@next-core/brick-container 2.66.2 → 2.66.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/brick-container",
3
- "version": "2.66.2",
3
+ "version": "2.66.5",
4
4
  "description": "Brick Container Server",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/brick-container",
6
6
  "license": "GPL-3.0",
@@ -41,18 +41,18 @@
41
41
  "ws": "^8.5.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@next-core/brick-dll": "^2.31.15",
45
- "@next-core/brick-icons": "^2.26.25",
44
+ "@next-core/brick-dll": "^2.31.17",
45
+ "@next-core/brick-icons": "^2.26.26",
46
46
  "@next-core/color-theme": "^0.4.3",
47
- "@next-core/custom-antd-styles": "^1.24.2",
48
- "@next-core/illustrations": "^0.5.13",
47
+ "@next-core/custom-antd-styles": "^1.24.3",
48
+ "@next-core/illustrations": "^0.5.14",
49
49
  "@next-core/less-plugin-css-variables": "^0.2.4",
50
50
  "@next-core/webpack-config-factory": "^2.16.0",
51
- "@next-dll/ace": "^2.0.367",
51
+ "@next-dll/ace": "^2.0.369",
52
52
  "@next-dll/d3": "^2.0.58",
53
53
  "@next-dll/echarts": "^2.0.59",
54
- "@next-dll/editor-bricks-helper": "^0.28.17",
55
- "@next-dll/react-dnd": "^0.1.305",
54
+ "@next-dll/editor-bricks-helper": "^0.28.19",
55
+ "@next-dll/react-dnd": "^0.1.307",
56
56
  "babel-loader": "^8.2.3",
57
57
  "clean-webpack-plugin": "^4.0.0",
58
58
  "copy-webpack-plugin": "^6.4.1",
@@ -72,5 +72,5 @@
72
72
  "webpack-dev-server": "^4.7.4",
73
73
  "webpack-merge": "^5.8.0"
74
74
  },
75
- "gitHead": "ee9eb554988036b1e7ce6789a4e7712f9108e4a9"
75
+ "gitHead": "413cf9ff555e368e886db19cfcc3ff7c73b3f496"
76
76
  }
@@ -126,6 +126,27 @@ def create_or_update_micro_app_to_api_gw(app, org):
126
126
  print 'create app: {}'.format(app["appId"])
127
127
 
128
128
 
129
+ def import_micro_app_permissions(install_path, org):
130
+ permission_path = os.path.join(install_path, "micro_app_permissions", "permissions.json")
131
+ if not os.path.exists(permission_path):
132
+ print "could not find permission path {}, will not import permissions".format(permission_path)
133
+ return
134
+
135
+ session_id, ip, port = ens_api.get_service_by_name("web.brick_next", "logic.micro_app_service")
136
+ if session_id <= 0:
137
+ raise NameServiceError("get nameservice logic.object_store_service error, session_id={}".format(session_id))
138
+ address = "{}:{}".format(ip, port)
139
+ headers = {"org": str(org), "user": "defaultUser"}
140
+ url = "http://{}/api/micro_app/v1/permission/import".format(address)
141
+
142
+ with open(permission_path) as f:
143
+ p_f_content = f.read()
144
+ permission_list = simplejson.loads(p_f_content)
145
+ body = {"permissionList": permission_list}
146
+ rsp = requests.post(url, json=body, headers=headers)
147
+ rsp.raise_for_status()
148
+
149
+
129
150
  def upload_micro_app_images(install_path, org):
130
151
  address = os.environ.get("OBJECT_STORE_SERVICE", "")
131
152
  if address == "":
@@ -170,3 +191,4 @@ if __name__ == "__main__":
170
191
  if app:
171
192
  report(org, app)
172
193
  upload_micro_app_images(install_path, org)
194
+ import_micro_app_permissions(install_path, org)