Add DEP management icon to navmenu

The DEP management page is formed once the iOS plugin has been deployed
within the IoT Home. Till then, any functionality with regards to DEP
management is not present within the server.
An icon in the navmenu allows users to access the DEP management page.

This commit includes the feature where the navmenu detects if the iOS
plugin has been deployed and accordingly displays the icon to access
the DEP management page.
revert-70aa11f8
n-jay 7 years ago
parent 280a63bdbd
commit 43feaf7bc7

@ -120,11 +120,13 @@
Certificate Configurations Certificate Configurations
</a> </a>
</li> </li>
<li> {{#unless iosPluginFlag}}
<a href="{{@app.context}}/dep/devices"><i class="fw fw-apple"></i> <li>
DEP Configurations <a href="{{@app.context}}/dep/devices"><i class="fw fw-apple"></i>
</a> DEP Configurations
</li> </a>
</li>
{{/unless}}
</ul> </ul>
</li> </li>

@ -28,6 +28,7 @@ function onRequest(context) {
} }
}); });
var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var mdmProps = require("/app/modules/conf-reader/main.js")["conf"]; var mdmProps = require("/app/modules/conf-reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var uiPermissions = userModule.getUIPermissions(); var uiPermissions = userModule.getUIPermissions();
@ -41,6 +42,17 @@ function onRequest(context) {
"device-mgt": [] "device-mgt": []
}; };
var typesListResponse = deviceModule.getDeviceTypesConfig();
var temp = [];
temp = typesListResponse["content"];
var iosPluginFlag = false;
temp.forEach(function(element) {
if (element["name"] == "ios") {
iosPluginFlag = true;
}
});
context["iosPluginFlag"] = iosPluginFlag;
// following context.link value comes here based on the value passed at the point // following context.link value comes here based on the value passed at the point
// where units are attached to a page zone. // where units are attached to a page zone.
// eg: {{unit "appbar" pageLink="users" title="User Management"}} // eg: {{unit "appbar" pageLink="users" title="User Management"}}

Loading…
Cancel
Save