merge-requests/1/head
thusithakalugamage 8 years ago
commit dc7bc22aa0

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

@ -29,6 +29,9 @@ function onRequest(context) {
permissions.ADD_POLICY = userModule.isAuthorized("/permission/admin/device-mgt/policies/manage");
permissions.ADD_ROLE = userModule.isAuthorized("/permission/admin/device-mgt/roles/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;
//TODO: Move enrollment URL into app-conf.json
viewModel.enrollmentURL = mdmProps.generalConfig.host + mdmProps.enrollmentDir;

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

Loading…
Cancel
Save