Updating artifacts to fix UI issues when upgrading carbon-dashboard version from 1.0.5 to 1.0.7
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/fdd2b14c Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/fdd2b14c Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/fdd2b14c Branch: refs/heads/master Commit: fdd2b14c4287b1d649a033d44e7e24dd6128d249 Parents: 340bedd Author: Thanuja <[email protected]> Authored: Mon Nov 2 17:44:54 2015 +0530 Committer: Akila Perera <[email protected]> Committed: Tue Nov 3 17:13:20 2015 +0530 ---------------------------------------------------------------------- .../Dashboard/stratos-metering-dashboard.json | 388 +++++++++---------- .../metering-dashboard/ues-patch/dashboard.jag | 230 +++++++++-- .../ues-patch/ues-dashboards.js | 28 +- .../Health_Stats_Filter/index.xml | 12 +- 4 files changed, 397 insertions(+), 261 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/fdd2b14c/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json index 96413db..42b436c 100644 --- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json +++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json @@ -3,7 +3,9 @@ "title": "Stratos Metering Dashboard", "description": "This dashboard is to show metering data.", "permissions": { - "viewers": [], + "viewers": [ + "Internal/everyone" + ], "editors": [ "Internal/everyone" ] @@ -20,147 +22,118 @@ "url": "store://layout/single-column/index.hbs", "content": "<!--\n\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License. You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied. See the License for the\n specific language governing permissions and limitations\n under the License.\n\n-->\n<div class=\"container\">\n<div class=\"row\">\n <div id=\"a\" class=\"col-md-12 ues-component-box\"></div>\n <div id=\"b\" class=\"col-md-12 ues-component-box\"></div >\n <div id=\"c\" class=\"col-md-12 >ues-component-box\"></div>\n</div>\n</div>\n" }, + "isanon": false, "content": { - "a": [ - { - "id": "ehng97cyk3kxogvi", - "content": { - "id": "Member_Status_Filter", - "title": "Member Status Filter", - "type": "gadget", - "thumbnail": "store://gadget/Member_Status_Filter/index.png", - "data": { - "url": "store://gadget/Member_Status_Filter/index.xml" - }, - "styles": { + "default": { + "a": [ + { + "id": "ehng97cyk3kxogvi", + "content": { + "id": "Member_Status_Filter", "title": "", - "height": "100", - "borders": false, - "titlePosition": "left" - }, - "notify": { - "member-status-filter": { - "type": "address", - "description": "This notifies time interval" + "type": "gadget", + "thumbnail": "store://gadget/Member_Status_Filter/index.png", + "data": { + "url": "store://gadget/Member_Status_Filter/index.xml" }, - "cancel": { - "type": "boolean", - "description": "This notifies cancellation of state selection" - } - }, - "options": {}, - "settings": {} + "styles": { + "title": "", + "height": "100", + "borders": false, + "titlePosition": "left" + }, + "notify": { + "member-status-filter": { + "type": "address", + "description": "This notifies time interval" + }, + "cancel": { + "type": "boolean", + "description": "This notifies cancellation of state selection" + } + }, + "settings": {} + } } - } - ], - "b": [ - { - "id": "q1pf6m8s5bq08uxr", - "content": { - "id": "Member_Count", - "title": "Member Count", - "type": "gadget", - "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png", - "data": { - "url": "local://store/carbon.super/gadget/Member_Count/index.xml" - }, - "listen": { - "member-status-filter": { - "type": "address", - "description": "Used to filter based on state", - "on": [ - { - "from": "ehng97cyk3kxogvi", - "event": "member-status-filter" - } - ] + ], + "b": [ + { + "id": "q1pf6m8s5bq08uxr", + "content": { + "id": "Member_Count", + "title": "Member Count", + "type": "gadget", + "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png", + "data": { + "url": "local://store/carbon.super/gadget/Member_Count/index.xml" }, - "auto-update": { - "type": "boolean", - "description": "Used to filter based on state", - "on": [] - } - }, - "styles": { - "title": "", - "height": "400", - "borders": true, - "titlePosition": "left" - }, - "options": { - "dataSource": { - "type": "STRING", - "title": "Data Source", - "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag", - "options": [], - "required": false + "listen": { + "member-status-filter": { + "type": "address", + "description": "Used to filter based on state", + "on": [ + { + "from": "ehng97cyk3kxogvi", + "event": "member-status-filter" + } + ] + }, + "auto-update": { + "type": "boolean", + "description": "Used to filter based on state", + "on": [] + } + }, + "styles": { + "title": "", + "height": "400", + "borders": true, + "titlePosition": "left" }, - "updateGraph": { - "type": "STRING", - "title": "Update Interval (s)", - "value": "No", - "options": [], - "required": false - } - }, - "settings": {} + "settings": {} + } } - } - ], - "c": [ - { - "id": "qf9lnn9oiv1pds4i", - "content": { - "id": "Member_Update", - "title": "Member Status", - "type": "gadget", - "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png", - "data": { - "url": "local://store/carbon.super/gadget/Member_Status/index.xml" - }, - "listen": { - "member-status-filter": { - "type": "address", - "description": "Used to filter based on state", - "on": [ - { - "from": "ehng97cyk3kxogvi", - "event": "member-status-filter" - } - ] + ], + "c": [ + { + "id": "qf9lnn9oiv1pds4i", + "content": { + "id": "Member_Update", + "title": "Member Status", + "type": "gadget", + "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png", + "data": { + "url": "local://store/carbon.super/gadget/Member_Status/index.xml" }, - "auto-update": { - "type": "boolean", - "description": "Used to filter based on state", - "on": [] - } - }, - "styles": { - "title": "", - "height": "800", - "borders": true, - "titlePosition": "left" - }, - "options": { - "dataSource": { - "type": "STRING", - "title": "Data Source", - "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag", - "options": [], - "required": false + "listen": { + "member-status-filter": { + "type": "address", + "description": "Used to filter based on state", + "on": [ + { + "from": "ehng97cyk3kxogvi", + "event": "member-status-filter" + } + ] + }, + "auto-update": { + "type": "boolean", + "description": "Used to filter based on state", + "on": [] + } }, - "updateGraph": { - "type": "STRING", - "title": "Update Interval (s)", - "value": "No", - "options": [], - "required": false - } - }, - "settings": {} + "styles": { + "title": "", + "height": "800", + "borders": true, + "titlePosition": "left" + }, + "settings": {} + } } - } - ] + ] + }, + "anon": {} } }, { @@ -174,94 +147,83 @@ "url": "store://layout/single-column/index.hbs", "content": "<!--\n\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License. You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied. See the License for the\n specific language governing permissions and limitations\n under the License.\n\n-->\n<div class=\"container\">\n<div class=\"row\">\n <div id=\"a\" class=\"col-md-12 ues-component-box\"></div>\n <div id=\"b\" class=\"col-md-12 ues-component-box\"></div >\n <div id=\"c\" class=\"col-md-12 >ues-component-box\"></div>\n</div>\n</div>\n" }, + "isanon": false, "content": { - "a": [ - { - "id": "8zgl65uoackgldi", - "content": { - "id": "Member_Details_Filter", - "title": "Member Details Filter", - "type": "gadget", - "thumbnail": "store://gadget/Member_Details_Filter/index.png", - "data": { - "url": "store://gadget/Member_Details_Filter/index.xml" - }, - "styles": { + "default": { + "a": [ + { + "id": "8zgl65uoackgldi", + "content": { + "id": "Member_Details_Filter", "title": "", - "height": "100", - "borders": false, - "titlePosition": "left" - }, - "notify": { - "member-details-filter": { - "type": "address", - "description": "This notifies applicationId and clusterId" - } - }, - "cancel": { - "type": "boolean", - "description": "This notifies cancellation of state selection" - }, - "options": {}, - "settings": {} - } - } - ], - "b": [ - { - "id": "hoqfz4b6z91nstt9", - "content": { - "id": "Member_Details", - "title": "Member Details", - "type": "gadget", - "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png", - "data": { - "url": "local://store/carbon.super/gadget/Member_Information/index.xml" - }, - "listen": { - "member-details-filter": { - "type": "address", - "description": "Used to filter based on state", - "on": [ - { - "from": "8zgl65uoackgldi", - "event": "member-details-filter" - } - ] + "type": "gadget", + "thumbnail": "store://gadget/Member_Details_Filter/index.png", + "data": { + "url": "store://gadget/Member_Details_Filter/index.xml" + }, + "styles": { + "title": "", + "height": "100", + "borders": false, + "titlePosition": "left" }, - "auto-update": { + "notify": { + "member-details-filter": { + "type": "address", + "description": "This notifies applicationId and clusterId" + } + }, + "cancel": { "type": "boolean", - "description": "Used to filter based on state" - } - }, - "styles": { - "title": "", - "height": "800", - "borders": true, - "titlePosition": "left" - }, - "options": { - "dataSource": { - "type": "STRING", - "title": "Data Source", - "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag", - "options": [], - "required": false + "description": "This notifies cancellation of state selection" + }, + "settings": {} + } + } + ], + "b": [ + { + "id": "hoqfz4b6z91nstt9", + "content": { + "id": "Member_Details", + "title": "Member Details", + "type": "gadget", + "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png", + "data": { + "url": "local://store/carbon.super/gadget/Member_Information/index.xml" + }, + "listen": { + "member-details-filter": { + "type": "address", + "description": "Used to filter based on state", + "on": [ + { + "from": "8zgl65uoackgldi", + "event": "member-details-filter" + } + ] + }, + "auto-update": { + "type": "boolean", + "description": "Used to filter based on state" + } + }, + "styles": { + "title": "", + "height": "800", + "borders": true, + "titlePosition": "left" }, - "updateGraph": { - "type": "STRING", - "title": "Update Interval (s)", - "value": "No", - "options": [], - "required": false - } - }, - "settings": {} + "settings": {} + } } - } - ] + ] + }, + "anon": {} } } ], - "landing": "member-status" + "landing": "member-status", + "isanon": false, + "isUserCustom": false } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/fdd2b14c/extensions/das/modules/artifacts/metering-dashboard/ues-patch/dashboard.jag ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/dashboard.jag b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/dashboard.jag index 43ed75b..32e926c 100644 --- a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/dashboard.jag +++ b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/dashboard.jag @@ -23,7 +23,7 @@ <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> <link rel="icon" href="<%=urlPrefix%><%=utils.resolveUrl('images/favicon.png')%>" type="image/x-icon" /> <link rel="stylesheet" href="<%=urlPrefix%>css/bootstrap.min.css"> <link rel="stylesheet" href="<%=urlPrefix%>css/fontwso2.css"> @@ -31,10 +31,28 @@ <link rel="stylesheet" href="<%=urlPrefix%>css/OpenSans.css"> <link rel="stylesheet" href="<%=urlPrefix%>css/common.css"> <link rel="stylesheet" href="<%=urlPrefix%>css/dashboard.css"> + <link rel="stylesheet" href="<%=urlPrefix%>css/bootstrap-modal-carousel.min.css"> <% include('/controllers/includes/theme-dashboard-styles.jag'); %> - <title>Dashboards</title> + <script src="<%=urlPrefix%>js/handlebars-v4.0.2.js"></script> + <%var i18n = require("i18n"); +i18n.init(request);%> + <title><%= i18n.localize("dashboard.lable")%></title> </head> -<body> +<body class="lang_<%=request.getLocale()%>"> +<% +var usr = require('/modules/user.js'); +var user = usr.current(); +var pages = dashboard.pages; +var isAnonView = request.getParameter('isAnonView'); +if (!user) { + if (isAnonView) { + response.sendRedirect(request.getRequestURL()); + } + isAnonView = true; +} else { + isAnonView = JSON.parse(isAnonView); +} +%> <div id="navigation" role="navigation" class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> @@ -44,43 +62,192 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a href="<%=dbRoot%>" class="navbar-brand"><%=dashboard.title%></a> + <a href="<%=dbRoot%>?isAnonView=<%=isAnonView%>" class="navbar-brand"><%=dashboard.title%></a> </div> <div class="collapse navbar-collapse horizontal-bar"> <ul class="nav navbar-nav"> - <li<% if(dashboard.landing === pageId) { %> class="active"<% } %>> - <a href="<%=dbRoot%>">Home</a> - </li> - <% -var pages = dashboard.pages; -pages.forEach(function (p) { - if (dashboard.landing !== p.id) { - %> - <li<%if (p.id === pageId) { %> class="active"<% } %>> - <a href="<%=dbRoot%><%=p.id%>"><%=p.title%></a> + + <% if (dashboard.pages.length >= 2) { %> + <li + <% + if (dashboard.landing === pageId) { %> + class="active" + <% + } + %>> + <a href="<%=dbRoot%>?isAnonView=<%=isAnonView + %>"><%= + i18n.localize("home") + %></a> </li> - <% } %> - <% }); %> + <% +} %> + + <% +pages.forEach(function (page) { + if (isAnonView || !user) { + if (page.isanon) { + // Anonymous viewing. So render only anonymous pages links. + renderPageLink(page); + } + } else { + renderPageLink(page); + } +}); + +function renderPageLink(page) { + if (dashboard.landing !== page.id) { %> + <li + <% + if (page.id === pageId) { %> + class="active" + <% + } + %>> + <a href="<%=dbRoot%><%=page.id%>?isAnonView=<%=isAnonView%>"> <%=page.title + %></a> + </li> + <% + } +};%> </ul> <ul class="nav navbar-nav navbar-right"> - <% if (user) { %> - <li> - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> - <%=user.username%> <span class="caret"></span> - </a> - <ul class="dropdown-menu" role="menu"> - <li><a href="<%=urlPrefix%>logout?destination=<%=dest%>">Logout</a></li> - </ul> - </li> - <% } else { %> - <li><a href="<%=urlPrefix%>login?destination=<%=dest%>">Login</a></li> - <% } %> + <% if (user) { + if (user.isEditor) { + %> + <li> + <a class="ues-copy" href="<%=dbRoot + %>?editor=true"> + <span class="fw-stack"> + <i class="fw fw-ring fw-stack-2x"></i> + <i class="fw fw-settings fw-stack-1x"></i> + </span> + <%= + i18n.localize("edit.button") + %> + </a> + </li> + <% + } else { + %> + <li> + <a class="ues-copy" href="<%=dbRoot + %>?custom=true"> + <span class="fw-stack"> + <i class="fw fw-ring fw-stack-2x"></i> + <i class="fw fw-settings fw-stack-1x"></i> + </span> + <%= + i18n.localize("personalize") + %> + </a> + </li> + <% + } + %> + <li> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> + <%= + user ? user.username : "anon" + %> <span class="caret"></span> + </a> + <ul class="dropdown-menu" role="menu"> + <li><a href="<%=urlPrefix%>logout?destination=<%=dest + %>"> + <%= + i18n.localize("logout.lable") + %> + </a></li> + </ul> + </li> + <% +} else { + %> + <li><a href="<%=urlPrefix%>login-controller?destination=<%=dest + %>"> + <%= + i18n.localize("login.lable") + %> + </a></li> + <% +} %> </ul> </div> <!--/.nav-collapse --> </div> </div> <div id="wrapper"></div> +<script id="ues-component-toolbar-hbs" type="text/x-handlebars-template"> + <div class="ues-toolbar"> + <ul class="list-inline pull-right"> + <li><a href="#" class="ues-component-full-handle"><i class="fw fw-laptop"></i></a></li> + </ul> + {{#has options}} + <ul class="list-inline pull-right"> + <li><a href="#" class="ues-component-settings-handle"><i class="fw fw-settings ues-component-properties-toggle"></i></a></li> + </ul> + {{/has}} + </div> +</script> +<script id="ues-component-full-hbs" type="text/x-handlebars-template"> + <div class="modal fade modal-fullscreen force-fullscreen" id="componentFull" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-body"> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default">Close</button> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> + </div><!-- /.modal --> +</script> +<script id="ues-gadget-setting-hbs" type="text/x-handlebars-template"> + <div class="ues-sandbox" data-component="{{id}}"> + <div id="ues-gadget-options" class="ues-gadget-options ues-gadget-properties gadget-setting"> + <form class="ues-component-properties"> + {{#has options}} + <div class="ues-options ues-properties"> + <h4>Options</h4> + {{#each options}} + <div class="form-group"> + {{#equals type "STRING"}} + <label>{{title}} + <input type="text" class="form-control" name="{{@key}}" placeholder="{{title}}" value="{{value}}"> + </label> + {{/equals}} + {{#equals type "BOOL"}} + <label> + <input type="checkbox" name="{{title}}"{{#equals value true}} checked="checked"{{/equals}}> {{title}} + </label> + {{/equals}} + {{#equals type "ENUM"}} + <label>{{title}} + <select id={{title}} name={{title}} class="form-control ues-title-position"> + {{#each options}} + <option value={{value}}{{#equals value ../value}} selected="selected"{{/equals}}>{{displayValue}}</option> + {{/each}} + </select> + </label> + {{/equals}} + {{#equals type "text"}} + <label>{{title}} + <textarea name="{{@key}}" class="form-control" rows="4">{{value}}</textarea> + </label> + {{/equals}} + </div> + {{/each}} + </div> + <hr/> + {{/has}} + {{#has options}} + {{else}} + No properties to configure. + {{/has}} + </form> + </div> + </div> +</script> <!--<iframe id="sandbox" src="preview.jag"></iframe>--> <script src="<%=urlPrefix%>js/jquery-1.10.2.js"></script> <script src="<%=urlPrefix%>js/bootstrap.min.js"></script> @@ -92,14 +259,17 @@ pages.forEach(function (p) { <% include('/controllers/includes/dashboard-scripts.jag'); %> <script src="<%=urlPrefix%>js/ues-gadgets.js"></script> <script src="<%=urlPrefix%>js/ues-dashboards.js"></script> -<script src="<%=urlPrefix%>js/ues-pubsub.js"></script> <script src="<%=urlPrefix%>extensions/components/gadget/index.js"></script> <script src="<%=urlPrefix%>extensions/components/widget/index.js"></script> <script src="<%=urlPrefix%>extensions/uris/local/index.js"></script> <script src="<%=urlPrefix%>extensions/uris/store/index.js"></script> +<script src="<%=urlPrefix%>js/bootstrap-modal-carousel.min.js"></script> +<script src="<%=urlPrefix%>js/gadget-properties.js"></script> <% include('/controllers/includes/theme-dashboard-scripts.jag'); %> <script> - ues.dashboards.render($('#wrapper'), ues.global.dashboard, ues.global.page); + if(!ues.global.renderFromExtension){ + ues.dashboards.render($('#wrapper'), ues.global.dashboard, ues.global.page); + } </script> </body> </html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/fdd2b14c/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-dashboards.js ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-dashboards.js b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-dashboards.js index 4a0b27a..69fd4ed 100644 --- a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-dashboards.js +++ b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-dashboards.js @@ -27,10 +27,13 @@ return plugin; }; + var createComponent = function (container, component, done) { var type = component.content.type; var plugin = findPlugin(type); - var sandbox = $('<div id="' + component.id + '" class="ues-component"></div>'); + var sandboxId = component.id; + //(component.viewOption? component.id+"_full" : component.id ); + var sandbox = $('<div id="' + sandboxId + '" data-component-id="' + component.id + '" class="ues-component"></div>'); sandbox.appendTo(container); plugin.create(sandbox, component, ues.hub, done); }; @@ -66,18 +69,19 @@ }); }; - + //overriding publish method var publish = ues.hub.publish; ues.hub.publish = function (topic, data){ $(".container").find('.ues-component').each(function () { var id = $(this).attr('id'); var channel = id + "." + topic; + console.log(channel); publish.apply(ues.hub, [channel, data]); }); - } + }; - var wires = function (page) { - var content = page.content; + var wires = function (page, pageType) { + var content = page.content[pageType]; var area; var blocks; var wirez = {}; @@ -120,13 +124,13 @@ document.title = dashboard.title + ' | ' + page.title; }; - var renderPage = function (element, dashboard, page, done) { + var renderPage = function (element, dashboard, page, pageType, done) { setDocumentTitle(dashboard, page); - wirings = wires(page); + wirings = wires(page, pageType); var container; var area; var layout = $(page.layout.content); - var content = page.content; + var content = page.content[pageType]; element.html(layout); for (area in content) { if (content.hasOwnProperty(area)) { @@ -159,17 +163,17 @@ } }; - var renderDashboard = function (element, dashboard, name, done) { + var renderDashboard = function (element, dashboard, name, pageType, done) { name = name || dashboard.landing; var page = findPage(dashboard, name); if (!page) { throw 'requested page : ' + name + ' cannot be found'; } - renderPage(element, dashboard, page, done); + renderPage(element, dashboard, page, pageType, done); }; - var rewireDashboard = function (page) { - wirings = wires(page); + var rewireDashboard = function (page, pageType) { + wirings = wires(page, pageType); }; var resolveURI = function (uri) { http://git-wip-us.apache.org/repos/asf/stratos/blob/fdd2b14c/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/GadgetHealthStatsFilter/Health_Stats_Filter/index.xml ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/GadgetHealthStatsFilter/Health_Stats_Filter/index.xml b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/GadgetHealthStatsFilter/Health_Stats_Filter/index.xml index 1541528..9ca6312 100644 --- a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/GadgetHealthStatsFilter/Health_Stats_Filter/index.xml +++ b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/GadgetHealthStatsFilter/Health_Stats_Filter/index.xml @@ -44,24 +44,24 @@ <form id="member-status" method="post" action="#"> <div class="container-fluid"> <div class="row"> - <div class="col-xs-9" id="cluster"> - <label for="cluster-filter">Cluster</label> + <div class="col-xs-11" id="cluster"> + <label class="col-xs-1" for="cluster-filter">Cluster</label> <select id="cluster-filter"> <option value="Select Cluster" disabled>Select Cluster</option> </select> </div> </div> <div class="row"> - <div class="col-xs-9" id="member" style="margin-top: 10px;"> - <label for="member-filter">Member</label> + <div class="col-xs-11" id="member" style="margin-top: 10px;"> + <label class="col-xs-1" for="member-filter">Member</label> <select id="member-filter"> <option value="All Members" disabled>All Members</option> </select> </div> </div> <div class="row"> - <div class="col-xs-9" id="time-interval" style="margin-top: 10px;"> - <label for="time-selector">Time</label> + <div class="col-xs-11" id="time-interval" style="margin-top: 10px;"> + <label class="col-xs-1" for="time-selector">Time</label> <input type="button" class="button" value="30 Min" onClick="publish(this.value)"> <input type="button" class="button" value="1 Hour" onClick="publish(this.value)"> <input type="button" class="button" value="1 Day" onClick="publish(this.value)">
