Fixing the alignment issue of policy compliance listing of device view page

revert-dabc3590
dilanua 8 years ago
parent 0d8da5f63f
commit ddea023fc2

@ -23,32 +23,6 @@ var InitiateViewOption = null;
var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type");
var operationTable;
// var payload = [deviceIdentifier];
// var serviceUrl;
// if (deviceType == "ios") {
// serviceUrl = "/ios/operation/deviceinfo";
// } else if (deviceType == "android") {
// //var serviceUrl = "/mdm-android-agent/operation/device-info";
// serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
// }
//
// if (serviceUrl) {
// invokerUtil.post(
// serviceUrl,
// payload,
// // success-callback
// function () {
// $(".panel-body").show();
// },
// // error-callback
// function () {
// var defaultInnerHTML =
// "<br><p class='small'><i class='fw-warning'></i>&nbsp;Device data may not have been updated. Please refresh to try again.<p>";
// $(".panel-body").append(defaultInnerHTML);
// }
// );
// }
$(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) {
var activeTabPane = $(e.target).attr("href");
@ -260,12 +234,12 @@ var InitiateViewOption = null;
if (data["complianceData"]) {
if (data["complianceData"]["complianceFeatures"] &&
data["complianceData"]["complianceFeatures"].length > 0) {
viewModel["compliance"] = "NON-COMPLIANT";
viewModel["complianceStatus"] = "NON-COMPLIANT";
viewModel["complianceFeatures"] = data["complianceData"]["complianceFeatures"];
content = template(viewModel);
$("#policy-list-container").html(content);
} else {
viewModel["compliance"] = "COMPLIANT";
viewModel["complianceStatus"] = "COMPLIANT";
content = template(viewModel);
$("#policy-list-container").html(content);
$("#policy-compliance-table").addClass("hidden");
@ -287,7 +261,7 @@ var InitiateViewOption = null;
);
}
} else if ((jqXHR.status == 200 && !data)) {
//$("#policy-spinner").addClass("hidden");
$("#policy-spinner").addClass("hidden");
$("#policy-list-container").
html("<div class='message message-info'>" +
"<h4 class='remove-margin'>" +

@ -1,61 +1,67 @@
<div class="wr-list-group wr-sortable policy-list">
<span class="list-group-item" id="{{id}}">
<div class="row">
<div class="col-lg-3 clearfix">
<span class="wr-list-icon">
{{#equal deviceType "android"}}
<i class=" fw fw-android"></i>
{{/equal}}
{{#equal deviceType "ios"}}
<i class=" fw fw-apple"></i>
{{/equal}}
{{#equal deviceType "windows"}}
<i class=" fw fw-windows"></i>
{{/equal}}
</span>
<span class="wr-list-desc">
<h3 class="wr-list-name">{{policy.policyName}}</h3>
<span class="wr-list-username">{{deviceType}}</span>
</span>
</div>
<div class="col-lg-6">
<div class="row no-gutter">
<div class="wr-desc-list-configs col-lg-4">
<div>
<b>Ownership Type : </b> {{policy.ownershipType}}
<span class="list-group-item" id="{{id}}">
<div class="row">
<div class="col-lg-2 clearfix" style="padding-left: 20px; padding-top: 10px;">
<span class="wr-list-icon">
{{#equal deviceType "android"}}
<i class=" fw fw-android"></i>
{{/equal}}
{{#equal deviceType "ios"}}
<i class=" fw fw-apple"></i>
{{/equal}}
{{#equal deviceType "windows"}}
<i class=" fw fw-windows"></i>
{{/equal}}
</span>
<span class="wr-list-desc">
<h3 class="wr-list-name">{{policy.policyName}}</h3>
<span>{{deviceType}}</span>
</span>
</div>
<div class="col-lg-7">
<div class="row no-gutter">
<div class="wr-desc-list-configs col-lg-4">
<div>
<b>Ownership Type</b>
<br>
{{policy.ownershipType}}
</div>
</div>
</div>
<div class="wr-desc-list-configs col-lg-4">
<div>
<b>Compliance Type :</b> {{policy.compliance}}
<div class="wr-desc-list-configs col-lg-4">
<div>
<b>Compliance Type</b>
<br>
{{policy.compliance}}
</div>
</div>
</div>
<div class="wr-desc-list-configs col-lg-4">
<div>
<b>Compliance :</b>
{{#equal compliance "COMPLIANT"}}
<span><i class="fw fw-ok icon-success"></i> Compliant</span>
{{/equal}}
{{#equal compliance "NON-COMPLIANT"}}
<span><i class="fw fw-warning icon-danger"></i> Not Compliant</span>
{{/equal}}
<div class="wr-desc-list-configs col-lg-4">
<div>
<b>Compliance Status</b>
<br>
{{#equal complianceStatus "COMPLIANT"}}
<span><i class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Compliant</span>
{{/equal}}
{{#equal complianceStatus "NON-COMPLIANT"}}
<span><i class="fw fw-warning icon-danger"></i>&nbsp;&nbsp;Not Compliant</span>
{{/equal}}
</div>
</div>
</div>
</div>
<div class="col-lg-2">
<span class="list-group-item-actions">
<!--suppress HtmlUnknownTarget -->
<a href="/emm/policy/view?id={{policy.id}}" class="cu-btn-inner policy-view-link" data-id="{{id}}">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>
</span>
&nbsp;View
</a>
</span>
</div>
</div>
<div class="col-lg-3">
<span class="list-group-item-actions">
<a href="/emm/policies/view?id={{policy.id}}" class="cu-btn-inner policy-view-link" data-id="{{id}}">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>
</span>
View
</a>
</span>
</div>
</div>
</span>
</span>
</div>
<table class="table table-striped table-hover table-bordered display data-table" id="policy-compliance-table">
<thead>
@ -68,9 +74,9 @@
{{#each complianceFeatures}}
<tr data-type="selectable">
<td data-display="{{featureCode}}" data-grid-label="Feature Code">{{featureCode}}</td>
<td data-display="{{compliance}}" data-grid-label="Status">
{{#equal compliance true}}<span><i class="fw fw-ok icon-success"></i> Compliant</span>{{/equal}}
{{#equal compliance false}}<span><i class="fw fw-warning icon-danger"></i> Not Compliant</span>{{/equal}}
<td data-display="{{complianceStatus}}" data-grid-label="Status">
{{#equal complianceStatus true}}<span><i class="fw fw-ok icon-success"></i>&nbsp;&nbsp;Compliant</span>{{/equal}}
{{#equal complianceStatus false}}<span><i class="fw fw-warning icon-danger"></i>&nbsp;&nbsp;Not Compliant</span>{{/equal}}
</td>
</tr>
{{/each}}

@ -312,7 +312,10 @@
<div id="collapseThree" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="device_location">
<div class="panel-body">
<div id="map-error" class="message message-danger">
<h4 class="remove-margin"><i class="icon fw fw-error"></i>Device location cannot be retrieved.</h4>
<h4 class="remove-margin">
<i class="icon fw fw-error"></i>
&nbsp;Device location cannot be retrieved.
</h4>
</div>
<div id="device-location"
data-lat="{{device.viewModel.location.latitude}}"
@ -341,7 +344,7 @@
</span>
</div>
<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">
<a href="javascript:void(0);" id="refresh-apps">
<i class="fw fw-refresh"></i>
@ -352,8 +355,11 @@
</div>
<div id="applications-list-container">
<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>
<h4>
<i class="icon fw fw-info"></i>
No applications found.
</h4>
<p>Please try refreshing in a while.</p>
</div>
</div>
</div>
@ -390,7 +396,10 @@
</div>
<div id="operations-log-container">
<div class="message message-info">
<h4 class="remove-margin"><i class="icon fw fw-info"></i>There are no operations, performed yet on this device.</h4>
<h4 class="remove-margin">
<i class="icon fw fw-info"></i>
There are no operations, performed yet on this device.
</h4>
</div>
</div>
<table class="table table-striped table-hover table-bordered display data-table" id="operations-log-table">

Loading…
Cancel
Save