brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [18/50] brooklyn-ui git commit: fix test web app compile bug, and extract sensors to new files (and new tab)
Date Mon, 01 Feb 2016 17:51:37 GMT
fix test web app compile bug, and extract sensors to new files (and new tab)


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/d20a8658
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/d20a8658
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/d20a8658

Branch: refs/heads/0.4.0
Commit: d20a8658a72a88b0138c7cc57591fb93e7218630
Parents: c43e60d
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Sun May 6 08:18:16 2012 +0300
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Sun May 6 08:18:16 2012 +0300

----------------------------------------------------------------------
 .../utils/brooklyn/web/console/TestWebApplication.groovy     | 3 ++-
 usage/web-console/grails-app/views/detail/_main.gsp          | 8 +-------
 usage/web-console/grails-app/views/detail/_main.haml         | 6 +-----
 .../grails-app/views/detail/detail-tabs/_sensors.gsp         | 8 ++++++++
 .../grails-app/views/detail/detail-tabs/_sensors.haml        | 5 +++++
 .../web-app/js/console/detail-tab/detail-tabs/sensors.js     | 4 ++--
 6 files changed, 19 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d20a8658/usage/web-console/grails-app/utils/brooklyn/web/console/TestWebApplication.groovy
----------------------------------------------------------------------
diff --git a/usage/web-console/grails-app/utils/brooklyn/web/console/TestWebApplication.groovy
b/usage/web-console/grails-app/utils/brooklyn/web/console/TestWebApplication.groovy
index 8c120d6..6e57aea 100644
--- a/usage/web-console/grails-app/utils/brooklyn/web/console/TestWebApplication.groovy
+++ b/usage/web-console/grails-app/utils/brooklyn/web/console/TestWebApplication.groovy
@@ -247,13 +247,14 @@ private class TestWebApplication extends AbstractApplication {
                                 "Restart Tomcat": restartTomcat])
 
             //updates sensors (this doesn't seem to be working?)
+            TestTomcatEntity tc = this;  //NB: ref to TestTomcatEntity.this breaks mvn build
             this.getExecutionContext().submit(
                 new ScheduledTask(period: TimeExtras.duration(5, TimeUnit.SECONDS),
                     tags:["EFFECTOR"],
                     tag:this,
                     displayName: "Update values",
                     description: "This updates sensor values",
-                    { updateSensorsWithRandoms(TestTomcatEntity.this); }));
+                    { updateSensorsWithRandoms(tc); }));
                 
             updateSensorsWithRandoms(this);
             setAttribute(sensors.get("webapp.url"), "http://localhost:8080/my-web-app-here");

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d20a8658/usage/web-console/grails-app/views/detail/_main.gsp
----------------------------------------------------------------------
diff --git a/usage/web-console/grails-app/views/detail/_main.gsp b/usage/web-console/grails-app/views/detail/_main.gsp
index 6a1f3ad..75c2d39 100644
--- a/usage/web-console/grails-app/views/detail/_main.gsp
+++ b/usage/web-console/grails-app/views/detail/_main.gsp
@@ -28,13 +28,7 @@
     <div id='summary-activity'></div>
   </div>
   <div id='sensors' tabindex='1'>
-    <div class='sensor-table'>
-      <table class='tab-content-table' id='sensor-data'></table>
-    </div>
-    <div class='sensor-bottom-buttons'>
-      <a href='javascript:Brooklyn.sensors.updateSensors();'>RELOAD</a>
-      <a href='javascript:Brooklyn.sensors.toggleShowEmptySensors();'>FILTER</a>
-    </div>
+    <g:render template='detail-tabs/sensors'></g:render>
   </div>
   <div id='effectors' tabindex='2'>
     <g:render template='detail-tabs/effectors'></g:render>

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d20a8658/usage/web-console/grails-app/views/detail/_main.haml
----------------------------------------------------------------------
diff --git a/usage/web-console/grails-app/views/detail/_main.haml b/usage/web-console/grails-app/views/detail/_main.haml
index e90d4b5..933928c 100644
--- a/usage/web-console/grails-app/views/detail/_main.haml
+++ b/usage/web-console/grails-app/views/detail/_main.haml
@@ -19,11 +19,7 @@
         #summary-groups
         #summary-activity
     #sensors{:tabindex=>"1"}
-        .sensor-table
-            %table{:id=>"sensor-data", :class=>"tab-content-table"}
-        .sensor-bottom-buttons
-            %a{:href=>"javascript:Brooklyn.sensors.updateSensors();"}RELOAD
-            %a{:href=>"javascript:Brooklyn.sensors.toggleShowEmptySensors();"}FILTER
+        %g:render{:template=>"detail-tabs/sensors"}
     #effectors{:tabindex=>"2"}
         %g:render{:template=>"detail-tabs/effectors"}
     #location{:tabindex=>"3"}

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d20a8658/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.gsp
----------------------------------------------------------------------
diff --git a/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.gsp b/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.gsp
new file mode 100644
index 0000000..41cb7c8
--- /dev/null
+++ b/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.gsp
@@ -0,0 +1,8 @@
+<%-- DO NOT MODIFY THIS FILE, IT IS AUTOMATICALLY GENERATED. INSTEAD MODIFY _sensors.haml
--%>
+<div class='sensor-table'>
+  <table class='tab-content-table' id='sensor-data'></table>
+</div>
+<div class='sensor-bottom-buttons'>
+  <a href='javascript:Brooklyn.sensors.updateSensors();'>RELOAD</a>
+  <a href='javascript:Brooklyn.sensors.toggleShowEmptySensors();'>FILTER</a>
+</div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d20a8658/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.haml
----------------------------------------------------------------------
diff --git a/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.haml b/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.haml
new file mode 100644
index 0000000..342d193
--- /dev/null
+++ b/usage/web-console/grails-app/views/detail/detail-tabs/_sensors.haml
@@ -0,0 +1,5 @@
+.sensor-table
+    %table{:id=>"sensor-data", :class=>"tab-content-table"}
+.sensor-bottom-buttons
+    %a{:href=>"javascript:Brooklyn.sensors.updateSensors();"}RELOAD
+    %a{:href=>"javascript:Brooklyn.sensors.toggleShowEmptySensors();"}FILTER

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d20a8658/usage/web-console/web-app/js/console/detail-tab/detail-tabs/sensors.js
----------------------------------------------------------------------
diff --git a/usage/web-console/web-app/js/console/detail-tab/detail-tabs/sensors.js b/usage/web-console/web-app/js/console/detail-tab/detail-tabs/sensors.js
index 440e004..49bd531 100644
--- a/usage/web-console/web-app/js/console/detail-tab/detail-tabs/sensors.js
+++ b/usage/web-console/web-app/js/console/detail-tab/detail-tabs/sensors.js
@@ -14,12 +14,12 @@ Brooklyn.sensors = (function() {
               json[i].actionHtml = '';
               for (ai in actions) {
                 json[i].actionHtml = json[i].actionHtml + ' <b><a href="'+
-                  actions[ai].url+'" target="_new">'+
+                  actions[ai].url+'" target="_blank">'+
                   actions[ai].name+'</a></b> &nbsp; ';
               }
               if (typeof parent.entity_id !== 'undefined') {
                 json[i].actionHtml = json[i].actionHtml + ' <a href="'+
-                  '../entity/sensor?entityId='+parent.entity_id+'&sensorId='+json[i].name+'"
target="_new">JSON</a> ';
+                  '../entity/sensor?entityId='+parent.entity_id+'&sensorId='+json[i].name+'"
target="_blank">JSON</a> ';
               }
               // others, e.g. little graphs
             }


Mime
View raw message