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

Quick links for custom services

    XMLWordPrintableJSON

Details

    • Important

    Description

      The existing version of the Ambari (2.0) does not have a declarative way to add "Quick Links" for the custom services. Currently, to add a "Quick Links" dropdown one has to do the following:

      1. Extract app.js file from /usr/lib/ambari-server/web/javascripts/app.js.gz to some directory.

      2. Add MY_CUSTOM_SERVICE entry to the quickLinks:

       mapQuickLinks: function (finalJson, item){
          if(!(item && item.ServiceInfo)) return;
          var quickLinks = {
            OOZIE: [19],
            GANGLIA: [20],
            STORM: [31],
            FALCON: [32],
            RANGER: [33],
            SPARK: [34],
            MY_CUSTOM_SERVICE: [35]
          };
      

      3. Add an entry to

      App.QuickLinks.FIXTURES = [
      
      
        {
          id: 35,
          label:'My Custom Service Admin UI',
          url:'%@://%@:8090/my_custom_service/admin',
          service_id: 'MY_CUSTOM_SERVICE',
          template:'%@://%@:8090/my_custom_service/admin'
        },
      

      4. GZip the app.js and upload it to the Ambari server as /usr/lib/ambari-server/web/javascripts/app.js.gz.

      Having a declarative way of adding "Quick Links" on the custom service level will be much more convenient.

      Attachments

        1. Stack Driven Quick Links.pdf
          43 kB
          Di Li
        2. AMBARI-11268.patch
          162 kB
          Di Li
        3. AMBARI-11268_code_refactored.patch
          154 kB
          Di Li

        Issue Links

          Activity

            People

              dili Di Li
              dvasilen Dmitry Vasilenko
              Votes:
              5 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: