Fix platform configuration display for custom units

feature/appm-store/pbac
Charitha Goonetilleke 5 years ago
parent 03345edca3
commit f1aa82c2b8

@ -16,37 +16,27 @@
under the License.
}}
{{#zone "topCss"}}
{{css "css/platform-configuration.css"}}
{{/zone}}
{{#zone "content"}}
{{#if isAuthorized}}
<div class="row">
<div class="col-md-12">
<!-- content -->
<div id="config-save-form" class="container col-centered wr-content">
<br>
<div class="row">
<div class="col-md-12">
<!-- content -->
<div id="config-save-form" class="container col-centered wr-content">
<br>
<h1 class="page-sub-title">
Platform Configurations
</h1>
<br>
{{#if isCloud}}
iOS Mobile Management Specific Server Settings for the Tenant
{{else}}
<h1 class="page-sub-title">
Platform Configurations
</h1>
<br>
General and Platform Specific Server Settings for the Tenant
{{/if}}
<br>
<br>
<div class="wr-advance-operations">
<div class="row">
<div class="wr-hidden-operations-nav col-lg-4">
<br>
<br>
{{#unless isCloud}}
<a id="generalConfigLink" href="javascript:void(0)" onclick="showAdvanceOperation('general', this)" class="selected">
<div class="wr-advance-operations">
<div class="row">
<div class="wr-hidden-operations-nav col-lg-4">
<a id="generalConfigLink" href="javascript:void(0)"
onclick="showAdvanceOperation('general', this)" class="selected">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-settings fw-stack-2x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
@ -57,12 +47,9 @@
</span>
General Configurations
</a>
{{/unless}}
{{#each deviceTypes}}
<a id="{{name}}ConfigLink" href="javascript:void(0)" onclick="showAdvanceOperation('{{name}}', this)"
{{#if isCloud}}
class="selected"
{{/if}} >
{{#each deviceTypes}}
<a id="{{name}}ConfigLink" href="javascript:void(0)"
onclick="showAdvanceOperation('{{name}}', this)">
<span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-settings fw-stack-2x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
@ -75,14 +62,13 @@
{{/if}}
</span>
</span>
{{label}} Configurations
</a>
{{/each}}
</div>
{{label}} Configurations
</a>
{{/each}}
</div>
<div class="wr-hidden-operations-content col-lg-8">
<!-- general -->
{{#unless isCloud}}
<div class="wr-hidden-operations-content col-lg-8">
<!-- general -->
<div class="wr-hidden-operation" data-operation="general" style="display: block">
<div class="panel panel-default">
<div id="general-config-heading" class="panel-heading" role="tab">
@ -99,7 +85,7 @@
<div class="wr-input-control">
<label class="wr-input-label" for="email-config-host">
Monitoring Frequency
<span class="helper" title="SMTP Server Host">
<span class="helper" title="SMTP Server Host">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
<br>
@ -114,54 +100,54 @@
</div>
</div>
{{#if geoServicesEnabled}}
<div id="general-config-heading" role="tab">
<h2 class="sub-title panel-title">
Geo Analytics
</h2>
</div>
<div class="panel-collapse panel-body" role="tabpanel">
<div class="wr-input-control">
<button class="wr-btn" onclick="artifactGeoUpload();">
Deploy Geo Analytics Artifacts
</button>
<div id="general-config-heading" role="tab">
<h2 class="sub-title panel-title">
Geo Analytics
</h2>
</div>
<div class="panel-collapse panel-body" role="tabpanel">
<div class="wr-input-control">
<button class="wr-btn" onclick="artifactGeoUpload();">
Deploy Geo Analytics Artifacts
</button>
</div>
</div>
</div>
{{/if}}
</div>
</div>
{{/unless}}
<!-- general-->
{{#each deviceTypes}}
<div class="wr-hidden-operation" data-operation="{{name}}" style="display: none;">
{{#if unitName}}
{{unit unitName deviceType=name}}
{{else}}
{{unit "cdmf.unit.dynamic.platform.configuration" deviceType=name}}
{{/if}}
</div>
{{/each}}
<!-- general-->
{{#each deviceTypes}}
<div class="wr-hidden-operation" data-operation="{{name}}" style="display: none;">
{{#if unitName}}
{{unit unitName deviceType=name}}
{{else}}
{{unit "cdmf.unit.dynamic.platform.configuration" deviceType=name}}
{{/if}}
</div>
{{/each}}
</div>
</div>
</div>
</div>
</div>
<div id="record-created-msg" class="container col-centered wr-content hidden">
<div class="wr-form">
<p class="page-sub-title">Configuration was saved successfully.</p>
<br>
<br>Please click <b>"Go back to configurations"</b>, if you wish to save another
<div id="record-created-msg" class="container col-centered wr-content hidden">
<div class="wr-form">
<p class="page-sub-title">Configuration was saved successfully.</p>
<br>
<br>Please click <b>"Go back to configurations"</b>, if you wish to save another
configuration or click
<b>"Exit"</b> to complete the process and go back to the dashboard.
<hr/>
<button class="wr-btn"
onclick="window.location.href='{{@app.context}}/platform-configuration'">Go back to configurations</button>
<button class="wr-btn" onclick="window.location.href='{{@app.context}}'">Exit</button>
<b>"Exit"</b> to complete the process and go back to the dashboard.
<hr/>
<button class="wr-btn"
onclick="window.location.href='{{@app.context}}/platform-configuration'">Go back to
configurations
</button>
<button class="wr-btn" onclick="window.location.href='{{@app.context}}'">Exit</button>
</div>
</div>
<!-- /content -->
</div>
<!-- /content -->
</div>
</div>
{{else}}
<h1 class="page-sub-title">
Permission Denied

@ -34,6 +34,7 @@
*/
function onRequest(context) {
var log = new Log("configuration.js");
var utility = require("/app/modules/utility.js").utility;
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
@ -50,7 +51,7 @@ function onRequest(context) {
if (data) {
for (var i = 0; i < data.length; i++) {
var deviceTypeName = data[i].name;
var deviceTypeLabel = deviceTypeName.charAt(0).toUpperCase() + deviceTypeName.slice(1);;
var deviceTypeLabel = deviceTypeName.charAt(0).toUpperCase() + deviceTypeName.slice(1);
var configUnitName = utility.getTenantedDeviceUnitName(deviceTypeName, "platform.configuration");
if (configUnitName) {
var deviceTypeConfig = utility.getDeviceTypeConfig(deviceTypeName);

@ -1,4 +0,0 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/publisher/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.publisher.ui_${feature.version}/publisher/public/,target:${installFolder}/../../deployment/server/webapps/publisher/,overwrite:true);\
Loading…
Cancel
Save