diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs index 3f2fac78e3..63018835c9 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/configuration.hbs @@ -19,7 +19,7 @@
@@ -87,9 +87,9 @@
@@ -99,9 +99,9 @@
@@ -111,9 +111,9 @@
@@ -123,9 +123,9 @@
@@ -135,9 +135,9 @@
+
+ + +
+
+
+ + +
@@ -186,4 +212,4 @@ {{#zone "bottomJs"}} {{js "js/platform-configuration.js"}} -{{/zone}} +{{/zone}} \ No newline at end of file diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js index 7cb8cb37d1..0faae04ee4 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js @@ -87,7 +87,9 @@ var kioskConfigs = { "wifiSecurity" : "android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE", "skipEncryption" : "android.app.extra.PROVISIONING_SKIP_ENCRYPTION", "checksum" : "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM", - "downloadURL" : "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION" + "downloadURL" : "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION", + "defaultOwnership" : "android.app.extra.defaultOwner", + "serverIP" : "android.app.extra.serverIp" }; $(document).ready(function () { @@ -150,6 +152,10 @@ $(document).ready(function () { $("input#android-kiosk-config-download-url").val(config.value); } else if (config.name === kioskConfigs["skipEncryption"]) { $("#android-kiosk-config-encryption").val(config.value); + } else if (config.name === kioskConfigs["defaultOwnership"]) { + $("#android-kiosk-config-defaultOwner").val(config.value); + } else if (config.name === kioskConfigs["serverIP"]) { + $("#android-kiosk-config-server-ip").val(config.value); } } } @@ -194,6 +200,8 @@ $(document).ready(function () { var wifiPassword = $("input#android-kiosk-config-wifi-password").val(); var encryption = $("#android-kiosk-config-encryption").find("option:selected").attr("value"); var wifiSecurity = $("#android-kiosk-config-wifi-sec").find("option:selected").attr("value"); + var defaultOwner = $("#android-kiosk-config-defaultOwner").find("option:selected").attr("value"); + var serverIp = $("#android-kiosk-config-server-ip").val(); if (notifierType === notifierTypeConstants["LOCAL"] && !notifierFrequency) { $(errorMsg).text("Notifier frequency is a required field. It cannot be empty."); @@ -281,6 +289,18 @@ $(document).ready(function () { "contentType": "text" }; + var kioskDefaultOwner = { + "name": kioskConfigs["defaultOwnership"], + "value": defaultOwner, + "contentType": "text" + }; + + var kioskServerIp = { + "name": kioskConfigs["serverIP"], + "value": serverIp, + "contentType": "text" + }; + configList.push(type); configList.push(frequency); configList.push(androidEula); @@ -292,6 +312,8 @@ $(document).ready(function () { configList.push(kioskWifiSSID); configList.push(kioskWifiPassword); configList.push(kioskWifiSecurity); + configList.push(kioskDefaultOwner); + configList.push(kioskServerIp); if (notifierType === notifierTypeConstants["FCM"]) { configList.push(fcmKey); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/css/styles.css b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/css/styles.css index a23eed95a0..811c4137d4 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/css/styles.css +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/css/styles.css @@ -59,7 +59,7 @@ hr { color: #006eff; } .enrollment-qr-container canvas { - width: 14%; + width: 15%; } @media (min-width:992px){ diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/application.svg b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/application.svg new file mode 100644 index 0000000000..fbef3182c9 --- /dev/null +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/application.svg @@ -0,0 +1,2 @@ + + diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/install_agent.png b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/install_agent.png old mode 100755 new mode 100644 index 8bf5bddf00..2686c87b5d Binary files a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/install_agent.png and b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/install_agent.png differ diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/register.png b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/register.png old mode 100755 new mode 100644 index de921eb88e..f7e4bfedfe Binary files a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/register.png and b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/register.png differ diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/registration.png b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/registration.png old mode 100755 new mode 100644 index 34a44ac251..f7a3bad6b6 Binary files a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/registration.png and b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/registration.png differ diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/set_profile.png b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/set_profile.png old mode 100755 new mode 100644 index c419a797ed..81de7a5993 Binary files a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/set_profile.png and b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/images/set_profile.png differ diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js index 98a97c67d5..16816e7ec4 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/public/js/type-view.js @@ -32,15 +32,17 @@ var backendEndBasePath = "/api/device-mgt/v1.0"; //} var kioskConfigs = { - "adminComponentName" : "android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME", - "wifiSSID" : "android.app.extra.PROVISIONING_WIFI_SSID", - "wifiPassword" : "android.app.extra.PROVISIONING_WIFI_PASSWORD", - "wifiSecurity" : "android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE", - "skipEncryption" : "android.app.extra.PROVISIONING_SKIP_ENCRYPTION", - "checksum" : "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM", - "downloadURL" : "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION", - "androidExtra" : "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE", - "accessToken" : "android.app.extra.token" + "adminComponentName": "android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME", + "wifiSSID": "android.app.extra.PROVISIONING_WIFI_SSID", + "wifiPassword": "android.app.extra.PROVISIONING_WIFI_PASSWORD", + "wifiSecurity": "android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE", + "skipEncryption": "android.app.extra.PROVISIONING_SKIP_ENCRYPTION", + "checksum": "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM", + "downloadURL": "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION", + "androidExtra": "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE", + "accessToken": "android.app.extra.token", + "defaultOwnership": "android.app.extra.defaultOwner", + "serverIp": "android.app.extra.serverIp" }; /* @@ -68,19 +70,19 @@ function hidePopup() { $(modalPopupContent).html(""); $(modalPopupContent).removeClass("operation-data"); $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right','0px'); + $('body').removeClass('modal-open').css('padding-right', '0px'); $('.modal-backdrop').remove(); } /* * QR-code generation function. */ -function generateQRCode(qrCodeClass) { +function generateQRCode() { var enrollmentURL = $("#qr-code-modal").data("enrollment-url"); $(qrCodeClass).qrcode({ text: enrollmentURL, - width: 200, - height: 200 + width: 150, + height: 150 }); } @@ -89,38 +91,63 @@ function generateQRCode(qrCodeClass) { */ function generateKIOSKQRCode(qrCodeClass) { - var androidConfigAPI = "/api/device-mgt/android/v1.0/configuration"; var payload = {}; + var androidConfigAPI = "/api/device-mgt/android/v1.0/configuration"; var isKioskConfigured = false; + var defaultOwnerVal = {}; + var serverIp = {}; + $("#android-qr-code").show(); + $("#enrollment_qr_content").show(); + $("#qr-code-img").hide(); + $("#enroll-qr-heading").show(); + var ownership_type = $("#android-device-ownership").find("option:selected").attr("value"); invokerUtil.get( androidConfigAPI, - function (data) { + function(data) { data = JSON.parse(data); if (data != null && data.configuration != null) { - for (var i = 0; i < data.configuration.length; i++) { - var config = data.configuration[i]; - - if (config.name === kioskConfigs["adminComponentName"]) { - isKioskConfigured = true; - payload[config.name] = config.value; - } else if (config.name === kioskConfigs["wifiSSID"]) { - payload[config.name] = config.value; - } else if (config.name === kioskConfigs["wifiPassword"]) { - payload[config.name] = config.value; - } else if (config.name === kioskConfigs["wifiSecurity"]) { - payload[config.name] = config.value; - } else if (config.name === kioskConfigs["checksum"]) { - payload[config.name] = config.value; - } else if (config.name === kioskConfigs["downloadURL"]) { - payload[config.name] = config.value; - } else if (config.name === kioskConfigs["skipEncryption"]) { - payload[config.name] = Boolean(config.value); + if (ownership_type == "COSU") { + for (var i = 0; i < data.configuration.length; i++) { + var config = data.configuration[i]; + if (config.name === kioskConfigs["adminComponentName"]) { + isKioskConfigured = true; + payload[config.name] = config.value; + } else if (config.name === kioskConfigs["wifiSSID"]) { + payload[config.name] = config.value; + } else if (config.name === kioskConfigs["wifiPassword"]) { + payload[config.name] = config.value; + } else if (config.name === kioskConfigs["wifiSecurity"]) { + payload[config.name] = config.value; + } else if (config.name === kioskConfigs["checksum"]) { + payload[config.name] = config.value; + } else if (config.name === kioskConfigs["downloadURL"]) { + payload[config.name] = config.value; + } else if (config.name === kioskConfigs["skipEncryption"]) { + payload[config.name] = Boolean(config.value); + } else if (config.name === kioskConfigs["defaultOwnership"]) { + defaultOwnerVal[config.name] = ownership_type; + } else if (config.name === kioskConfigs["serverIp"]) { + serverIp[config.name] = config.value; + } + } + } else { + for (var i = 0; i < data.configuration.length; i++) { + var config = data.configuration[i]; + if (config.name === kioskConfigs["adminComponentName"]) { + isKioskConfigured = true; + payload[config.name] = config.value; + } else if (config.name === kioskConfigs["defaultOwnership"]) { + defaultOwnerVal[config.name] = ownership_type; + } else if (config.name === kioskConfigs["serverIp"]) { + serverIp[config.name] = config.value; + } } } } - }, function (data) { + }, + function(data) { console.log(data); }); @@ -129,27 +156,57 @@ function generateKIOSKQRCode(qrCodeClass) { var accessToken = {}; accessToken[kioskConfigs["accessToken"]] = tokenPair["accessToken"]; - payload[kioskConfigs["androidExtra"]] = accessToken; - + var sumExtra = $.extend(accessToken, defaultOwnerVal, serverIp); + payload[kioskConfigs["androidExtra"]] = sumExtra; + $(".kiosk-enrollment-qr-container").empty(); if (isKioskConfigured) { $(qrCodeClass).qrcode({ text: JSON.stringify(payload), - width: 300, - height: 300 + width: 350, + height: 350 }); } else { - $("#kiosk_heading").hide(); + $("#android-configurations-alert").fadeToggle(500); $("#kiosk_content").hide(); } } +function displayAgentDownloadQR() { + $(".enrollment-qr-container").empty(); + generateQRCode(".enrollment-qr-container"); + $("#download-agent-qr").fadeToggle(1000); + $("#enroll-agent-qr").fadeOut(1000); + $("#android-enroll-manually-instructions").fadeOut(1000); + $('html,body').animate({ + scrollTop: $('#download-agent-qr').position().top + }, 800); +} + +function displayEnrollmentQR() { + $("#download-agent-qr").fadeOut(1000); + $("#enroll-agent-qr").fadeToggle(1000); + $("#android-enroll-manually-instructions").fadeOut(1000); + $('html,body').animate({ + scrollTop: $('#enroll-agent-qr').position().top + }, 800); +} + +function manualEnrollmentGuide() { + $("#enroll-agent-qr").fadeOut(1000); + $("#download-agent-qr").fadeOut(1000); + $("#android-enroll-manually-instructions").fadeToggle(1000); + $('html,body').animate({ + scrollTop: $('#android-enroll-manually-instructions').position().top + }, 800); +} + function toggleEnrollment() { $(".modal-content").html($("#qr-code-modal").html()); generateQRCode(".modal-content .qr-code"); modalDialog.show(); } -var updateNotificationCountOnSuccess = function (data, textStatus, jqXHR) { +var updateNotificationCountOnSuccess = function(data, textStatus, jqXHR) { var notificationBubble = "#notification-bubble"; if (jqXHR.status == 200 && data) { var responsePayload = JSON.parse(data); @@ -187,12 +244,12 @@ function loadNewNotifications() { var notifications = $("#notifications"); var currentUser = notifications.data("currentUser"); - $.template("notification-listing", notifications.attr("src"), function (template) { + $.template("notification-listing", notifications.attr("src"), function(template) { var serviceURL = backendEndBasePath + "/notifications?offset=0&limit=5&status=NEW"; invokerUtil.get( serviceURL, // on success - function (data, textStatus, jqXHR) { + function(data, textStatus, jqXHR) { if (jqXHR.status == 200 && data) { var viewModel = {}; var responsePayload = JSON.parse(data); @@ -214,7 +271,7 @@ function loadNewNotifications() { } }, // on error - function (jqXHR) { + function(jqXHR) { if (jqXHR.status = 500) { $(messageSideBar).html("

Unexpected error occurred while trying " + "to retrieve any new notifications.

"); @@ -230,7 +287,7 @@ function loadNewNotifications() { * notification listing sidebar. * @return {Null} */ -$.sidebar_toggle = function (action, target, container) { +$.sidebar_toggle = function(action, target, container) { var elem = '[data-toggle=sidebar]', button, containerOffsetLeft, @@ -244,7 +301,7 @@ $.sidebar_toggle = function (action, target, container) { buttonParent; var sidebar_window = { - update: function (target, container, button) { + update: function(target, container, button) { containerOffsetLeft = $(container).data('offset-left') ? $(container).data('offset-left') : 0; containerOffsetRight = $(container).data('offset-right') ? $(container).data('offset-right') : 0; targetOffsetLeft = $(target).data('offset-left') ? $(target).data('offset-left') : 0; @@ -259,7 +316,7 @@ $.sidebar_toggle = function (action, target, container) { } }, - show: function () { + show: function() { if ($(target).data('sidebar-fixed') == true) { $(target).height($(window).height() - $(target).data('fixed-offset')); } @@ -303,7 +360,7 @@ $.sidebar_toggle = function (action, target, container) { $(target).trigger('shown.sidebar'); }, - hide: function () { + hide: function() { $(target).trigger('hide.sidebar'); $(target).removeClass('toggled'); if (button !== undefined) { @@ -350,7 +407,7 @@ $.sidebar_toggle = function (action, target, container) { // binding click function var body = 'body'; $(body).off('click', elem); - $(body).on('click', elem, function (e) { + $(body).on('click', elem, function(e) { e.preventDefault(); button = $(this); container = button.data('container'); @@ -368,41 +425,41 @@ $.sidebar_toggle = function (action, target, container) { }); }; -$.fn.collapse_nav_sub = function () { +$.fn.collapse_nav_sub = function() { var navSelector = 'ul.nav'; if (!$(navSelector).hasClass('collapse-nav-sub')) { - $(navSelector + ' > li', this).each(function () { + $(navSelector + ' > li', this).each(function() { var position = $(this).offset().left - $(this).parent().scrollLeft(); $(this).attr('data-absolute-position', (position + 5)); }); - $(navSelector + ' li', this).each(function () { + $(navSelector + ' li', this).each(function() { if ($('ul', this).length !== 0) { $(this).addClass('has-sub'); } }); - $(navSelector + ' > li', this).each(function () { + $(navSelector + ' > li', this).each(function() { $(this).css({ 'left': $(this).data('absolute-position'), 'position': 'absolute' }); }); - $(navSelector + ' li.has-sub', this).on('click', function () { + $(navSelector + ' li.has-sub', this).on('click', function() { var elem = $(this); if (elem.attr('aria-expanded') !== 'true') { - elem.siblings().fadeOut(100, function () { - elem.animate({'left': '15'}, 200, function () { + elem.siblings().fadeOut(100, function() { + elem.animate({ 'left': '15' }, 200, function() { $(elem).first().children('ul').fadeIn(200); }); }); elem.siblings().attr('aria-expanded', 'false'); elem.attr('aria-expanded', 'true'); } else { - $(elem).first().children('ul').fadeOut(100, function () { - elem.animate({'left': $(elem).data('absolute-position')}, 200, function () { + $(elem).first().children('ul').fadeOut(100, function() { + elem.animate({ 'left': $(elem).data('absolute-position') }, 200, function() { elem.siblings().fadeIn(100); }); }); @@ -411,27 +468,24 @@ $.fn.collapse_nav_sub = function () { } }); - $(navSelector + ' > li.has-sub ul', this).on('click', function (e) { + $(navSelector + ' > li.has-sub ul', this).on('click', function(e) { e.stopPropagation(); }); $(navSelector).addClass('collapse-nav-sub'); } }; -$(document).ready(function () { +$(document).ready(function() { $.sidebar_toggle(); - generateQRCode(".enrollment-qr-container"); - generateKIOSKQRCode(".kiosk-enrollment-qr-container"); - if (typeof $.fn.collapse == 'function') { - $('.navbar-collapse.tiles').on('shown.bs.collapse', function () { + $('.navbar-collapse.tiles').on('shown.bs.collapse', function() { $(this).collapse_nav_sub(); }); } loadNewNotificationsOnSideViewPanel(); - $("#right-sidebar").on("click", ".new-notification", function () { + $("#right-sidebar").on("click", ".new-notification", function() { var notificationId = $(this).data("id"); var redirectUrl = $(this).data("url"); var markAsReadNotificationsEpr = backendEndBasePath + "/notifications/" + notificationId + "/mark-checked"; @@ -441,14 +495,14 @@ $(document).ready(function () { markAsReadNotificationsEpr, null, // on success - function (data) { + function(data) { data = JSON.parse(data); if (data.statusCode == responseCodes["ACCEPTED"]) { location.href = redirectUrl; } }, // on error - function () { + function() { var content = "
  • Warning

    " + "

    Unexpected error occurred while loading notification. Please refresh the pa{{#if isCloud}}ge and" + " try again

  • "; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs index 75673b597a..105b7ea03a 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs @@ -1,77 +1,150 @@ -{{unit "cdmf.unit.lib.qrcode"}} + {{unit "cdmf.unit.device.type.qr-modal" enrollmentURL=enrollmentURL deviceTypeName="Android"}} -{{unit "cdmf.unit.device.type.email.invite-modal" deviceTypeView="android"}}
    {{#if isVirtual}}

    DOWNLOAD THE VIRTUAL ANDROID DEVICE

    {{else}} -

    DOWNLOAD THE ANDROID AGENT

    +

    ENROLL THE ANDROID AGENT

    {{/if}}
    - -
    - {{#if isVirtual}} -

    Download our virtual Android device, enroll it with WSO2 +

    --}} +
    + {{#if isVirtual}} +

    Download our virtual Android device, enroll it with WSO2 {{#if isCloud}} Device Cloud {{else}} IoT Server {{/if}}and try it out!

    - - {{else}} -

    Scan to get the Android Agent.

    -
    -

    or

    + Download the virtual Android device +
    + {{else}} +

    Scan to get the Android Agent.

    +
    +

    or

    + {{#if isCloud}} +
    + + Get it on Google Play + +
    + {{else}} + + {{/if}} + {{/if}} +
    {{#if isCloud}} -
    - - Get it on Google Play - -
    + {{else}} - + {{/if}} - {{/if}} -
    - {{#if isCloud}} - - {{else}} -
    +

    Step 02 - Enroll the Android Agent.


    +

    Your device can be enrolled with Entgra IoTS automatically via QR code or manually by a wizard. + To enroll automatically; first download agent as mentioned in Step 1 then proceed with the ENROLL WITH QR option from the device setup activity. + Thereafter select the ownership configuration and scan the generated QR to complete the process. + To enroll manually; select the Manual enrollment option from the setup activity and follow the succeeding steps.

    +
    + {{#unless isVirtual}} + {{#unless isCloud}} +
    + + +
    + {{/unless}} {{else}} - href="https://entgra.atlassian.net/wiki/spaces/IoTS340/pages/28278906/Android" - {{/if}} - target="_blank">Entgra IoT Server documentation.

    - {{/if}} + + {{/unless}} + + {{!-- Agent enroll QR code class --}} + -
    +{{!-- Warning message --}} + + +
    Step 3
    @@ -168,29 +239,28 @@
    - + {{else}}

    Let's start by installing the Android agent on your device. Open the downloaded file, and tap INSTALL.

    - + {{/if}}
    -
    Step 2

    Tap Skip to proceed with the default enrollment process.

    - +
    Step 3

    Enter the server address based on your environment, in the text box provided.

    - +
    Step 4
    @@ -202,27 +272,11 @@
  • Password: Your password.
  • - +
    {{/if}}
    -
    -
    -

    PROVISION YOUR KIOSK DEVICE

    -
    -
    -
    - -
    - -
    -
    -

    Scan to provision the KIOSK device

    -
    -
    -
    - {{#zone "topCss"}} {{css "css/styles.css"}} {{/zone}}