thusithakalugamage 8 years ago
commit dc7bc22aa0

@ -19,15 +19,15 @@
{{unit "cdmf.unit.lib.qrcode"}} {{unit "cdmf.unit.lib.qrcode"}}
{{unit "mdm.unit.device.qr-modal"}} {{unit "mdm.unit.device.qr-modal"}}
{{#zone "content"}} {{#zone "content"}}
{{#if permissions.LIST_DEVICES}} {{#if permissions.LIST_DEVICES}}
<div class="row "> <div class="row ">
<div class="col-md-3 wr-stats-board"> <div class="col-md-3 wr-stats-board">
<div class="wr-stats-board-tile"> <div class="wr-stats-board-tile">
<div class="tile-name">Devices</div> <div class="tile-name">Devices</div>
<div> <div>
<div class="tile-icon"><i class="fw fw-mobile"></i></div> <div class="tile-icon"><i class="fw fw-mobile"></i></div>
<div class="tile-stats"> <div class="tile-stats">
<span id="device-count" data-device-count="true">Loading...</span> <span id="device-count" data-device-count="true">Loading...</span>
<span class="tile-stats-free"> <span class="tile-stats-free">
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
<a id="device-count-view-btn" href="{{@app.context}}/devices"> <a id="device-count-view-btn" href="{{@app.context}}/devices">
@ -37,27 +37,29 @@
</span> </span>
View View
</a> </a>
<a href="javascript:toggleEnrollment()"> {{#if permissions.ENROLL_DEVICE)}}
<a href="javascript:toggleEnrollment()">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i> <i class="fw fw-add fw-stack-1x"></i>
</span> </span>
Add Add
</a> </a>
{{/if}}
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
{{/if}} </div>
{{# if permissions.LIST_POLICIES}} {{/if}}
<div class="col-md-3 wr-stats-board"> {{# if permissions.LIST_POLICIES}}
<div class="wr-stats-board-tile"> <div class="col-md-3 wr-stats-board">
<div class="tile-name">Policies</div> <div class="wr-stats-board-tile">
<div> <div class="tile-name">Policies</div>
<div class="tile-icon"><i class="fw fw-policy"></i></div> <div>
<div class="tile-stats"> <div class="tile-icon"><i class="fw fw-policy"></i></div>
<span id="policy-count" data-policy-count="true">Loading...</span> <div class="tile-stats">
<span id="policy-count" data-policy-count="true">Loading...</span>
<span class="tile-stats-free"> <span class="tile-stats-free">
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
<a id="policy-count-view-btn" href="{{@app.context}}/policies/"> <a id="policy-count-view-btn" href="{{@app.context}}/policies/">
@ -78,19 +80,19 @@
</a> </a>
{{/if}} {{/if}}
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
{{/if}} </div>
{{# if permissions.LIST_USERS}} {{/if}}
<div class="col-md-3 wr-stats-board"> {{# if permissions.LIST_USERS}}
<div class="wr-stats-board-tile"> <div class="col-md-3 wr-stats-board">
<div class="tile-name">Users</div> <div class="wr-stats-board-tile">
<div> <div class="tile-name">Users</div>
<div class="tile-icon"><i class="fw fw-user"></i></div> <div>
<div class="tile-stats"> <div class="tile-icon"><i class="fw fw-user"></i></div>
<span id="user-count" data-user-count="true">Loading...</span> <div class="tile-stats">
<span id="user-count" data-user-count="true">Loading...</span>
<span class="tile-stats-free"> <span class="tile-stats-free">
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
<a id="user-count-view-btn" href="{{@app.context}}/users/"> <a id="user-count-view-btn" href="{{@app.context}}/users/">
@ -111,19 +113,19 @@
</a> </a>
{{/if}} {{/if}}
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
{{/if}} </div>
{{# if permissions.LIST_ROLES}} {{/if}}
<div class="col-md-3 wr-stats-board"> {{# if permissions.LIST_ROLES}}
<div class="wr-stats-board-tile"> <div class="col-md-3 wr-stats-board">
<div class="tile-name">Roles</div> <div class="wr-stats-board-tile">
<div> <div class="tile-name">Roles</div>
<div class="tile-icon"><i class="fw fw-bookmark"></i></div> <div>
<div class="tile-stats"> <div class="tile-icon"><i class="fw fw-bookmark"></i></div>
<span id="role-count" data-role-count="true">Loading...</span> <div class="tile-stats">
<span id="role-count" data-role-count="true">Loading...</span>
<span class="tile-stats-free"> <span class="tile-stats-free">
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
<a id="device-count-view-btn" href="{{@app.context}}/roles"> <a id="device-count-view-btn" href="{{@app.context}}/roles">
@ -144,12 +146,12 @@
</a> </a>
{{/if}} {{/if}}
</span> </span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{/if}} </div>
{{/if}}
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}
{{js "js/dashboard.js"}} {{js "js/dashboard.js"}}

@ -29,6 +29,9 @@ function onRequest(context) {
permissions.ADD_POLICY = userModule.isAuthorized("/permission/admin/device-mgt/policies/manage"); permissions.ADD_POLICY = userModule.isAuthorized("/permission/admin/device-mgt/policies/manage");
permissions.ADD_ROLE = userModule.isAuthorized("/permission/admin/device-mgt/roles/manage"); permissions.ADD_ROLE = userModule.isAuthorized("/permission/admin/device-mgt/roles/manage");
permissions.ADD_USER = userModule.isAuthorized("/permission/admin/device-mgt/users/manage"); permissions.ADD_USER = userModule.isAuthorized("/permission/admin/device-mgt/users/manage");
if (userModule.isAuthorized("/permission/admin/device-mgt/devices/enroll/ios") | userModule.isAuthorized("/permission/admin/devices/enroll/android") | userModule.isAuthorized("/permission/admin/device-mgt/devices/enroll/windows") ){
permissions.ENROLL_DEVICE = true;
}
viewModel.permissions = permissions; viewModel.permissions = permissions;
//TODO: Move enrollment URL into app-conf.json //TODO: Move enrollment URL into app-conf.json
viewModel.enrollmentURL = mdmProps.generalConfig.host + mdmProps.enrollmentDir; viewModel.enrollmentURL = mdmProps.generalConfig.host + mdmProps.enrollmentDir;

@ -110,7 +110,7 @@ function loadOperationBar(deviceType) {
var successCallback = function (data) { var successCallback = function (data) {
var permittedOperations = []; var permittedOperations = [];
var i; var i;
var permissionList = JSON.parse($("#operations-mod").data("permissions")); var permissionList = $("#operations-mod").data("permissions");
var totalFeatures = JSON.parse(data); var totalFeatures = JSON.parse(data);
for (i = 0; i < permissionList[deviceType].length; i++) { for (i = 0; i < permissionList[deviceType].length; i++) {
var j; var j;

Loading…
Cancel
Save