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.operation-bar/operation-bar.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.operation-bar/operation-bar.hbs index 3a5a60956a..b25fdf5586 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.operation-bar/operation-bar.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.operation-bar/operation-bar.hbs @@ -65,48 +65,55 @@ {{description}}
- -
- {{#each params.0.pathParams}} - -
- {{/each}} - {{#each params.0.formParams}} - -
- {{/each}} - {{#each params.0.queryParams}} - -
- {{/each}} - {{#each uiParams}} - {{#equal this.type "checkbox"}} - - {{this.label}} + +
+ + {{#each params.0.pathParams}} + +
+ {{/each}} + {{#each params.0.formParams}} +
- {{/equal}} - {{#equal this.type "text"}} - + {{/each}} + {{#each params.0.queryParams}} +
- {{/equal}} - {{/each}} - - - - + {{/each}} + {{#each uiParams}} + {{#equal this.type "checkbox"}} + + {{this.label}} +
+ {{/equal}} + {{#equal this.type "text"}} + +
+ {{/equal}} + {{/each}} + + + + +
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.operation-bar/public/js/operation-bar.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.operation-bar/public/js/operation-bar.js index a5ab32d774..4ab3a2271e 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.operation-bar/public/js/operation-bar.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.operation-bar/public/js/operation-bar.js @@ -28,6 +28,10 @@ function operationSelect(selection) { } function submitForm(formId) { + $("#operation-form").addClass("hidden"); + $('[data-toggle="loading"]').removeClass("hidden"); + $('[data-toggle="loading"]').loading('show'); + var form = $("#" + formId); var uri = form.attr("action"); var deviceId = form.data("device-id"); @@ -69,6 +73,12 @@ function submitForm(formId) { var statusIcon = content.find("#status-icon"); var description = content.find("#description"); description.html(""); + + var resetLoader = function () { + $("#operation-form").removeClass("hidden"); + $('[data-toggle="loading"]').addClass("hidden"); + }; + var successCallBack = function (response) { var res = response; try { @@ -79,11 +89,12 @@ function submitForm(formId) { title.html("Operation Triggered!"); statusIcon.attr("class", defaultStatusClasses + " fw-check"); description.html(res); - console.log("success!"); + // console.log("success!"); + resetLoader(); $(modalPopupContent).html(content.html()); }; var errorCallBack = function (response) { - console.log(response); + // console.log(response); title.html("An Error Occurred!"); statusIcon.attr("class", defaultStatusClasses + " fw-error"); var reason = (response.responseText == "null")?response.statusText:response.responseText; @@ -93,7 +104,8 @@ function submitForm(formId) { //do nothing } description.html(reason); - console.log("Error!"); + // console.log("Error!"); + resetLoader(); $(modalPopupContent).html(content.html()); }; //executing http request @@ -111,12 +123,12 @@ function submitForm(formId) { title.html("An Error Occurred!"); statusIcon.attr("class", defaultStatusClasses + " fw-error"); description.html("This operation requires http method: " + httpMethod + " which is not supported yet!"); + resetLoader(); $(modalPopupContent).html(content.html()); } } $(document).on('submit', 'form', function (e) { - cosole.log("darn!!"); e.preventDefault(); var postOperationRequest = $.ajax({ url: $(this).attr("action") + '&' + $(this).serialize(), 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 7e9011bf29..22018141c7 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 @@ -19,11 +19,13 @@ -->
{{#if isVirtual}} -

Download our Android-try-it emulator, enroll it with WSO2 Device Cloud and try it out!

+

Download our virtual Android device, enroll it with WSO2 + Device Cloud and try it out!

- Download the android-try-it Emulator
+ Download the virtual Android device +
{{else}}

Scan to get the Android Agent.

@@ -31,7 +33,7 @@ {{#if isCloud}}
+ target="_blank"> Get it on Google Play @@ -39,7 +41,7 @@ {{else}}
+ class="btn-operations remove-margin download_agent"> Download APK
{{/if}} @@ -50,20 +52,20 @@ to save it to your computer.

--> - {{#if isCloud}} - - {{else}} - - {{/if}} + {{#if isCloud}} + + {{else}} + + {{/if}}
@@ -80,47 +82,47 @@ {{#if isCloud}}
{{#if isVirtual}} -
-
Step 1
-
-
    -
  1. Unzip the 'android-tryit.zip file and run the 'start' script on your terminal.
  2. -
  3. Download and install the Android SDK. -
      -
    • If you already have an Android SDK on your computer, please provide the location of - the SDK. -
    • -
    • Else, this tool will download and install the minimum SDK components required to run - the emulator. - This is a one-time process. -
    • -
    -
  4. -
  5. Next, you will be asked to create an AVD: -
      -
    • If you don't have one, the WSO2_AVD will be created for you.
    • -
    • Else, you can use an existing AVD to try out IoT Android agent.
    • -
    -
  6. -
+
+
Step 1
+
+
    +
  1. Unzip the 'android-tryit.zip file and run the 'start' script on your terminal.
  2. +
  3. Download and install the Android SDK: +
      +
    • If you already have an Android SDK on your computer, please provide the location of + the SDK. +
    • +
    • Else, this tool will download and install the minimum SDK components required to run + the emulator. + This is a one-time process. +
    • +
    +
  4. +
  5. Next, you will be asked to create an AVD: +
      +
    • If you don't have one, the WSO2_AVD will be created for you.
    • +
    • Else, you can use an existing AVD to try out IoT Android agent.
    • +
    +
  6. +
+
+
- -
{{else}} -
-
Step 1
-
-

Let's start by opening the Android agent on your device. -
Tap on WSO2 Device Management Agent. -

+
+
Step 1
+
+

Let's start by opening the Android agent on your device. +
Tap on WSO2 Device Management Agent. +

+
+
- -
{{/if}} -
+
Step 2
-

Enter your: +

Enter your :

  • Organization: {{@user.domain}}
  • @@ -130,7 +132,7 @@
-
+
Step 3

To successfully register the virtual device,

@@ -149,9 +151,13 @@
  • Unzip the 'android-tryit.zip file and run the 'start' script on your terminal.
  • Download and install the Android SDK.
      -
    • If you already have an Android SDK on your computer, please provide the location of the SDK.
    • -
    • Else, this tool will download and install the minimum SDK components required to run the emulator. - This is a one-time process.
    • +
    • If you already have an Android SDK on your computer, please provide the location of the + SDK. +
    • +
    • Else, this tool will download and install the minimum SDK components required to run the + emulator. + This is a one-time process. +
  • Next, you will be asked to create an AVD: @@ -194,63 +200,6 @@
  • - - - - {{#zone "topCss"}} {{css "css/styles.css"}} {{/zone}}