Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-15443

Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • trunk
    • 2.4.0
    • ambari-server, ambari-web
    • None

    Description

      The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.

      The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.

      components: function () {
      var serviceNames = App.Service.find().mapProperty('serviceName');
      var menuItems = [
      O.create(

      { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }

      ),
      O.create(

      { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }

      ),
      O.create(

      { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }

      ),
      O.create(

      { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }

      )];

      return menuItems.filter(function (item)

      { return serviceNames.contains(item.serviceName); }

      );
      }.property(),

      Attachments

        1. AMBARI-15443.patch
          24 kB
          Di Li

        Issue Links

          Activity

            People

              dili Di Li
              dili Di Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: