Browse Source

AMBARI-5016. Mirroring: Dataset table should be clickable anywhere in the row. (akovalenko)

Aleksandr Kovalenko 11 years ago
parent
commit
7187a2606b

+ 2 - 2
ambari-web/app/assets/data/mirroring/feeds.xml

@@ -8,11 +8,11 @@
     <entity>
         <type>feed</type>
         <name>dataset2</name>
-        <status>RUNNING</status>
+        <status>SUSPENDED</status>
     </entity>
     <entity>
         <type>feed</type>
         <name>dataset3</name>
-        <status>RUNNING</status>
+        <status>SUBMITTED</status>
     </entity>
 </entities>

+ 2 - 2
ambari-web/app/routes/main.js

@@ -174,8 +174,8 @@ module.exports = Em.Route.extend({
       router.get('mainController').connectOutlet('mainMirroring');
     },
 
-    gotoShowJobs: function (router, event) {
-      var dataset = (event && event.context) || router.get('mainMirroringController.selectedDataset') || App.Dataset.find().objectAt(0);
+    gotoShowJobs: function (router, context) {
+      var dataset = context || router.get('mainMirroringController.selectedDataset') || App.Dataset.find().objectAt(0);
       if (dataset) {
         router.transitionTo('showDatasetJobs', dataset);
       } else {

+ 4 - 0
ambari-web/app/styles/application.less

@@ -4183,6 +4183,10 @@ ul.filter {
     background-color: #E6F1F6;
   }
 
+  .dataset-item {
+    cursor: pointer;
+  }
+
   .jobs-container {
     margin-top: 50px;
     border: 1px solid #dddddd;

+ 1 - 1
ambari-web/app/templates/main/mirroring/datasets.hbs

@@ -67,7 +67,7 @@
               <span {{bindAttr class="dataset.healthClass"}}></span>
             </td>
             <td class="name">
-              <a title="{{unbound dataset.name}}" href="#" {{action "gotoShowJobs" dataset}}>{{unbound dataset.name}}</a>
+              <a title="{{unbound dataset.name}}" href="javascript:void(null)">{{unbound dataset.name}}</a>
             </td>
             <td><span {{bindAttr class="dataset.isRunning:text-info dataset.isSuspended:text-warning"}}>{{dataset.statusFormatted}}</span></td>
             {{/view}}

+ 5 - 1
ambari-web/app/views/main/mirroring/datasets_view.js

@@ -78,7 +78,11 @@ App.MainDatasetsView = App.TableView.extend({
     content: null,
     tagName: 'tr',
 
-    classNameBindings: ['selectedClass'],
+    click: function () {
+      App.router.send('gotoShowJobs', this.get('content'));
+    },
+
+    classNameBindings: ['selectedClass', ':dataset-item'],
 
     selectedClass: function () {
       return this.get('controller.selectedDataset.id') === this.get('content.id') ? 'dataset-selected' : '';