Fixes for the ui isuess in EMM 2.2.0-beta

revert-dabc3590
kamidu 8 years ago
parent 5936884c16
commit 22ec7aa695

@ -227,11 +227,8 @@ $(document).ready(function () {
addConfigAPI,
addConfigFormData,
function (data, textStatus, jqXHR) {
data = JSON.parse(data);
if (jqXHR.status == 201) {
$("#config-save-form").addClass("hidden");
$("#record-created-msg").removeClass("hidden");
}
}, function (data) {
if (data.status == 500) {

@ -309,6 +309,10 @@ var InitiateViewOption = null;
loadApplicationsList();
loadPolicyCompliance();
if ($("#device_details_tab").length == 0) {
$(".device-detail-body").addClass("hidden");
}
$("#refresh-policy").click(function () {
$("#policy-spinner").removeClass("hidden");
loadPolicyCompliance();

@ -6,7 +6,8 @@
{{#if deviceFound}}
{{#if isAuthorized}}
<h1 class="page-sub-title device-id device-select"
data-deviceid="{{deviceView.deviceIdentifier}}" data-type="{{deviceView.deviceType}}" data-ownership="{{deviceView.ownership}}">
data-deviceid="{{deviceView.deviceIdentifier}}" data-type="{{deviceView.deviceType}}"
data-ownership="{{deviceView.ownership}}">
Device {{deviceView.name}}
{{#if deviceView.model}}
<span class="lbl-device">
@ -20,7 +21,9 @@
<div class="thumbnail icon"><i class="square-element text fw fw-mobile"></i></div>
</div>
<div class="media-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Device Overview</div>
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Device
Overview
</div>
{{#defineZone "device-detail-properties"}}
<table class="table table-responsive table-striped" id="members">
<tbody>
@ -48,10 +51,14 @@
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td>
<td style="padding:10px 15px;">
{{#equal deviceView.status "ACTIVE"}}<span><i class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Active</span>{{/equal}}
{{#equal deviceView.status "INACTIVE"}}<span><i class="fw fw-warning icon-warning"></i>&nbsp;&nbsp;Inactive</span>{{/equal}}
{{#equal deviceView.status "BLOCKED"}}<span><i class="fw fw-remove icon-danger"></i>&nbsp;&nbsp;Blocked</span>{{/equal}}
{{#equal deviceView.status "REMOVED"}}<span><i class="fw fw-delete icon-danger"></i>&nbsp;&nbsp;Removed</span>{{/equal}}
{{#equal deviceView.status "ACTIVE"}}<span><i
class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Active</span>{{/equal}}
{{#equal deviceView.status "INACTIVE"}}<span><i
class="fw fw-warning icon-warning"></i>&nbsp;&nbsp;Inactive</span>{{/equal}}
{{#equal deviceView.status "BLOCKED"}}<span><i
class="fw fw-remove icon-danger"></i>&nbsp;&nbsp;Blocked</span>{{/equal}}
{{#equal deviceView.status "REMOVED"}}<span><i
class="fw fw-delete icon-danger"></i>&nbsp;&nbsp;Removed</span>{{/equal}}
</td>
</tr>
{{/if}}
@ -81,7 +88,9 @@
{{/if}}
{{#if deviceView.osBuildDate}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build Date</td>
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build
Date
</td>
<td style="padding:10px 15px;">{{deviceView.osBuildDate}}</td>
</tr>
{{/if}}
@ -100,7 +109,9 @@
</tbody>
</table>
{{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Operations</div>
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Operations {{deviceView.isNotWindows}}
</div>
<div class="add-margin-top-4x">
{{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}}
</div>
@ -109,29 +120,42 @@
<div class="media tab-responsive">
<div class="media-left col-xs-1 col-sm-1 col-md-2 col-lg-2 hidden-xs">
<ul class="list-group nav nav-pills nav-stacked" role="tablist">
{{#if deviceView.isNotWindows}}
<li role="presentation" class="list-group-item active">
<a href="#device_details_tab" role="tab" data-toggle="tab" aria-controls="device_details_tab">
<a href="#device_details_tab" role="tab" data-toggle="tab"
aria-controls="device_details_tab">
<i class="icon fw fw-mobile"></i><span class="hidden-sm">Device Details</span>
</a>
</li>
{{/if}}
{{#if deviceView.isNotWindows}}
<li role="presentation" class="list-group-item">
{{else}}
<li role="presentation" class="list-group-item active">
{{/if}}
<li role="presentation" class="list-group-item">
<a href="#policy_compliance_tab" role="tab" data-toggle="tab" aria-controls="policy_compliance_tab">
<a href="#policy_compliance_tab" role="tab" data-toggle="tab"
aria-controls="policy_compliance_tab">
<i class="icon fw fw-policy"></i><span class="hidden-sm">Policy Compliance</span>
</a>
</li>
{{#if deviceView.isNotWindows}}
<li role="presentation" class="list-group-item">
<a href="#device_location_tab" role="tab" data-toggle="tab"
data-lat="{{deviceView.location.latitude}}"
data-long="{{deviceView.location.longitude}}"
aria-controls="device_location_tab">
<i class="icon fw fw-map-location"></i><span class="hidden-sm">Device Location</span>
<i class="icon fw fw-map-location"></i><span
class="hidden-sm">Device Location</span>
</a>
</li>
<li role="presentation" class="list-group-item">
<a href="#installed_applications_tab" role="tab" data-toggle="tab" aria-controls="installed_applications_tab">
<a href="#installed_applications_tab" role="tab" data-toggle="tab"
aria-controls="installed_applications_tab">
<i class="icon fw fw-application"></i><span class="hidden-sm">Installed Applications</span>
</a>
</li>
{{/if}}
<li role="presentation" class="list-group-item">
<a href="#event_log_tab" role="tab" data-toggle="tab" aria-controls="event_log_tab">
<i class="icon fw fw-text"></i><span class="hidden-sm">Operations Log</span>
@ -141,13 +165,16 @@
</div>
{{#defineZone "device-detail-properties"}}
<div class="media-body add-padding-left-5x remove-padding-xs">
<div class="panel-group tab-content remove-padding" id="tabs" role="tablist" aria-multiselectable="true">
<div class="panel-group tab-content remove-padding" id="tabs" role="tablist"
aria-multiselectable="true">
<div class="arrow-left hidden-xs"></div>
{{#if deviceView.isNotWindows}}
<div class="panel panel-default" role="tabpanel" id="device_details_tab">
<div class="panel-heading visible-xs collapsed" id="device_details">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="fw fw-mobile fw-2x"></i>
Device Details
<i class="caret-updown fw fw-down"></i>
@ -155,13 +182,15 @@
</h4>
</div>
<div class="panel-heading display-none-xs">Device Details</div>
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="device_details">
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="device_details">
<div class="panel-body ">
<div class="device-detail-body">
<!-- device summary -->
{{#equal deviceView.deviceType "windows"}}
<div class="message message-info">
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not available yet</h4>
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not
available yet</h4>
</div>
{{/equal}}
{{#if deviceView.deviceInfoAvailable}}
@ -171,7 +200,8 @@
<div class="wr-stats-board-tile">
<div class="tile-name">BATTERY</div>
<div>
<div class="tile-icon"><i class="fw fw-battery"></i></div>
<div class="tile-icon"><i
class="fw fw-battery"></i></div>
<div class="tile-stats">
{{deviceView.BatteryLevel.value}} %
</div>
@ -201,7 +231,8 @@
<div class="wr-stats-board-tile">
<div class="tile-name">RAM Usage</div>
<div>
<div class="tile-icon"><i class="fw fw-hardware"></i></div>
<div class="tile-icon"><i
class="fw fw-hardware"></i></div>
<div class="tile-stats">
{{deviceView.ramUsage.value}} %
</div>
@ -216,7 +247,9 @@
<div class="wr-stats-board-tile">
<div class="tile-name">Local Storage</div>
<div>
<div class="tile-icon"><i class="fw fw-hdd"></i></div>
<div class="tile-icon"><i
class="fw fw-hdd"></i>
</div>
<div class="tile-stats">
{{deviceView.internalMemory.usage}} %
<span class="tile-stats-free">
@ -234,7 +267,8 @@
<div class="wr-stats-board-tile">
<div class="tile-name">External Storage</div>
<div>
<div class="tile-icon"><i class="fw fw-usb-drive"></i></div>
<div class="tile-icon"><i
class="fw fw-usb-drive"></i></div>
<div class="tile-stats">
{{deviceView.externalMemory.usage}} %
<span class="tile-stats-free">
@ -250,7 +284,8 @@
<div class="message message-info">
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
Battery, RAM and Storage related information are not available yet.
Battery, RAM and Storage related information are not
available yet.
</h4>
</div>
{{/if}}
@ -258,11 +293,15 @@
</div>
</div>
</div>
<div class="panel panel-default visible-xs-block" role="tabpanel" id="policy_compliance_tab">
{{/if}}
<div class="panel panel-default visible-xs-block" role="tabpanel"
id="policy_compliance_tab">
<div class="panel-heading visible-xs collapsed" id="policy_compliance">
<h4 class="panel-title">
<a role="button"
data-toggle="collapse" data-parent="#tabs" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
data-toggle="collapse" data-parent="#tabs" href="#collapseTwo"
aria-expanded="true" aria-controls="collapseTwo">
<i class="fw fw-policy fw-2x"></i>
Policy Compliance
<i class="caret-updown fw fw-down"></i>
@ -278,7 +317,8 @@
</a>
</span>
</div>
<div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="policy_compliance">
<div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="policy_compliance">
<div class="panel-body ">
<span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-policy">
@ -287,17 +327,20 @@
</span>
<div id="policy-spinner"
class="wr-advance-operations-init add-padding-bottom-2x add-padding-bottom-4x hidden">
<i class="fw fw-settings fw-spin fw-2x"></i>&nbsp;&nbsp;Loading Policy Compliance...
<i class="fw fw-settings fw-spin fw-2x"></i>&nbsp;&nbsp;Loading Policy
Compliance...
</div>
<div id="policy-list-container">
</div>
</div>
</div>
</div>
<div class="panel panel-default visible-xs-block" role="tabpanel" id="device_location_tab">
<div class="panel panel-default visible-xs-block" role="tabpanel"
id="device_location_tab">
<div class="panel-heading visible-xs collapsed" id="device_location">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
<a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
<i class="fw fw-map-location fw-2x"></i>
Device Location
<i class="caret-updown fw fw-down"></i>
@ -305,7 +348,8 @@
</h4>
</div>
<div class="panel-heading display-none-xs">Device Location</div>
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="device_location">
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="device_location">
<div class="panel-body">
{{#if deviceView.location}}
<div id="device-location"
@ -326,10 +370,12 @@
</div>
</div>
</div>
<div class="panel panel-default visible-xs-block" role="tabpanel" id="installed_applications_tab">
<div class="panel panel-default visible-xs-block" role="tabpanel"
id="installed_applications_tab">
<div class="panel-heading visible-xs collapsed" id="installed_applications">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
<a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
<i class="fw fw-application fw-2x"></i>
Installed Applications
<i class="caret-updown fw fw-down"></i>
@ -345,7 +391,8 @@
</a>
</span>
</div>
<div id="collapseFour" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="installed_applications">
<div id="collapseFour" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="installed_applications">
<div class="panel-body">
<span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-apps">
@ -353,7 +400,8 @@
</a>
</span>
<div id="apps-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Applications List...
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Applications
List...
</div>
<div id="applications-list-container">
<div class="message message-info">
@ -370,7 +418,8 @@
<div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab">
<div class="panel-heading visible-xs collapsed" id="event_log">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
<a role="button" data-toggle="collapse" data-parent="#tabs"
href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
<i class="fw fw-text fw-2x"></i>
Operations Log
<i class="caret-updown fw fw-down"></i>
@ -386,7 +435,8 @@
</a>
</span>
</div>
<div id="collapseFive" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="event_log">
<div id="collapseFive" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="event_log">
<div class="panel-body">
<span class="visible-xs add-padding-2x text-right">
<a href="javascript:void(0);" id="refresh-operations">
@ -404,7 +454,8 @@
</h4>
</div>
</div>
<table class="table table-striped table-hover table-bordered display data-table" id="operations-log-table">
<table class="table table-striped table-hover table-bordered display data-table"
id="operations-log-table">
<thead>
<tr class="sort-row">
<th>Operation Code</th>

@ -21,6 +21,7 @@ function onRequest(context) {
var deviceType = context["uriParams"]["deviceType"];
var deviceId = request.getParameter("id");
var deviceViewData = {};
var log = new Log("new log");
if (deviceType && deviceId) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
@ -35,6 +36,10 @@ function onRequest(context) {
var viewModel = {};
if (filteredDeviceData["type"]) {
viewModel["deviceType"] = filteredDeviceData["type"];
viewModel.isNotWindows = true;
if (viewModel["deviceType"] == "windows") {
viewModel.isNotWindows = false;
}
}
if (filteredDeviceData["deviceIdentifier"]) {
viewModel["deviceIdentifier"] = filteredDeviceData["deviceIdentifier"];
@ -195,6 +200,6 @@ function onRequest(context) {
} else {
deviceViewData["deviceFound"] = false;
}
log.error(stringify(deviceViewData));
return deviceViewData;
}
Loading…
Cancel
Save