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, addConfigAPI,
addConfigFormData, addConfigFormData,
function (data, textStatus, jqXHR) { function (data, textStatus, jqXHR) {
data = JSON.parse(data);
if (jqXHR.status == 201) {
$("#config-save-form").addClass("hidden"); $("#config-save-form").addClass("hidden");
$("#record-created-msg").removeClass("hidden"); $("#record-created-msg").removeClass("hidden");
}
}, function (data) { }, function (data) {
if (data.status == 500) { if (data.status == 500) {

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

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

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