ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-5506. Flume agents should have actions to stop/start each agent. (akovalenko)
Date Fri, 18 Apr 2014 12:34:52 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c67e883e6 -> 68147d53c


AMBARI-5506. Flume agents should have actions to stop/start each agent. (akovalenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/68147d53
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/68147d53
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/68147d53

Branch: refs/heads/trunk
Commit: 68147d53c7a08afc75f79e8f26b5f595ece444f4
Parents: c67e883
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Fri Apr 18 15:31:56 2014 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Fri Apr 18 15:31:56 2014 +0300

----------------------------------------------------------------------
 .../controllers/main/service/info/summary.js    |  68 +++++++++++++
 ambari-web/app/messages.js                      |   4 +
 ambari-web/app/styles/application.less          |  14 ++-
 .../app/templates/main/service/info/summary.hbs |   6 +-
 .../templates/main/service/services/flume.hbs   | 102 +++++++++++--------
 ambari-web/app/utils/ajax/ajax.js               |  23 +++++
 .../app/views/main/service/services/flume.js    |  26 ++++-
 7 files changed, 194 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/68147d53/ambari-web/app/controllers/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/summary.js b/ambari-web/app/controllers/main/service/info/summary.js
index 0fb5a01..08150cb 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -20,6 +20,74 @@ var App = require('app');
 App.MainServiceInfoSummaryController = Em.Controller.extend({
   name: 'mainServiceInfoSummaryController',
 
+  selectedFlumeAgent: null,
+
+  /**
+   * Send start command for selected Flume Agent
+   * @method startFlumeAgent
+   */
+  startFlumeAgent: function () {
+    var selectedFlumeAgent = this.get('selectedFlumeAgent');
+    if (selectedFlumeAgent && selectedFlumeAgent.get('status') === 'INSTALLED') {
+      var self = this;
+      App.showConfirmationPopup(function () {
+        var command = 'START';
+        var context = Em.I18n.t('services.service.summary.flume.start.context').format(selectedFlumeAgent.get('name'));
+        self.sendFlumeAgentCommandToServer(command, context, selectedFlumeAgent);
+      });
+    }
+  },
+
+  /**
+   * Send stop command for selected Flume Agent
+   * @method stopFlumeAgent
+   */
+  stopFlumeAgent: function () {
+    var selectedFlumeAgent = this.get('selectedFlumeAgent');
+    if (selectedFlumeAgent && selectedFlumeAgent.get('status') === 'STARTED') {
+      var self = this;
+      App.showConfirmationPopup(function () {
+        var command = 'STOP';
+        var context = Em.I18n.t('services.service.summary.flume.stop.context').format(selectedFlumeAgent.get('name'));
+        self.sendFlumeAgentCommandToServer(command, context, selectedFlumeAgent);
+      });
+    }
+  },
+
+  /**
+   * Send command for Flume Agent to server
+   * @param {string} command
+   * @param {string} context
+   * @param {Object} agent
+   * @method sendFlumeAgentCommandToServer
+   */
+  sendFlumeAgentCommandToServer: function (command, context, agent) {
+    App.ajax.send({
+      name: 'service.flume.agent.command',
+      sender: this,
+      data: {
+        command: command,
+        context: context,
+        agentName: agent.get('name'),
+        host: agent.get('host.hostName')
+      },
+      success: 'commandSuccessCallback'
+    });
+  },
+
+  /**
+   * Callback, that shows Background operations popup if request was successful
+   */
+  commandSuccessCallback: function () {
+    console.log('Send request for refresh configs successfully');
+    // load data (if we need to show this background operations popup) from persist
+    App.router.get('applicationController').dataLoading().done(function (showPopup) {
+      if (showPopup) {
+        App.router.get('backgroundOperationsController').showPopup();
+      }
+    });
+  },
+
   nagiosUrl: function(){
     return App.router.get('clusterController.nagiosUrl');
   }.property('App.router.clusterController.nagiosUrl'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/68147d53/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 6ef14fa..0d3fe77 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1100,6 +1100,10 @@ Em.I18n.translations = {
   'services.service.summary.storm.tasks': 'Tasks',
   'services.service.summary.storm.nimbus.uptime': 'Nimbus uptime',
   'services.service.summary.storm.topologies': 'Topologies',
+  'services.service.summary.flume.startAgent': 'Start Agent',
+  'services.service.summary.flume.stopAgent': 'Stop Agent',
+  'services.service.summary.flume.stop.context': 'Stop Flume Agent {0}',
+  'services.service.summary.flume.start.context': 'Start Flume Agent {0}',
 
   'services.service.info.metrics.flume.channelFillPercent':'Channel Fill Percentage',
   'services.service.info.metrics.flume.channelSize':'Channel Size',

http://git-wip-us.apache.org/repos/asf/ambari/blob/68147d53/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 4b2445a..54cf714 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -6086,9 +6086,8 @@ i.icon-asterisks {
 #flume-summary {
   text-align:left !important;
   max-height: 490px;
-  overflow: scroll;
   #flume-agents-table {
-    margin-top: 7px;
+    margin: 0;
     width: 100%;
     .highlight {
       td, th {
@@ -6129,4 +6128,15 @@ i.icon-asterisks {
       background: url(	data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU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E8/syOll+AAAACXBIWXMAAAsTAAALEwEAmpwYAAABmElEQVQ4EdWSv0vDQBTH7y4ZUkKhTdtYHArOUvwPdHAVpeBY3PwH/BfEycF/wclR6NzBxUFxKrgokRLaSkmhTZr+ADWJ32s5DeXaSkHBW97du/c+73vvHiF/vaIooj+pyZYFAaTbtn0DuzR2YQBX1G63K57n7TQajfNlhRfCfN8/6na7u4AS13VPOp3O/iLgXBgAa0i+/Hh7J5RSEoYh6fV6FfjX5wGlMCQwgKpQNs0Lo4kdjUYEz77FvSIDSmGA7DmOU+SKxGJkukeRDfTwWPjjVo0fxH48Hic1TbtmjBX5c2F1WA/3rSAI7obDoSVif81+vyNWAmNQHgwGB6qqbqHxOUVRklD
 kQ2ELCu+h+qJQKDzGUiZb6TPT6TTt9/uHABLeK947QFKE0RSyNg3DkM6c9AN0Xb9CwguUCNDXeKDQQyaTeZpVxc9SZVASQMk2frWFzyCTwUBDElqCmKZZxv10VmaIUmU8Bgmv+Xy+JNRxXzabraJfz3y/0mo2m2e1Wi2q1+sQG+VWgogkAKhlWaeY/pLw/T/7CTBQv9a27vsbAAAAAElFTkSuQmCC)
no-repeat right 50%;
     }
   }
+  .flume-agents-actions {
+    margin: 0 5px 5px 0;
+    a {
+      text-decoration: none;
+    }
+  }
+  .scrollable-container {
+    max-height: 450px;
+    width: 100%;
+    overflow-y: scroll;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/68147d53/ambari-web/app/templates/main/service/info/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary.hbs b/ambari-web/app/templates/main/service/info/summary.hbs
index 23286e9..e488656 100644
--- a/ambari-web/app/templates/main/service/info/summary.hbs
+++ b/ambari-web/app/templates/main/service/info/summary.hbs
@@ -60,7 +60,11 @@
               {{template "templates/main/service/info/summary/hue"}}
             {{/if}}
             {{#if view.serviceStatus.flume}}
-              {{view App.MainDashboardServiceFlumeView serviceBinding="view.service"}}
+              <tr>
+                <td>
+                  {{view App.MainDashboardServiceFlumeView serviceBinding="view.service"}}
+                </td>
+              </tr>
             {{/if}}
             {{#if view.serviceStatus.falcon}}
               {{template "templates/main/service/info/summary/falcon"}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/68147d53/ambari-web/app/templates/main/service/services/flume.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/flume.hbs b/ambari-web/app/templates/main/service/services/flume.hbs
index 6d1e363..ce904f2 100644
--- a/ambari-web/app/templates/main/service/services/flume.hbs
+++ b/ambari-web/app/templates/main/service/services/flume.hbs
@@ -17,49 +17,63 @@
 }}
 
 <!-- Flume Agents -->
-<tr>
-  <td>
     <div id="flume-summary">
-    <a href="#" {{action filterHosts view.flumeHandlerComponent}}>{{view.summaryHeader}}</a>
-    <table class="table table-hover table-bordered table-striped" id="flume-agents-table">
-      <thead>
-      {{#view view.sortView contentBinding="view.filteredContent" class="label-row"}}
-        {{view view.parentView.statusSort}}
-        {{view view.parentView.agentSort}}
-        {{view view.parentView.hostSort}}
-        {{view view.parentView.sourceSort}}
-        {{view view.parentView.channelSort}}
-        {{view view.parentView.sinkSort}}
-        <td></td>
-      {{/view}}
-      </thead>
-      <tbody>
-      {{#each agent in view.pageContent}}
-        <tr {{action showAgentInfo agent target="view"}}>
-          <td class="agent-status">
-            <span {{bindAttr class="agent.healthClass"}}></span>
-          </td>
-          <td class="agent-name">
-            {{agent.name}}
-          </td>
-          <td class="agent-host-name">
-            {{agent.host.hostName}}
-          </td>
-          <td>
-            {{agent.sourcesCount}}
-          </td>
-          <td>
-            {{agent.channelsCount}}
-          </td>
-          <td>
-            {{agent.sinksCount}}
-          </td>
-          <td>
-          </td>
-        </tr>
-      {{/each}}
-      </tbody>
-    </table>
+      <a href="#" {{action filterHosts view.flumeHandlerComponent}}>{{view.summaryHeader}}</a>
+        <div class="btn-group display-inline-block flume-agents-actions pull-right">
+          <a {{bindAttr class=":btn :dropdown-toggle view.isActionsDisabled:disabled"}}
data-toggle="dropdown" href="javascript:void(null)">{{t common.actions}}
+            <span class="caret"></span>
+          </a>
+          <ul class="pull-left dropdown-menu">
+            <li {{bindAttr class="view.isStartAgentDisabled:disabled"}}>
+              <a href="javascript:void(null)"
+                      {{bindAttr class="view.isStartAgentDisabled:disabled"}}
+                      {{action startFlumeAgent target="controller"}}>
+                {{t services.service.summary.flume.startAgent}}</a>
+            </li>
+            <li {{bindAttr class="view.isStopAgentDisabled:disabled"}}>
+              <a href="javascript:void(null)"
+                      {{bindAttr class="view.isStopAgentDisabled:disabled"}}
+                      {{action stopFlumeAgent target="controller"}}>
+                {{t services.service.summary.flume.stopAgent}}</a>
+            </li>
+          </ul>
+        </div>
+      <div class="scrollable-container">
+        <table class="table table-hover table-bordered table-striped" id="flume-agents-table">
+          <thead>
+          {{#view view.sortView contentBinding="view.filteredContent" class="label-row"}}
+            {{view view.parentView.statusSort}}
+            {{view view.parentView.agentSort}}
+            {{view view.parentView.hostSort}}
+            {{view view.parentView.sourceSort}}
+            {{view view.parentView.channelSort}}
+            {{view view.parentView.sinkSort}}
+          {{/view}}
+          </thead>
+          <tbody>
+          {{#each agent in view.pageContent}}
+            <tr {{action showAgentInfo agent target="view"}}>
+              <td class="agent-status">
+                <span {{bindAttr class="agent.healthClass"}}></span>
+              </td>
+              <td class="agent-name">
+                {{agent.name}}
+              </td>
+              <td class="agent-host-name">
+                {{agent.host.hostName}}
+              </td>
+              <td>
+                {{agent.sourcesCount}}
+              </td>
+              <td>
+                {{agent.channelsCount}}
+              </td>
+              <td>
+                {{agent.sinksCount}}
+              </td>
+            </tr>
+          {{/each}}
+          </tbody>
+        </table>
+      </div>
     </div>
-  </td>
-</tr>

http://git-wip-us.apache.org/repos/asf/ambari/blob/68147d53/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index a35061c..f5af8c3 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -141,6 +141,29 @@ var urls = {
     'real': '/clusters/{clusterName}/config_groups?ConfigGroup/tag={serviceName}&fields=*',
     'mock': '/data/configurations/config_group.json'
   },
+  'service.flume.agent.command': {
+    'real': '/clusters/{clusterName}/requests',
+    'mock': '',
+    'format': function (data) {
+      return {
+        type: 'POST',
+        data: JSON.stringify({
+          "RequestInfo": {
+            "command": data.command,
+            "context": data.context,
+            "flume_handler": data.agentName
+          },
+          "Requests/resource_filters": [
+            {
+              "service_name": "FLUME",
+              "component_name": "FLUME_HANDLER",
+              "hosts": data.host
+            }
+          ]
+        })
+      }
+    }
+  },
   'reassign.stop_services': {
     'real': '/clusters/{clusterName}/services',
     'mock': '',

http://git-wip-us.apache.org/repos/asf/ambari/blob/68147d53/ambari-web/app/views/main/service/services/flume.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/flume.js b/ambari-web/app/views/main/service/services/flume.js
index d869920..a42d074 100644
--- a/ambari-web/app/views/main/service/services/flume.js
+++ b/ambari-web/app/views/main/service/services/flume.js
@@ -24,6 +24,12 @@ App.MainDashboardServiceFlumeView = App.TableView.extend({
 
   pagination: false,
 
+  isActionsDisabled: true,
+
+  isStartAgentDisabled: true,
+
+  isStopAgentDisabled: true,
+
   content: function () {
     return this.get('service.agents');
   }.property('service.agents.length'),
@@ -82,8 +88,22 @@ App.MainDashboardServiceFlumeView = App.TableView.extend({
   }),
 
   didInsertElement: function () {
+    this.set('controller.selectedFlumeAgent', null);
     this.filter();
   },
+
+  /**
+   * Change classes for dropdown DOM elements after status change of selected agent
+   */
+  setActionsDropdownClasses: function () {
+    var selectedFlumeAgent = this.get('controller.selectedFlumeAgent');
+    this.set('isActionsDisabled', !selectedFlumeAgent);
+    if (selectedFlumeAgent) {
+      this.set('isStartAgentDisabled', selectedFlumeAgent.get('status') !== 'INSTALLED');
+      this.set('isStopAgentDisabled', selectedFlumeAgent.get('status') !== 'STARTED');
+    }
+  }.observes('controller.selectedFlumeAgent', 'controller.selectedFlumeAgent.status'),
+
   /**
    * Action handler from flume tepmlate.
    * Highlight selected row and show metrics graphs of selected agent.
@@ -91,9 +111,11 @@ App.MainDashboardServiceFlumeView = App.TableView.extend({
    * @method showAgentInfo
    * @param {object} event
    */
-  showAgentInfo: function(event){
+  showAgentInfo: function (event) {
+    var agent = event.context;
+    this.set('controller.selectedFlumeAgent', agent);
     this.toggleHighlight($(event.currentTarget));
-    this.get('parentView').setMetric(event.context);
+    this.get('parentView').setMetric(agent);
   },
   /**
    * Highlight current row and remove highlight from previously selected item.


Mime
View raw message