Merge branch 'kiosk-policy-ui' into 'master'

Kiosk Policy UI - Single Mode App

See merge request entgra/carbon-device-mgt-plugins!26
revert-dabc3590
Inosh Perara 6 years ago
commit 536ecf98ef

@ -210,6 +210,7 @@ var androidOperationModule = function () {
payload["kioskBackgroundImage"] = deviceGlobalConfigurations["kioskBackgroundImage"];
payload["kioskLogoImage"] = deviceGlobalConfigurations["kioskLogoImage"];
payload["kioskAppName"] = deviceGlobalConfigurations["kioskAppName"];
payload["isSingleModeApp"] = deviceGlobalConfigurations["isSingleModeApp"];
payload["isIdleGraphicsEnabled"] = deviceGlobalConfigurations["isIdleGraphicsEnabled"];
payload["idleTimeout"] = deviceGlobalConfigurations["idleTimeout"];
payload["isMultiUserDevice"] = deviceGlobalConfigurations["isMultiUserDevice"];
@ -501,6 +502,20 @@ var androidOperationModule = function () {
if (operationData["kioskAppName"]) {
deviceGlobalConfigurations["kioskAppName"] = operationData["kioskAppName"];
}
deviceGlobalConfigurations["isSingleModeApp"] = operationData["isSingleModeApp"];
if (deviceGlobalConfigurations["isSingleModeApp"] === true) {
var selectedSingleModeAppElement = "div#install-app-enrollment .child-input";
if ($(selectedSingleModeAppElement + "[data-child-key='type']").val() === "Web Clip") {
var webClipApp = {
"identity": $(selectedSingleModeAppElement + "[data-child-key='packageName']").val(),
"title": $(selectedSingleModeAppElement + "[data-child-key='appName']").val()
};
deviceGlobalConfigurations["singleModeApp"] = JSON.stringify(webClipApp);
} else {
deviceGlobalConfigurations["singleModeApp"]
= $(selectedSingleModeAppElement + "[data-child-key='packageName']").val();
}
}
deviceGlobalConfigurations["isIdleGraphicsEnabled"] = operationData["isIdleGraphicsEnabled"];
if (operationData["idleTimeout"]) {
deviceGlobalConfigurations["idleTimeout"] = operationData["idleTimeout"];

@ -365,6 +365,22 @@ var validatePolicyProfile = function () {
}
}
if (continueToCheckNextInputs) {
var isSingleAppMode = $("input#cosu-global-config-is-single-application-mode").is(":checked");
if (isSingleAppMode === true) {
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if ($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "No application has been selected in Enrollment Application Install " +
"config to run on Single Application Mode.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
if (continueToCheckNextInputs) {
var isMultiUser = $("input#cosu-global-config-is-multi-user-device").is(":checked");
if (isMultiUser === true) {
@ -778,7 +794,7 @@ var validatePolicyProfile = function () {
//If enrollment app install configured
operation = androidOperationConstants["ENROLLMENT_APP_INSTALL"];
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if($(enrollmentAppInstallAppList).length == 0) {
if($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications are not selected to be installed during device enrollment.",

@ -1722,6 +1722,26 @@
class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent"/>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Selected initial app in
<strong>Enrollment Application Install policy config</strong>
will be selected for single application mode
</ul>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-global-config-is-single-application-mode" type="checkbox"
class="form-control operationDataKeys"
data-key="isSingleModeApp"/>
<span class="helper">
Is single application mode
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is single application mode"></span>
</span>
</label>
</div>
<div id="cosu-profile-idle-media-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">

@ -1327,7 +1327,26 @@
class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent" disabled/>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Selected initial app in
<strong>Enrollment Application Install policy config</strong>
will be selected for single application mode
</ul>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-global-config-is-single-application-mode" type="checkbox"
class="form-control operationDataKeys"
data-key="isSingleModeApp" disabled/>
<span class="helper">
Is single application mode
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is single application mode"></span>
</span>
</label>
</div>
<div id="cosu-profile-idle-media-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">

@ -308,6 +308,22 @@ var validatePolicyProfile = function () {
}
}
if (continueToCheckNextInputs) {
var isSingleAppMode = $("input#cosu-global-config-is-single-application-mode").is(":checked");
if (isSingleAppMode === true) {
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if ($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "No application has been selected in Enrollment Application Install " +
"config to run on Single Application Mode.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
if (continueToCheckNextInputs) {
var isMultiUser = $("input#cosu-global-config-is-multi-user-device").is(":checked");
if (isMultiUser === true) {
@ -713,7 +729,7 @@ var validatePolicyProfile = function () {
//If enrollment app install configured
operation = androidOperationConstants["ENROLLMENT_APP_INSTALL"];
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if($(enrollmentAppInstallAppList).length == 0) {
if($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications are not selected to be installed during device enrollment.",

@ -1453,6 +1453,26 @@
class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent"/>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Selected initial app in
<strong>Enrollment Application Install policy config</strong>
will be selected for single application mode
</ul>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-global-config-is-single-application-mode" type="checkbox"
class="form-control operationDataKeys"
data-key="isSingleModeApp"/>
<span class="helper">
Is single application mode
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is single application mode"></span>
</span>
</label>
</div>
<div id="cosu-profile-idle-media-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">

Loading…
Cancel
Save