Adding UI changes to integrate metering dashboard in applications' topology view
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a43277e7 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a43277e7 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a43277e7 Branch: refs/heads/stratos-4.1.x Commit: a43277e7114b727af1d5b7c8202ad563c4efef39 Parents: 09e7abb Author: Thanuja <[email protected]> Authored: Tue Oct 6 10:58:12 2015 +0530 Committer: Akila Perera <[email protected]> Committed: Sat Oct 10 00:51:09 2015 +0530 ---------------------------------------------------------------------- .../console/applications_form.jag | 49 ++-- .../console/controllers/login/login.jag | 24 +- .../theme0/js/custom/applications_topology.js | 20 +- .../theme0/partials/applications_topology.hbs | 228 ++++++++++--------- .../theme0/renderers/applications_form.js | 164 ++++++------- .../src/main/conf/cartridge-config.properties | 3 + 6 files changed, 252 insertions(+), 236 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/a43277e7/components/org.apache.stratos.manager.console/console/applications_form.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/applications_form.jag b/components/org.apache.stratos.manager.console/console/applications_form.jag index 6f63501..a9f8021 100644 --- a/components/org.apache.stratos.manager.console/console/applications_form.jag +++ b/components/org.apache.stratos.manager.console/console/applications_form.jag @@ -32,10 +32,13 @@ var log = new Log("apachestratos.applications_form"), uriMatcher = new URIMatcher(request.getRequestURI()), elements = uriMatcher.match('/{context}/{formtype}/'), breadcrumbPathLevelOne = 'applications', - formDataEdit = topologyData = editorGroups = editorCartridges = editorAutoscalePolicies = applicationHbs ='', - editorDeploymentPolicies = applicationPolicyData = applicationJSON ='', - isEdit = isForm = false, - userPermissions = session.get('PERMISSIONS'); + formDataEdit = topologyData = editorGroups = editorCartridges = editorAutoscalePolicies = applicationHbs = '', + editorDeploymentPolicies = applicationPolicyData = applicationJSON = '', + isEdit = isForm = false, + userPermissions = session.get('PERMISSIONS'), + dasStatsPublisherEnabled = session.get('DAS_STATS_PUBLISHER_ENABLED'), + meteringDashboardUrl = ''; + //create left menu var leftMenu = menuGenerator(context, menuJson.menu, userPermissions); @@ -44,7 +47,7 @@ var leftMenu = menuGenerator(context, menuJson.menu, userPermissions); if (!elements) { elements = uriMatcher.match('/{context}/{formtype}/{action}/'); - if(!elements){ + if (!elements) { elements = uriMatcher.match('/{context}/{formtype}/{applicationId}/{action}'); var applicationName = elements.applicationId; @@ -52,17 +55,16 @@ if (!elements) { applicationJSON = util.RESTCalls.getApplicationJSON(applicationName); var applicationAlias = applicationJSON.alias; - if(elements.action == 'view'){ + if (elements.action == 'view') { applicationHbs = 'applicationView'; - }else if(elements.action == 'deploy'){ + } else if (elements.action == 'deploy') { applicationHbs = 'applicationDeploy'; applicationPolicyData = util.RESTCalls.getApplicationPolicies(); - }else if(elements.action == 'signup'){ + } else if (elements.action == 'signup') { applicationHbs = 'applicationSignup'; } - }else{ - + } else { try { var formData = require('controllers/forms/schema/applications/' + elements.formtype + '.json'), formDataRaw = require('controllers/forms/default/applications/' + elements.formtype + '.json'), @@ -80,9 +82,10 @@ if (!elements) { //get application json applicationJSON = util.RESTCalls.getApplicationJSON(elements.action); - }else if(elements.formtype == 'applications' && elements.action == 'new'){ + + } else if (elements.formtype == 'applications' && elements.action == 'new') { applicationHbs = 'applicationEditor'; - editorGroups = util.RESTCalls.getGroups(); + editorGroups = util.RESTCalls.getGroups(); editorCartridges = util.RESTCalls.getCartridges(); editorAutoscalePolicies = util.RESTCalls.getPolicyAutoScales(); editorDeploymentPolicies = util.RESTCalls.getPolicyDeployments(); @@ -106,7 +109,11 @@ switch (formtype) { break; default: - error.push({"errorMessage":"Incorrect resource path found"}); + error.push({"errorMessage": "Incorrect resource path found"}); +} + +if (dasStatsPublisherEnabled) { + meteringDashboardUrl = session.get('METERING_DASHBOARD_URL'); } var caramelData = { breadcrumbPathLevelOne: breadcrumbPathLevelOne, @@ -119,22 +126,24 @@ var caramelData = { editorGroups: JSON.stringify(editorGroups), editorCartridges: JSON.stringify(editorCartridges), editorAutoscalePolicies: JSON.stringify(editorAutoscalePolicies), - editorDeploymentPolicies:JSON.stringify(editorDeploymentPolicies), + editorDeploymentPolicies: JSON.stringify(editorDeploymentPolicies), applicationHbs: applicationHbs, - applicationPolicyData:applicationPolicyData, - applicationAlias:applicationAlias, - applicationName:applicationName, - applicationJSON:JSON.stringify(applicationJSON), + applicationPolicyData: applicationPolicyData, + applicationAlias: applicationAlias, + applicationName: applicationName, + applicationJSON: JSON.stringify(applicationJSON), applicationStatus: applicationJSON.status, formTitle: formTitle, formDataRaw: JSON.stringify(formDataRaw), - formtype:elements.formtype, + formtype: elements.formtype, buttonText: buttonText, //formDataRaw: JSON.stringify(partition_data.partition[0]), formDataEdit: JSON.stringify(formDataEdit), formData: JSON.stringify(formData), list_data: list_data, - error: error + error: error, + dasStatsPublisherEnabled: dasStatsPublisherEnabled, + meteringDashboardUrl: meteringDashboardUrl } http://git-wip-us.apache.org/repos/asf/stratos/blob/a43277e7/components/org.apache.stratos.manager.console/console/controllers/login/login.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/login/login.jag b/components/org.apache.stratos.manager.console/console/controllers/login/login.jag index 4843262..6a78ecf 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/login/login.jag +++ b/components/org.apache.stratos.manager.console/console/controllers/login/login.jag @@ -24,15 +24,21 @@ var log = new Log("controller.login"), util = require('/controllers/rest/rest_calls.jag'), server = new carbon.server.Server(), conf = carbon.server.loadConfig('carbon.xml'), - offset = conf.*::['Ports'].*::['Offset'].text(), - hostName = conf.*::['HostName'].text().toString(); + offset = conf. *::['Ports']. *::['Offset'].text(), + hostName = conf. *::['HostName'].text().toString(), + conf = carbon.server.loadConfig('thrift-client-config.xml'), + dasConfig = conf. *::['config'].(name == "das"), + dasStatsPublisherEnabled = dasConfig.statsPublisherEnabled.text(); + if (hostName === null || hostName === '') { hostName = 'localhost'; } var httpPort = 9763 + parseInt(offset, 10), - httpsPort = 9443 + parseInt(offset, 10); + httpsPort = 9443 + parseInt(offset, 10); + +var meteringDashboardUrl = process.getProperty("das.metering.dashboard.url"); process.setProperty('server.host', hostName); process.setProperty('http.port', httpPort.toString()); @@ -40,7 +46,7 @@ process.setProperty('https.port', httpsPort.toString()); var username = request.getParameter('username').trim(), - password = request.getParameter('password'); + password = request.getParameter('password'); if (username || password) { session.put("error", "Enter your username and password."); @@ -49,7 +55,7 @@ if (username || password) { try { var auth = server.authenticate(username, password); if (!auth) { - print({ status: 0, "message" : "The username or password you entered is incorrect." }); + print({status: 0, "message": "The username or password you entered is incorrect."}); } else { var userObject = carbon.server.tenantUser(username); var um = new carbon.user.UserManager({}, userObject.tenantId); @@ -60,6 +66,10 @@ try { session.put("TENANT_DOMAIN", userObject.domain); session.put("ROLE_ARRAY", roles); session.put("TENANT_ID", userObject.tenantId); + session.put("DAS_STATS_PUBLISHER_ENABLED", dasStatsPublisherEnabled); + if (dasStatsPublisherEnabled) { + session.put("METERING_DASHBOARD_URL", meteringDashboardUrl); + } try { //get all user permission @@ -67,8 +77,8 @@ try { session.put("PERMISSIONS", userPermissions); //call the authentication rest-endpoint and get the JSESSION_ID var result = util.RESTCalls.getSession(username, password); - if((result == null) || (result.data == null) || (result.data.Success == null)) { - print({ "status": 0, "message" : "Login permission is not granted for user." }); + if ((result == null) || (result.data == null) || (result.data.Success == null)) { + print({"status": 0, "message": "Login permission is not granted for user."}); } else { //save the JSESSION_ID in current console.session. var jSessionId = result.data.Success.sessionId; http://git-wip-us.apache.org/repos/asf/stratos/blob/a43277e7/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_topology.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_topology.js b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_topology.js index 2bba203..40bdfae 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_topology.js +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_topology.js @@ -20,6 +20,7 @@ */ var applicationId = ''; + //create JSON from topology function genTree(data) { var rawout = []; @@ -141,6 +142,7 @@ function genTree(data) { return treeData[0]; } + function update(source) { // ************** Generate the tree diagram ***************** @@ -215,8 +217,10 @@ function update(source) { accessURLHTML + "<strong>HostNames: </strong>" + d.hostNames + "<br/>" + "<strong>Service Name: </strong>" + d.serviceName + "<br/>" + - "<strong>Status: </strong>" + d.status + "<br/>" + - "<button class='btn btn-info show-usage' id=" + d.alias + " name='clusterUsage' onClick='showClusterUsage(this.id)'>Show Usage</button>"; + "<strong>Status: </strong>" + d.status + "<br/>"; + if (dasStatsPublisherEnabled) { + div_html += "<button class='btn btn-info show-usage' id=" + d.alias + " name='clusterUsage' onClick='showClusterUsage(this.id)'>Show Usage</button>"; + } } else if (d.type == 'members') { if ((typeof d.ports != 'undefined') && (d.ports.length > 0)) { var portsHTML = "<strong>Ports: </strong></br>"; @@ -249,9 +253,10 @@ function update(source) { } else { div_html = "<strong>Alias: </strong>" + d.name + "<br/>" + - "<strong>Status: </strong>" + d.status + "<br/>" + - "<button class='btn btn-info show-usage' id=" + d.name + " name='appUsage' onClick='showApplicationUsage(this.id)'>Show Usage</button>"; - + "<strong>Status: </strong>" + d.status + "<br/>"; + if (dasStatsPublisherEnabled) { + div_html += "<button class='btn btn-info show-usage' id=" + d.name + " name='appUsage' onClick='showApplicationUsage(this.id)'>Show Usage</button>"; + } } return div_html; }); @@ -604,13 +609,14 @@ $("a[href='#application']").on('shown.bs.tab', function (e) { } }); + function showApplicationUsage(id) { - window.location = 'https://localhost:9444/portal/dashboards/stratos-metering-dashboard?applicationId=' + applicationId; + window.location = meteringDashboardUrl + '?applicationId=' + applicationId; } function showClusterUsage(id, type) { var clusterId = id; - window.location = 'https://localhost:9444/portal/dashboards/stratos-metering-dashboard?applicationId=' + applicationId + '&clusterId=' + clusterId; + window.location = meteringDashboardUrl + '?applicationId=' + applicationId + '&clusterId=' + clusterId; } http://git-wip-us.apache.org/repos/asf/stratos/blob/a43277e7/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs index 72300bc..41eed06 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs @@ -31,14 +31,16 @@ <div class='container text-center form-toolbar'> <div class='col-md-1'> <button class='btn btn-default btn-lg' type='button' style="margin-left: -15px; " - onclick='window.location.replace(document.referrer)'> Back</button> - </div> - {{#ifCond applicationStatus "==" "Undeploying"}} - <div class='col-md-1'> - <button class="btn btn-danger btn-lg" type="button" style="..." - value="{{appName}}" id="force_undeploy">Force Undeploy</button> + onclick='window.location.replace(document.referrer)'> Back + </button> </div> - {{/ifCond}} + {{#ifCond applicationStatus "==" "Undeploying"}} + <div class='col-md-1'> + <button class="btn btn-danger btn-lg" type="button" style="..." + value="{{appName}}" id="force_undeploy">Force Undeploy + </button> + </div> + {{/ifCond}} </div> </div> <!-- Nav tabs --> @@ -51,8 +53,10 @@ <div class="tab-content"> <div class="tab-pane active" id="topology"> <div class="topology-buttons"> - <a id='export' ><i class="fa fa-save" data-toggle="tooltip" data-placement="top" title="Export as PNG"></i></a> - <i class="fa fa-refresh" id='refresh' data-toggle="tooltip" data-placement="top" title="Refresh Topology"></i> + <a id='export'><i class="fa fa-save" data-toggle="tooltip" data-placement="top" + title="Export as PNG"></i></a> + <i class="fa fa-refresh" id='refresh' data-toggle="tooltip" data-placement="top" + title="Refresh Topology"></i> </div> <div class="left-side"> <div class="panel panel-default"> @@ -61,11 +65,11 @@ </div> <div class="panel-body"> <div class="keys"> - <div><i class="fa fa-square st-active"></i> Active </div> - <div><i class="fa fa-square st-created"></i> Created </div> - <div><i class="fa fa-square st-inactive"></i> Inactive </div> - <div><i class="fa fa-square st-terminated"></i> Terminated </div> - <div><i class="fa fa-square st-other"></i> Other </div> + <div><i class="fa fa-square st-active"></i> Active</div> + <div><i class="fa fa-square st-created"></i> Created</div> + <div><i class="fa fa-square st-inactive"></i> Inactive</div> + <div><i class="fa fa-square st-terminated"></i> Terminated</div> + <div><i class="fa fa-square st-other"></i> Other</div> </div> </div> </div> @@ -86,114 +90,116 @@ </div> </div> + <script type="text/javascript"> var topologydata = {{{topologyData}}}; var applicationJSON = {{{applicationJSON}}}; -$(window).load(function() { + var dasStatsPublisherEnabled = {{dasStatsPublisherEnabled}}; + var meteringDashboardUrl = '{{meteringDashboardUrl}}'; + $(window).load(function () { - //handled Ajax base session expire issue - $(document).ajaxError(function (e, xhr, settings) { - window.location.href = '../'; - }); + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); - //initial generation with deafult call - update(genTree(topologydata)); - - $('#refresh').click(function(){ - //get ajax call - $(".application-topology").html('<i class="fa fa-spinner fa-pulse fa-4x"></i>'); - var formtype = 'applicationtopology'; - var applicationId = "{{appName}}"; - - $.ajax({ - type: "GET", - url: caramel.context + "/controllers/applications/application_getrequests.jag", - dataType: 'json', - data: { "formtype": formtype, "appId":applicationId }, - success: function (data) { - if (data.status == 'error') { - var n = noty({text: data.message, layout: 'bottomRight', type: 'error'}); - $(".application-topology").html(''); - } else { - $(".application-topology").html(''); - update(genTree(data)); - //call canvas update event - canvg('canvasOriginal', new XMLSerializer().serializeToString(svg)); + //initial generation with deafult call + update(genTree(topologydata)); + + $('#refresh').click(function () { + //get ajax call + $(".application-topology").html('<i class="fa fa-spinner fa-pulse fa-4x"></i>'); + var formtype = 'applicationtopology'; + var applicationId = "{{appName}}"; + + $.ajax({ + type: "GET", + url: caramel.context + "/controllers/applications/application_getrequests.jag", + dataType: 'json', + data: {"formtype": formtype, "appId": applicationId}, + success: function (data) { + if (data.status == 'error') { + var n = noty({text: data.message, layout: 'bottomRight', type: 'error'}); + $(".application-topology").html(''); + } else { + $(".application-topology").html(''); + update(genTree(data)); + //call canvas update event + canvg('canvasOriginal', new XMLSerializer().serializeToString(svg)); + } } - } - }) - }); + }) + }); - //make svg to canvas - var svg = $('svg')[0]; - var canvasOriginal = $('#canvasOriginal')[0]; - var ctxOriginal = canvasOriginal.getContext('2d'); - // this saves the inline svg to canvas without external css - canvg('canvasOriginal', new XMLSerializer().serializeToString(svg)); - /** - * This is the function that will take care of image extracting and - * setting proper filename for the download. - * IMPORTANT: Call it from within a onclick event. - */ - function downloadCanvas(link, canvasId, filename) { - link.href = document.getElementById(canvasId).toDataURL(); - link.download = filename; - } - - /** - * The event handler for the link's onclick event. We give THIS as a - * parameter (=the link element), ID of the canvas and a filename. - */ - $('#export').click(function() { - downloadCanvas(this, 'canvasOriginal', '{{{appName}}}.png'); - }); + //make svg to canvas + var svg = $('svg')[0]; + var canvasOriginal = $('#canvasOriginal')[0]; + var ctxOriginal = canvasOriginal.getContext('2d'); + // this saves the inline svg to canvas without external css + canvg('canvasOriginal', new XMLSerializer().serializeToString(svg)); + /** + * This is the function that will take care of image extracting and + * setting proper filename for the download. + * IMPORTANT: Call it from within a onclick event. + */ + function downloadCanvas(link, canvasId, filename) { + link.href = document.getElementById(canvasId).toDataURL(); + link.download = filename; + } + + /** + * The event handler for the link's onclick event. We give THIS as a + * parameter (=the link element), ID of the canvas and a filename. + */ + $('#export').click(function () { + downloadCanvas(this, 'canvasOriginal', '{{{appName}}}.png'); + }); -$( "#force_undeploy" ).click(function() { -var payload =$(this).attr("value"); - noty({ - layout: 'bottomRight', - type: 'warning', - text: 'Are you sure you want to <strong>forcefully undeploy</strong> application: <strong>' - +$(this).attr("value") + "</strong> ?", - buttons: [ - {addClass: 'btn btn-primary', text: 'Yes', onClick: function($noty) { - var formtype = 'forceundeployapplication'; - $noty.close(); - - $.ajax({ - type: "POST", - url: caramel.context + "/controllers/applications/application_requests.jag", - dataType: 'json', - data: { "applicationId": payload, "formtype": formtype }, - success: function (data) { - if (data.status == 'error') { - var n = noty({text: data.message, layout: 'bottomRight', type: 'error'}); - } else if (data.status == 'warning') { - var n = noty({text: data.message, layout: 'bottomRight', type: 'warning'}); - } else { - var n = noty({text: data.message, layout: 'bottomRight', type: 'success'}); + $("#force_undeploy").click(function () { + var payload = $(this).attr("value"); + noty({ + layout: 'bottomRight', + type: 'warning', + text: 'Are you sure you want to <strong>forcefully undeploy</strong> application: <strong>' + + $(this).attr("value") + "</strong> ?", + buttons: [ + { + addClass: 'btn btn-primary', text: 'Yes', onClick: function ($noty) { + var formtype = 'forceundeployapplication'; + $noty.close(); + + $.ajax({ + type: "POST", + url: caramel.context + "/controllers/applications/application_requests.jag", + dataType: 'json', + data: {"applicationId": payload, "formtype": formtype}, + success: function (data) { + if (data.status == 'error') { + var n = noty({text: data.message, layout: 'bottomRight', type: 'error'}); + } else if (data.status == 'warning') { + var n = noty({text: data.message, layout: 'bottomRight', type: 'warning'}); + } else { + var n = noty({text: data.message, layout: 'bottomRight', type: 'success'}); + } + window.setTimeout(function () { + window.location.href = '../'; + }, 1500); } - window.setTimeout(function(){ - window.location.href = '../'; - }, 1500); - } - }).always(function () { - - }); - - } - }, - {addClass: 'btn btn-danger', text: 'No', onClick: function($noty) { - $noty.close(); - } - } - ] + }).always(function () { + + }); + + } + }, + { + addClass: 'btn btn-danger', text: 'No', onClick: function ($noty) { + $noty.close(); + } + } + ] + }); }); }); -}); - - - </script> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/a43277e7/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js b/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js index e5efbce..b87f893 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js @@ -20,7 +20,7 @@ */ var render = function (theme, data, meta, require) { - if(data.error.length === 0 ){ + if (data.error.length === 0) { switch (data.applicationHbs) { case "applicationView": @@ -29,16 +29,15 @@ var render = function (theme, data, meta, require) { { partial: 'index_title', context: { - page_title: 'Apache Stratos - Application Managment', - page_description: 'Apache Stratos - Application Managment' + page_title: 'Apache Stratos - Application Management', + page_description: 'Apache Stratos - Application Management' } } ], header: [ { partial: 'index_header', - context: { - } + context: {} } ], sub_header: [ @@ -61,9 +60,7 @@ var render = function (theme, data, meta, require) { right_menu_help: [ { partial: 'index_right_menu_help', - context: { - - } + context: {} } ], content: [ @@ -81,25 +78,24 @@ var render = function (theme, data, meta, require) { ] }); - break; + break; case "applicationTopology": - theme('index', { - page_meta: [ - { - partial: 'index_title', - context: { - page_title: 'Apache Stratos - Application Managment', - page_description: 'Apache Stratos - Application Managment' + theme('index', { + page_meta: [ + { + partial: 'index_title', + context: { + page_title: 'Apache Stratos - Application Management', + page_description: 'Apache Stratos - Application Management' + } } - } ], header: [ { partial: 'index_header', - context: { - } + context: {} } ], sub_header: [ @@ -122,9 +118,7 @@ var render = function (theme, data, meta, require) { right_menu_help: [ { partial: 'index_right_menu_help', - context: { - - } + context: {} } ], content: [ @@ -134,7 +128,7 @@ var render = function (theme, data, meta, require) { formContext: data.breadcrumbPathLevelTwo, appName: data.appName, topologyData: data.topologyData, - applicationJSON:data.applicationJSON, + applicationJSON: data.applicationJSON, applicationStatus: data.applicationStatus, form_action: data.form_action, formHtml: data.formHtml, @@ -144,14 +138,17 @@ var render = function (theme, data, meta, require) { isForm: data.isForm, isEdit: data.isEdit, formTitle: data.formTitle, - content_body: {sections: data.list_data + dasStatsPublisherEnabled: data.dasStatsPublisherEnabled, + meteringDashboardUrl: data.meteringDashboardUrl, + content_body: { + sections: data.list_data } } } ] }); - break; + break; case "applicationDeploy": theme('index', { @@ -159,16 +156,15 @@ var render = function (theme, data, meta, require) { { partial: 'index_title', context: { - page_title: 'Apache Stratos - Application Managment', - page_description: 'Apache Stratos - Application Managment' + page_title: 'Apache Stratos - Application Management', + page_description: 'Apache Stratos - Application Management' } } ], header: [ { partial: 'index_header', - context: { - } + context: {} } ], sub_header: [ @@ -191,9 +187,7 @@ var render = function (theme, data, meta, require) { right_menu_help: [ { partial: 'index_right_menu_help', - context: { - - } + context: {} } ], content: [ @@ -205,9 +199,9 @@ var render = function (theme, data, meta, require) { applicationAlias: data.applicationAlias, applicationJSON: data.applicationJSON, editorCartridges: data.editorCartridges, - editorGroups:data.editorGroups, + editorGroups: data.editorGroups, form_action: data.form_action, - applicationPolicyData:data.applicationPolicyData, + applicationPolicyData: data.applicationPolicyData, formHtml: data.formHtml, formData: data.formData, formDataRaw: data.formDataRaw, @@ -221,7 +215,7 @@ var render = function (theme, data, meta, require) { ] }); - break; + break; case "applicationEditor": theme('index', { @@ -229,16 +223,15 @@ var render = function (theme, data, meta, require) { { partial: 'index_title', context: { - page_title: 'Apache Stratos - Application Managment', - page_description: 'Apache Stratos - Application Managment' + page_title: 'Apache Stratos - Application Management', + page_description: 'Apache Stratos - Application Management' } } ], header: [ { partial: 'index_header', - context: { - } + context: {} } ], sub_header: [ @@ -261,9 +254,7 @@ var render = function (theme, data, meta, require) { right_menu_help: [ { partial: 'index_right_menu_help', - context: { - - } + context: {} } ], content: [ @@ -273,7 +264,7 @@ var render = function (theme, data, meta, require) { formContext: data.breadcrumbPathLevelTwo, appName: data.appName, editorCartridges: data.editorCartridges, - editorGroups:data.editorGroups, + editorGroups: data.editorGroups, editorAutoscalePolicies: data.editorAutoscalePolicies, editorDeploymentPolicies: data.editorDeploymentPolicies, form_action: data.form_action, @@ -290,7 +281,7 @@ var render = function (theme, data, meta, require) { ] }); - break; + break; case "applicationSignup": theme('index', { @@ -298,16 +289,15 @@ var render = function (theme, data, meta, require) { { partial: 'index_title', context: { - page_title: 'Apache Stratos - Application Managment', - page_description: 'Apache Stratos - Application Managment' + page_title: 'Apache Stratos - Application Management', + page_description: 'Apache Stratos - Application Management' } } ], header: [ { partial: 'index_header', - context: { - } + context: {} } ], sub_header: [ @@ -330,9 +320,7 @@ var render = function (theme, data, meta, require) { right_menu_help: [ { partial: 'index_right_menu_help', - context: { - - } + context: {} } ], content: [ @@ -358,99 +346,93 @@ var render = function (theme, data, meta, require) { { partial: 'index_title', context: { - page_title: 'Apache Stratos - Application Managment', - page_description: 'Apache Stratos - Application Managment' + page_title: 'Apache Stratos - Application Management', + page_description: 'Apache Stratos - Application Management' } } ], - header:[ + header: [ { partial: 'index_header', - context:{ - } + context: {} } ], - sub_header:[ + sub_header: [ { - partial:'index_sub_header', - context:{ - breadcrumbPathLevelOne:data.breadcrumbPathLevelOne, - breadcrumbPathLevelTwo:data.breadcrumbPathLevelTwo + partial: 'index_sub_header', + context: { + breadcrumbPathLevelOne: data.breadcrumbPathLevelOne, + breadcrumbPathLevelTwo: data.breadcrumbPathLevelTwo } } ], - left_menu:[ + left_menu: [ { - partial:'index_left_menu', - context:{ - left_menu:data.left_menu + partial: 'index_left_menu', + context: { + left_menu: data.left_menu } } ], - right_menu_help:[ + right_menu_help: [ { - partial:'index_right_menu_help', - context:{ - - } + partial: 'index_right_menu_help', + context: {} } ], content: [ { - partial:'applications_form', - context:{ + partial: 'applications_form', + context: { formContext: data.breadcrumbPathLevelTwo, form_action: data.form_action, formHtml: data.formHtml, formData: data.formData, formDataRaw: data.formDataRaw, formDataEdit: data.formDataEdit, - formtype:data.formtype, + formtype: data.formtype, buttonText: data.buttonText, isForm: data.isForm, - isEdit:data.isEdit, + isEdit: data.isEdit, formTitle: data.formTitle, - content_body: {sections: - data.list_data + content_body: { + sections: data.list_data } } } ] }); - break; + break; } - }else{ + } else { theme('index', { page_meta: [ { - partial:'index_title', - context:{ - page_title:'Apache Stratos Home - Error', - page_description:'Apache Stratos Home - Error' + partial: 'index_title', + context: { + page_title: 'Apache Stratos Home - Error', + page_description: 'Apache Stratos Home - Error' } } ], - header:[ + header: [ { partial: 'index_header', - context:{ - } + context: {} } ], content: [ { partial: 'error_page', - context:{ - error:data.error, - content_title:'Sorry Something went Wrong...! ', - content_body:{ - - } + context: { + error: data.error, + content_title: 'Sorry Something went Wrong...! ', + content_body: {} } } http://git-wip-us.apache.org/repos/asf/stratos/blob/a43277e7/products/stratos/modules/distribution/src/main/conf/cartridge-config.properties ---------------------------------------------------------------------- diff --git a/products/stratos/modules/distribution/src/main/conf/cartridge-config.properties b/products/stratos/modules/distribution/src/main/conf/cartridge-config.properties index 461a54c..c96edb5 100644 --- a/products/stratos/modules/distribution/src/main/conf/cartridge-config.properties +++ b/products/stratos/modules/distribution/src/main/conf/cartridge-config.properties @@ -22,8 +22,11 @@ autoscaler.service.url=https://localhost:9443/services/AutoscalerService/ cloud.controller.service.url=https://localhost:9443/services/CloudControllerService/ stratos.manager.service.url=https://localhost:9443/services/StratosManagerService/ +das.metering.dashboard.url=https://localhost:9444/portal/dashboards/stratos-metering-dashboard/ puppet.ip=127.0.0.1 puppet.hostname=puppet.stratos.apache.org puppet.dns.available=false puppet.environment=stratos + +
