activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1430382 - in /activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console: index.html js/app.js
Date Tue, 08 Jan 2013 16:54:05 GMT
Author: chirino
Date: Tue Jan  8 16:54:05 2013
New Revision: 1430382

URL: http://svn.apache.org/viewvc?rev=1430382&view=rev
Log:
hide host details when destination details are displayed.

Modified:
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/index.html
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/index.html
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/index.html?rev=1430382&r1=1430381&r2=1430382&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/index.html (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/index.html Tue Jan 
8 16:54:05 2013
@@ -106,7 +106,7 @@
                 </div>
               </div>
             </div>
-            <div class="row">
+            <div class="row" {{bindAttr style="App.VirtualHostController.style"}}>
               <div class="span4">
                 <div class="well" style="padding: 8px 8px">
                   <div class="well-title">Details</div>
@@ -166,10 +166,15 @@
               </div>
             </div>
             {{#if App.destination}}
-            <div class="row">
-                <div class="span12" style="font-size:170%; padding:0.5em;">
-                  <strong>{{App.DestinationsController.kind_label}}:</strong>
{{App.destination.id}}
-                </div>
+            <div class="row" style="padding:0em 2em">
+                  <ul class="nav nav-tabs">
+                    <li class="active">
+                        <a data-toggle="tab">
+                        <strong>{{App.DestinationsController.kind_label}}:</strong>
{{App.destination.id}}
+                        <strong {{action "clear" target="App.DestinationController" on="click"}}><i
class="icon-remove-sign"></i></strong>
+                    </a>
+                    </li>
+                  </ul>
                 <div class="span4">
                   <div class="well" style="padding: 8px 8px">
                     <div class="well-title">Details</div>

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js?rev=1430382&r1=1430381&r2=1430382&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/console/js/app.js Tue Jan  8
16:54:05 2013
@@ -217,6 +217,16 @@ App.VirtualHostController = Em.ArrayCont
   tabs:["Queues","Topics","Durable Subs"],
   selected_tab:"Queues",
   selected:null,
+  style:function(){
+    // Hide the virtual host details while the destination is displayed.
+    var destination = App.get("destination");
+    if( destination ) {
+      return "display:none";
+    } else {
+      return null;
+    }
+  }.property("App.destination"),
+
   refresh: function() {
     var selected = this.get("selected")
     if( selected ) {
@@ -230,6 +240,11 @@ App.VirtualHostController = Em.ArrayCont
         } 
       });
     }
+
+  },
+  onSelectedChange: function() {
+    App.set("destination", null)
+    this.refresh();
   }.observes("selected")
 });
 
@@ -319,7 +334,9 @@ App.destination = null;
 App.DestinationController = Em.Controller.create({
   destinationBinding:"App.destination",
   selectedBinding:"App.DestinationsController.selected",
-
+  clear: function() {
+    this.set('selected', null);
+  },
   refresh: function() {
     var selected = this.get("selected")
     if( selected==null ) {



Mime
View raw message