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

@ -185,17 +185,17 @@ var InitiateViewOption = null;
$("#applications-list-container").html(content); $("#applications-list-container").html(content);
} else { } else {
$("#applications-list-container"). $("#applications-list-container").
html("<div class='message message-info'><h4><i class='icon fw fw-info'></i>No applications found.</h4>" + html("<div class='message message-info'><h4><i class='icon fw fw-info'></i>No applications found.</h4>" +
"<p>Please try refreshing the list in a while.</p></div>"); "<p>Please try refreshing the list in a while.</p></div>");
} }
} }
}, },
// error-callback // error-callback
function () { function () {
$("#applications-list-container"). $("#applications-list-container").
html("<div class='panel-body'><br><p class='fw-warning'>&nbsp;Loading application list " + html("<div class='panel-body'><br><p class='fw-warning'>&nbsp;Loading application list " +
"was not successful. please try refreshing the list in a while.<p></div>"); "was not successful. please try refreshing the list in a while.<p></div>");
}); });
}); });
} }
@ -251,50 +251,50 @@ var InitiateViewOption = null;
// error-callback // error-callback
function () { function () {
$("#policy-list-container"). $("#policy-list-container").
html("<div class='message message-warning'>" + html("<div class='message message-warning'>" +
"<h4 class='remove-margin'>" + "<h4 class='remove-margin'>" +
"<i class='icon fw fw-warning'></i>" + "<i class='icon fw fw-warning'></i>" +
"Loading policy compliance related data " + "Loading policy compliance related data " +
"was not successful. please try refreshing in a while." + "was not successful. please try refreshing in a while." +
"</h4>" + "</h4>" +
"</div>" + "</div>" +
"<p class='add-padding-5x'></p>" + "<p class='add-padding-5x'></p>" +
"<p class='add-padding-5x'></p>" + "<p class='add-padding-5x'></p>" +
"<p class='add-padding-5x'></p>" "<p class='add-padding-5x'></p>"
); );
} }
); );
} }
} else if ((jqXHR.status == 200 && !data)) { } else if ((jqXHR.status == 200 && !data)) {
$("#policy-spinner").addClass("hidden"); $("#policy-spinner").addClass("hidden");
$("#policy-list-container"). $("#policy-list-container").
html("<div class='message message-info'>" + html("<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>" +
"There is currently no effective policy applied for this device." + "There is currently no effective policy applied for this device." +
"</h4>" + "</h4>" +
"</div>" + "</div>" +
"<p class='add-padding-5x'></p>" + "<p class='add-padding-5x'></p>" +
"<p class='add-padding-5x'></p>" + "<p class='add-padding-5x'></p>" +
"<p class='add-padding-5x'></p>" "<p class='add-padding-5x'></p>"
); );
} }
}, },
// error-callback // error-callback
function () { function () {
$("#policy-spinner").addClass("hidden"); $("#policy-spinner").addClass("hidden");
$("#policy-list-container"). $("#policy-list-container").
html("<div class='message message-warning'>" + html("<div class='message message-warning'>" +
"<h4 class='remove-margin'>" + "<h4 class='remove-margin'>" +
"<i class='icon fw fw-warning'></i>" + "<i class='icon fw fw-warning'></i>" +
"Loading policy compliance related data " + "Loading policy compliance related data " +
"was not successful. please try refreshing in a while." + "was not successful. please try refreshing in a while." +
"</h4>" + "</h4>" +
"</div>" + "</div>" +
"<p class='add-padding-5x'></p>" + "<p class='add-padding-5x'></p>" +
"<p class='add-padding-5x'></p>" + "<p class='add-padding-5x'></p>" +
"<p class='add-padding-5x'></p>" "<p class='add-padding-5x'></p>"
); );
} }
); );
} }
@ -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">
@ -15,413 +16,463 @@
{{/if}} {{/if}}
</h1> </h1>
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;"> <div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
<div class="media"> <div class="media">
<div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2"> <div class="media-left media-middle asset-image col-xs-2 col-sm-2 col-md-2 col-lg-2">
<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
{{#defineZone "device-detail-properties"}} Overview
<table class="table table-responsive table-striped" id="members"> </div>
<tbody> {{#defineZone "device-detail-properties"}}
{{#if deviceView.deviceIdentifier}} <table class="table table-responsive table-striped" id="members">
<tr role="row" class="odd"> <tbody>
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Device ID</td> {{#if deviceView.deviceIdentifier}}
<td style="padding:10px 15px;">{{deviceView.deviceIdentifier}}</td>
</tr>
{{/if}}
{{#if deviceView.name}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Name</td>
<td style="padding:10px 15px;">{{deviceView.name}}</td>
</tr>
{{/if}}
{{#if deviceView.vendor}}
{{#if deviceView.model}}
<tr role="row" class="odd"> <tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Model</td> <td class="sorting_1" style="padding:10px 15px; width: 15%;">Device ID</td>
<td style="padding:10px 15px;">{{deviceView.vendor}} {{deviceView.model}}</td> <td style="padding:10px 15px;">{{deviceView.deviceIdentifier}}</td>
</tr> </tr>
{{/if}} {{/if}}
{{#if deviceView.name}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Name</td>
<td style="padding:10px 15px;">{{deviceView.name}}</td>
</tr>
{{/if}}
{{#if deviceView.vendor}}
{{#if deviceView.model}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Model</td>
<td style="padding:10px 15px;">{{deviceView.vendor}} {{deviceView.model}}</td>
</tr>
{{/if}}
{{/if}}
{{#if deviceView.status}}
<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}}
</td>
</tr>
{{/if}}
{{#if deviceView.owner}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Owner</td>
<td style="padding:10px 15px;">{{deviceView.owner}}</td>
</tr>
{{/if}}
{{#if deviceView.ownership}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Ownership</td>
<td style="padding:10px 15px;">{{deviceView.ownership}}</td>
</tr>
{{/if}}
{{#if deviceView.imei}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">IMEI</td>
<td style="padding:10px 15px;">{{deviceView.imei}}</td>
</tr>
{{/if}}
{{#if deviceView.udid}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">UDID</td>
<td style="padding:10px 15px;">{{deviceView.udid}}</td>
</tr>
{{/if}}
{{#if deviceView.osBuildDate}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build
Date
</td>
<td style="padding:10px 15px;">{{deviceView.osBuildDate}}</td>
</tr>
{{/if}}
{{#if deviceView.phoneNumber}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Phone Number</td>
<td style="padding:10px 15px;">{{deviceView.phoneNumber}}</td>
</tr>
{{/if}}
{{#if deviceView.lastUpdatedTime}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Last Update</td>
<td style="padding:10px 15px;">{{deviceView.lastUpdatedTime}}</td>
</tr>
{{/if}}
</tbody>
</table>
{{/defineZone}}
<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>
</div>
</div>
<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">
<i class="icon fw fw-mobile"></i><span class="hidden-sm">Device Details</span>
</a>
</li>
{{/if}} {{/if}}
{{#if deviceView.status}} {{#if deviceView.isNotWindows}}
<tr role="row" class="even"> <li role="presentation" class="list-group-item">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Status</td> {{else}}
<td style="padding:10px 15px;"> <li role="presentation" class="list-group-item active">
{{#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}}
{{#if deviceView.owner}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Owner</td>
<td style="padding:10px 15px;">{{deviceView.owner}}</td>
</tr>
{{/if}}
{{#if deviceView.ownership}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Ownership</td>
<td style="padding:10px 15px;">{{deviceView.ownership}}</td>
</tr>
{{/if}}
{{#if deviceView.imei}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">IMEI</td>
<td style="padding:10px 15px;">{{deviceView.imei}}</td>
</tr>
{{/if}}
{{#if deviceView.udid}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">UDID</td>
<td style="padding:10px 15px;">{{deviceView.udid}}</td>
</tr>
{{/if}}
{{#if deviceView.osBuildDate}}
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Firmware Build Date</td>
<td style="padding:10px 15px;">{{deviceView.osBuildDate}}</td>
</tr>
{{/if}}
{{#if deviceView.phoneNumber}}
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Phone Number</td>
<td style="padding:10px 15px;">{{deviceView.phoneNumber}}</td>
</tr>
{{/if}} {{/if}}
{{#if deviceView.lastUpdatedTime}} <li role="presentation" class="list-group-item">
<tr role="row" class="even"> <a href="#policy_compliance_tab" role="tab" data-toggle="tab"
<td class="sorting_1" style="padding:10px 15px; width: 15%;">Last Update</td> aria-controls="policy_compliance_tab">
<td style="padding:10px 15px;">{{deviceView.lastUpdatedTime}}</td> <i class="icon fw fw-policy"></i><span class="hidden-sm">Policy Compliance</span>
</tr> </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>
</a>
</li>
<li role="presentation" class="list-group-item">
<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}} {{/if}}
</tbody> <li role="presentation" class="list-group-item">
</table> <a href="#event_log_tab" role="tab" data-toggle="tab" aria-controls="event_log_tab">
{{/defineZone}} <i class="icon fw fw-text"></i><span class="hidden-sm">Operations Log</span>
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Operations</div> </a>
<div class="add-margin-top-4x"> </li>
{{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}} </ul>
</div> </div>
</div> {{#defineZone "device-detail-properties"}}
</div> <div class="media-body add-padding-left-5x remove-padding-xs">
<div class="media tab-responsive"> <div class="panel-group tab-content remove-padding" id="tabs" role="tablist"
<div class="media-left col-xs-1 col-sm-1 col-md-2 col-lg-2 hidden-xs"> aria-multiselectable="true">
<ul class="list-group nav nav-pills nav-stacked" role="tablist"> <div class="arrow-left hidden-xs"></div>
<li role="presentation" class="list-group-item active">
<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>
<li role="presentation" class="list-group-item">
<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>
<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>
</a>
</li>
<li role="presentation" class="list-group-item">
<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>
<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>
</a>
</li>
</ul>
</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="arrow-left hidden-xs"></div>
<div class="panel panel-default" role="tabpanel" id="device_details_tab"> {{#if deviceView.isNotWindows}}
<div class="panel-heading visible-xs collapsed" id="device_details"> <div class="panel panel-default" role="tabpanel" id="device_details_tab">
<h4 class="panel-title"> <div class="panel-heading visible-xs collapsed" id="device_details">
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> <h4 class="panel-title">
<i class="fw fw-mobile fw-2x"></i> <a role="button" data-toggle="collapse" data-parent="#tabs"
Device Details href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="caret-updown fw fw-down"></i> <i class="fw fw-mobile fw-2x"></i>
</a> Device Details
</h4> <i class="caret-updown fw fw-down"></i>
</div> </a>
<div class="panel-heading display-none-xs">Device Details</div> </h4>
<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>
</div>
{{/equal}}
{{#if deviceView.deviceInfoAvailable}}
{{#if deviceView.BatteryLevel}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<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-stats">
{{deviceView.BatteryLevel.value}} %
</div>
</div>
</div>
</div>
</div> </div>
{{/if}} <div class="panel-heading display-none-xs">Device Details</div>
<!--{{#if deviceView.cpuUsage}}--> <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"
<!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">--> aria-labelledby="device_details">
<!--<div class="col-md-12">--> <div class="panel-body ">
<!--<div class="wr-stats-board-tile">--> <div class="device-detail-body">
<!--<div class="tile-name">CPU Usage</div>--> <!-- device summary -->
<!--<div>--> {{#equal deviceView.deviceType "windows"}}
<div class="message message-info">
<h4 class="remove-margin"><i class="icon fw fw-info"></i>Not
available yet</h4>
</div>
{{/equal}}
{{#if deviceView.deviceInfoAvailable}}
{{#if deviceView.BatteryLevel}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12">
<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-stats">
{{deviceView.BatteryLevel.value}} %
</div>
</div>
</div>
</div>
</div>
{{/if}}
<!--{{#if deviceView.cpuUsage}}-->
<!--<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">-->
<!--<div class="col-md-12">-->
<!--<div class="wr-stats-board-tile">-->
<!--<div class="tile-name">CPU Usage</div>-->
<!--<div>-->
<!--<div class="tile-icon"><i class="fw fw-dashboard"></i></div>--> <!--<div class="tile-icon"><i class="fw fw-dashboard"></i></div>-->
<!--<div class="tile-stats">--> <!--<div class="tile-stats">-->
<!--{{deviceView.cpuUsage.value}} %--> <!--{{deviceView.cpuUsage.value}} %-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!--{{/if}}--> <!--{{/if}}-->
{{#if deviceView.ramUsage}} {{#if deviceView.ramUsage}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12"> <div class="col-md-12">
<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
<div class="tile-stats"> class="fw fw-hardware"></i></div>
{{deviceView.ramUsage.value}} % <div class="tile-stats">
</div> {{deviceView.ramUsage.value}} %
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{/if}} </div>
{{#if deviceView.internalMemory}} {{/if}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> {{#if deviceView.internalMemory}}
<div class="col-md-12"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="wr-stats-board-tile"> <div class="col-md-12">
<div class="tile-name">Local Storage</div> <div class="wr-stats-board-tile">
<div> <div class="tile-name">Local Storage</div>
<div class="tile-icon"><i class="fw fw-hdd"></i></div> <div>
<div class="tile-stats"> <div class="tile-icon"><i
{{deviceView.internalMemory.usage}} % class="fw fw-hdd"></i>
<span class="tile-stats-free"> </div>
<div class="tile-stats">
{{deviceView.internalMemory.usage}} %
<span class="tile-stats-free">
TOTAL OF {{deviceView.internalMemory.total}} GB TOTAL OF {{deviceView.internalMemory.total}} GB
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{/if}} {{/if}}
{{#if deviceView.externalMemory}} {{#if deviceView.externalMemory}}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div class="col-md-12"> <div class="col-md-12">
<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
<div class="tile-stats"> class="fw fw-usb-drive"></i></div>
{{deviceView.externalMemory.usage}} % <div class="tile-stats">
<span class="tile-stats-free"> {{deviceView.externalMemory.usage}} %
<span class="tile-stats-free">
TOTAL OF {{deviceView.externalMemory.total}} GB TOTAL OF {{deviceView.externalMemory.total}} GB
</span> </span>
</div>
</div>
</div>
</div>
</div>
{{/if}}
{{else}}
<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.
</h4>
</div> </div>
</div> {{/if}}
</div> </div>
</div> </div>
</div> </div>
{{/if}}
{{else}}
<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.
</h4>
</div> </div>
{{/if}} {{/if}}
</div>
</div> <div class="panel panel-default visible-xs-block" role="tabpanel"
</div> id="policy_compliance_tab">
</div> <div class="panel-heading visible-xs collapsed" id="policy_compliance">
<div class="panel panel-default visible-xs-block" role="tabpanel" id="policy_compliance_tab"> <h4 class="panel-title">
<div class="panel-heading visible-xs collapsed" id="policy_compliance"> <a role="button"
<h4 class="panel-title"> data-toggle="collapse" data-parent="#tabs" href="#collapseTwo"
<a role="button" 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> </a>
</a> </h4>
</h4> </div>
</div> <div class="panel-heading display-none-xs">
<div class="panel-heading display-none-xs"> Policy Compliance
Policy Compliance &nbsp;&nbsp;
&nbsp;&nbsp; <span>
<span>
<a href="javascript:void(0);" id="refresh-policy"> <a href="javascript:void(0);" id="refresh-policy">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</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"
<div class="panel-body "> aria-labelledby="policy_compliance">
<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">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</a> </a>
</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
</div> Compliance...
<div id="policy-list-container"> </div>
</div> <div id="policy-list-container">
</div> </div>
</div> </div>
</div> </div>
<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">
<i class="fw fw-map-location fw-2x"></i>
Device Location
<i class="caret-updown fw fw-down"></i>
</a>
</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 class="panel-body">
{{#if deviceView.location}}
<div id="device-location"
data-lat="{{deviceView.location.latitude}}"
data-long="{{deviceView.location.longitude}}">
</div> </div>
{{else}} <div class="panel panel-default visible-xs-block" role="tabpanel"
<div id="map-error" class="message message-warning"> id="device_location_tab">
<h4 class="remove-margin"> <div class="panel-heading visible-xs collapsed" id="device_location">
<i class="icon fw fw-warning"></i> <h4 class="panel-title">
&nbsp;Device location information is not available. <a role="button" data-toggle="collapse" data-parent="#tabs"
</h4> 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>
</a>
</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 class="panel-body">
{{#if deviceView.location}}
<div id="device-location"
data-lat="{{deviceView.location.latitude}}"
data-long="{{deviceView.location.longitude}}">
</div>
{{else}}
<div id="map-error" class="message message-warning">
<h4 class="remove-margin">
<i class="icon fw fw-warning"></i>
&nbsp;Device location information is not available.
</h4>
</div>
<p class="add-padding-5x"></p>
<p class="add-padding-5x"></p>
<p class="add-padding-5x"></p>
{{/if}}
</div>
</div>
</div> </div>
<p class="add-padding-5x"></p> <div class="panel panel-default visible-xs-block" role="tabpanel"
<p class="add-padding-5x"></p> id="installed_applications_tab">
<p class="add-padding-5x"></p> <div class="panel-heading visible-xs collapsed" id="installed_applications">
{{/if}} <h4 class="panel-title">
</div> <a role="button" data-toggle="collapse" data-parent="#tabs"
</div> href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
</div> <i class="fw fw-application fw-2x"></i>
<div class="panel panel-default visible-xs-block" role="tabpanel" id="installed_applications_tab"> Installed Applications
<div class="panel-heading visible-xs collapsed" id="installed_applications"> <i class="caret-updown fw fw-down"></i>
<h4 class="panel-title"> </a>
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour"> </h4>
<i class="fw fw-application fw-2x"></i> </div>
Installed Applications <div class="panel-heading display-none-xs">
<i class="caret-updown fw fw-down"></i> Installed Applications
</a> &nbsp;&nbsp;
</h4> <span>
</div>
<div class="panel-heading display-none-xs">
Installed Applications
&nbsp;&nbsp;
<span>
<a href="javascript:void(0);" id="refresh-apps"> <a href="javascript:void(0);" id="refresh-apps">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</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"
<div class="panel-body"> aria-labelledby="installed_applications">
<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">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</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
</div> List...
<div id="applications-list-container"> </div>
<div class="message message-info"> <div id="applications-list-container">
<h4> <div class="message message-info">
<i class="icon fw fw-info"></i> <h4>
No applications found. <i class="icon fw fw-info"></i>
</h4> No applications found.
<p>Please try refreshing in a while.</p> </h4>
<p>Please try refreshing in a while.</p>
</div>
</div>
</div>
</div>
</div> </div>
</div> <div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab">
</div> <div class="panel-heading visible-xs collapsed" id="event_log">
</div> <h4 class="panel-title">
</div> <a role="button" data-toggle="collapse" data-parent="#tabs"
<div class="panel panel-default visible-xs-block" role="tabpanel" id="event_log_tab"> href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
<div class="panel-heading visible-xs collapsed" id="event_log"> <i class="fw fw-text fw-2x"></i>
<h4 class="panel-title"> Operations Log
<a role="button" data-toggle="collapse" data-parent="#tabs" href="#collapseFive" aria-expanded="true" aria-controls="collapseFive"> <i class="caret-updown fw fw-down"></i>
<i class="fw fw-text fw-2x"></i> </a>
Operations Log </h4>
<i class="caret-updown fw fw-down"></i> </div>
</a> <div class="panel-heading display-none-xs">
</h4> Operations Log
</div> &nbsp;&nbsp;
<div class="panel-heading display-none-xs"> <span>
Operations Log
&nbsp;&nbsp;
<span>
<a href="javascript:void(0);" id="refresh-operations"> <a href="javascript:void(0);" id="refresh-operations">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</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"
<div class="panel-body"> aria-labelledby="event_log">
<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">
<i class="fw fw-refresh"></i> <i class="fw fw-refresh"></i>
</a> </a>
</span> </span>
<div id="operations-spinner" class="wr-advance-operations-init hidden"> <div id="operations-spinner" class="wr-advance-operations-init hidden">
<i class="fw fw-settings fw-spin fw-2x"></i> Loading Operations Log... <i class="fw fw-settings fw-spin fw-2x"></i> Loading Operations Log...
</div> </div>
<div id="operations-log-container"> <div id="operations-log-container">
<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>
There are no operations, performed yet on this device. There are no operations, performed yet on this device.
</h4> </h4>
</div>
</div>
<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>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div> </div>
</div> </div>
<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>
<th>Status</th>
<th>Request created at</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div> </div>
</div> {{/defineZone}}
</div>
</div>
</div> </div>
{{/defineZone}}
</div>
</div> </div>
{{else}} {{else}}
<h1 class="page-sub-title"> <h1 class="page-sub-title">

@ -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"];
@ -139,7 +144,7 @@ function onRequest(context) {
} }
if (filteredDeviceData["latestDeviceInfo"]["updatedTime"]) { if (filteredDeviceData["latestDeviceInfo"]["updatedTime"]) {
viewModel["lastUpdatedTime"] = filteredDeviceData["latestDeviceInfo"]["updatedTime"]. viewModel["lastUpdatedTime"] = filteredDeviceData["latestDeviceInfo"]["updatedTime"].
substr(0, filteredDeviceData["latestDeviceInfo"]["updatedTime"].indexOf("+")); substr(0, filteredDeviceData["latestDeviceInfo"]["updatedTime"].indexOf("+"));
} }
viewModel["BatteryLevel"] = {}; viewModel["BatteryLevel"] = {};
viewModel["BatteryLevel"]["value"] = filteredDeviceData["latestDeviceInfo"]["batteryLevel"]; viewModel["BatteryLevel"]["value"] = filteredDeviceData["latestDeviceInfo"]["batteryLevel"];
@ -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