You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/11/12 10:37:49 UTC
[1/4] stratos git commit: Changing Monitoring menu link target in
menuGenerator()
Repository: stratos
Updated Branches:
refs/heads/stratos-4.1.x b67418df9 -> 10ea238e1
Changing Monitoring menu link target in menuGenerator()
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/10ea238e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/10ea238e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/10ea238e
Branch: refs/heads/stratos-4.1.x
Commit: 10ea238e1aedb466493e5bc06cc883c5e000b3e9
Parents: 4862019
Author: Thanuja <th...@wso2.com>
Authored: Thu Nov 12 14:38:38 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Thu Nov 12 15:07:27 2015 +0530
----------------------------------------------------------------------
.../console/controllers/menu/menu_generator.jag | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/10ea238e/components/org.apache.stratos.manager.console/console/controllers/menu/menu_generator.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/menu/menu_generator.jag b/components/org.apache.stratos.manager.console/console/controllers/menu/menu_generator.jag
index ee6b6ea..14b4676 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/menu/menu_generator.jag
+++ b/components/org.apache.stratos.manager.console/console/controllers/menu/menu_generator.jag
@@ -40,12 +40,14 @@ function menuGenerator(context, jsonobject, permissions) {
if (hasPermission.length > 0) {
if (jsonPermission.title == "Monitoring") {
+ if(jsonPermission.linkexternal){
+ target = "_blank";
+ }
if (application.get("dasStatsPublisherEnabled") == true) {
link = application.get("monitoringDashboardUrl");
menu_html += '<li><a href="' + link + '" target="' + target + '">';
} else {
link = jsonPermission.link;
- target = "_blank";
menu_html += '<li><a href="' + link + '" target="' + target + '" class="disabled">';
}
} else {
[2/4] stratos git commit: Renaming metering and monitoring dashboard
json file names, title and urls
Posted by ga...@apache.org.
Renaming metering and monitoring dashboard json file names, title and urls
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/30c2c6ab
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/30c2c6ab
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/30c2c6ab
Branch: refs/heads/stratos-4.1.x
Commit: 30c2c6abd1327d3f400d46d569b86acf253efd5a
Parents: 12110f4
Author: Thanuja <th...@wso2.com>
Authored: Wed Nov 11 15:50:04 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Thu Nov 12 15:07:27 2015 +0530
----------------------------------------------------------------------
.../console/applications_form.jag | 2 +-
.../Dashboard/artifact.xml | 2 +-
.../Dashboard/metering-dashboard.json | 229 ++++++++++++++++
.../Dashboard/stratos-metering-dashboard.json | 229 ----------------
.../Dashboard/artifact.xml | 2 +-
.../Dashboard/monitoring-dashboard.json | 225 +++++++++++++++
.../Dashboard/stratos-monitoring-dashboard.json | 274 -------------------
.../src/main/conf/cartridge-config.properties | 4 +-
8 files changed, 459 insertions(+), 508 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/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 64baf5d..755ea7f 100644
--- a/components/org.apache.stratos.manager.console/console/applications_form.jag
+++ b/components/org.apache.stratos.manager.console/console/applications_form.jag
@@ -36,7 +36,7 @@ var log = new Log("apachestratos.applications_form"),
editorDeploymentPolicies = applicationPolicyData = applicationJSON = '',
isEdit = isForm = false,
userPermissions = session.get('PERMISSIONS'),
- dasStatsPublisherEnabled = application.get("dasStatsPublisherEnabled");
+ dasStatsPublisherEnabled = application.get("dasStatsPublisherEnabled"),
meteringDashboardUrl = '';
//create left menu
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml
index bd6d164..7b50b23 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml
@@ -20,5 +20,5 @@
-->
<artifact name="Dashboard" version="1.0.0" type="dashboards/dashboard" serverRole="DataAnalyticsServer">
- <file>stratos-metering-dashboard.json</file>
+ <file>metering-dashboard.json</file>
</artifact>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/metering-dashboard.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/metering-dashboard.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/metering-dashboard.json
new file mode 100644
index 0000000..7cf8d6b
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/metering-dashboard.json
@@ -0,0 +1,229 @@
+{
+ "id": "metering-dashboard",
+ "title": "Metering Dashboard",
+ "description": "This dashboard is to show metering data.",
+ "permissions": {
+ "viewers": [
+ "Internal/everyone"
+ ],
+ "editors": [
+ "Internal/everyone"
+ ]
+ },
+ "pages": [
+ {
+ "id": "member-status",
+ "title": "Member Status",
+ "layout": {
+ "id": "single-column",
+ "title": "Single Column",
+ "description": "This is a layout generated through single-column.io",
+ "thumbnail": "store://layout/single-column/index.png",
+ "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": {
+ "default": {
+ "a": [
+ {
+ "id": "ehng97cyk3kxogvi",
+ "content": {
+ "id": "Member_Status_Filter",
+ "title": "",
+ "type": "gadget",
+ "thumbnail": "store://gadget/Member_Status_Filter/index.png",
+ "data": {
+ "url": "store://gadget/Member_Status_Filter/index.xml"
+ },
+ "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"
+ }
+ ]
+ },
+ "auto-update": {
+ "type": "boolean",
+ "description": "Used to filter based on state",
+ "on": []
+ }
+ },
+ "styles": {
+ "title": "",
+ "height": "400",
+ "borders": true,
+ "titlePosition": "left"
+ },
+ "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"
+ }
+ ]
+ },
+ "auto-update": {
+ "type": "boolean",
+ "description": "Used to filter based on state",
+ "on": []
+ }
+ },
+ "styles": {
+ "title": "",
+ "height": "800",
+ "borders": true,
+ "titlePosition": "left"
+ },
+ "settings": {}
+ }
+ }
+ ]
+ },
+ "anon": {}
+ }
+ },
+ {
+ "id": "member-details",
+ "title": "Member Details",
+ "layout": {
+ "id": "single-column",
+ "title": "Single Column",
+ "description": "This is a layout generated through single-column.io",
+ "thumbnail": "store://layout/single-column/index.png",
+ "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": {
+ "default": {
+ "a": [
+ {
+ "id": "8zgl65uoackgldi",
+ "content": {
+ "id": "Member_Details_Filter",
+ "title": "",
+ "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"
+ },
+ "notify": {
+ "member-details-filter": {
+ "type": "address",
+ "description": "This notifies applicationId and clusterId"
+ }
+ },
+ "cancel": {
+ "type": "boolean",
+ "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"
+ },
+ "settings": {}
+ }
+ }
+ ]
+ },
+ "anon": {}
+ }
+ }
+ ],
+ "landing": "member-status",
+ "isanon": false,
+ "isUserCustom": false
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/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
deleted file mode 100644
index 42b436c..0000000
--- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
+++ /dev/null
@@ -1,229 +0,0 @@
-{
- "id": "stratos-metering-dashboard",
- "title": "Stratos Metering Dashboard",
- "description": "This dashboard is to show metering data.",
- "permissions": {
- "viewers": [
- "Internal/everyone"
- ],
- "editors": [
- "Internal/everyone"
- ]
- },
- "pages": [
- {
- "id": "member-status",
- "title": "Member Status",
- "layout": {
- "id": "single-column",
- "title": "Single Column",
- "description": "This is a layout generated through single-column.io",
- "thumbnail": "store://layout/single-column/index.png",
- "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": {
- "default": {
- "a": [
- {
- "id": "ehng97cyk3kxogvi",
- "content": {
- "id": "Member_Status_Filter",
- "title": "",
- "type": "gadget",
- "thumbnail": "store://gadget/Member_Status_Filter/index.png",
- "data": {
- "url": "store://gadget/Member_Status_Filter/index.xml"
- },
- "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"
- }
- ]
- },
- "auto-update": {
- "type": "boolean",
- "description": "Used to filter based on state",
- "on": []
- }
- },
- "styles": {
- "title": "",
- "height": "400",
- "borders": true,
- "titlePosition": "left"
- },
- "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"
- }
- ]
- },
- "auto-update": {
- "type": "boolean",
- "description": "Used to filter based on state",
- "on": []
- }
- },
- "styles": {
- "title": "",
- "height": "800",
- "borders": true,
- "titlePosition": "left"
- },
- "settings": {}
- }
- }
- ]
- },
- "anon": {}
- }
- },
- {
- "id": "member-details",
- "title": "Member Details",
- "layout": {
- "id": "single-column",
- "title": "Single Column",
- "description": "This is a layout generated through single-column.io",
- "thumbnail": "store://layout/single-column/index.png",
- "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": {
- "default": {
- "a": [
- {
- "id": "8zgl65uoackgldi",
- "content": {
- "id": "Member_Details_Filter",
- "title": "",
- "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"
- },
- "notify": {
- "member-details-filter": {
- "type": "address",
- "description": "This notifies applicationId and clusterId"
- }
- },
- "cancel": {
- "type": "boolean",
- "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"
- },
- "settings": {}
- }
- }
- ]
- },
- "anon": {}
- }
- }
- ],
- "landing": "member-status",
- "isanon": false,
- "isUserCustom": false
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/artifact.xml b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/artifact.xml
index c6119ae..63d8e2d 100644
--- a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/artifact.xml
+++ b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/artifact.xml
@@ -20,5 +20,5 @@
-->
<artifact name="Dashboard" version="1.0.0" type="dashboards/dashboard" serverRole="DataAnalyticsServer">
- <file>stratos-monitoring-dashboard.json</file>
+ <file>monitoring-dashboard.json</file>
</artifact>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/monitoring-dashboard.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/monitoring-dashboard.json b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/monitoring-dashboard.json
new file mode 100644
index 0000000..b6675cb
--- /dev/null
+++ b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/monitoring-dashboard.json
@@ -0,0 +1,225 @@
+{
+ "id": "monitoring-dashboard",
+ "title": "Monitoring Dashboard",
+ "description": "This dashboard helps to monitor health stats.",
+ "permissions": {
+ "viewers": [
+ "Internal/everyone"
+ ],
+ "editors": [
+ "Internal/everyone"
+ ]
+ },
+ "pages": [
+ {
+ "id": "health-stats",
+ "title": "Health Stats",
+ "layout": {
+ "id": "single-column",
+ "title": "Single Column",
+ "description": "This is a layout generated through single-column.io",
+ "thumbnail": "store://layout/single-column/index.png",
+ "url": "store://layout/single-column/index.hbs",
+ "content": "<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": {
+ "default": {
+ "a": [
+ {
+ "id": "8nfqbaxvjc8cwhfr",
+ "content": {
+ "id": "Health_Stats_Filter",
+ "title": "",
+ "type": "gadget",
+ "thumbnail": "store://gadget/Health_Stats_Filter/index.png",
+ "data": {
+ "url": "store://gadget/Health_Stats_Filter/index.xml"
+ },
+ "styles": {
+ "height": "150",
+ "borders": false,
+ "titlePosition": "left",
+ "title": ""
+ },
+ "notify": {
+ "health-stats-filter": {
+ "type": "address",
+ "description": "This notifies time interval"
+ },
+ "cancel": {
+ "type": "boolean",
+ "description": "This notifies cancellation of state selection"
+ }
+ },
+ "locale_titles": {
+ "en-US": ""
+ },
+ "settings": {}
+ }
+ },
+ {
+ "id": "8wnyg587eaznz5mi",
+ "content": {
+ "id": "Memory_Usage",
+ "title": "Memory Usage",
+ "type": "gadget",
+ "thumbnail": "local://images/gadgetIcon.png",
+ "data": {
+ "url": "local://store/carbon.super/gadget/Memory_Usage/index.xml"
+ },
+ "listen": {
+ "health-stats-filter": {
+ "type": "address",
+ "description": "Used to filter based on state",
+ "on": [
+ {
+ "from": "8nfqbaxvjc8cwhfr",
+ "event": "health-stats-filter"
+ }
+ ]
+ },
+ "auto-update": {
+ "type": "boolean",
+ "description": "Used to filter based on state",
+ "on": []
+ }
+ },
+ "styles": {
+ "height": "400",
+ "borders": true,
+ "titlePosition": "left",
+ "title": "Memory Usage"
+ },
+ "settings": {},
+ "locale_titles": {
+ "en-US": "Memory Usage"
+ }
+ }
+ }
+ ],
+ "b": [
+ {
+ "id": "hhy2fj8wgu1bgldi",
+ "content": {
+ "id": "Load_Average",
+ "title": "Load Average",
+ "type": "gadget",
+ "thumbnail": "local://images/gadgetIcon.png",
+ "data": {
+ "url": "local://store/carbon.super/gadget/Load_Average/index.xml"
+ },
+ "listen": {
+ "health-stats-filter": {
+ "type": "address",
+ "description": "Used to filter based on state",
+ "on": [
+ {
+ "from": "8nfqbaxvjc8cwhfr",
+ "event": "health-stats-filter"
+ }
+ ]
+ },
+ "auto-update": {
+ "type": "boolean",
+ "description": "Used to filter based on state",
+ "on": []
+ }
+ },
+ "styles": {
+ "height": "400",
+ "borders": true,
+ "titlePosition": "left",
+ "title": "Load Average"
+ },
+ "settings": {},
+ "locale_titles": {
+ "en-US": "Load Average"
+ }
+ }
+ },
+ {
+ "id": "3rlgpdhg2e29",
+ "content": {
+ "id": "In_Flight_Request",
+ "title": "In Flight Request",
+ "type": "gadget",
+ "thumbnail": "local://images/gadgetIcon.png",
+ "data": {
+ "url": "local://store/carbon.super/gadget/In_Flight_Request/index.xml"
+ },
+ "listen": {
+ "health-stats-filter": {
+ "type": "address",
+ "description": "Used to filter based on state",
+ "on": []
+ },
+ "auto-update": {
+ "type": "boolean",
+ "description": "Used to filter based on state",
+ "on": []
+ }
+ },
+ "styles": {
+ "height": "400",
+ "borders": true,
+ "titlePosition": "left",
+ "title": "In-Flight Request"
+ },
+ "settings": {},
+ "locale_titles": {
+ "en-US": "In-Flight Request"
+ }
+ }
+ }
+ ],
+ "c": [
+ {
+ "id": "a7jevl0wisc680k9",
+ "content": {
+ "id": "Scaling_Details",
+ "title": "Scaling Details",
+ "type": "gadget",
+ "thumbnail": "local://images/gadgetIcon.png",
+ "data": {
+ "url": "local://store/carbon.super/gadget/Scaling_Details/index.xml"
+ },
+ "listen": {
+ "health-stats-filter": {
+ "type": "address",
+ "description": "Used to filter based on state",
+ "on": [
+ {
+ "from": "8nfqbaxvjc8cwhfr",
+ "event": "health-stats-filter"
+ }
+ ]
+ },
+ "auto-update": {
+ "type": "boolean",
+ "description": "Used to filter based on state",
+ "on": []
+ }
+ },
+ "styles": {
+ "height": "600",
+ "borders": true,
+ "titlePosition": "left",
+ "title": "Cluster Instances"
+ },
+ "settings": {},
+ "locale_titles": {
+ "en-US": "Cluster Instances"
+ }
+ }
+ }
+ ]
+ },
+ "anon": {}
+ }
+ }
+ ],
+ "landing": "health-stats",
+ "isanon": false,
+ "isUserCustom": false
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/stratos-monitoring-dashboard.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/stratos-monitoring-dashboard.json b/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/stratos-monitoring-dashboard.json
deleted file mode 100644
index 545b004..0000000
--- a/extensions/das/modules/artifacts/monitoring-dashboard/capps/stratos-monitoring-service/Dashboard/stratos-monitoring-dashboard.json
+++ /dev/null
@@ -1,274 +0,0 @@
-{
- "id": "stratos-monitoring-dashboard",
- "title": "Stratos Monitoring Dashboard",
- "description": "This dashboard helps to monitor health stats.",
- "permissions": {
- "viewers": [
- "Internal/everyone"
- ],
- "editors": [
- "Internal/everyone"
- ]
- },
- "pages": [
- {
- "id": "health-stats",
- "title": "Health Stats",
- "layout": {
- "id": "single-column",
- "title": "Single Column",
- "description": "This is a layout generated through single-column.io",
- "thumbnail": "store://layout/single-column/index.png",
- "url": "store://layout/single-column/index.hbs",
- "content": "<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"
- },
- "content": {
- "a": [
- {
- "id": "np79atkpuq8h0k9",
- "content": {
- "id": "Health_Stats_Filter",
- "title": "Health Stats Filter",
- "type": "gadget",
- "thumbnail": "store://gadget/Health_Stats_Filter/index.png",
- "data": {
- "url": "store://gadget/Health_Stats_Filter/index.xml"
- },
- "styles": {
- "title": "",
- "height": "150",
- "borders": false,
- "titlePosition": "left"
- },
- "notify": {
- "health-stats-filter": {
- "type": "address",
- "description": "This notifies time interval"
- },
- "cancel": {
- "type": "boolean",
- "description": "This notifies cancellation of state selection"
- }
- },
- "options": {},
- "settings": {}
- }
- },
- {
- "id": "8wnyg587eaznz5mi",
- "content": {
- "id": "Memory_Usage",
- "title": "Memory Usage",
- "type": "gadget",
- "thumbnail": "local://images/gadgetIcon.png",
- "data": {
- "url": "local://store/carbon.super/gadget/Memory_Usage/index.xml"
- },
- "listen": {
- "health-stats-filter": {
- "type": "address",
- "description": "Used to filter based on state",
- "on": [
- {
- "from": "np79atkpuq8h0k9",
- "event": "health-stats-filter"
- }
- ]
- },
- "auto-update": {
- "type": "boolean",
- "description": "Used to filter based on state",
- "on": []
- }
- },
- "styles": {
- "title": "Memory Usage",
- "height": "400",
- "borders": true,
- "titlePosition": "left"
- },
- "options": {
- "dataSource": {
- "type": "STRING",
- "title": "Data Source",
- "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag",
- "options": [],
- "required": false
- },
- "updateGraph": {
- "type": "STRING",
- "title": "Update Interval (s)",
- "value": "5",
- "options": [],
- "required": false
- }
- },
- "settings": {}
- }
- }
- ],
- "b": [
- {
- "id": "hhy2fj8wgu1bgldi",
- "content": {
- "id": "Load_Average",
- "title": "Load Average",
- "type": "gadget",
- "thumbnail": "local://images/gadgetIcon.png",
- "data": {
- "url": "local://store/carbon.super/gadget/Load_Average/index.xml"
- },
- "listen": {
- "health-stats-filter": {
- "type": "address",
- "description": "Used to filter based on state",
- "on": [
- {
- "from": "np79atkpuq8h0k9",
- "event": "health-stats-filter"
- }
- ]
- },
- "auto-update": {
- "type": "boolean",
- "description": "Used to filter based on state",
- "on": []
- }
- },
- "styles": {
- "title": "Load Average",
- "height": "400",
- "borders": true,
- "titlePosition": "left"
- },
- "options": {
- "dataSource": {
- "type": "STRING",
- "title": "Data Source",
- "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag",
- "options": [],
- "required": false
- },
- "updateGraph": {
- "type": "STRING",
- "title": "Update Interval (s)",
- "value": "5",
- "options": [],
- "required": false
- }
- },
- "settings": {}
- }
- },
- {
- "id": "3rlgpdhg2e29",
- "content": {
- "id": "In_Flight_Request",
- "title": "In Flight Request",
- "type": "gadget",
- "thumbnail": "local://images/gadgetIcon.png",
- "data": {
- "url": "local://store/carbon.super/gadget/In_Flight_Request/index.xml"
- },
- "listen": {
- "health-stats-filter": {
- "type": "address",
- "description": "Used to filter based on state",
- "on": [
- {
- "from": "np79atkpuq8h0k9",
- "event": "health-stats-filter"
- }
- ]
- },
- "auto-update": {
- "type": "boolean",
- "description": "Used to filter based on state",
- "on": []
- }
- },
- "styles": {
- "title": "In-Flight Request",
- "height": "400",
- "borders": true,
- "titlePosition": "left"
- },
- "options": {
- "dataSource": {
- "type": "STRING",
- "title": "Data Source",
- "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag",
- "options": [],
- "required": false
- },
- "updateGraph": {
- "type": "STRING",
- "title": "Update Interval (s)",
- "value": "5",
- "options": [],
- "required": false
- }
- },
- "settings": {}
- }
- }
- ],
- "c": [
- {
- "id": "a7jevl0wisc680k9",
- "content": {
- "id": "Scaling_Details",
- "title": "Scaling Details",
- "type": "gadget",
- "thumbnail": "local://images/gadgetIcon.png",
- "data": {
- "url": "local://store/carbon.super/gadget/Scaling_Details/index.xml"
- },
- "listen": {
- "health-stats-filter": {
- "type": "address",
- "description": "Used to filter based on state",
- "on": [
- {
- "from": "np79atkpuq8h0k9",
- "event": "health-stats-filter"
- }
- ]
- },
- "auto-update": {
- "type": "boolean",
- "description": "Used to filter based on state",
- "on": []
- }
- },
- "styles": {
- "title": "Cluster Instances",
- "height": "600",
- "borders": true,
- "titlePosition": "left"
- },
- "options": {
- "dataSource": {
- "type": "STRING",
- "title": "Data Source",
- "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag",
- "options": [],
- "required": false
- },
- "updateGraph": {
- "type": "STRING",
- "title": "Update Interval (s)",
- "value": "5",
- "options": [],
- "required": false
- }
- },
- "settings": {}
- }
- }
- ]
- }
- }
- ],
- "landing": "health-stats"
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/30c2c6ab/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 6ce37c0..e4bd8c4 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,8 @@
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
-das.monitoring.dashboard.url=https://localhost:9444/portal/dashboards/stratos-monitoring-dashboard
+das.metering.dashboard.url=https://localhost:9444/portal/dashboards/metering-dashboard
+das.monitoring.dashboard.url=https://localhost:9444/portal/dashboards/monitoring-dashboard
puppet.ip=127.0.0.1
puppet.hostname=puppet.stratos.apache.org
puppet.dns.available=false
[3/4] stratos git commit: Changing das distribution artifact id
Posted by ga...@apache.org.
Changing das distribution artifact id
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4862019c
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4862019c
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4862019c
Branch: refs/heads/stratos-4.1.x
Commit: 4862019c4a2979565d75ed8fb674bc3704cac21f
Parents: 30c2c6a
Author: Thanuja <th...@wso2.com>
Authored: Thu Nov 12 11:17:39 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Thu Nov 12 15:07:27 2015 +0530
----------------------------------------------------------------------
extensions/das/modules/distribution/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/4862019c/extensions/das/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/distribution/pom.xml b/extensions/das/modules/distribution/pom.xml
index a12c4e0..cea5a28 100644
--- a/extensions/das/modules/distribution/pom.xml
+++ b/extensions/das/modules/distribution/pom.xml
@@ -27,7 +27,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <artifactId>org.apache.stratos.das.artifacts</artifactId>
+ <artifactId>apache-stratos-das-artifacts</artifactId>
<packaging>pom</packaging>
<name>Apache Stratos - DAS Artifacts</name>
<description>Apache Stratos DAS Artifacts</description>
[4/4] stratos git commit: Updating ues-patch and
member-details-filter.js to get rid of timeout
Posted by ga...@apache.org.
Updating ues-patch and member-details-filter.js to get rid of timeout
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/12110f4b
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/12110f4b
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/12110f4b
Branch: refs/heads/stratos-4.1.x
Commit: 12110f4b83b3f40a487808a386312137e167e5d7
Parents: b67418d
Author: Thanuja <th...@wso2.com>
Authored: Wed Nov 11 15:28:57 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Thu Nov 12 15:07:27 2015 +0530
----------------------------------------------------------------------
.../js/member-details-filter.js | 30 ++-
.../metering-dashboard/ues-patch/README.md | 2 +-
.../metering-dashboard/ues-patch/dashboard.jag | 130 +++++-------
.../ues-patch/ues-dashboards.js | 211 -------------------
.../metering-dashboard/ues-patch/ues-gadgets.js | 175 +++++++++++++++
.../metering-dashboard/ues-patch/ues-pubsub.js | 20 +-
6 files changed, 247 insertions(+), 321 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/12110f4b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js
index bbc4312..6f36e4d 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js
@@ -24,24 +24,20 @@ var clusterId;
$(document).ready(function () {
loadApplication();
- setTimeout(function () {
- if (applicationId != null) {
- loadCluster(applicationId);
- $('#' + window.frameElement.id).ready(function () {
- $(this).contents().find('body').contents().find('#application-filter').val(applicationId);
- publish();
- });
- }
- }, 2000);
+ if (applicationId != null) {
+ loadCluster(applicationId);
+ $('#' + window.frameElement.id).ready(function () {
+ $(this).contents().find('body').contents().find('#application-filter').val(applicationId);
+ publish();
+ });
+ }
- setTimeout(function () {
- if (clusterId != null) {
- $('#' + window.frameElement.id).ready(function () {
- $(this).contents().find('body').contents().find('#cluster-filter').val(clusterId);
- publish();
- });
- }
- }, 3000);
+ if (clusterId != null) {
+ $('#' + window.frameElement.id).ready(function () {
+ $(this).contents().find('body').contents().find('#cluster-filter').val(clusterId);
+ publish();
+ });
+ }
});
http://git-wip-us.apache.org/repos/asf/stratos/blob/12110f4b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
index 69e065c..2bafefa 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
+++ b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/README.md
@@ -4,5 +4,5 @@ dashboard url and publish the values to gadgets.
You can find the related UES product jira here: https://wso2.org/jira/browse/UES-582
Please follow below steps to apply the patch locally:
-1. Copy 'ues-dashboard.js' and 'ues-pubsub.js' files to <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/js/ folder.
+1. Copy 'ues-gadgets.js' and 'ues-pubsub.js' files to <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/js/ folder.
2. Copy 'dashboard.jag' file to <DAS-HOME>/repository/deployment/server/jaggeryapps/portal/theme/templates/ folder.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/12110f4b/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 32e926c..a738418 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/dashboard.jag
+++ b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/dashboard.jag
@@ -67,25 +67,18 @@ if (!user) {
<div class="collapse navbar-collapse horizontal-bar">
<ul class="nav navbar-nav">
- <% if (dashboard.pages.length >= 2) { %>
+ <% if(dashboard.pages.length >= 2) { %>
<li
- <%
- if (dashboard.landing === pageId) { %>
+ <% if(dashboard.landing === pageId) { %>
class="active"
- <%
- }
- %>>
- <a href="<%=dbRoot%>?isAnonView=<%=isAnonView
- %>"><%=
- i18n.localize("home")
- %></a>
- </li>
- <%
-} %>
+ <% } %>>
+ <a href="<%=dbRoot%>?isAnonView=<%=isAnonView%>"><%= i18n.localize("home")%></a>
+ </li>
+ <% } %>
<%
pages.forEach(function (page) {
- if (isAnonView || !user) {
+ if(isAnonView || !user) {
if (page.isanon) {
// Anonymous viewing. So render only anonymous pages links.
renderPageLink(page);
@@ -98,79 +91,53 @@ pages.forEach(function (page) {
function renderPageLink(page) {
if (dashboard.landing !== page.id) { %>
<li
- <%
- if (page.id === pageId) { %>
+ <% if (page.id === pageId) { %>
class="active"
- <%
- }
- %>>
- <a href="<%=dbRoot%><%=page.id%>?isAnonView=<%=isAnonView%>"> <%=page.title
- %></a>
- </li>
- <%
- }
+ <% } %>>
+ <a href="<%=dbRoot%><%=page.id%>?isAnonView=<%=isAnonView%>"> <%=page.title%></a>
+ </li>
+ <% }
};%>
</ul>
<ul class="nav navbar-nav navbar-right">
<% 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")
- %>
+ 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 -->
@@ -259,6 +226,7 @@ function renderPageLink(page) {
<% 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>
http://git-wip-us.apache.org/repos/asf/stratos/blob/12110f4b/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
deleted file mode 100644
index 69fd4ed..0000000
--- a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-dashboards.js
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-(function () {
-
- var findPlugin = function (type) {
- var plugin = ues.plugins.components[type];
- if (!plugin) {
- throw 'ues dashboard plugin for ' + type + ' cannot be found';
- }
- return plugin;
- };
-
-
- var createComponent = function (container, component, done) {
- var type = component.content.type;
- var plugin = findPlugin(type);
- 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);
- };
-
- var updateComponent = function (component, done) {
- var plugin = findPlugin(component.content.type);
- var container = $('#' + component.id);
- plugin.update(container, component, ues.hub, done);
- };
-
- var destroyComponent = function (component, done) {
- var plugin = findPlugin(component.content.type);
- var container = $('#' + component.id);
- plugin.destroy(container, component, ues.hub, done);
- };
-
- var componentId = function (clientId) {
- return clientId.split('-').pop();
- };
-
- var wirings;
-
- var publishForClient = ues.hub.publishForClient;
- ues.hub.publishForClient = function (container, topic, data) {
- console.log('publishing data container:%s, topic:%s, data:%j', container.getClientID(), topic, data);
- var clientId = componentId(container.getClientID());
- var channels = wirings[clientId + '.' + topic];
- if (!channels) {
- return;
- }
- channels.forEach(function (channel) {
- publishForClient.apply(ues.hub, [container, channel, data]);
- });
- };
-
- //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, pageType) {
- var content = page.content[pageType];
- var area;
- var blocks;
- var wirez = {};
-
- var wire = function (wirez, id, listeners) {
- var event;
- var listener;
- for (event in listeners) {
- if (listeners.hasOwnProperty(event)) {
- listener = listeners[event];
- if (!listener.on) {
- continue;
- }
- listener.on.forEach(function (notifier) {
- var channel = notifier.from + '.' + notifier.event;
- var wire = wirez[channel] || (wirez[channel] = []);
- wire.push(id + '.' + event);
- });
- }
- }
- };
-
- for (area in content) {
- if (content.hasOwnProperty(area)) {
- blocks = content[area];
- blocks.forEach(function (block) {
- var listeners = block.content.listen;
- if (!listeners) {
- return;
- }
- wire(wirez, block.id, listeners);
- });
- }
- }
- console.log(wirez);
- return wirez;
- };
-
- var setDocumentTitle = function (dashboard, page) {
- document.title = dashboard.title + ' | ' + page.title;
- };
-
- var renderPage = function (element, dashboard, page, pageType, done) {
- setDocumentTitle(dashboard, page);
- wirings = wires(page, pageType);
- var container;
- var area;
- var layout = $(page.layout.content);
- var content = page.content[pageType];
- element.html(layout);
- for (area in content) {
- if (content.hasOwnProperty(area)) {
- container = $('#' + area, layout);
- content[area].forEach(function (options) {
- createComponent(container, options, function (err) {
- if (err) {
- console.error(err);
- }
- });
- });
- }
- }
- if (!done) {
- return;
- }
- done();
- };
-
- var findPage = function (dashboard, id) {
- var i;
- var page;
- var pages = dashboard.pages;
- var length = pages.length;
- for (i = 0; i < length; i++) {
- page = pages[i];
- if (page.id === id) {
- return page;
- }
- }
- };
-
- 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, pageType, done);
- };
-
- var rewireDashboard = function (page, pageType) {
- wirings = wires(page, pageType);
- };
-
- var resolveURI = function (uri) {
- var index = uri.indexOf('://');
- var scheme = uri.substring(0, index);
- var uriPlugin = ues.plugins.uris[scheme];
- if (!uriPlugin) {
- return uri;
- }
- var path = uri.substring(index + 3);
- return uriPlugin(path);
- };
-
- ues.components = {
- create: createComponent,
- update: updateComponent,
- destroy: destroyComponent
- };
-
- ues.dashboards = {
- render: renderDashboard,
- rewire: rewireDashboard,
- findPage: findPage,
- resolveURI: resolveURI
- };
-
- ues.assets = {};
-
- ues.plugins = {
- assets: {},
- components: {},
- uris: {}
- };
-
-}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/12110f4b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-gadgets.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-gadgets.js b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-gadgets.js
new file mode 100644
index 0000000..11d64bc
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-gadgets.js
@@ -0,0 +1,175 @@
+(function () {
+ var registry = {};
+ var username = null;
+ //search overridden configs through ues.configs object
+ var configs = function (configs, args) {
+ var find = function (o, args) {
+ var pop = args.shift();
+ if (typeof o !== 'object' || !o[pop]) {
+ return null;
+ }
+ if (!args.length) {
+ return o[pop];
+ }
+ return find(o[pop], args);
+ };
+ return find(configs, args);
+ };
+
+ var extend = function (options, extended) {
+ var name;
+ for (name in extended) {
+ if (extended.hasOwnProperty(name)) {
+ options[name] = extended[name];
+ }
+ }
+ };
+
+ var merge = function (options) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ var extended = configs(ues.configs, args);
+ if (!extended) {
+ return options;
+ }
+ return extended ? extend(options, extended) : options;
+ };
+
+ var params = {};
+ params[osapi.container.ContainerConfig.RENDER_DEBUG] = true;
+ merge(params, 'container');
+
+ //opensocial container for the DOM
+ var container = new osapi.container.Container(params);
+
+ //Gadget renderer
+ var render = function (sandbox, url, prefs, params, done) {
+ var options = {};
+ options[osapi.container.RenderParam.WIDTH] = '100%';
+ options[osapi.container.RenderParam.USER_PREFS] = prefs;
+ options[osapi.container.RenderParam.HEIGHT] = sandbox.height();
+ extend(options, params);
+ sandbox = (sandbox instanceof jQuery) ? sandbox : $(sandbox);
+ if (!sandbox.length) {
+ return;
+ }
+ var site = container.newGadgetSite(sandbox[0]);
+ container.navigateGadget(site, url, {}, options, function (metadata) {
+ if (metadata.error) {
+ done ? done(metadata.error) : console.log(metadata.error);
+ return;
+ }
+ registry[site.getId()] = site;
+ if (done) {
+ done(false, metadata);
+ }
+ });
+ return site;
+ };
+
+ var preload = function (url, done) {
+ container.preloadGadget(url, function (data) {
+ var metadata = data[url];
+ done(metadata.error, metadata);
+ });
+ };
+
+ var remove = function (id) {
+ container.closeGadget(registry[id]);
+ delete registry[id];
+ };
+
+ //Initializing OpenAjax ManagedHub
+ var hub = new OpenAjax.hub.ManagedHub({
+ onSubscribe: function (topic, container) {
+ readRequestParam();
+ if(topic.indexOf("token-channel") !=-1){
+ if(username){
+ ues.hub.publish("token-channel", username);
+ }else{
+
+ jQuery.ajax({
+ url: '/portal/apis/user',
+ type: 'get',
+ dataType: "json",
+ success: function (data) {
+ username = data.username;
+ ues.hub.publish("token-channel", username);
+ },
+ error: function (msg) {
+ ues.hub.publish("token-channel", null);
+ }
+ });
+ }
+ }
+ var fn = configs(ues.configs, ['hub', 'subscribe']);
+ return fn ? fn(topic, container) : true;
+ },
+ onUnsubscribe: function (topic, container) {
+ var fn = configs(ues.configs, ['hub', 'unsubscribe']);
+ return fn ? fn(topic, container) : true;
+ },
+ onPublish: function (topic, data, from, to) {
+ /*var clientId = to.getClientID();
+ var sub = subscriptions[clientId];
+ var container = ues.hub.getContainer(clientId);
+ container.sendToClient(topic, data, sub.conSubId);*/
+ var fn = configs(ues.configs, ['hub', 'publish']);
+ return fn ? fn(topic, data, from, to) : true;
+ }
+ });
+
+ var inlineContainer = new OpenAjax.hub.InlineContainer(hub, 'ues', {
+ Container: {
+ onSecurityAlert: function (source, alertType) {
+ //Handle client-side security alerts
+ },
+ onConnect: function (container) {
+ //Called when client connects
+ },
+ onDisconnect: function (container) {
+ //Called when client disconnects
+ }
+ }
+ }
+ );
+
+ var client = new OpenAjax.hub.InlineHubClient({
+ HubClient: {
+ onSecurityAlert: function (source, alertType) {
+ }
+ },
+ InlineHubClient: {
+ container: inlineContainer
+ }
+ });
+
+ // Linking ManagedHub with opensocial pubsub2
+ gadgets.pubsub2router.init({
+ hub: hub
+ });
+ /*
+ var Hub = function (client) {
+
+ };
+
+ Hub.prototype.on = function () {
+
+ };
+
+ Hub.prototype.once = function () {
+
+ };
+
+ Hub.prototype.off = function () {
+
+ };*/
+
+ ues.hub = hub;
+ ues.container = container;
+ ues.client = client;
+ ues.gadgets = {
+ render: render,
+ preload: preload,
+ remove: remove
+ };
+}());
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/12110f4b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-pubsub.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-pubsub.js b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-pubsub.js
index 373531d..9f70f6c 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-pubsub.js
+++ b/extensions/das/modules/artifacts/metering-dashboard/ues-patch/ues-pubsub.js
@@ -17,23 +17,21 @@
* under the License.
*
*/
-var applicationId;
-var clusterId;
+
var vars;
-$(document).ready(function () {
+
+function readRequestParam(){
var query = window.location.search.substring(1);
vars = query.split("&");
- applicationId = getRequestParam('applicationId');
- clusterId = getRequestParam('clusterId');
+ var applicationId = getRequestParam('applicationId');
+ var clusterId = getRequestParam('clusterId');
- setTimeout(function () {
- var data = {applicationId: applicationId, clusterId: clusterId};
- console.log("Publishing request params: " + JSON.stringify(data));
- ues.hub.publish("request-params",data);
- }, 2000);
+ var data = {applicationId: applicationId, clusterId: clusterId};
+ console.log("Publishing request params: " + JSON.stringify(data));
+ ues.hub.publish("request-params",data);
+}
-});
function getRequestParam(variable) {
for (var i = 0; i < vars.length; i++) {