Merge pull request #585 from Kamidu/cloud-3.1.0

Cloud 3.1.0
revert-dabc3590
Kamidu Sachith Punchihewa 8 years ago committed by GitHub
commit 32c50e0ef7

@ -336,16 +336,18 @@
<div id="device-location" <div id="device-location"
data-lat="{{device.location.latitude}}" data-lat="{{device.location.latitude}}"
data-long="{{device.location.longitude}}" data-long="{{device.location.longitude}}"
data-locations = "{{device.locationHistory}}"> data-locations="{{device.locationHistory}}">
</div> </div>
<br/> <br/>
<a class="padding-left" target="_blank" {{#unless isCloud}}
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}"> <a class="padding-left" target="_blank"
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i> <i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-map-location fw-stack-1x"></i> <i class="fw fw-map-location fw-stack-1x"></i>
</span> Add Geo Fencing </span> Add Geo Fencing
</a> </a>
{{/unless}}
{{else}} {{else}}
<div id="map-error" class="message message-warning"> <div id="map-error" class="message message-warning">
<h4 class="remove-margin"> <h4 class="remove-margin">

@ -213,6 +213,7 @@ function onRequest(context) {
deviceViewData["autoCompleteParams"] = autoCompleteParams; deviceViewData["autoCompleteParams"] = autoCompleteParams;
deviceViewData["portalUrl"] = devicemgtProps['portalURL']; deviceViewData["portalUrl"] = devicemgtProps['portalURL'];
deviceViewData["isCloud"] = devicemgtProps['isCloud'];
deviceViewData["anchor"] = encodeURI(JSON.stringify({ "device" : { "id" : deviceId, "type" : deviceType}})); deviceViewData["anchor"] = encodeURI(JSON.stringify({ "device" : { "id" : deviceId, "type" : deviceType}}));
return deviceViewData; return deviceViewData;
} }

@ -19,7 +19,7 @@
var map; var map;
function loadLeafletMap() { function loadLeafletMap() {
var deviceLocationID = "#device-location", var deviceLocationID = "#device-location",
locations = $(deviceLocationID).data("locations"), locations = $(deviceLocationID).data("locations"),
location_lat = $(deviceLocationID).data("lat"), location_lat = $(deviceLocationID).data("lat"),
@ -28,7 +28,7 @@ function loadLeafletMap() {
zoomLevel = 13, zoomLevel = 13,
tileSet = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", tileSet = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
attribution = "&copy; <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors"; attribution = "&copy; <a href='https://openstreetmap.org/copyright'>OpenStreetMap</a> contributors";
if (locations) { if (locations && locations.locations.length > 0) {
var locationSets = locations.locations; var locationSets = locations.locations;
map = L.map(container).setView([locationSets[0].lat, locationSets[0].lng], zoomLevel); map = L.map(container).setView([locationSets[0].lat, locationSets[0].lng], zoomLevel);

@ -19,7 +19,9 @@
<a href="javascript:toggleEnrollment()" class="download-link btn-operations"><i class="fw fw-mobile fw-inverse fw-lg add-margin-1x"></i> Enroll Device</a> <a href="javascript:toggleEnrollment()" class="download-link btn-operations"><i class="fw fw-mobile fw-inverse fw-lg add-margin-1x"></i> Enroll Device</a>
<a href="{{host}}/android-web-agent/public/mdm.page.enrollments.android.download-agent/asset/android-agent.apk" class="btn-operations"><i class="fw fw-download fw-inverse fw-lg add-margin-1x"></i> Download APK</a> <a href="{{host}}/android-web-agent/public/mdm.page.enrollments.android.download-agent/asset/android-agent.apk" class="btn-operations"><i class="fw fw-download fw-inverse fw-lg add-margin-1x"></i> Download APK</a>
{{#unless isCloud}}
<a href="javascript:toggleEmailInvite()" class="btn-operations"><i class="fw fw-mail fw-inverse fw-lg add-margin-1x"></i> Invite by Email</a> <a href="javascript:toggleEmailInvite()" class="btn-operations"><i class="fw fw-mail fw-inverse fw-lg add-margin-1x"></i> Invite by Email</a>
{{/unless}}
{{#if displayStatus}} {{#if displayStatus}}
<a href="javascript:artifactUpload()" class="btn-operations"><i class="fw fw-upload fw-inverse fw-lg add-margin-1x"></i> Deploy Analytics Artifacts</a> <a href="javascript:artifactUpload()" class="btn-operations"><i class="fw fw-upload fw-inverse fw-lg add-margin-1x"></i> Deploy Analytics Artifacts</a>
{{/if}} {{/if}}

@ -34,6 +34,7 @@ function onRequest(context){
// //do nothing. // //do nothing.
// } // }
//); //);
viewModel["isCloud"] = devicemgtProps["isCloud"];
viewModel["hostName"] = devicemgtProps["httpsURL"]; viewModel["hostName"] = devicemgtProps["httpsURL"];
viewModel["enrollmentURL"] = devicemgtProps["generalConfig"]["host"] + devicemgtProps["androidEnrollmentDir"]; viewModel["enrollmentURL"] = devicemgtProps["generalConfig"]["host"] + devicemgtProps["androidEnrollmentDir"];
return viewModel; return viewModel;

Loading…
Cancel
Save