Milan Perera 8 years ago
commit 2bda72a5ce

@ -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) {

@ -21,9 +21,9 @@
* when a user clicks on the list item
* initial mode and with out select mode.
*/
function InitiateViewOption(url) {
function InitiateViewOption() {
if ($(".select-enable-btn").text() == "Select") {
$(location).attr('href', url);
$(location).attr('href', $(this).data("url"));
}
}
@ -148,7 +148,7 @@ function loadDevices() {
if (row.status != 'REMOVED') {
url = "device/" + deviceType + "?id=" + deviceIdentifier;
}
return '<div onclick="javascript:InitiateViewOption(\'' + url + '\')" class="thumbnail icon">' +
return '<div class=" viewEnabledIcon thumbnail icon" data-url="' + url + '">' +
'<i class="square-element text fw fw-mobile"></i>' +
'</div>'
}

@ -25,12 +25,13 @@ var InitiateViewOption = null;
var ownership = deviceId.data("ownership");
var operationTable;
positionArrow($(".media .list-group-item.active"),"#device_details_tab");
$(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) {
var activeTabPane = $(e.target).attr("href");
var activeListGroupItem = $(".media .list-group-item.active");
$(activeTabPane).removeClass("visible-xs-block");
$(activeTabPane).siblings().not(".arrow-left").addClass("visible-xs-block");
positionArrow(activeListGroupItem);
positionArrow(activeListGroupItem,activeTabPane);
});
$(".media.tab-responsive .tab-content").on("shown.bs.collapse", function (e) {
@ -50,7 +51,7 @@ var InitiateViewOption = null;
}
});
function positionArrow(selectedTab) {
function positionArrow(selectedTab,activeTabPane) {
var selectedTabHeight = $(selectedTab).innerHeight();
var arrowPosition = 0;
var totalHeight = 0;
@ -75,6 +76,12 @@ var InitiateViewOption = null;
}
$(arrow).css("top", arrowPosition - 10);
var listHeight = $(".tab-responsive .media-left ul").height();
var paneHeight = $(activeTabPane).height();
if(listHeight > paneHeight){
$(activeTabPane).height(listHeight);
}
}
function loadOperationsLog(update) {
@ -309,6 +316,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();

@ -1,7 +1,7 @@
<div class="wr-list-group wr-sortable policy-list">
<span class="list-group-item" id="{{id}}">
<div class="row">
<div class="col-lg-2 clearfix" style="padding-left: 20px; padding-top: 10px;">
<div class="col-lg-4 clearfix" style="padding-left: 20px; padding-top: 10px;">
<span class="wr-list-icon">
{{#equal deviceType "android"}}
<i class=" fw fw-android"></i>
@ -18,7 +18,7 @@
<span>{{deviceType}}</span>
</span>
</div>
<div class="col-lg-7">
<div class="col-lg-6">
<div class="row no-gutter">
<div class="wr-desc-list-configs col-lg-4">
<div>
@ -48,7 +48,7 @@
</div>
</div>
</div>
<div class="col-lg-2">
<div class="col-lg-1">
<span class="list-group-item-actions" style="padding-top: 15px;">
<!--suppress HtmlUnknownTarget -->
<a href="/emm/policy/view?id={{policy.id}}"

@ -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
</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>

@ -35,6 +35,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"];
@ -45,6 +49,10 @@ function onRequest(context) {
if (filteredDeviceData["enrolmentInfo"]) {
if (filteredDeviceData["enrolmentInfo"]["status"]) {
viewModel["status"] = filteredDeviceData["enrolmentInfo"]["status"];
viewModel.isActive = false ;
if (filteredDeviceData["enrolmentInfo"]["status"]== "ACTIVE") {
viewModel.isActive = true ;
}
}
if (filteredDeviceData["enrolmentInfo"]["owner"]) {
viewModel["owner"] = filteredDeviceData["enrolmentInfo"]["owner"];
@ -195,6 +203,5 @@ function onRequest(context) {
} else {
deviceViewData["deviceFound"] = false;
}
return deviceViewData;
}

@ -354,7 +354,23 @@ validateStep["policy-profile"] = function () {
};
continueToCheckNextInputs = false;
}
// For the secure wifi types, it is required to have a password
var wifiTypeUIElement = $("#wifi-type");
var wifiType = wifiTypeUIElement.find("option:selected").val();
if (wifiTypeUIElement.is("input:checkbox")) {
wifiType = wifiTypeUIElement.is(":checked").toString();
}
if (wifiType != "none") {
if (!$("#wifi-password").val()) {
validationStatus = {
"error": true,
"subErrorMsg": "Password is required for the wifi security type " + wifiType + ". " +
"Please provide a password to proceed.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
// at-last, if the value of continueToCheckNextInputs is still true
// this means that no error is found
if (continueToCheckNextInputs) {

@ -879,7 +879,7 @@
</div>
<div class="wr-input-control" id="control-wifi-password" style="display:none;">
<label class="wr-input-label" for="wifi-password">
Password
Password*
<span class="helper" title="Password for the wireless network.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>

@ -382,7 +382,23 @@ validateStep["policy-profile"] = function () {
};
continueToCheckNextInputs = false;
}
// For the secure wifi types, it is required to have a password
var wifiTypeUIElement = $("#wifi-type");
var wifiType = wifiTypeUIElement.find("option:selected").val();
if (wifiTypeUIElement.is("input:checkbox")) {
wifiType = wifiTypeUIElement.is(":checked").toString();
}
if (wifiType != "none") {
if (!$("#wifi-password").val()) {
validationStatus = {
"error": true,
"subErrorMsg": "Password is required for the wifi security type " + wifiType + ". Please " +
"provide a password to proceed.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
// at-last, if the value of continueToCheckNextInputs is still true
// this means that no error is found
if (continueToCheckNextInputs) {

@ -903,7 +903,7 @@
</div>
<div class="wr-input-control" id="control-wifi-password" style="display:none;">
<label class="wr-input-label" for="wifi-password">
Password
Password*
<span class="helper" title="Password for the wireless network.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>

@ -866,7 +866,7 @@
</div>
<div class="wr-input-control" id="control-wifi-password" style="display:none;">
<label class="wr-input-label" for="wifi-password">
Password
Password*
<span class="helper" title="Password for the wireless network.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>

@ -335,7 +335,7 @@
</div>
<div class="wr-input-control">
<label class="wr-input-label" for="wifi-password">
Password
Password*
<span class="helper" title="Password for the wireless network.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>

@ -16,3 +16,4 @@
under the License.
}}
{{#zone "productName"}}ENTERPRISE MOBILITY MANAGER{{/zone}}
{{#zone "productNameResponsive"}}EMM{{/zone}}

@ -368,16 +368,12 @@ $(document).ready(function () {
var redirectUrl = $(this).data("url");
var markAsReadNotificationsEpr = emmAdminBasePath + "/notifications/" + notificationId + "/mark-checked";
var messageSideBar = ".sidebar-messages";
invokerUtil.put(
markAsReadNotificationsEpr,
null,
// on success
function (data) {
data = JSON.parse(data);
if (data.statusCode == responseCodes["ACCEPTED"]) {
location.href = redirectUrl;
}
window.location.href = redirectUrl;
},
// on error
function () {

@ -5,8 +5,7 @@
<li class="message" data-type="selectable" >
<h4>
<i class="icon fw fw-mobile text-muted"></i>
<a href="{{../contextPath}}/device/{{deviceType}}?id={{deviceIdentifier}}"
data-id="{{operationId}}"
<a data-id="{{id}}"
data-url="{{../contextPath}}/device/{{deviceType}}?id={{deviceIdentifier}}"
class="new-notification text-capitalize" data-click-event="remove-form">
Failure on {{deviceType}} {{deviceName}}

Loading…
Cancel
Save