Device view and detail related ui fixes

revert-dabc3590
kamidu 8 years ago
parent 9dd2e1585a
commit b8d91478d5

@ -33,17 +33,36 @@
{{/zone}}
{{#zone "navbarActions"}}
{{#if permissions.enroll}}
{{!-- #if permissions.enroll --}}
<li>
<a href="{{@app.context}}/device/enroll" class="cu-btn">
<span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i>
<a href="javascript:toggleEnrollment()">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-mobile fw-stack-1x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
<i class="fw fw-circle fw-stack-2x fw-stroke fw-inverse"></i>
<i class="fw fw-circle fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
</span>
Enroll Device
</a>
</li>
{{/if}}
{{!-- /if --}}
<li>
<a href="{{appContext}}devices/search">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-mobile fw-stack-1x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
<i class="fw fw-circle fw-stack-2x fw-stroke fw-inverse"></i>
<i class="fw fw-circle fw-stack-2x"></i>
<i class="fw fw-search fw-stack-1x"></i>
</span>
</span>
Advanced Search
</a>
</li>
{{/zone}}
{{#zone "content"}}
@ -56,7 +75,7 @@
</div>
<div id="device-listing-status" class="raw hidden">
<ul style="list-style-type: none;">
<li class="message message-info" >
<li class="message message-info">
<h4>
<i class="icon fw fw-info"></i>
<a id="device-listing-status-msg"></a>
@ -65,7 +84,8 @@
</ul>
</div>
<div id="device-table">
<table class="table table-striped table-hover list-table display responsive nowrap data-table grid-view" id="device-grid">
<table class="table table-striped table-hover list-table display responsive nowrap data-table grid-view"
id="device-grid">
<thead>
<tr class="sort-row">
<th class="no-sort"></th>
@ -87,7 +107,7 @@
</tr>
<tr class="bulk-action-row">
<th colspan="7">
<div id = "operation-bar">
<div id="operation-bar">
{{unit "mdm.unit.device.operation-bar"}}
</div>
<div id="operation-guide" class="bs-callout bs-callout-info">
@ -99,7 +119,7 @@
</thead>
<tbody id="ast-container">
<br class="c-both" />
<br class="c-both"/>
</tbody>
</table>
</div>
@ -117,7 +137,8 @@
{{/zone}}
{{#zone "bottomJs"}}
<script id="device-listing" data-current-user="{{currentUser.username}}" data-image-resource="{{self.publicURL}}/images/"
src="{{self.publicURL}}/templates/device-listing.hbs" type="text/x-handlebars-template" ></script>
<script id="device-listing" data-current-user="{{currentUser.username}}"
data-image-resource="{{self.publicURL}}/images/"
src="{{self.publicURL}}/templates/device-listing.hbs" type="text/x-handlebars-template"></script>
{{js "js/device-listing.js"}}
{{/zone}}

@ -106,12 +106,12 @@ function loadOperationBar(deviceType) {
//var selectedDeviceID = deviceId;
$.template("operations-bar", operationBarSrc, function (template) {
//var serviceURL = "/mdm-admin/features/" + platformType;
var serviceURL = "/api/device-mgt/v1.0/devices/"+platformType+"/*/features";
var serviceURL = "/api/device-mgt/v1.0/devices/" + platformType + "/*/features";
var successCallback = function (data) {
var viewModel = {};
data = JSON.parse(data).filter(function (current) {
var iconName;
switch(deviceType) {
switch (deviceType) {
case platformTypeConstants.ANDROID:
iconName = operationModule.getAndroidIconForFeature(current.code);
current.type = deviceType;
@ -142,7 +142,6 @@ function loadOperationBar(deviceType) {
function runOperation(operationName) {
var deviceIdList = getSelectedDeviceIds();
var list = getDevicesByTypes(deviceIdList);
console.log(list);
var successCallback = function (data) {
if (operationName == "NOTIFICATION") {
@ -159,16 +158,14 @@ function runOperation(operationName) {
var payload, serviceEndPoint;
if (list[platformTypeConstants.IOS]) {
payload = operationModule.
generatePayload(platformTypeConstants.IOS, operationName, list[platformTypeConstants.IOS]);
payload = operationModule.generatePayload(platformTypeConstants.IOS, operationName, list[platformTypeConstants.IOS]);
serviceEndPoint = operationModule.getIOSServiceEndpoint(operationName);
} else if (list[platformTypeConstants.ANDROID]) {
payload = operationModule
.generatePayload(platformTypeConstants.ANDROID, operationName, list[platformTypeConstants.ANDROID]);
serviceEndPoint = operationModule.getAndroidServiceEndpoint(operationName);
} else if (list[platformTypeConstants.WINDOWS]) {
payload = operationModule.
generatePayload(platformTypeConstants.WINDOWS, operationName, list[platformTypeConstants.WINDOWS]);
payload = operationModule.generatePayload(platformTypeConstants.WINDOWS, operationName, list[platformTypeConstants.WINDOWS]);
serviceEndPoint = operationModule.getWindowsServiceEndpoint(operationName);
}
if (operationName == "NOTIFICATION") {
@ -185,7 +182,6 @@ function runOperation(operationName) {
hidePopup();
}
} else {
console.log(serviceEndPoint);
invokerUtil.post(serviceEndPoint, payload, successCallback, errorCallback);
$(modalPopupContent).removeData();
hidePopup();

@ -1,5 +1,5 @@
<div class="row no-gutter">
<div class="wr-hidden-operations-nav col-lg-4">
<div class="wr-hidden-operations-nav col-lg-4">
<a href="javascript:void(0)" onclick="showAdvanceOperation('security', this)" class="selected">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-padlock fw-stack-2x"></i>
@ -24,13 +24,12 @@
</span>
Wi-fi
</a>
</div>
<div class="wr-hidden-operations-content col-lg-8">
</div>
<div class="wr-hidden-operations-content col-lg-8">
<!-- security -->
<div class="wr-hidden-operation" data-operation="security" style="display: block">
<div class="panel panel-default operation-data"
data-operation="{{features.ENCRYPT_STORAGE.code}}">
<!-- security -->
<div class="wr-hidden-operation" data-operation="security" style="display: block">
<div class="panel panel-default operation-data" data-operation="{{features.ENCRYPT_STORAGE.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#enableEncryptionTab"
@ -53,16 +52,14 @@
class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<a href="javascript:runOperation('{{features.ENCRYPT_STORAGE.code}}')"
class="btn-operations">Configure</a>
<a href="javascript:runOperation('{{features.ENCRYPT_STORAGE.code}}')" class="btn-operations">Configure</a>
</div>
</div>
<div class="panel panel-default operation-data"
data-operation="{{features.PASSCODE_POLICY.code}}">
<div class="panel panel-default operation-data" data-operation="{{features.PASSCODE_POLICY.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#passCodePolicy"
aria-expanded="false" aria-controls="passCodePolicy" class="collapsed">
<a data-toggle="collapse" data-parent="#accordion" href="#passCodePolicy" aria-expanded="false"
aria-controls="passCodePolicy" class="collapsed">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
@ -74,38 +71,31 @@
<div id="passCodePolicy" class="panel-collapse panel-body collapse" role="tabpanel"
aria-labelledby="passCodePolicy">
<label class="wr-input-label col-sm-4" for="maxFailedAttempts">Maximum Failed
Attempts</label>
<label class="wr-input-label col-sm-4" for="maxFailedAttempts">Maximum Failed Attempts</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="maxFailedAttempts"
data-key="maxFailedAttempts" placeholder="Enter maximum Failed Attempts">
</div>
<label class="wr-input-label col-sm-4" for="minLength">Minimum Length</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="minLength"
data-key="minLength" placeholder="Enter minimum Length">
<input type="text" class="form-control operationDataKeys" id="minLength" data-key="minLength"
placeholder="Enter minimum Length">
</div>
<label class="wr-input-label col-sm-4" for="pinHistory">PIN History</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="pinHistory"
data-key="pinHistory" placeholder="Enter PIN History">
<input type="text" class="form-control operationDataKeys" id="pinHistory" data-key="pinHistory"
placeholder="Enter PIN History">
</div>
<label class="wr-input-label col-sm-4" for="minComplexChars">Minimum complex
characters</label>
<label class="wr-input-label col-sm-4" for="minComplexChars">Minimum complex characters</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="minComplexChars"
data-key="minComplexChars" placeholder="Enter minimum complex characters">
</div>
<label class="wr-input-label col-sm-4" for="lockcode">Minimum PIN Age in days</label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="maxPINAgeInDays"
data-key="maxPINAgeInDays" placeholder="Enter minimum PIN age in days">
@ -122,26 +112,23 @@
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="allowSimple"
data-key="allowSimple"/>
<input type="checkbox" class="operationDataKeys" id="allowSimple" data-key="allowSimple"/>
<span class="helper" title="Allow simple PIN">Allow simple PIN<span
class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
</div>
<a href="javascript:runOperation('{{features.PASSCODE_POLICY.code}}')"
class="btn-operations">Configure</a>
<a href="javascript:runOperation('{{features.PASSCODE_POLICY.code}}')" class="btn-operations">Configure</a>
</div>
</div>
</div>
<!-- /security -->
</div>
<!-- /security -->
<!-- wi-fi -->
<div class="wr-hidden-operation panel-body" data-operation="wifi">
<!-- wi-fi -->
<div class="wr-hidden-operation panel-body" data-operation="wifi">
<div class="operation-data" data-operation="{{features.WIFI.code}}">
<label class="wr-input-label" title="Identification of the wireless network to connect to">Service
Set Identifier<span
class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<label class="wr-input-label" title="Identification of the wireless network to connect to">Service Set
Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Identification of the wireless network to connect to</span-->
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="ssid" data-key="ssid"
@ -152,23 +139,21 @@
class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<!--span>Password for the wireless network</span-->
<div class="wr-input-control">
<input type="password" class="form-control operationDataKeys" id="password"
data-key="password" placeholder="Password"/>
<input type="password" class="form-control operationDataKeys" id="password" data-key="password"
placeholder="Password"/>
</div>
<a href="javascript:runOperation('{{features.WIFI.code}}')"
class="btn-operations">Configure</a>
<a href="javascript:runOperation('{{features.WIFI.code}}')" class="btn-operations">Configure</a>
</div>
</div>
<!-- /wi-fi -->
<!-- application -->
<div class="wr-hidden-operation" data-operation="application">
<div class="panel panel-default operation-data"
data-operation="{{features.INSTALL_APPLICATION.code}}">
</div>
<!-- /wi-fi -->
<!-- application -->
<div class="wr-hidden-operation" data-operation="application">
<div class="panel panel-default operation-data" data-operation="{{features.INSTALL_APPLICATION.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#installApp"
aria-expanded="true" aria-controls="installApp">
<a data-toggle="collapse" data-parent="#accordion" href="#installApp" aria-expanded="true"
aria-controls="installApp">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
@ -204,15 +189,14 @@
<input type="text" class="form-control operationDataKeys" id="url" data-key="url"
placeholder="Enter URL"/>
</div>
<a href="javascript:runOperation('{{features.INSTALL_APPLICATION.code}}')"
class="btn-operations">Install</a>
<a href="javascript:runOperation('{{features.INSTALL_APPLICATION.code}}')" class="btn-operations">Install</a>
</div>
</div>
<div class="panel panel-default operation-data" data-operation="{{features.WEBCLIP.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#installWebClip"
aria-expanded="true" aria-controls="installWebClip" class="collapsed">
<a data-toggle="collapse" data-parent="#accordion" href="#installWebClip" aria-expanded="true"
aria-controls="installWebClip" class="collapsed">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
@ -227,8 +211,8 @@
class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
<div class="wr-input-control">
<input type="text" class="form-control operationDataKeys" id="title"
data-key="title" placeholder="Enter Title"/>
<input type="text" class="form-control operationDataKeys" id="title" data-key="title"
placeholder="Enter Title"/>
</div>
<label class="wr-input-label" title="URL">URL<span
class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>
@ -240,12 +224,11 @@
<a href="javascript:runOperation('{{features.WEBCLIP.code}}')" class="btn-operations">Install</a>
</div>
</div>
<div class="panel panel-default operation-data"
data-operation="{{features.UNINSTALL_APPLICATION.code}}">
<div class="panel panel-default operation-data" data-operation="{{features.UNINSTALL_APPLICATION.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#uninstallApp"
aria-expanded="true" aria-controls="uninstallApp" class="collapsed">
<a data-toggle="collapse" data-parent="#accordion" href="#uninstallApp" aria-expanded="true"
aria-controls="uninstallApp" class="collapsed">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
@ -263,20 +246,19 @@
<input type="text" class="form-control operationDataKeys" id="package-name"
data-key="packageName" placeholder="Enter App Identifer"/>
</div>
<a href="javascript:runOperation('{{features.UNINSTALL_APPLICATION.code}}')"
class="btn-operations">Uninstall</a>
<a href="javascript:runOperation('{{features.UNINSTALL_APPLICATION.code}}')" class="btn-operations">Uninstall</a>
</div>
</div>
</div>
<!-- /application -->
</div>
<!-- /application -->
<!-- Restriction -->
<div class="wr-hidden-operation" data-operation="restriction">
<!-- Restriction -->
<div class="wr-hidden-operation" data-operation="restriction">
<div class="panel panel-default operation-data" data-operation="{{features.CAMERA.code}}">
<div class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#cameraDisable"
aria-expanded="true" aria-controls="cameraDisable">
<a data-toggle="collapse" data-parent="#accordion" href="#cameraDisable" aria-expanded="true"
aria-controls="cameraDisable">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
@ -289,8 +271,8 @@
aria-labelledby="cameraDisable">
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input type="checkbox" class="operationDataKeys" id="enableCamera"
data-key="enableCamera" checked/>
<input type="checkbox" class="operationDataKeys" id="enableCamera" data-key="enableCamera"
checked/>
<span class="helper" title="Remove App upon dis-enrollment">Enable Camera<span
class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>
</label>
@ -298,7 +280,7 @@
<a href="javascript:runOperation('{{features.CAMERA.code}}')" class="btn-operations">Configure</a>
</div>
</div>
</div>
<!-- /Restriction -->
</div>
</div>
<!-- /Restriction -->
</div>
</div>

@ -12,7 +12,6 @@
<h4>
Please select a device or a list of devices to perform an operation.
</h4>
<div class="buttons">
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
</div>
@ -34,7 +33,6 @@
<h4>
Unexpected error occurred. Please Try again later.
</h4>
<div class="buttons">
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
</div>
@ -56,7 +54,6 @@
<h4>
Operation has been queued successfully to be sent to the device.
</h4>
<div class="buttons">
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
</div>
@ -79,7 +76,6 @@
<h4>
Message has been queued to be sent to the device.
</h4>
<div class="buttons">
<a href="javascript:hidePopup()" class="btn-operations">Ok</a>
</div>
@ -107,14 +103,11 @@
<h4>
{{#equal code "WIPE_DATA"}}
{{#equal type "android"}}
Enter PIN code (Optional - This is required only if the device type
is BYOD).
Enter PIN code (Optional - This is required only if the device type is BYOD).
<br><br>
<div>
<input type="password"
class="form-control modal-input operationDataKeys"
id="pin" data-key="pin"></textarea>
<input type="password" class="form-control modal-input operationDataKeys" id="pin"
data-key="pin">
</div>
<br>
{{/equal}}
@ -122,25 +115,115 @@
{{#equal code "NOTIFICATION"}}
Type your message below.
<br><br>
<div id="notification-error-msg" class="alert alert-danger hidden"
role="alert">
<div id="notification-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<div>
<textarea class="form-control modal-input operationDataKeys"
id="message" data-key="message"></textarea>
<input type='text' class="form-control modal-input operationDataKeys" id="messageTitle"
data-key="messageTitle"/>
</div>
<br>
<div>
<textarea class="form-control modal-input operationDataKeys" id="messageText"
data-key="messageText"></textarea>
</div>
<br>
{{/equal}}
{{#equal code "CHANGE_LOCK_CODE"}}
Type new lock-code below.
<br><br>
<input type="password"
class="form-control modal-input operationDataKeys" id="lockcode"
<input type="password" class="form-control modal-input operationDataKeys" id="lockcode"
data-key="lockCode" placeholder="Enter Lockcode"/>
<br>
{{/equal}}
{{#equal code "DEVICE_LOCK"}}
{{#equal type "android"}}
Type your message to be shown in the lock screen (Optional).
<br><br>
<div>
<textarea class="form-control modal-input operationDataKeys" id="lock-message"
data-key="lock-message"></textarea>
</div>
<br>
<label class="wr-input-control checkbox">
<input id="hard-lock" type="checkbox" class="form-control operationDataKeys"
data-key="hard-lock"/>
<span class="helper" title="Once it enables, device will be blocked permanently.">
&nbsp;&nbsp;&nbsp;Enable Permanent Lock
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
{{/equal}}
{{/equal}}
{{#equal code "UPGRADE_FIRMWARE"}}
{{#equal type "android"}}
Enter firmware upgrade scheduling information.
<br><br>
<label class="wr-input-control checkbox">
<input id="instant-upgrade" type="checkbox" class="form-control operationDataKeys"
data-key="instant-upgrade"/>
<span class="helper"
title="Once enabled, device firmware upgrade process will start instantly.">
&nbsp;&nbsp;&nbsp;Instant Upgrade
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<br><br>
<div class='input-group date' id='dateTimePicker'>
Enter the date and time to schedule firmware upgrade.
<br><br>
<div id="firmware-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<input type='text' class="form-control modal-input operationDataKeys"
style="z-index : 900;" name="daterange" id="schedule" data-key="schedule"/>
</div>
<br><br>
<div class='wr-input-control' id='firmwareServerInfo'>
Enter firmware upgrade server URL (ie. http://abc.com or http://abc.com/ota)
(Optional).
<br><br>
<input type='text' class="form-control modal-input operationDataKeys" id="server"
data-key="server"/>
</div>
<script type="text/javascript">
$(function () {
$('.modalpopup-bg').css('z-index', '1000');
$('.modalpopup-container').css('z-index', '1200');
$('input[name="daterange"]').daterangepicker({
singleDatePicker: true,
timePicker: true,
showDropdowns: true,
timePickerIncrement: 1,
locale: {
format: 'MM-DD-YYYY hh:mm a'
}
});
});
$('#instant-upgrade').change(function () {
if ($(this).is(":checked")) {
$('#dateTimePicker').addClass("hidden");
$("#schedule").val('');
} else {
$('#dateTimePicker').removeClass("hidden");
$('input[name="daterange"]').daterangepicker({
singleDatePicker: true,
timePicker: true,
showDropdowns: true,
timePickerIncrement: 1,
locale: {
format: 'MM-DD-YYYY hh:mm a'
}
});
}
});
</script>
<br>
{{/equal}}
{{/equal}}
<br><br>
Do you want to perform this operation on selected device(s) ?
<br>
</h4>

Loading…
Cancel
Save