Esempio n. 1
0
    def get(self, request, *args, **kwargs):
        """
        获取某个插件的配置信息
        ---
        parameters:
            - name: tenantName
              description: 租户名
              required: true
              type: string
              paramType: path
            - name: plugin_id
              description: 插件ID
              required: true
              type: string
              paramType: path
            - name: build_version
              description: 版本
              required: true
              type: string
              paramType: path
        """
        config_groups = plugin_config_service.get_config_details(
            self.plugin_version.plugin_id, self.plugin_version.build_version)
        data = self.plugin_version.to_dict()
        main_url = region_services.get_region_wsurl(self.response_region)
        data["web_socket_url"] = "{0}/event_log".format(main_url)

        result = general_message(200,
                                 "success",
                                 "查询成功",
                                 bean=data,
                                 list=config_groups)
        return Response(result, status=result["code"])
Esempio n. 2
0
 def get_plugins_group_items(self, plugins):
     rt_list = []
     for p in plugins:
         config_group_list = plugin_config_service.get_config_details(p["plugin_id"], p["build_version"])
         p["config_groups"] = config_group_list
         if p["origin_share_id"] == "new_create":
             p["plugin_key"] = make_uuid()
         else:
             p["plugin_key"] = p["origin_share_id"]
         rt_list.append(p)
     return rt_list