2

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

我已经完成的步骤:

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

  2. 创建 theme.json 为:

{“名称”:“默认”,

"description": "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 为:添加了以下条目:

在此处输入图像描述

但它仍然没有反映它。

4

1 回答 1

0

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

于 2015-10-08T14:24:12.683 回答