如何在ambari 2.1中使用主题框架进行定制服务?

时间:2015-10-08 13:32:57

标签: ambari

如何使用ambari主题框架为属性提供组合,滑块等主题?我需要添加一个带有是或否属性的切换许可证。 我按照以下链接但无法查看自定义服务的主题。 http://search-hadoop.com/m/g7Bc62I7Ncfx9tB1&subj=Re+Using+theme+framework+on+my+own+stack

我已经完成的步骤:

  1. 在metainfo.xml中添加了theme.json条目

  2. 将theme.json创建为:

  3. { " name":"默认",

    "说明":" HBASE服务的默认主题",

    "配置":{

    "layouts": [
    
      {
    
       "name": "default",
    
        "tabs": [
    
        {
    
         "name": "settings",
    
            "display-name": "Settings",
    
            "layout": {
    
              "tab-columns": "3",
    
              "tab-rows": "3",
    
              "sections": [
    
                {
    
                  "name": "section-memory",
    
                  "display-name": "Server",
    
                  "row-index": "0",
    
                  "column-index": "0",
    
                  "row-span": "1",
    
                  "column-span": "2",
    
                  "section-columns": "2",
    
                  "section-rows": "1",
    
                  "subsections": [
    
                    {
    
                      "name": "subsection-col1",
    
                      "row-index": "0",
    
                      "column-index": "0",
    
                      "row-span": "1",
    
                      "column-span": "1"
    
                    },
    
                    {
                      "name": "subsection-col2",
    
                      "row-index": "0",
    
                      "column-index": "1",
    
                      "row-span": "1",
    
                      "column-span": "1"
    
                    }
    
                  ]
    
                }
                ]
                }
                }
                ]
                }
                ],
             "placement": {
      "configuration-layout": "default",
      "configs": [
        {
          "config": "genera/licence",
          "subsection-name": "subsection-col1"
        }
    ]
    },
    "widgets": [
      {
        "config": "genera/licence",
        "widget": {
          "type": "toggle"
        }
      }
    ]
    

    } }

    1. 在配置文件夹中的general.xml中: 添加了以下条目:
    2. enter image description here

      但它仍未反映出来。

1 个答案:

答案 0 :(得分:0)

以上步骤正常。错误是theme.json文件中的一般拼写错误。纠正后,它正常工作。