Fix platform configuration display for custom units

4.x.x
Charitha Goonetilleke 5 years ago
parent 03345edca3
commit f1aa82c2b8

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

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