cube-studio/myapp/views/home.py

1045 lines
153 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from flask import (
flash,
g,
Markup,
redirect,
Response,
)
from myapp.utils.py.py_k8s import K8s
import datetime
from flask import jsonify
from myapp import conf
from myapp.views.base import BaseMyappView
from flask_appbuilder import expose
from myapp import appbuilder
from flask import stream_with_context, request
node_resource_used = {
"check_time": None,
"data": {}
}
pipeline_resource_used={
"check_time": None,
"data": {}
}
class Myapp(BaseMyappView):
route_base='/myapp'
default_view = 'welcome' # 设置进入蓝图的默认访问视图(没有设置网址的情况下)
@expose('/welcome')
@expose('/profile/<username>/')
def welcome(self,username=None):
if not g.user or not g.user.get_id():
return redirect(appbuilder.get_url_for_login)
if username:
msg = 'Hello ' + username + " !"
else:
msg = 'Hello '+g.user.username+" !"
# 返回模板
return self.render_template('hello.html', msg=msg)
@expose('/home')
def home(self):
# 返回模板
return self.render_template('home.html')
@expose('/navbar_right')
def navbar_right(self):
data = [
# {
# "text": "",
# "icon": '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64" viewBox="0 0 64 64"> <metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about=""/> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?></metadata> <image id="图层_0" data-name="图层 0" x="6" width="52" height="64" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAABACAMAAABiFaQOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABXFBMVEUAAADXHgXXHgXXHgXYHgXYHgXYHgbZHgbYHgbYHgXWHQbPIADXHgfYHgbYHgbWHQbYHgaqAADXHwTYHgbYHwjbHQfYHwfZHgbYHgbXHwfXHQfeIQvZHgXYHwXXHgfXHgbYHwbZHgjbHwXZHgbbHgbXHgbYHgbZHwfYHgbYHwbYHQXYHgbXHwbYHgfYHgbXHQfYHgbXHgbZHgbYHQXMMwDQHAnYHgbXIAjWHAfVIAXXHwTWHgfYHQbZHQXXHwbYHgbXHgXWHgfYHgbXHQbXHwfXHwbYHwXZHQbXHgfYHQfXHQbYHwbYHgTXHgXYIQfYHgbcGgnXHgbZGgDYHgbMGgDYHgbXHgbYHgbXHgbYHwbXHQbZHgbYHgbZHgbYHwfXHQXYHQbYHgbXHwXZHgXYHgfYHwbYHwbYHgbYHgbXHQbYHgbYHgXYHwfXHgbTIQvYHgbYHwbcIwzYHgYAAACjlaAKAAAAcnRSTlMAM2aSvenz3MWPUBCZ3VYsigM52kJG6veidEYXumNN+9lDMX8qubJrsFthxqfE+EftgNS/BRvfICUwOkWdk1qJZXB2emyFYliaTqWvO7onzx3aFOQK7/ru29HHs6mfloyCiI2SmH2do6iuuL51zhes4RYaP3bpAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+YJGhAsAvVkLkcAAAJjSURBVEjHlZbnVxNREMUfJgpJbBRLAEUDShHQJfTee0+oIRB6F3z//wfvvE1c3JNy33zY+5i9vxPO7uROlMpXZc8CwecvyitC4Ygiq+yl/levXlPImyeI1NvK0kxVtfZXTSnm3XuxffgYra2rq43Wu9Sn4sznBjF9+Zr7O9ZoqKai0DexfH/aaZZOSzGmVRzB/3tt0iv2DH/gfrW/2Y5mR2EmgNudP/3dml9oB3xNp0tbVJdjoLgNo3VcmG47RutuQBFbSGa4B9rbJ5/ZVOA9ev2+Xpx6cOiH1rt35Wa+p+r1Za76oQPeGy8NteA0AB2EtrOQvOhB6BB0mIWGcRqChqEjLDSCUxg6Ch1joTGcRqHjUIeFHJzGoRPQSZUbqHg+yOtPwjwBnYJO50Y3O46+8vrTME9BZ6CziqxZmGegIegcC83BHILOQxdYaAHmeehi9n1RJZOwCF2CLrPQMsxL0BVojIViMK9AO6CrLLSaTaY16DoLrcO8Bt2AbrLQJswb0AQ0yUJJmBPQrQJTmr9g3oJsI1V5qFPrbTf2dnhoxwRfJPtfkpUwwSext8tDuyb4JPb2eGjPBJ/E3j4P7Zvgk9gL8lDQBJ8Me4qHUuaLJLF3wEMHJvgk9tI8lDbBJ7F3yEOHJvgk9o546MgEn8RehocyJvgytttTPuPYHjpWJ/bQiTq1h07VGa7n/IM4h/1MXeAa5aEo7BfqEtdmHpKff5fqymbTuLvmSl3bbBp311ybWac3jbtrUurGZtO4u+ZG3eJ6x0N3sN+aL4hlpVWjPeSo5L0tc4918fvh0QZ5fPij/gJTBPTTrMeWfgAAAABJRU5ErkJggg=="/> </svg> ',
# "link": "%s/frontend/aihub/model_market/model_all"%request.host_url.strip('/')
# },
{
"text": "",
"pic_url": '%s/static/assets/images/tip.gif'%request.host_url.strip('/'),
"link": "%s/frontend/aihub/model_market/model_all"%request.host_url.strip('/')
},
{
"text":"帮助文档",
"icon":'<svg t="1663658395713" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4531" width="64" height="64"><path d="M808.35715 213.332736c-164.707272-164.709319-432.683537-164.709319-597.333504 0-164.709319 164.649967-164.709319 432.624185 0 597.333504 164.649967 164.709319 432.626231 164.709319 597.333504 0C973.067492 645.956921 973.067492 377.982704 808.35715 213.332736zM765.48983 767.767198c-141.075039 141.077086-370.609783 141.077086-511.627517 0-141.078109-141.017734-141.078109-370.520755 0-511.596817 141.017734-141.017734 370.552477-141.077086 511.627517 0C906.506541 397.188114 906.506541 626.750487 765.48983 767.767198z" p-id="4532" fill="#3273f1"></path><path d="M500.686838 686.040848c-20.432355 0.061398-37.063127 16.692171-37.063127 37.095873 0 20.458961 16.630772 37.090756 37.092803 37.090756 20.432355 0 37.066197-16.631796 37.066197-37.151132C537.781688 702.672644 521.147846 686.040848 500.686838 686.040848z" p-id="4533" fill="#3273f1"></path><path d="M505.832022 265.144776c-72.362075 0-136.290059 41.640376-158.933779 103.683431-5.26491 14.508435-9.813506 38.620599-5.26491 58.753125 3.048429 13.81975 17.709337 22.974247 31.320333 19.863397 14.117532-3.171226 23.0029-17.23043 19.832697-31.290657-1.556449-7.210215-0.060375-20.132526 3.350304-29.435403 12.533454-34.342156 51.27378-69.043493 109.60735-69.043493 68.681242 0 116.635417 35.091216 116.635417 85.375459 0 37.572734-23.302729 51.1561-64.525596 72.034617-37.303604 18.847254-83.761706 42.241057-83.761706 101.289917L474.092134 629.981065c0 14.478759 11.784394 26.2652 26.204825 26.2652 14.449084 0 26.235524-11.786441 26.235524-26.2652l0-53.606919c0.060375-25.605168 18.936281-36.317137 55.042617-54.504358 41.6107-20.968567 93.421716-47.025013 93.421716-118.820176C674.997839 321.862545 605.418135 265.144776 505.832022 265.144776z" p-id="4534" fill="#3273f1"></path></svg>',
"link":conf.get('DOCUMENTATION_URL','https://github.com/tencentmusic/cube-studio/wiki')
},
{
"text":'',
"icon":'<svg t="1663658292626" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2369" width="64" height="64"><path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9 23.5 23.2 38.1 55.4 38.1 91v112.5c0.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" p-id="2370" fill="#3273f1"></path></svg>',
"link":"https://github.com/tencentmusic/cube-studio"
}
]
# 返回模板
return jsonify(data)
@expose('/menu')
def menu(self):
menu=[
{
"name": 'group',
"title": '项目空间',
"isExpand": False,
"isMenu": True,
"icon": '<svg t="1646706317746" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2888" width="128" height="128"><path d="M616.8 499.52c44.34-32.41 73.31-84.65 73.31-143.65 0-98.15-79.86-178.01-178.02-178.01s-178.02 79.85-178.02 178.01c0 59 28.98 111.25 73.32 143.66-114.84 42.7-197.02 153.08-197.02 282.59v64.27h603.42v-64.27c0.02-129.52-82.16-239.91-196.99-282.6zM512.1 238.55c64.7 0 117.33 52.63 117.33 117.32 0 64.7-52.63 117.33-117.33 117.33s-117.33-52.63-117.33-117.33c0-64.69 52.63-117.32 117.33-117.32zM753.13 785.7H271.07v-3.59c0-132.9 108.14-241.03 241.06-241.03 132.89 0 241 108.13 241 241.03v3.59z" fill="#666666" p-id="2889"></path><path d="M348.64 502.43c0-1.04-0.2-2.02-0.3-3.03 0.09-0.95 0.29-1.86 0.29-2.83 0-16.76-13.58-30.34-30.34-30.34-49.54 0-89.84-40.3-89.84-89.84 0-49.53 40.3-89.83 89.84-89.83 16.76 0 30.34-13.58 30.34-30.34s-13.58-30.34-30.34-30.34c-82.99 0-150.52 67.52-150.52 150.51 0 46.16 20.93 87.5 53.76 115.13C130.92 529.5 67.1 619.05 67.1 723.26v27.61c0 16.76 13.58 30.34 30.34 30.34s30.34-13.58 30.34-30.34v-27.61c0-105.04 85.46-190.49 190.52-190.49 16.76 0 30.34-13.58 30.34-30.34zM802.68 491.53c32.83-27.63 53.76-68.97 53.76-115.13 0-82.99-67.53-150.51-150.52-150.51-16.76 0-30.34 13.58-30.34 30.34s13.58 30.34 30.34 30.34c49.54 0 89.84 40.3 89.84 89.83 0 49.54-40.3 89.84-89.84 89.84-16.76 0-30.34 13.58-30.34 30.34 0 0.97 0.2 1.89 0.29 2.83-0.1 1.01-0.3 1.99-0.3 3.03 0 16.76 13.58 30.34 30.34 30.34 105.06 0 190.52 85.45 190.52 190.49v27.61c0 16.76 13.58 30.34 30.34 30.34 16.76 0 30.34-13.58 30.34-30.34v-27.61c-0.01-104.22-63.84-193.77-154.43-231.74z" fill="#666666" p-id="2890"></path></svg>',
"children": [
{
"name": 'project_group',
"title": '项目组',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'org_group',
"title": '项目分组',
"icon": '<svg t="1646706714564" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3885" width="128" height="128"><path d="M323.072 660.48c-86.016 0-155.648-69.632-155.648-155.648 0-86.016 69.632-155.648 155.648-155.648s155.648 69.632 155.648 155.648c0 86.016-69.632 155.648-155.648 155.648z m0-260.096c-57.344 0-104.448 47.104-104.448 104.448S265.728 609.28 323.072 609.28s104.448-47.104 104.448-104.448-47.104-104.448-104.448-104.448z" p-id="3886"></path><path d="M80 920c-13.44 0-24-10.56-24-24 0-155.52 126.24-281.76 281.76-281.76 70.08 0 137.76 25.92 190.08 73.44 9.6 9.12 10.56 24 1.44 34.08-9.12 9.6-24 10.56-34.08 1.44-43.2-39.36-99.36-60.96-157.44-60.96-129.12 0-233.76 104.64-233.76 233.76 0 13.44-10.56 24-24 24zM695.36 651.2c-80.64 0-145.92-65.28-145.92-145.92 0-80.64 65.28-145.92 145.92-145.92s145.92 65.28 145.92 145.92c0 80.64-65.28 145.92-145.92 145.92z m0-243.84c-53.76 0-97.92 44.16-97.92 97.92S641.6 603.2 695.36 603.2s97.92-44.16 97.92-97.92-44.16-97.92-97.92-97.92z" p-id="3887"></path><path d="M956 920c-13.44 0-24-10.56-24-24 0-129.12-104.64-233.76-233.76-233.76S464.48 766.88 464.48 896c0 13.44-10.56 24-24 24s-24-10.56-24-24c0-155.52 126.24-281.76 281.76-281.76s281.76 126.24 281.76 281.76c0 13.44-10.56 24-24 24zM517.76 357.44c-80.64 0-145.92-65.28-145.92-145.92S437.12 65.6 517.76 65.6s145.92 65.28 145.92 145.92-65.28 145.92-145.92 145.92z m0-243.84C464 113.6 419.84 157.76 419.84 211.52s44.16 97.92 97.92 97.92 97.92-44.16 97.92-97.92S571.52 113.6 517.76 113.6z" p-id="3888"></path><path d="M666.112 400.384c-4.608 0-9.216-1.024-13.312-4.096-39.424-24.576-84.992-37.376-131.584-37.376-46.592 0-91.648 12.8-131.584 37.376-11.776 7.68-27.648 3.584-35.328-8.192s-3.584-27.648 8.192-35.328c47.616-29.696 102.4-45.568 158.208-45.568 55.808 0 110.592 15.872 158.208 45.568 11.776 7.68 15.872 23.04 8.192 35.328-4.096 8.192-12.288 12.288-20.992 12.288z" p-id="3889"></path></svg>',
"menu_type": "api",
"url": "/project_modelview/org/api/",
"model_name": "project",
"related": [
{
"hidden": 1,
"name": 'project_user',
"title": '组成员',
"icon": '<svg t="1646706405313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3745" width="128" height="128"><path d="M992 512c0-12-6-24-18-30l-108-60 108-60c12 0 18-12 18-30 0-12-6-24-18-30L530 68c-12-6-24-6-30 0L50 302c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 0-18 12-18 30 0 12 6 24 18 30l444 234c6 0 12 6 18 6 6 0 12 0 18-6l444-234c12-6 18-18 18-30s-6-24-18-30l-108-60 108-60c12-6 18-18 18-30zM140 332L512 140 884 332 512 530 140 332z m744 360L512 884 140 692l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48z m-372 18L140 512l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48L512 710z" p-id="3746"></path></svg>',
"menu_type": "api",
"url": "/project_user_modelview/api/",
}
]
},
{
"name": 'job_template_group',
"title": '模板分类',
"icon": '<svg t="1646706405313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3745" width="128" height="128"><path d="M992 512c0-12-6-24-18-30l-108-60 108-60c12 0 18-12 18-30 0-12-6-24-18-30L530 68c-12-6-24-6-30 0L50 302c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 0-18 12-18 30 0 12 6 24 18 30l444 234c6 0 12 6 18 6 6 0 12 0 18-6l444-234c12-6 18-18 18-30s-6-24-18-30l-108-60 108-60c12-6 18-18 18-30zM140 332L512 140 884 332 512 530 140 332z m744 360L512 884 140 692l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48z m-372 18L140 512l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48L512 710z" p-id="3746"></path></svg>',
"menu_type": "api",
"url": "/project_modelview/job_template/api/",
"model_name": "project",
"related": [
{
"hidden": 1,
"name": 'project_user',
"title": '组成员',
"icon": '<svg t="1646706405313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3745" width="128" height="128"><path d="M992 512c0-12-6-24-18-30l-108-60 108-60c12 0 18-12 18-30 0-12-6-24-18-30L530 68c-12-6-24-6-30 0L50 302c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 0-18 12-18 30 0 12 6 24 18 30l444 234c6 0 12 6 18 6 6 0 12 0 18-6l444-234c12-6 18-18 18-30s-6-24-18-30l-108-60 108-60c12-6 18-18 18-30zM140 332L512 140 884 332 512 530 140 332z m744 360L512 884 140 692l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48z m-372 18L140 512l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48L512 710z" p-id="3746"></path></svg>',
"menu_type": "api",
"url": "/project_user_modelview/api/",
}
]
},
{
"name": 'model_group',
"title": '模型分组',
"icon": '<svg t="1646706763192" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5611" width="128" height="128"><path d="M512.2 475.7c-8.2-0.3-16.1-2.4-23.4-6.1L192.6 330.2c-24.9-11.1-36.1-40.3-25-65.2 5-11.2 13.9-20.1 25-25l281.5-133.2a89.43 89.43 0 0 1 76 0L831.7 240c24.9 11.1 36.1 40.3 25 65.2-5 11.2-13.9 20.1-25 25L535.5 469.5c-7.2 3.8-15.2 5.9-23.3 6.2z m-76.5 452.5c-7.6 0-15.1-1.9-21.8-5.5L146.3 797.2c-17-8.9-27.5-26.5-27.3-45.6v-320c0.1-18 9.7-34.5 25.1-43.7 14.3-8.1 31.8-8.1 46.1 0l267.1 125.4c16.1 8.7 26.4 25.4 27.1 43.7v320.4c-0.2 17.9-9.6 34.4-24.9 43.7-7.2 4.3-15.4 6.8-23.8 7.1z m152.9 0c-8.3 0-16.5-2.2-23.8-6.3-15.3-9.3-24.7-25.8-24.9-43.7V556.9c0.4-18.2 10.4-34.8 26.2-43.7L835 387c14.2-7.5 31.4-7.1 45.2 1.1 15.5 9.1 25 25.7 25.1 43.7v319.8c0.4 18.9-9.7 36.5-26.2 45.6L610.5 922.8c-6.8 3.6-14.3 5.5-21.9 5.4z" p-id="5612"></path></svg>',
"menu_type": "api",
"url": "/project_modelview/model/api/",
"model_name": "project",
"related": [
{
"hidden": 1,
"name": 'project_user',
"title": '组成员',
"icon": '<svg t="1646706405313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3745" width="128" height="128"><path d="M992 512c0-12-6-24-18-30l-108-60 108-60c12 0 18-12 18-30 0-12-6-24-18-30L530 68c-12-6-24-6-30 0L50 302c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 0-18 12-18 30 0 12 6 24 18 30l444 234c6 0 12 6 18 6 6 0 12 0 18-6l444-234c12-6 18-18 18-30s-6-24-18-30l-108-60 108-60c12-6 18-18 18-30zM140 332L512 140 884 332 512 530 140 332z m744 360L512 884 140 692l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48z m-372 18L140 512l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48L512 710z" p-id="3746"></path></svg>',
"menu_type": "api",
"url": "/project_user_modelview/api/",
}
]
},
]
}
]
},
# 数据
{
"name": 'dataleap',
"title": '数据资产',
'hidden': 0,
"isMenu": True,
"icon": '<svg t="1646710165879" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="33769" width="128" height="128"><path d="M959.718832 123.963683C872.444401 50.185297 704.593576 0.299912 511.850044 0.299912S151.255687 50.185297 63.981255 123.963683C23.193205 158.453578 0 198.04198 0 240.22962v543.840672c0 132.461193 229.132871 239.929708 511.850044 239.929708s511.850044-107.468515 511.850044-239.929708v-543.840672c0-42.18764-23.193205-81.776042-63.981256-116.265937zM87.774285 189.64444c19.794201-21.893586 50.685151-43.087377 89.373816-61.182075 42.287611-19.794201 92.073025-35.489603 147.956653-46.586352C384.087474 70.17944 446.869081 64.281168 511.850044 64.281168s127.76257 5.898272 186.745289 17.594845c55.883628 11.096749 105.669042 26.792151 147.956654 46.586352 38.688665 18.094699 69.579615 39.28849 89.373816 61.182075 15.795372 17.494875 23.793029 34.489896 23.793029 50.48521 0 16.095285-7.997657 33.090306-23.793029 50.485209-19.794201 21.893586-50.685151 43.087377-89.373816 61.182075-42.287611 19.894172-92.073025 35.489603-147.956654 46.586352-58.98272 11.696573-121.864298 17.594845-186.745289 17.594845s-127.76257-5.898272-186.74529-17.594845c-55.883628-11.096749-105.669042-26.792151-147.956653-46.586352-38.688665-18.094699-69.579615-39.28849-89.373816-61.182075C71.978912 273.319926 63.981255 256.324905 63.981255 240.22962s7.997657-33.090306 23.79303-50.58518zM63.981255 356.495558c87.274431 73.778385 255.125256 123.66377 447.868789 123.66377s360.594357-49.885385 447.868788-123.66377v155.254515c0 16.095285-7.997657 33.090306-23.793029 50.48521-19.794201 21.893586-50.685151 43.087377-89.373816 61.182075-42.287611 19.794201-92.073025 35.489603-147.956654 46.586352-58.98272 11.696573-121.864298 17.594845-186.745289 17.594845s-127.76257-5.898272-186.74529-17.594845c-55.883628-11.096749-105.669042-26.792151-147.956653-46.586352-38.688665-18.094699-69.579615-39.28849-89.373816-61.182075C71.978912 544.740408 63.981255 527.745387 63.981255 511.750073V356.495558z m895.737577 427.574734c0 16.095285-7.997657 33.090306-23.793029 50.485209-19.794201 21.893586-50.685151 43.087377-89.373816 61.182076-42.287611 19.894172-92.073025 35.489603-147.956654 46.586352-58.98272 11.696573-121.864298 17.594845-186.745289 17.594845s-127.76257-5.898272-186.74529-17.594845c-55.883628-11.096749-105.669042-26.792151-147.956653-46.586352-38.688665-18.094699-69.579615-39.28849-89.373816-61.182076C71.978912 817.160597 63.981255 800.165576 63.981255 784.070292V627.91604c87.274431 73.778385 255.125256 123.66377 447.868789 123.663771s360.594357-49.885385 447.868788-123.663771v156.154252z" p-id="33770"></path><path d="M167.950796 519.847701m-39.988285 0a39.988285 39.988285 0 1 0 79.976569 0 39.988285 39.988285 0 1 0-79.976569 0Z" p-id="33771"></path><path d="M167.950796 791.768037m-39.988285 0a39.988285 39.988285 0 1 0 79.976569 0 39.988285 39.988285 0 1 0-79.976569 0Z" p-id="33772"></path></svg>',
"children": [
# {
# "name": 'data_access',
# "title": '数据接入',
# "isMenu": True,
# "isExpand": True,
# "children": [
# {
# "name": 'data_access_offline',
# "title": '离线接入',
# "icon": '<svg t="1655877042221" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2425" width="200" height="200"><path d="M895.5 660.5L742 239.7l-0.1-0.4c-6.5-17.1-18-31.6-33-42-15.1-10.4-32.7-15.9-51-15.9h-313c-39 0-73.3 24.9-85.5 61.9l-0.1 0.2L128.2 661c-10.8 18-17 39-17 61.5 0 66.2 53.8 120 120 120h561.6c66.2 0 120-53.8 120-120 0-22.7-6.3-43.9-17.3-62zM306.8 258.9c5.5-16.4 20.7-27.4 38-27.4h313c16.4 0 31.4 10.3 37.3 25.6l127.4 349.1c-9.5-2.4-19.4-3.7-29.7-3.7H231.2c-11.7 0-23.1 1.7-33.8 4.8l109.4-348.4z m486 533.6H231.2c-38.6 0-70-31.4-70-70s31.4-70 70-70h561.6c38.6 0 70 31.4 70 70s-31.4 70-70 70z" p-id="2426"></path><path d="M735 722m-34 0a34 34 0 1 0 68 0 34 34 0 1 0-68 0Z" p-id="2427"></path><path d="M331 543.3c16.1 15.2 37.1 23.6 59.3 23.6h224.3c28 0 54.3-10.9 74.1-30.7 20.6-20.6 31.7-49.1 30.6-78.2-1-27.3-12.6-52.8-32.7-71.7-14.5-13.8-32.4-23-51.6-26.9-9.8-58.3-60.9-102.9-122.2-102.9h-20.3c-33 0-63.9 12.8-87.2 36.1-23.3 23.4-36.1 54.4-36.1 87.3 0 6.5 0.5 13 1.5 19.3-15.5 3.5-29.8 11.3-41.3 22.8-16.5 16.6-25.6 39.5-24.8 62.9 0.7 22.3 10.1 43 26.4 58.4z m33.8-85.9c6.6-6.6 15.4-10.2 24.7-10.2 11 0 21.5-5.3 28-14.2 6.5-8.9 8.4-20.5 5.1-31.1-2.2-7.1-3.4-14.5-3.4-22 0-19.6 7.6-38 21.5-51.9 13.8-13.9 32.2-21.5 51.9-21.5h20.3c40.8 0 73.9 32.9 73.9 73.3v0.4c0 7.2 2.7 14 7.8 19.1 5.1 5.1 11.8 7.9 19 7.9 14.5 0 28.2 5.5 38.7 15.4 10.4 9.9 16.5 23.1 17 37.3 0.6 15.5-5.1 30-16 40.9-10.4 10.4-24.1 16.1-38.8 16.1H390.3c-19.1 0-35.1-15.1-35.7-33.6-0.4-9.8 3.3-19 10.2-25.9z" p-id="2428"></path></svg>',
# "disable": True,
# "menu_type": "api",
# "url": '/data_access_offline_modelview/api/',
# },
# {
# "name": 'data_access_online',
# "title": '实时接入',
# "icon": '<svg t="1655877106690" class="icon" viewBox="0 0 1029 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4736" width="200" height="200"><path d="M147.911111 207.644444c36.977778 0 68.266667-22.755556 79.644445-56.888888h236.088888l201.955556 199.111111h82.488889c11.377778 34.133333 42.666667 56.888889 79.644444 56.888889 48.355556 0 85.333333-36.977778 85.333334-85.333334s-36.977778-85.333333-85.333334-85.333333c-36.977778 0-68.266667 22.755556-79.644444 56.888889h-59.733333l-201.955556-199.111111H227.555556c-11.377778-34.133333-42.666667-56.888889-79.644445-56.888889-48.355556 0-85.333333 36.977778-85.333333 85.333333s36.977778 85.333333 85.333333 85.333333zM944.355556 492.088889c-48.355556 0-85.333333 36.977778-85.333334 85.333333H531.911111l-210.488889 241.777778H173.511111c-5.688889-28.444444-22.755556-54.044444-54.044444-65.422222-42.666667-17.066667-93.866667 5.688889-110.933334 48.355555-17.066667 42.666667 5.688889 93.866667 48.355556 110.933334 39.822222 14.222222 82.488889 0 105.244444-36.977778h182.044445l210.488889-241.777778H881.777778c14.222222 17.066667 36.977778 28.444444 62.577778 28.444445 48.355556 0 85.333333-36.977778 85.333333-85.333334s-39.822222-85.333333-85.333333-85.333333zM91.022222 543.288889c36.977778 0 68.266667-22.755556 79.644445-56.888889h125.155555c11.377778 34.133333 42.666667 56.888889 79.644445 56.888889 48.355556 0 85.333333-36.977778 85.333333-85.333333s-36.977778-85.333333-85.333333-85.333334c-36.977778 0-68.266667 22.755556-79.644445 56.888889H170.666667c-11.377778-34.133333-42.666667-56.888889-79.644445-56.888889-48.355556 0-85.333333 36.977778-85.333333 85.333334s36.977778 85.333333 85.333333 85.333333z" p-id="4737"></path><path d="M716.8 861.866667m-85.333333 0a85.333333 85.333333 0 1 0 170.666666 0 85.333333 85.333333 0 1 0-170.666666 0Z" p-id="4738"></path></svg>',
# "disable": True,
# "menu_type": "api",
# "url": '/data_access_online_modelview/api/',
# },
# ]
# },
{
"name": 'metadata',
"title": '元数据',
"isMenu": True,
"isExpand": True,
"children":[
{
"name": 'metadata_table',
"title": '库表',
"icon": '<svg t="1649762743051" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2547" width="200" height="200"><path d="M948.223929 540.204361c-5.326903-7.19661-12.594068-10.971303-20.990112-10.971302-8.995763 0-17.709305 4.2333-25.435078 8.007992-1.97554 0.952493-3.915803 1.904985-5.78551 2.716368-2.222483 0.98777-4.480243 1.97554-6.808557 2.610535-1.799153 0.493885-3.316085 0.740828-4.480243 0.740827-1.340545 0-3.033865 0-5.22107-6.596892-6.843835-20.566783-15.310435-41.733283-25.223413-62.970338-4.51552-9.666035-10.230475-19.04985-15.769042-28.151445-10.44214-17.180143-20.31984-33.44307-21.519276-49.635443-1.26999-17.144865 5.891343-35.524443 13.440728-54.962346 3.880525-9.912978 7.831605-20.143453 10.72436-30.444482 2.081373-7.47883 4.79774-21.483998-0.634995-31.432253l-1.164157-2.151927c-17.039033-31.220588-34.677783-63.4995-55.279843-93.344266-21.02539-30.47976-59.160368-48.647673-102.022531-48.647673-33.972233 0-64.945878 12.13546-82.866848 32.4553-8.960485 10.124643-15.698488 11.324078-20.002343 11.324078-5.92662 0-13.12323-2.53998-22.648155-7.972715-64.698935-36.864988-135.818376-67.7328-211.453336-91.756778-12.84101-4.09219-24.12981-6.06773-34.536673-6.06773-22.29538 0-40.745513 9.207428-56.479278 28.116167-4.021635 4.833018-8.819375 9.17215-13.899335 13.758225-4.127468 3.704138-8.254935 7.443553-12.029628 11.42991-28.186723 29.880043-57.114273 45.543253-91.01595 49.317946-13.652393 1.516933-29.562545 10.30103-38.628863 21.272332-45.1552 54.785958-45.966583 106.961381-2.53998 164.216764 4.480243 5.92662 9.03104 11.85324 13.934612 17.427085 40.9219 46.495745 66.3217 85.759603 82.372963 127.281221 5.538568 14.357943 15.23988 21.342888 29.597823 21.342888 1.340545 0 2.751645-0.070555 4.2333-0.176388 31.32642-2.610535 62.723395-4.93885 94.614256-7.302442l19.155682-1.4111c-0.14111 0.211665-0.246943 0.42333-0.388052 0.634995-32.243635 50.482103-41.239398 109.536638-28.222 185.841871 11.57102 67.909188 46.037138 129.856478 99.623661 179.068591 48.68295 44.696593 103.539463 67.344748 163.087883 67.344748l3.38664-0.035277c49.917663-0.740828 91.298171-23.530093 131.302856-45.613808 6.49106-3.598305 13.017398-7.161333 19.649568-10.72436 5.468013-2.998588 5.07996-8.784098 4.903572-11.218245l-0.105832-2.469425v-9.912978l-25.999518 2.187205c-11.747408 1.023048-23.42426 2.046095-35.13639 2.716368-2.8222 0.176388-5.679678 0.388053-8.537155 0.599717-4.974128 0.42333-9.948255 0.811383-14.781273 0.811383-13.722948 0-23.600648-3.10442-30.373927-18.62652-2.293038-5.22107-6.20884-9.419093-9.701313-13.087953-1.97554-2.11665-5.326903-5.6444-5.609123-6.561615 0.42333-1.799153 4.550798-6.103008 7.020223-8.678265 2.363593-2.469425 4.691908-4.974128 6.561615-7.372997l7.937438-10.371586-12.452958-3.915802c-32.31419-10.15992-39.36969-17.321253-38.346643-28.64533l37.076653 20.813725 14.39322-20.707893-4.691907-5.397457c-2.751645-3.139698-5.573845-6.244118-8.396046-9.31326-6.738003-7.372998-13.12323-14.322665-18.3443-21.977883-1.234713-1.799153-1.69332-5.432735-2.11665-9.101595 2.857478-0.740828 5.820788-1.446378 9.101595-1.446378 0.352775 0 0.670273 0 1.023048 0.035278 8.537155 3.316085 16.580425 9.348538 20.990113 15.733765 13.440728 19.402625 32.17308 30.05643 59.019257 33.513625 6.561615 0.84666 13.052675 1.904985 19.579013 2.998588 9.948255 1.622765 19.89651 3.24553 29.91532 4.127467 13.087953 1.164158 24.764805 1.763875 35.700831 1.763875 59.760085 0 102.869191-18.06208 135.606711-56.902608 37.25304-44.16743 49.564888-97.295346 56.655665-143.403038 2.716368-17.49764-1.799153-38.346643-10.971303-50.729046z m-141.356943 200.023427c-17.285975 0-34.57195-5.573845-51.328763-16.615703l-2.046095-1.340545c-27.869225-18.273745-54.150963-35.524443-70.166948-74.294415l-5.150515-12.452958-37.358873 36.088883 11.112413 18.20319s7.725773-0.458608 8.713542-0.458607c2.010818 0 3.38664 0.14111 4.303855 0.317497-0.42333 1.340545-1.446378 3.704138-3.704137 7.514108-5.044683 8.60771-10.265753 17.144865-15.698488 26.070072-1.164158-2.610535-2.222483-5.326903-3.24553-8.04327-3.10442-7.972715-6.279395-16.22765-12.347125-22.930375-24.623695-27.269508-32.631688-54.115685-25.96424-87.064871 2.610535-12.735178-12.382403-32.73752-24.870638-37.217762-22.118993-7.90216-31.396975-22.365935-31.996692-49.882386-0.388053-18.273745-1.340545-36.54749-2.363593-56.479278l-1.904985-38.911082-10.195198 1.763875c-13.68767 2.363593-27.198953 4.550798-40.569125 6.702725-30.515038 4.93885-59.336755 9.560203-88.370138 16.051262-25.435078 5.679678-50.870155 12.946843-75.423296 19.967065-16.50987 4.727185-33.01974 9.419093-49.600165 13.687671-5.326903 1.375823-10.30103 2.081373-14.851828 2.081372-13.96989 0-25.011748-6.63217-34.783615-20.919558C201.822579 422.271678 172.401144 383.113653 143.967479 345.260895L131.937851 329.174355c-15.733765-20.990113-19.47318-43.638268-11.359355-69.285011C129.962311 230.291522 143.649981 217.662177 166.368691 217.662177c6.984945 0 15.063493 1.199435 24.023978 3.563027 12.206015 3.24553 24.517863 7.372998 36.441658 11.359355 9.666035 3.24553 19.33207 6.49106 29.103937 9.31326 6.455783 1.904985 12.946843 2.469425 19.190961 3.033865 2.575258 0.211665 5.185793 0.458608 7.725772 0.776105l7.725773 0.98777 6.455782-21.942605L229.868192 189.087401c3.10442-2.857478 6.20884-5.714955 9.242705-8.501877 13.511283-12.41768 26.24646-24.165088 38.24081-36.935543 13.934613-14.851828 29.245048-22.083715 46.777965-22.083715 8.713543 0 18.097358 1.83443 27.869226 5.468012 34.71306 12.911565 65.580873 25.96424 94.40259 39.863576 24.941193 12.029628 49.917663 25.152858 74.082751 37.852757 17.427085 9.17215 34.889448 18.309023 52.457643 27.163676 39.299135 19.790678 66.286423 48.330175 82.478795 87.311813 6.879113 16.50987 16.545148 31.714473 25.928963 46.460468l6.808558 10.794915c3.10442 5.009405 7.514108 8.642988 11.394632 11.85324 1.481655 1.199435 2.96331 2.434148 4.303855 3.704137l5.50329 5.185793 16.474593-11.99435-7.725773-18.379578c-1.940263-4.65663-4.09219-9.277983-6.244117-13.899335-4.550798-9.630758-8.819375-18.76763-10.794915-28.116168-11.85324-55.950115-37.852758-95.672581-79.268543-121.142936 13.793503-18.414855 39.263858-30.691425 65.122265-30.691425 17.744583 0 33.196128 5.856065 43.532435 16.474593 19.261515 19.825955 35.947773 43.32077 52.069591 66.074758 4.727185 6.667448 9.419093 13.299618 14.216832 19.861233 7.831605 10.759638 8.537155 22.683433 2.081373 35.348055-1.058325 2.081373-1.83443 4.37441-2.53998 6.63217l-0.811383 2.504702c-5.36218 14.710718-9.912978 26.034795-13.54656 35.136391-15.839598 39.546078-15.627933 42.544665 5.6444 80.15048 4.79774 8.4666 10.72436 19.014573 17.92097 32.59641l9.8777 18.450133c6.561615 12.170738 13.087953 24.306198 19.226238 36.653323 1.375823 2.751645 2.328315 6.032453 3.24553 9.524925l-30.656148 1.97554 12.558791 32.73752H781.749406l-2.328315 22.930375 17.321252 3.174975-16.9332 28.398388 38.875805-12.382403-9.03104 27.975058 20.602061 11.782685 33.936955-61.52396c6.702725 6.06773 14.81655 10.936025 24.41203 10.936025 10.794915 0 21.483998-5.92662 35.101113-19.579013 0.317498 2.222483 0.42333 4.586075 0.14111 6.526338-7.408275 49.10628-23.56537 88.334861-49.388501 119.837668-18.76763 22.895098-42.156613 35.030558-67.59169 35.030558z m-212.546939 169.720054l-9.136873-1.516933c2.716368-0.246943 5.432735-0.42333 8.18438-0.56444 0.28222 0.634995 0.634995 1.340545 0.952493 2.081373z m-213.887484-382.655046c-1.305268-8.18438 0.176388-18.167913 1.023047-19.684845 11.676853-6.91439 26.422848-10.371585 40.886623-13.54656 1.340545 2.046095 3.10442 5.115238 4.65663 8.431323 8.678265 18.414855 17.250698 36.864988 25.787853 55.350398 17.07431 36.82971 34.71306 74.929411 53.163193 111.935508 4.762463 9.560203 11.041858 18.06208 17.92097 26.563958-69.602508-37.605815-129.715368-82.090743-143.438316-169.049782z m-14.463775 135.359769c42.826885 47.166018 98.741723 70.343336 153.280738 88.229028 5.36218 1.763875 10.195198 5.291625 11.14769 7.408275 2.575258 5.6444 3.774693 12.206015 3.139698 16.686258-1.763875 0.529163-4.586075 1.023048-7.549385 1.023047-2.151928 0-3.351363-0.28222-3.598305-0.42333-43.849933-18.520688-91.262893-39.687188-145.025804-64.663658-2.8222-1.305268-6.63217-6.385228-7.161332-9.560202-2.11665-12.629345-3.210253-25.858408-4.2333-38.699418z m69.673063 151.411031c37.746925 10.406863 73.412478 20.249285 109.571915 31.32642 2.575258 0.776105 5.997175 5.07996 9.066318 9.03104-4.09219 2.786923-8.290213 5.538568-11.535743 5.92662-6.385228 0.70555-12.629345 1.058325-18.732352 1.058325-43.779378 0-79.303821-17.77986-103.927516-51.64626l15.557378 4.303855z" fill="#333333" p-id="2548"></path><path d="M772.012816 283.560547l-2.610535-7.267165c-1.375823-3.915803-2.716368-7.866883-4.056913-11.817963-7.972715-23.70648-16.22765-48.189065-38.593585-65.89837l-5.256348-4.162745-19.437902 13.158508 48.82406 87.840975 21.131223-11.85324zM723.929583 449.117856c-33.01974 0-50.552658 13.652393-56.937886 44.202708l-3.880525 18.555965 114.193269-57.361216-29.880043-3.739415c-8.960485-1.12888-16.65098-1.658043-23.494815-1.658042zM526.940021 274.564785c-13.617115 0-27.975058 2.293038-42.61522 6.808557l-32.913908 10.124643 94.684811 21.201777c-2.151928 1.340545-40.49857 24.870638-40.49857 24.870638l35.206945-1.55221 3.704137-0.105833c31.32642 0 51.22293 17.321253 74.999966 47.307128l16.121818-7.443552c-12.27657-63.323113-52.91625-101.211148-108.689979-101.211148zM720.71933 509.371826c-8.572433 0.035278-15.839598 5.150515-22.260102 9.701313-2.25776 1.587488-4.550798 3.210253-6.808558 4.51552l-9.101595 5.150515 17.144865 22.612878-14.39322 18.379577h18.76763l17.77986 0.211665c3.316085 0 6.420505-0.105833 9.560203-0.352775 15.769043-1.234713 25.54091-5.856065 29.880043-14.146277 4.162745-7.937438 2.751645-17.744583-4.303855-29.915321-6.808558-11.782685-25.752575-16.157095-36.265271-16.157095z" fill="#333333" p-id="2549"></path></svg>',
"menu_type": "api",
"url": "/metadata_table_modelview/api/"
},
{
"name": 'metadata_metric',
"title": '指标',
"icon": '<svg t="1650360886140" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6048" width="200" height="200"><path d="M896 311.466667h-81.066667V42.666667c0-25.6-17.066667-42.666667-42.666666-42.666667H42.666667C17.066667 0 0 17.066667 0 42.666667v938.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h853.333333c72.533333 0 128-55.466667 128-128V439.466667c0-68.266667-55.466667-128-128-128zM85.333333 85.333333h644.266667v810.666667c0 17.066667 4.266667 29.866667 8.533333 42.666667H85.333333V85.333333z m853.333334 810.666667c0 25.6-17.066667 42.666667-42.666667 42.666667h-34.133333c-25.6 0-42.666667-17.066667-42.666667-42.666667V396.8H896c25.6 0 42.666667 17.066667 42.666667 42.666667V896z" p-id="6049"></path><path d="M614.4 371.2H196.266667c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666666h418.133333c25.6 0 42.666667 17.066667 42.666667 42.666666s-17.066667 42.666667-42.666667 42.666667zM614.4 571.733333H196.266667c-25.6 0-42.666667-17.066667-42.666667-42.666666s17.066667-42.666667 42.666667-42.666667h418.133333c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666666zM375.466667 768H196.266667c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666666h174.933333c25.6 0 42.666667 17.066667 42.666667 42.666666s-17.066667 42.666667-38.4 42.666667z" p-id="6050"></path></svg>',
"menu_type": "api",
"url": "/metadata_metric_modelview/api/"
},
{
"name": 'metadata_dimension',
"title": '维表',
# "disable":True,
"icon": '<svg t="1646714682203" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="43468" width="128" height="128"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#64676F" p-id="43469"></path></svg>',
"menu_type": "api",
"url": "/dimension_table_modelview/api/"
},
]
},
{
"name": 'etl',
"title": '特征平台',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'feast',
"title": '特征平台',
"icon": '<svg t="1658320572989" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4843" width="200" height="200"><path d="M959.063415 831.188293c0 17.655758-14.313022 31.96878-31.968781 31.96878H95.906341c-17.655758 0-31.96878-14.313022-31.96878-31.96878V191.812683c0-17.655758 14.313022-31.96878 31.96878-31.968781h831.188293c17.655758 0 31.96878 14.313022 31.968781 31.968781v639.37561z m-71.929756-447.562927H135.867317v407.601951h751.266342V383.625366z m-603.127009 60.225186l146.934509 146.934509a7.992195 7.992195 0 0 1 0 11.302962l-39.205713 39.206713-0.007992 0.006993-107.720804 107.720804a7.992195 7.992195 0 0 1-11.301963 0l-33.908886-33.906888a7.992195 7.992195 0 0 1 0-11.302962l107.375141-107.375142-107.375141-107.375141a7.992195 7.992195 0 0 1 0-11.303961l33.908886-33.906888a7.992195 7.992195 0 0 1 11.301963 0zM823.196098 575.438049a7.992195 7.992195 0 0 1 7.992195 7.992195v47.953171a7.992195 7.992195 0 0 1-7.992195 7.992195H583.430244a7.992195 7.992195 0 0 1-7.992195-7.992195v-47.953171a7.992195 7.992195 0 0 1 7.992195-7.992195h239.765854z m63.937561-343.66439H135.867317v87.914146h751.266342v-87.914146z" p-id="4844"></path></svg>',
"menu_type": "api",
"disable": True,
"url": "/metadata_metric_modelview/api/"
},
{
"name": 'etl',
"title": '特征加工',
"icon": '<svg t="1658320609813" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5976" width="200" height="200"><path d="M488.308263 331.270343L452.261159 152.802147a74.482489 74.482489 0 1 1 73.750083-11.400056l34.996261 173.707558a148.359947 148.359947 0 0 1 74.355114 22.720502l153.646006-165.587405a111.739655 111.739655 0 1 1 54.452782 50.790752l-156.862223 169.090216a148.025588 148.025588 0 0 1 17.354834 53.943282l170.363965 23.612127a74.482489 74.482489 0 1 1-10.205916 73.734161l-169.918153-23.452908a149.267493 149.267493 0 0 1-36.875042 53.338251l119.859807 187.702877a74.482489 74.482489 0 1 1-59.81845 44.692678l-125.878272-196.873873a149.347102 149.347102 0 0 1-97.44182-9.234682l-161.399955 173.866776a111.739655 111.739655 0 1 1-57.366483-47.685988l160.810846-173.261745a148.312181 148.312181 0 0 1-26.7965-114.478216l-176.016228-102.64827a74.482489 74.482489 0 1 1 42.606913-61.378793l164.616172 95.945164a150.413867 150.413867 0 0 1 47.813363-38.674212z m-103.316988-61.299184a37.257166 37.257166 0 0 1-74.482488 0 111.739655 111.739655 0 1 0-59.229342 98.699647 37.257166 37.257166 0 1 1 35.171402 65.693618 186.222144 186.222144 0 1 1 98.476741-164.249968l0.063687-0.143297z m229.593307 490.807439a37.257166 37.257166 0 1 1 67.763462 30.840654 111.739655 111.739655 0 1 0 101.756645-65.550322 37.257166 37.257166 0 1 1 0-74.498411 186.222144 186.222144 0 1 1-169.536029 109.208079z" fill="#8a8a8a" p-id="5977"></path></svg>',
"menu_type": "api",
"disable": True,
"url": "/metadata_metric_modelview/api/"
}
]
},
{
"name": 'media_data',
"title": '媒体数据',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'dataset',
"title": '数据集',
"icon": '<svg t="1658320455412" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2287" width="200" height="200"><path d="M685.6 444l171.7 68.7-354.8 141.9-337.2-141.9 175-73.7-37.3-17-208.6 90.7 408.1 177.4 425.8-177.4-201.7-84-41 15.3z m0 230.7l171.7 68.7-354.8 141.9-337.2-141.9 175-73.7-37.4-17-208.5 90.7 408.1 177.4 425.8-177.4-201.7-84-41 15.3zM928.3 282L502.5 104.6 94.4 282l408.1 177.4L928.3 282z m-763 0l337.1-141.9L857.3 282 502.5 424 165.3 282z m586.1 17.8V282L503 388.5 254.5 282v17.7L503 406.2l248.4-106.4z" fill="" p-id="2288"></path></svg>',
"menu_type": "api",
"url": "/dataset_modelview/api/"
},
{
"name": 'label_platform',
"title": '标注平台',
"icon": '<svg t="1658320508784" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3263" width="200" height="200"><path d="M875.65 912h-380a36 36 0 0 1 0-72h380a36 36 0 1 1 0 72zM812.26 284.82L285.39 811.69l-88.11 15.1L212 738l526.72-526.72 73.54 73.54m90.51-11.31L750 120.77a16 16 0 0 0-22.62 0L152.5 695.68a34.11 34.11 0 0 0-9.5 18.56l-25.95 156.23a32 32 0 0 0 37 36.78l155.38-26.62a34.2 34.2 0 0 0 18.38-9.52l575-575a16 16 0 0 0 0-22.63z" p-id="3264"></path></svg>',
"menu_type": "api",
"disable": True,
"url": "/metadata_table_modelview/api/"
}
]
},
]
},
# 在线开发
{
"name": 'dev',
"title": '在线开发',
'hidden': 0,
"isExpand": True,
"icon": '<svg t="1658320670421" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8692" width="200" height="200"><path d="M44.100267 534.357333v-0.034133a33.655467 33.655467 0 0 1 0-47.854933v-0.068267l239.342933-239.138133a33.826133 33.826133 0 1 1 47.889067 47.854933l-215.415467 215.278933 215.415467 215.278934a33.792 33.792 0 0 1 0.068266 47.889066 34.065067 34.065067 0 0 1-47.957333-0.034133l-239.3088-239.138133-0.034133-0.034134z m534.528-427.008a34.133333 34.133333 0 1 1 65.9456 17.646934l-211.968 791.074133a34.133333 34.133333 0 1 1-65.9456-17.646933l211.968-791.074134z m401.271466 427.008l-239.342933 239.172267a34.065067 34.065067 0 0 1-47.957333 0.034133 33.792 33.792 0 0 1 0.068266-47.889066l215.415467-215.278934-215.415467-215.278933a33.826133 33.826133 0 1 1 47.889067-47.854933l239.3088 239.138133 0.034133 0.034133v0.034134a33.655467 33.655467 0 0 1 0 47.854933z" fill="#333333" p-id="8693"></path></svg>',
"children": [
{
"name": 'images',
"title": '镜像管理',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'docker_repository',
"title": '镜像仓库',
"icon": '<svg t="1646707265666" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13240" width="128" height="128"><path d="M466.752 128.96a71.376 71.376 0 0 1 90.496 0L924.16 429.392a19.2 19.2 0 0 1-24.32 29.712L532.912 158.688a32.976 32.976 0 0 0-41.84 0L124.16 459.088a19.2 19.2 0 1 1-24.32-29.712L466.752 128.976zM317.104 415.2a36.704 36.704 0 0 1 36.672-36.768h96.048a36.704 36.704 0 0 1 36.656 36.768v96.544a36.704 36.704 0 0 1-36.656 36.768H353.76a36.704 36.704 0 0 1-36.672-36.768V415.2z m38.4 1.632v93.28h92.576v-93.28H355.52z m-150.176 62.56a19.2 19.2 0 0 1 19.2 19.2v307.2c0 28.272 22.784 51.024 50.656 51.024h471.52c27.872 0 50.64-22.752 50.64-51.024v-307.2a19.2 19.2 0 1 1 38.4 0v307.2c0 49.28-39.776 89.424-89.056 89.424H275.2c-49.28 0-89.056-40.128-89.056-89.424v-307.2a19.2 19.2 0 0 1 19.2-19.2z m111.776 155.248a36.704 36.704 0 0 1 36.672-36.768h96.048a36.704 36.704 0 0 1 36.656 36.768v96.544a36.704 36.704 0 0 1-36.656 36.752H353.76a36.704 36.704 0 0 1-36.672-36.752v-96.544z m38.4 1.632v93.28h92.576v-93.28H355.52z m179.888-1.632a36.704 36.704 0 0 1 36.672-36.768h96.048a36.704 36.704 0 0 1 36.656 36.768v96.544a36.704 36.704 0 0 1-36.656 36.752h-96.048a36.704 36.704 0 0 1-36.672-36.752v-96.544z m38.4 1.632v93.28h92.576v-93.28h-92.576z" p-id="13241"></path></svg>',
"menu_type": "api",
"url": "/repository_modelview/api/"
},
{
"name": 'docker',
"title": '镜像构建',
"icon": '<svg t="1658320733754" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11164" width="200" height="200"><path d="M973.714286 166.857143H356.571429c-20.228571 0-36.571429 16.342857-36.571429 36.571428v269.714286H50.285714c-20.228571 0-36.571429 16.342857-36.571428 36.571429v310.857143c0 20.228571 16.342857 36.571429 36.571428 36.571428h617.142857c20.228571 0 36.571429-16.342857 36.571429-36.571428V550.857143h269.714286c20.228571 0 36.571429-16.342857 36.571428-36.571429V203.428571c0-20.228571-16.342857-36.571429-36.571428-36.571428z m-576 77.714286h228.571428v228.571428H397.714286V244.571429z m-77.714286 534.857142H91.428571V550.857143h228.571429v228.571428z m306.285714 0H397.714286V550.857143h228.571428v228.571428z m306.285715-306.285714H704V244.571429h228.571429v228.571428z" p-id="11165"></path></svg>',
"menu_type": "api",
"url": "/docker_modelview/api/"
},
{
"name": 'template_images',
"title": '镜像管理',
"icon": '<svg t="1646707325205" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13984" width="128" height="128"><path d="M945.9 493.8c-2.2-1.9-47.8-40.9-112.1-40.9h-2.3c-11.9-23.2-35.1-55.2-79.7-83.5-14.3-9-32.9-7-44.8 5-2.3 2.3-22.6 23.2-37.7 56-15.3 33.1-19.9 66.7-13.8 98.8-2.3 0.5-5.6 1-10 1.5h-523c-27.7 0-50.9 20.8-54 48.3-1.3 11.1-1.9 21.5-1.9 30.9 0 38.6 7.3 75 21.6 108.4 14.4 33.5 35.6 63.3 63 88.4 55.3 50.7 133.7 80.3 226.8 85.7h0.4c0.6 0 3.8 0.2 9.3 0.2 23.8 0 90.2-2.6 166.4-27.8 55.5-18.4 104.9-45 146.9-79.2 46.9-38.2 84.4-85.6 111.7-141.3 10.9-1 24.2-3.4 38.6-8.3 32.2-11 76.4-37.4 104.1-100.6 6.1-14.4 2.3-31.3-9.5-41.6z m-115.5 73.1c-18.8 7.1-34.7 6.1-36.7 5.9-16.1-2.4-31 6.5-37.5 21.6-23 53.8-56.6 99-99.7 134.4-34.8 28.6-76.2 51.1-122.9 66.8-79.6 26.9-148.5 25-151.9 24.8-150-8.8-243.2-89.5-243.2-210.7 0-2.3 0.1-4.7 0.2-7.2h508.7c1.2 0 2.5-0.1 3.7-0.2 20.1-2.1 30.3-5.4 37.5-8.4l23.8-8.4c9.6-3.4 17.4-10.7 21.3-20.2 3.9-9.4 3.6-20.1-0.8-29.3-11-22.9-10.6-47.8 0.9-74 1.9-4.2 3.9-8.2 5.9-11.8 25.7 23.7 32 44.9 32.9 48.2 1.5 9.7 6.8 17.7 14.9 23.3 8.2 5.7 18.2 7 28 4.9 22.6-4.8 43.1 0.3 58.1 6.8-11.6 15.9-26.1 27.1-43.2 33.5zM132.8 501.1h70c11 0 20-9 20-20v-70c0-11-9-20-20-20h-70c-11 0-20 9-20 20v70c0 11 9 20 20 20z" p-id="13985"></path><path d="M265.2 501.1h70c11 0 20-9 20-20v-70c0-11-9-20-20-20h-70c-11 0-20 9-20 20v70c0 11 8.9 20 20 20zM399 501.1h70c11 0 20-9 20-20v-70c0-11-9-20-20-20h-70c-11 0-20 9-20 20v70c0 11 9 20 20 20zM265.2 370.2h70c11 0 20-9 20-20v-70c0-11-9-20-20-20h-70c-11 0-20 9-20 20v70c0 11 8.9 20 20 20zM399 370.2h70c11 0 20-9 20-20v-70c0-11-9-20-20-20h-70c-11 0-20 9-20 20v70c0 11 9 20 20 20zM399 239.5h70c11 0 20-9 20-20v-70c0-11-9-20-20-20h-70c-11 0-20 9-20 20v70c0 11 9 20 20 20zM532.3 501.1h70c11 0 20-9 20-20v-70c0-11-9-20-20-20h-70c-11 0-20 9-20 20v70c0 11 8.9 20 20 20z" p-id="13986"></path><path d="M250.7 678.1m-36 0a36 36 0 1 0 72 0 36 36 0 1 0-72 0Z" p-id="13987"></path></svg>',
"menu_type": "api",
"url": "/images_modelview/api/"
},
]
},
{
"name": 'dev_online',
"title": '代码开发',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'notebook',
"title": 'notebook',
"icon": '<svg t="1646706986326" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11053" width="128" height="128"><path d="M639.904 96.32a16 16 0 0 1 2.88 31.776l-2.88 0.256H160.128v768h704V363.296a16 16 0 0 1 31.744-2.88l0.256 2.88V896.32a32 32 0 0 1-28.256 31.776l-3.744 0.224h-704a32 32 0 0 1-31.776-28.288l-0.224-3.712v-768a32 32 0 0 1 28.256-31.808l3.744-0.192h479.776z m-88.64 482.912a16 16 0 0 1 10.112 17.824l-0.768 2.784-71.072 189.312a16 16 0 0 1-30.72-8.48l0.768-2.784 71.04-189.28a16 16 0 0 1 20.64-9.376z m-173.152 3.712a16 16 0 0 1 1.792 20.416l-1.856 2.208-82.496 82.112 82.656 84.672a16 16 0 0 1 1.6 20.416l-1.856 2.208a16 16 0 0 1-20.448 1.6l-2.176-1.888-93.76-96a16 16 0 0 1-1.664-20.288l1.856-2.208 93.728-93.312a16 16 0 0 1 22.624 0.064z m288-1.92l2.24 1.856 93.696 93.312 1.856 2.208a16 16 0 0 1 0.128 18.08l-1.824 2.24-93.728 96-2.176 1.856a16 16 0 0 1-18.208 0.224l-2.24-1.824-1.888-2.208a16 16 0 0 1-0.192-18.176l1.824-2.24 82.656-84.672-82.496-82.112-1.856-2.24a16 16 0 0 1 22.208-22.304z m-316.416-146.72c6.528 0 12.288 1.92 16.896 6.528 4.224 4.224 6.528 9.6 6.528 16.128a21.184 21.184 0 0 1-6.912 16.512 23.552 23.552 0 0 1-16.512 6.528 23.552 23.552 0 0 1-16.512-6.528 21.984 21.984 0 0 1-6.528-16.512c0-6.528 1.92-11.904 6.528-16.128a21.984 21.984 0 0 1 16.512-6.528zM890.432 100.096a16 16 0 0 1 3.584 20.16l-1.632 2.4-288.544 342.56a16 16 0 0 1-26.112-18.24l1.632-2.368 288.544-342.56a16 16 0 0 1 22.528-1.92zM355.456 200.448c24.576 0 44.16 6.528 59.136 20.352 14.208 13.056 21.504 31.104 21.504 54.144 0 17.28-4.992 32.256-14.592 44.928-3.84 4.608-14.208 14.592-31.104 29.568a79.04 79.04 0 0 0-18.048 21.12 53.6 53.6 0 0 0-7.296 28.032v8.832h-30.72v-8.832c0-12.672 2.304-23.808 6.912-33.408 5.376-11.52 18.048-26.112 38.784-44.544 6.144-6.144 10.752-10.752 13.056-13.824 7.68-9.6 11.52-19.584 11.52-30.336 0-15.36-4.608-27.264-13.056-35.712-8.832-9.216-21.504-13.44-37.632-13.44-19.2 0-33.408 6.144-42.624 18.816-8.448 10.752-12.672 25.344-12.672 44.16h-30.336c0-26.88 7.296-48.384 22.656-64.512 15.36-16.896 36.864-25.344 64.512-25.344z" p-id="11054"></path></svg>',
"menu_type": "api",
"url": "/notebook_modelview/api/"
}
]
},
# {
# "name": 'data_sql_select',
# "title": '数据探索',
# "isMenu": True,
# "isExpand": True,
# "children": [
# {
# "name": 'data_search',
# "title": 'sqllab',
# "icon": '<svg t="1649746944636" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2366" width="200" height="200"><path d="M832 960H192V64h384l256 256zM576 160v160h160z m-64 224V128H256v768h512V384z" fill="#262626" p-id="2367"></path><path d="M672 736v-160h-32v192h96v-32zM601.6 673.28c-1.6-63.04-28.16-95.68-80-97.28-52.16 1.92-79.04 34.24-80.96 97.28 0.96 58.56 24.96 89.92 71.36 94.72h0.32c3.2 0.32 14.72 0.32 17.28 0H608v-32h-25.28c12.48-16.32 18.88-37.12 18.88-62.72z m-80 68.8c-28.48 0.64-42.88-22.4-42.88-68.8 0.64-45.12 14.72-67.84 42.88-67.84 27.52 0 41.6 22.72 41.92 67.84-0.32 45.44-14.4 68.16-41.92 68.8zM352 608c13.44-0.64 28.48 11.52 32 32h32c-6.08-37.12-27.84-64-64-64-35.2 1.92-55.36 19.84-57.92 54.08-0.96 27.2 12.48 45.12 40.64 53.12 11.52 3.2 20.8 6.4 27.84 10.24 8.64 3.84 13.12 10.24 13.44 19.52-0.64 11.84-11.2 22.4-24 23.04-16.64 0-28.48-6.4-32-32H288c7.04 44.8 25.28 65.28 64 64 38.72-0.64 63.04-19.2 64-56-0.64-21.76-8.64-38.08-24.96-49.28-8.96-6.08-20.48-11.2-34.56-15.04-15.68-3.84-22.72-10.24-21.76-19.52s7.36-19.52 17.28-20.16z" fill="#262626" p-id="2368"></path></svg>',
# "menu_type": "innerRoute",
# "url": "{host}/frontend/dataSearch".format(host=request.host_url.strip('/'))
# }
# ],
# },
{
"name": 'data_pipeline',
"title": '数据开发',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'etl_pipeline',
"title": '任务ETL',
"icon": '<svg t="1646714525402" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="37492" width="128" height="128"><path d="M576.364 706c59.702 0 108.1 48.398 108.1 108.1 0 59.702-48.398 108.1-108.1 108.1h-179.4c-59.702 0-108.1-48.398-108.1-108.1 0-59.702 48.398-108.1 108.1-108.1h179.4z m196.737-188.572c78.348 3.4 140.802 68.833 151.318 148.04 11.261 84.825-39.41 157.519-138.707 179.422l1.457 41.706a6.9 6.9 0 0 1-11.165 5.662l-82.04-64.617a6.9 6.9 0 0 1-0.367-10.53l77.321-70.17a6.9 6.9 0 0 1 11.533 4.869l1.123 32.004c61.365-17.221 88.357-59.32 81.565-110.477-6.833-51.47-46.297-93.259-93.207-96.091l-1.424-0.074-0.715-0.04c-16.15-1.081-28.566-14.87-27.86-31.128 0.716-16.498 14.67-29.292 31.168-28.576zM576.364 765.8h-179.4c-26.675 0-48.3 21.625-48.3 48.3 0 26.406 21.19 47.863 47.493 48.293l0.807 0.007h179.4c26.676 0 48.3-21.625 48.3-48.3 0-26.406-21.19-47.863-47.493-48.293l-0.807-0.007z m0-326.6c59.702 0 108.1 48.398 108.1 108.1 0 59.702-48.398 108.1-108.1 108.1h-179.4c-59.702 0-108.1-48.398-108.1-108.1 0-59.702 48.398-108.1 108.1-108.1h179.4zM261.236 260.804c0.706 16.258-11.71 30.047-27.86 31.128l-0.715 0.04c-47.534 2.063-87.729 44.175-94.631 96.165-5.815 43.8 13.134 80.958 57.218 101.55l1.02-29.118a6.9 6.9 0 0 1 11.532-4.868l77.321 70.169a6.9 6.9 0 0 1-0.367 10.53l-82.04 64.617a6.9 6.9 0 0 1-11.164-5.662l1.48-42.383C109.937 525.25 68.453 457.83 78.75 380.267c10.515-79.206 72.97-144.639 151.318-148.039 16.498-0.716 30.452 12.078 31.168 28.576zM576.364 499h-179.4c-26.675 0-48.3 21.625-48.3 48.3 0 26.406 21.19 47.863 47.493 48.293l0.807 0.007h179.4c26.676 0 48.3-21.625 48.3-48.3 0-26.406-21.19-47.863-47.493-48.293l-0.807-0.007z m0-345c59.702 0 108.1 48.398 108.1 108.1 0 59.702-48.398 108.1-108.1 108.1h-179.4c-59.702 0-108.1-48.398-108.1-108.1 0-59.702 48.398-108.1 108.1-108.1h179.4z m0 59.8h-179.4c-26.675 0-48.3 21.625-48.3 48.3 0 26.406 21.19 47.863 47.493 48.293l0.807 0.007h179.4c26.676 0 48.3-21.625 48.3-48.3 0-26.406-21.19-47.863-47.493-48.293l-0.807-0.007z" fill="#333333" p-id="37493"></path></svg>',
"menu_type": "api",
# "disable": True,
"url": "/etl_pipeline_modelview/api/",
},
{
"name": 'task_manager',
"title": '任务管理',
# "disable": True,
"icon": '<svg t="1646714570024" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="41094" width="128" height="128"><path d="M831.825 63.94H191.94c-70.692 0-128 57.308-128 128v639.885c0 70.692 57.308 128 128 128h639.885c70.692 0 128-57.308 128-128V191.94c0-70.692-57.308-128-128-128zM895.885 832a63.835 63.835 0 0 1-63.973 63.886H192.088c-17.112 0-33.27-6.575-45.372-18.676s-18.836-28.098-18.836-45.21V192a64.236 64.236 0 0 1 64.208-64.12h639.824A64.038 64.038 0 0 1 895.885 192V832z" p-id="41095"></path><path d="M791.998 351.852H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94z m0 256.121H536a31.97 31.97 0 0 0 0 63.94h256a31.97 31.97 0 0 0 0-63.94z m-447.996-79.975c-61.856 0-111.986 50.144-111.986 111.985S282.16 751.97 344.002 751.97s111.985-50.144 111.985-111.986-50.13-111.985-111.985-111.985z m33.982 145.982a48.045 48.045 0 1 1 14.088-33.982 47.746 47.746 0 0 1-14.088 33.986z m39.412-376.586L311.999 402.787l-41.391-41.395a31.97 31.97 0 1 0-45.213 45.213l63.997 64.002a31.97 31.97 0 0 0 45.214 0l128-128a31.97 31.97 0 0 0-45.21-45.213z" p-id="41096"></path></svg>',
"menu_type": "api",
"url": "/etl_task_modelview/api/",
},
{
"name": 'instance_manager',
"title": '任务实例',
"disable": True,
"icon": '<svg t="1646714617148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="41609" width="128" height="128"><path d="M112.64 95.36a32 32 0 0 0-32 32v332.16a32 32 0 0 0 32 32h332.16a32 32 0 0 0 32-32V128a32 32 0 0 0-32-32z m300.16 332.16H144.64V159.36h268.16zM938.88 293.76a197.76 197.76 0 1 0-197.76 197.76 198.4 198.4 0 0 0 197.76-197.76z m-332.16 0a133.76 133.76 0 1 1 133.76 133.76 134.4 134.4 0 0 1-133.76-133.76zM99.84 928.64h365.44a32 32 0 0 0 27.52-48L310.4 563.84a33.28 33.28 0 0 0-55.68 0l-182.4 316.8a32 32 0 0 0 27.52 48z m182.4-284.16l128 220.16h-256zM832 552.96h-177.28a32 32 0 0 0-27.52 16l-89.6 155.52a32 32 0 0 0 0 32l89.6 155.52a32 32 0 0 0 27.52 16H832a32 32 0 0 0 27.52-16l89.6-155.52a32 32 0 0 0 0-32l-89.6-155.52a32 32 0 0 0-27.52-16z m-18.56 311.04h-140.16L601.6 741.12l71.68-123.52h142.72l71.68 123.52z" fill="#1B213F" p-id="41610"></path></svg>',
"menu_type": "innerRoute",
}
]
},
]
},
# 机器学习
{
"name": 'train',
"title": '模型训练',
'hidden': 0,
"isExpand": True,
"icon": '<svg t="1656301644598" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3966" width="200" height="200"><path d="M738.133333 85.333333C789.333333 85.333333 832 128 832 179.2c0 42.666667-27.733333 78.933333-66.133333 89.6l-27.733334 166.4c23.466667 17.066667 40.533333 44.8 40.533334 76.8 0 51.2-42.666667 93.866667-93.866667 93.866667-38.4 0-72.533333-23.466667-87.466667-57.6l-102.4-6.4c-12.8 14.933333-29.866667 23.466667-51.2 23.466666-36.266667 0-66.133333-29.866667-66.133333-66.133333 0-25.6 14.933333-49.066667 36.266667-59.733333l8.533333-55.466667c-10.666667-12.8-19.2-27.733333-19.2-46.933333 0-36.266667 29.866667-66.133333 66.133333-66.133334s66.133333 29.866667 66.133334 66.133334c0 25.6-14.933333 49.066667-36.266667 59.733333l-8.533333 55.466667c2.133333 2.133333 4.266667 6.4 6.4 8.533333l102.4 6.4c12.8-21.333333 32-38.4 55.466666-44.8L682.666667 256c-12.8-8.533333-23.466667-21.333333-32-36.266667H369.066667c-10.666667 23.466667-32 42.666667-57.6 49.066667l-49.066667 298.666667c34.133333 19.2 57.6 51.2 61.866667 91.733333l364.8 81.066667c23.466667-40.533333 66.133333-66.133333 115.2-66.133334 74.666667 0 132.266667 59.733333 132.266666 132.266667S878.933333 938.666667 806.4 938.666667c-70.4 0-128-53.333333-132.266667-121.6l-364.8-81.066667c-21.333333 34.133333-59.733333 55.466667-102.4 55.466667-66.133333 0-119.466667-53.333333-119.466666-119.466667 0-59.733333 42.666667-108.8 98.133333-117.333333L234.666667 256c-27.733333-17.066667-42.666667-44.8-42.666667-76.8C192 128 234.666667 85.333333 285.866667 85.333333c36.266667 0 70.4 21.333333 85.333333 53.333334h283.733333C669.866667 106.666667 701.866667 85.333333 738.133333 85.333333z" fill="#6415FF" p-id="3967"></path></svg>',
"children": [
{
"name": 'train_template',
"title": '模板开发',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'job_template',
"title": '任务模板',
"icon": '<svg t="1646707407473" class="icon" viewBox="0 0 1029 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17170" width="128" height="128"><path d="M643.645496 1023.99488 113.833257 1023.99488c-30.396199 0-58.031151-11.271775-79.914779-32.597638C11.728384 969.774108-2.3e-05 942.054369-2.3e-05 911.233205l0-124.322548 1.166609-4.899351c5.90149-24.79198 17.650329-44.099262 34.923705-57.386553 11.227848-8.634135 24.849187-13.195352 39.399113-13.195352 15.645028 0 31.811045 5.112854 49.416425 15.631747 3.524345 2.049228 5.667556 3.097338 6.73916 3.581552l4.203675 0.700782 5.771753 2.885877c12.707051 6.354036 25.061669 9.44218 37.76872 9.44218 13.633597 0 25.891167-2.395533 37.475536-7.323486 11.839756-5.038281 21.822336-11.714105 30.51572-20.408512 8.781238-8.782259 15.500988-18.690266 20.545399-30.295066 4.838058-11.128758 7.190685-23.107445 7.190685-36.626628 0-13.638705-2.395533-25.895253-7.321443-37.470428-5.040324-11.844864-11.716148-21.827444-20.411576-30.522871-8.697471-8.697471-18.680051-15.374317-30.522871-20.412598-11.576196-4.927953-23.831724-7.322465-37.47145-7.322465-12.730547 0-25.006505 2.678503-37.527634 8.188739l-1.820401 0.800895-1.886802 0.628253c-3.394608 1.131876-4.863596 1.838789-5.123069 1.968525-9.249108 4.623532-18.446116 8.92834-27.345853 12.796948-15.133231 6.58082-29.98145 9.13878-43.887801 7.592154-19.025334-2.107456-35.750139-12.615112-47.064819-29.582024-8.90178-13.350627-13.566174-30.509591-14.68375-54.005225l-0.049035-2.039013 0-112.840335c0-30.608681 11.592541-58.379499 33.52214-80.310119 21.935728-21.931641 49.704502-33.521118 80.31114-33.521118l96.492482 0c-6.217149-19.393092-9.363521-39.975267-9.363521-61.338927 0-29.5003 5.734977-57.534677 17.047615-83.324711 11.066444-25.231246 26.191502-47.537796 44.954298-66.301613 18.766882-18.764839 41.073433-33.889898 66.301613-44.955319 25.785947-11.310593 53.459718-17.046593 82.250041-17.046593 28.789302 0 56.462051 5.734977 82.252085 17.046593 25.231246 11.066444 47.538818 26.192524 66.301613 44.955319 18.763817 18.763817 33.888877 41.072411 44.953276 66.305699 11.310593 25.782882 17.047615 53.819303 17.047615 83.320624 0 21.575121-2.948191 42.052077-8.809841 61.338927l30.38394 0c30.821164 0 58.540903 11.727385 80.161994 33.916458 21.325863 21.889759 32.595595 49.522666 32.595595 79.914779l0 69.794291c20.424857-7.043583 42.091917-10.607768 64.562937-10.607768 27.951631 0 54.97161 5.50615 80.307054 16.365219 25.004462 10.716052 47.241547 25.709331 66.09424 44.562023 18.853714 18.850649 33.848014 41.089778 44.565088 66.095261 10.858048 25.338508 16.364198 52.356444 16.364198 80.303989 0 28.763763-5.543948 56.051388-16.476569 81.104884-10.71503 24.553959-25.672556 46.524419-44.456804 65.303559-18.845542 18.847585-41.082627 33.840864-66.08811 44.55998-25.344638 10.860091-52.362573 16.365219-80.309097 16.365219-22.474085 0-44.140123-3.564185-64.560893-10.607768l0 61.19591c0 30.601531-11.402533 58.184383-32.975611 79.766655C701.84418 1012.587239 674.257242 1023.99488 643.645496 1023.99488zM85.810117 803.534327l0 107.699899c0 7.753559 2.316873 13.1739 7.994645 18.707632 5.930093 5.777883 11.920458 8.243903 20.028496 8.243903l529.812238 0c7.986472 0 13.519183-2.274991 19.095821-7.85265 5.574594-5.577659 7.851628-11.112413 7.851628-19.098886L670.592944 684.116237l70.693255 60.092638c10.82638 9.203138 23.426168 16.797335 37.448976 22.574196 13.158576 5.417276 26.971966 8.051852 42.228805 8.051852 16.490871 0 31.70276-3.084058 46.507053-9.426857 15.132209-6.48786 27.961847-15.1128 39.217277-26.36823 11.325917-11.323874 19.986612-24.061572 26.482644-38.944523 6.267205-14.361961 9.313464-29.66477 9.313464-46.783893 0-16.490871-3.084058-31.701739-9.426857-46.501945-6.486838-15.135274-15.111778-27.964912-26.367209-39.21932-11.258495-11.257473-24.087111-19.882414-39.223407-26.369252-14.799185-6.341778-30.011075-9.425835-46.503988-9.425835-15.257861 0-29.073293 2.634576-42.237999 8.054916-14.014635 5.770732-26.615445 13.365951-37.444889 22.571131l-70.69019 60.079357L670.589879 386.798402c0-8.109058-2.46602-14.099424-8.245946-20.03156-5.528624-5.674707-10.947943-7.989537-18.701502-7.989537L448.509149 358.777305l60.409317-70.762719c18.397081-21.550604 27.340745-46.536678 27.340745-76.386348 0-17.810712-3.212773-33.790807-9.821175-48.855595-6.857661-15.638898-15.703255-28.752526-27.046539-40.093767-11.343283-11.343283-24.456912-20.191943-40.091724-27.049604-15.065809-6.608402-30.696535-9.819132-47.78399-9.819132s-32.717159 3.211751-47.780925 9.819132c-15.633791 6.856639-28.74844 15.704277-40.093767 27.049604-11.342261 11.342261-20.1899 24.454869-27.046539 40.089681-6.609424 15.067852-9.821175 31.049991-9.821175 48.85866 0 14.848219 2.390425 28.228472 7.30612 40.904876 5.194578 13.39864 12.227945 25.6889 20.904984 36.53571l55.770462 69.70848L113.833257 358.776283c-7.986472 0-13.676502 2.431287-19.637242 8.391006-5.956654 5.955632-8.38692 11.643619-8.38692 19.631113l0 105.644542c2.926738-1.393393 5.875952-2.832756 8.83538-4.312981 4.231257-2.11665 8.981461-4.082111 14.468203-5.981171 22.750924-9.734343 46.382424-14.668427 70.274419-14.668427 25.064734 0 48.978181 4.769613 71.075314 14.176039 21.832552 9.290991 41.212363 22.308593 57.594949 38.692201 16.382586 16.381564 29.40121 35.761376 38.694245 57.600057 9.403361 22.097133 14.172975 46.009559 14.172975 71.070206 0 25.174039-4.81354 49.007806-14.306797 70.840357-9.284862 21.357531-22.258538 40.454374-38.560421 56.756257-16.3785 16.380543-35.759333 29.400189-57.601078 38.694245-22.107348 9.405404-46.017731 14.172975-71.069185 14.172975-24.391532 0-48.470471-5.489806-71.650446-16.327422C101.166046 811.214335 94.074451 808.097589 85.810117 803.534327z" p-id="17171"></path></svg>',
"menu_type": "api",
"url": "/job_template_fab_modelview/api/"
},
]
},
{
"name": 'train_task',
"title": '任务流',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'pipeline',
"title": '任务流',
"icon": '<svg t="1646707538926" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17496" width="128" height="128"><path d="M527.579429 186.660571a119.954286 119.954286 0 1 1-67.949715 0V47.542857a33.938286 33.938286 0 0 1 67.949715 0v139.190857z m281.380571 604.598858a119.954286 119.954286 0 1 1 67.949714 0v139.190857a33.938286 33.938286 0 1 1-67.949714 0v-139.190857z m-698.441143 0a119.954286 119.954286 0 1 1 67.949714 0v139.190857a33.938286 33.938286 0 0 1-67.949714 0v-139.190857zM144.457143 13.531429c18.797714 0 34.011429 15.213714 34.011428 33.938285v410.038857a33.938286 33.938286 0 0 1-67.949714 0V47.542857c0-18.724571 15.213714-33.938286 33.938286-33.938286z m0 722.139428a60.269714 60.269714 0 1 0 0-120.466286 60.269714 60.269714 0 0 0 0 120.466286z m698.514286-722.139428c18.724571 0 33.938286 15.213714 33.938285 33.938285v410.038857a33.938286 33.938286 0 1 1-67.949714 0V47.542857c0-18.724571 15.213714-33.938286 34.011429-33.938286z m0 722.139428a60.269714 60.269714 0 1 0 0-120.466286 60.269714 60.269714 0 0 0 0 120.466286z m-349.403429 228.717714a33.938286 33.938286 0 0 1-33.938286-33.938285V520.411429a33.938286 33.938286 0 0 1 67.949715 0v410.038857a33.938286 33.938286 0 0 1-34.011429 33.938285z m0-722.139428a60.269714 60.269714 0 1 0 0 120.539428 60.269714 60.269714 0 0 0 0-120.539428z" fill="#000000" p-id="17497"></path></svg>',
"menu_type": "api",
"url": "/pipeline_modelview/api/",
"model_name":"pipeline",
"related": [
{
"hidden": 1,
"name": 'task',
"title": '任务',
"icon": '<svg t="1646706405313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3745" width="128" height="128"><path d="M992 512c0-12-6-24-18-30l-108-60 108-60c12 0 18-12 18-30 0-12-6-24-18-30L530 68c-12-6-24-6-30 0L50 302c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 6-18 18-18 30s6 24 18 30l108 60-108 60c-12 0-18 12-18 30 0 12 6 24 18 30l444 234c6 0 12 6 18 6 6 0 12 0 18-6l444-234c12-6 18-18 18-30s-6-24-18-30l-108-60 108-60c12-6 18-18 18-30zM140 332L512 140 884 332 512 530 140 332z m744 360L512 884 140 692l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48z m-372 18L140 512l90-48 264 138c6 0 12 6 18 6 6 0 12 0 18-6l264-138 90 48L512 710z" p-id="3746"></path></svg>',
"menu_type": "api",
"url": "/task_modelview/api/",
}
]
},
{
"name": 'runhistory',
"title": '定时调度记录',
"icon": '<svg t="1646707555273" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18410" width="128" height="128"><path d="M491.287273 915.316364c-224.581818 0-407.272727-182.690909-407.272728-407.272728 0-156.392727 87.272727-296.494545 227.607273-365.614545 11.403636-5.585455 25.367273-0.930909 31.185455 10.705454 5.585455 11.636364 0.930909 25.367273-10.705455 31.185455-124.276364 61.207273-201.541818 185.250909-201.541818 323.723636 0 198.981818 161.745455 360.727273 360.727273 360.727273s360.727273-161.745455 360.727272-360.727273-161.745455-360.727273-360.727272-360.727272c-12.8 0-23.272727-10.472727-23.272728-23.272728s10.472727-23.272727 23.272728-23.272727c224.581818 0 407.272727 182.690909 407.272727 407.272727s-182.690909 407.272727-407.272727 407.272728z" fill="#040000" p-id="18411"></path><path d="M491.287273 531.316364c-12.8 0-23.272727-10.472727-23.272728-23.272728l-0.232727-279.272727c0-12.8 10.472727-23.272727 23.272727-23.272727s23.272727 10.472727 23.272728 23.272727l0.232727 279.272727c0 12.8-10.472727 23.272727-23.272727 23.272728z" fill="#040000" p-id="18412"></path><path d="M688.407273 531.316364h-197.12c-12.8 0-23.272727-10.472727-23.272728-23.272728s10.472727-23.272727 23.272728-23.272727h197.12c12.8 0 23.272727 10.472727 23.272727 23.272727s-10.472727 23.272727-23.272727 23.272728z" fill="#040000" p-id="18413"></path></svg>',
"menu_type": "api",
"url": "/runhistory_modelview/api/"
},
{
"name": 'workflow',
"title": '运行实例',
"icon": '<svg t="1646707580896" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19019" width="128" height="128"><path d="M422 684h360c19.882 0 36 16.118 36 36v140c0 19.882-16.118 36-36 36H422c-19.882 0-36-16.118-36-36V720c0-19.882 16.118-36 36-36z m36 72v68h288v-68H458zM242 128h360c19.882 0 36 16.118 36 36v140c0 19.882-16.118 36-36 36H242c-19.882 0-36-16.118-36-36V164c0-19.882 16.118-36 36-36z m36 72v68h288v-68H278z" p-id="19020"></path><path d="M178 476c-19.683 0-35.677 15.797-35.995 35.405L142 512v278c0 19.683 15.797 35.677 35.405 35.995L178 826h142c19.882 0 36-16.118 36-36 0-19.683-15.797-35.677-35.405-35.995L320 754H214V548h204.68c19.684 0 35.678-15.797 35.995-35.405l0.005-0.595c0-19.683-15.797-35.677-35.404-35.995l-0.596-0.005H178z m526-278c-19.882 0-36 16.118-36 36 0 19.683 15.797 35.677 35.405 35.995L704 270h106v206H603.037c-19.683 0-35.677 15.797-35.995 35.405l-0.005 0.595c0 19.683 15.797 35.677 35.405 35.995l0.595 0.005H846c19.683 0 35.677-15.797 35.995-35.405L882 512V234c0-19.683-15.797-35.677-35.405-35.995L846 198H704z" p-id="19021"></path><path d="M534.749 394.274l111 90c17.77 14.408 17.77 41.52 0 55.927l-111 90c-13.216 10.716-32.13 10.716-45.346 0l-111-90c-17.77-14.408-17.77-41.519 0-55.927l111-90c13.216-10.715 32.13-10.715 45.346 0z m-22.673 74.309l-53.839 43.654 53.839 43.654 53.84-43.654-53.84-43.654z" p-id="19022"></path></svg>',
"menu_type": "api",
"url": "/workflow_modelview/api/"
},
]
},
{
"name": 'train_hyperparameter',
"title": '超参搜索',
"isExpand": True,
"isMenu": True,
"children": [
{
"name": 'nni',
"title": 'nni超参搜索',
"icon": '<svg t="1646707647264" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22114" width="128" height="128"><path d="M 340.11 511.12 h -99.32 V 121.77 a 21.5 21.5 0 0 0 -43 0 v 389.35 H 98 a 21.51 21.51 0 0 0 -21.5 21.5 v 107.14 a 21.5 21.5 0 0 0 21.5 21.5 h 99.56 v 245.6 a 21.5 21.5 0 0 0 43 0 v -245.6 h 99.55 a 21.5 21.5 0 0 0 21.5 -21.5 V 532.62 a 21.51 21.51 0 0 0 -21.5 -21.5 Z m -21.5 107.14 H 119.5 v -64.14 h 199.11 Z M 633.09 270.12 h -99.32 V 121.77 a 21.5 21.5 0 1 0 -43 0 v 148.35 H 391 a 21.51 21.51 0 0 0 -21.5 21.5 v 107.14 a 21.5 21.5 0 0 0 21.5 21.5 h 99.56 v 486.6 a 21.5 21.5 0 0 0 43 0 v -486.6 h 99.55 a 21.5 21.5 0 0 0 21.5 -21.5 V 291.62 a 21.51 21.51 0 0 0 -21.52 -21.5 Z m -21.5 107.14 H 412.48 v -64.14 h 199.11 Z M 924.29 649.12 h -99.56 V 121.77 a 21.5 21.5 0 1 0 -43 0 v 527.35 h -99.55 a 21.51 21.51 0 0 0 -21.5 21.5 v 107.14 a 21.5 21.5 0 0 0 21.5 21.5 h 99.55 v 107.6 a 21.5 21.5 0 1 0 43 0 v -107.6 h 99.56 a 21.5 21.5 0 0 0 21.5 -21.5 V 670.62 a 21.51 21.51 0 0 0 -21.5 -21.5 Z m -21.5 107.14 H 703.68 v -64.14 h 199.11 Z" p-id="22115"></path></svg>',
"menu_type": "api",
"url": "/nni_modelview/api/"
},
{
"name": 'ray',
"title": 'ray超参搜索',
"icon": '<svg t="1646707647264" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22114" width="128" height="128"><path d="M 340.11 511.12 h -99.32 V 121.77 a 21.5 21.5 0 0 0 -43 0 v 389.35 H 98 a 21.51 21.51 0 0 0 -21.5 21.5 v 107.14 a 21.5 21.5 0 0 0 21.5 21.5 h 99.56 v 245.6 a 21.5 21.5 0 0 0 43 0 v -245.6 h 99.55 a 21.5 21.5 0 0 0 21.5 -21.5 V 532.62 a 21.51 21.51 0 0 0 -21.5 -21.5 Z m -21.5 107.14 H 119.5 v -64.14 h 199.11 Z M 633.09 270.12 h -99.32 V 121.77 a 21.5 21.5 0 1 0 -43 0 v 148.35 H 391 a 21.51 21.51 0 0 0 -21.5 21.5 v 107.14 a 21.5 21.5 0 0 0 21.5 21.5 h 99.56 v 486.6 a 21.5 21.5 0 0 0 43 0 v -486.6 h 99.55 a 21.5 21.5 0 0 0 21.5 -21.5 V 291.62 a 21.51 21.51 0 0 0 -21.52 -21.5 Z m -21.5 107.14 H 412.48 v -64.14 h 199.11 Z M 924.29 649.12 h -99.56 V 121.77 a 21.5 21.5 0 1 0 -43 0 v 527.35 h -99.55 a 21.51 21.51 0 0 0 -21.5 21.5 v 107.14 a 21.5 21.5 0 0 0 21.5 21.5 h 99.55 v 107.6 a 21.5 21.5 0 1 0 43 0 v -107.6 h 99.56 a 21.5 21.5 0 0 0 21.5 -21.5 V 670.62 a 21.51 21.51 0 0 0 -21.5 -21.5 Z m -21.5 107.14 H 703.68 v -64.14 h 199.11 Z" p-id="22115"></path></svg>',
"menu_type": "api",
"disable":True,
"url": "/nni_modelview/api/"
}
]
},
]
},
# 服务化
{
"name": 'service',
"title": '服务化',
"isMenu": True,
# "isExpand": True,
"icon":'<svg t="1658475429152" class="icon" viewBox="0 0 1056 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3298" width="200" height="200"><path d="M784.818005 488.94136h-417.766352l2.578804-28.366851a206.304371 206.304371 0 0 1 412.608743 0z m-357.938085-51.576092h298.109817a154.728279 154.728279 0 0 0-298.109817 0zM956.566394 333.18156L928.715304 291.404925a430.660375 430.660375 0 0 0-176.905999-145.960343l-56.217941-25.272286 57.249463-22.69348c121.203818-47.450005 180.000564-23.725003 206.304372 4.126087s48.481527 78.395661 13.409784 182.579369z m-128.940232-206.304372a485.331034 485.331034 0 0 1 108.825556 91.805446 92.836967 92.836967 0 0 0-13.409784-81.490227A103.152186 103.152186 0 0 0 825.563118 127.90871zM202.008155 979.945765a118.109253 118.109253 0 0 1-87.163597-31.461417c-46.418484-46.418484-41.260874-135.645124 14.957067-251.175572l25.272286-51.576093 21.661959 54.670658a434.270702 434.270702 0 0 0 166.075019 202.178284l40.745113 26.303808-44.35544 19.083154a384.757653 384.757653 0 0 1-123.266862 33.008699z m-47.450005-206.304372c-23.725003 66.017399-25.272286 118.109253-2.578805 140.802734a76.848378 76.848378 0 0 0 61.375551 15.988588 269.742966 269.742966 0 0 0 62.407072-12.894023A488.94136 488.94136 0 0 1 155.073911 768.999545z" fill="#5E5C5C" p-id="3299"></path><path d="M179.830435 1023.785443a187.221217 187.221217 0 0 1-138.223928-51.576092 176.390238 176.390238 0 0 1-41.260875-124.814145 545.159302 545.159302 0 0 1 29.914134-171.232628A882.466949 882.466949 0 0 1 74.615206 567.337022l-3.094566 4.126087 37.650548-151.117952a480.689186 480.689186 0 0 1 464.184836-363.611455h28.366851c165.043497-69.627725 308.940796-75.816857 370.316347-14.957067a185.673934 185.673934 0 0 1 51.576093 126.361428A385.273414 385.273414 0 0 1 999.374551 309.456557a481.720707 481.720707 0 0 1 57.249463 227.45057 499.256579 499.256579 0 0 1-2.578804 54.670658l-3.094566 29.398373H423.785355a164.011975 164.011975 0 0 0 304.814709 45.386962l7.220653-13.409784 17.535871-3.610327h292.952208l-14.957067 43.839679a480.689186 480.689186 0 0 1-454.901139 325.445146 474.500054 474.500054 0 0 1-203.209806-44.871201 464.184836 464.184836 0 0 1-193.410349 50.02881z m309.456558-879.888144L346.421215 286.763076l-29.398373 29.914134a1031.521857 1031.521857 0 0 0-149.570669 188.7685 897.939777 897.939777 0 0 0-88.195119 187.221217 493.583209 493.583209 0 0 0-27.85109 154.728279 129.971754 129.971754 0 0 0 26.819568 88.71088c51.576093 51.576093 154.728279 47.450005 283.15275-14.441306l11.346741-5.673371 11.34674 5.673371a422.408201 422.408201 0 0 0 191.347305 44.8712 429.113093 429.113093 0 0 0 396.620154-265.616878h-206.304372a215.072307 215.072307 0 0 1-398.683197-103.152186v-26.819568h636.964746v-32.492938a429.628854 429.628854 0 0 0-55.186419-213.525025l-5.67337-10.315218 4.126087-11.346741a346.075583 346.075583 0 0 0 24.756525-133.06632 135.645124 135.645124 0 0 0-36.619026-92.321206c-45.386962-44.871201-175.358716-33.008699-316.161449 28.882612h-42.808157A427.050049 427.050049 0 0 0 309.802189 200.631001a432.207658 432.207658 0 0 0-115.014687 138.73969A601.377243 601.377243 0 0 1 314.959799 246.017963z" fill="#5E5C5C" p-id="3300"></path></svg>',
"children": [
{
"name": 'k8s_service',
"title": '内部服务',
"icon": '<svg t="1646708008152" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31188" width="128" height="128"><path d="M967.111111 113.777778v682.666666H56.888889V113.777778h910.222222zM113.777778 170.666667v568.888889h796.444444V170.666667H113.777778z" fill="#333333" p-id="31189"></path><path d="M170.666667 853.333333h682.666666v56.888889H170.666667z" fill="#333333" p-id="31190"></path><path d="M665.6 648.533333l-39.822222-45.511111L773.688889 455.111111 625.777778 307.2l39.822222-45.511111L853.333333 455.111111zM358.4 648.533333l39.822222-45.511111L250.311111 455.111111 398.222222 307.2l-39.822222-45.511111L170.666667 455.111111zM540.899556 221.866667l55.182222 13.824L483.157333 688.355556l-55.182222-13.767112z" fill="#333333" p-id="31191"></path></svg>',
"menu_type": "api",
"url": "/service_modelview/api/"
},
{
"name": 'inferenceservice',
"title": '推理服务',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'model_manager',
"title": '模型管理',
"icon": '<svg t="1658320907066" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14656" width="200" height="200"><path d="M512 1024C229.888 1024 0 794.112 0 512S229.888 0 512 0s512 229.888 512 512-229.888 512-512 512z m0-972.8c-253.952 0-460.8 206.848-460.8 460.8s206.848 460.8 460.8 460.8 460.8-206.848 460.8-460.8-206.848-460.8-460.8-460.8z" fill="" p-id="14657"></path><path d="M512 870.4c-28.16 0-51.2-23.04-51.2-51.2V409.6c0-28.16 23.04-51.2 51.2-51.2s51.2 23.04 51.2 51.2v409.6c0 28.16-23.04 51.2-51.2 51.2z" fill="" p-id="14658"></path><path d="M512 256m-51.2 0a51.2 51.2 0 1 0 102.4 0 51.2 51.2 0 1 0-102.4 0Z" fill="" p-id="14659"></path></svg>',
"menu_type": "api",
"url": "/training_model_modelview/api/"
},
{
"name": 'inferenceservice_manager',
"title": '服务上线',
"icon": '<svg t="1647603468955" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8582" width="128" height="128"><path d="M512 170.666667H398.222222v682.666666h56.888889V512h56.888889c91.022222 0 170.666667-73.955556 170.666667-170.666667s-73.955556-170.666667-170.666667-170.666666z m113.777778 170.666666c0 62.577778-51.2 113.777778-113.777778 113.777778H455.111111V227.555556h56.888889c62.577778 0 113.777778 51.2 113.777778 113.777777zM910.222222 227.555556V170.666667h-170.666666v56.888889h56.888888v568.888888h-56.888888v56.888889h170.666666v-56.888889h-56.888889V227.555556zM199.111111 170.666667C119.466667 170.666667 56.888889 233.244444 56.888889 312.888889V853.333333h56.888889V512h170.666666v341.333333h56.888889V312.888889C341.333333 233.244444 278.755556 170.666667 199.111111 170.666667zM284.444444 455.111111H113.777778V312.888889C113.777778 267.377778 153.6 227.555556 199.111111 227.555556h5.688889C244.622222 227.555556 284.444444 267.377778 284.444444 312.888889V455.111111z" fill="#333333" p-id="8583"></path></svg>',
"menu_type": "api",
"url": "/inferenceservice_modelview/api/"
},
]
},
{
"name": 'inferenceservice_pipeline',
"title": '服务pipeline',
"icon": '<svg t="1646708148024" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="32938" width="128" height="128"><path d="M576.364 706c59.702 0 108.1 48.398 108.1 108.1 0 59.702-48.398 108.1-108.1 108.1h-179.4c-59.702 0-108.1-48.398-108.1-108.1 0-59.702 48.398-108.1 108.1-108.1h179.4z m196.737-188.572c78.348 3.4 140.802 68.833 151.318 148.04 11.261 84.825-39.41 157.519-138.707 179.422l1.457 41.706a6.9 6.9 0 0 1-11.165 5.662l-82.04-64.617a6.9 6.9 0 0 1-0.367-10.53l77.321-70.17a6.9 6.9 0 0 1 11.533 4.869l1.123 32.004c61.365-17.221 88.357-59.32 81.565-110.477-6.833-51.47-46.297-93.259-93.207-96.091l-1.424-0.074-0.715-0.04c-16.15-1.081-28.566-14.87-27.86-31.128 0.716-16.498 14.67-29.292 31.168-28.576zM576.364 765.8h-179.4c-26.675 0-48.3 21.625-48.3 48.3 0 26.406 21.19 47.863 47.493 48.293l0.807 0.007h179.4c26.676 0 48.3-21.625 48.3-48.3 0-26.406-21.19-47.863-47.493-48.293l-0.807-0.007z m0-326.6c59.702 0 108.1 48.398 108.1 108.1 0 59.702-48.398 108.1-108.1 108.1h-179.4c-59.702 0-108.1-48.398-108.1-108.1 0-59.702 48.398-108.1 108.1-108.1h179.4zM261.236 260.804c0.706 16.258-11.71 30.047-27.86 31.128l-0.715 0.04c-47.534 2.063-87.729 44.175-94.631 96.165-5.815 43.8 13.134 80.958 57.218 101.55l1.02-29.118a6.9 6.9 0 0 1 11.532-4.868l77.321 70.169a6.9 6.9 0 0 1-0.367 10.53l-82.04 64.617a6.9 6.9 0 0 1-11.164-5.662l1.48-42.383C109.937 525.25 68.453 457.83 78.75 380.267c10.515-79.206 72.97-144.639 151.318-148.039 16.498-0.716 30.452 12.078 31.168 28.576zM576.364 499h-179.4c-26.675 0-48.3 21.625-48.3 48.3 0 26.406 21.19 47.863 47.493 48.293l0.807 0.007h179.4c26.676 0 48.3-21.625 48.3-48.3 0-26.406-21.19-47.863-47.493-48.293l-0.807-0.007z m0-345c59.702 0 108.1 48.398 108.1 108.1 0 59.702-48.398 108.1-108.1 108.1h-179.4c-59.702 0-108.1-48.398-108.1-108.1 0-59.702 48.398-108.1 108.1-108.1h179.4z m0 59.8h-179.4c-26.675 0-48.3 21.625-48.3 48.3 0 26.406 21.19 47.863 47.493 48.293l0.807 0.007h179.4c26.676 0 48.3-21.625 48.3-48.3 0-26.406-21.19-47.863-47.493-48.293l-0.807-0.007z" fill="#333333" p-id="32939"></path></svg>',
"menu_type": "api",
"disable":True,
"url": "/service_pipeline_modelview/api/"
},
]
},
# 应用市场
{
"name": 'aihub',
"title": 'AIHub',
"isMenu": True,
'hidden': 1,
"isExpand": True,
"icon": '<svg t="1660895494223" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2520" width="200" height="200"><path d="M735.9 66.5H288.1C176.4 66.5 85.5 157.3 85.5 269v486c0 111.7 90.9 202.6 202.6 202.6H736c111.7 0 202.6-90.9 202.6-202.6V269c-0.1-111.7-91-202.5-202.7-202.5zM884.8 755c0 82.1-66.8 148.9-148.9 148.9H288.1C206 903.8 139.2 837 139.2 755V269c0-82.1 66.8-148.9 148.9-148.9H736c82.1 0 148.9 66.8 148.9 148.9v486z" fill="#494949" p-id="2521"></path><path d="M651.2 344.5c-18.5 0-33.6 15-33.6 33.6 0 58.3-47.4 105.7-105.7 105.7-58.3 0-105.7-47.4-105.7-105.7 0-18.5-15-33.6-33.6-33.6-18.5 0-33.6 15-33.6 33.6 0 95.3 77.5 172.8 172.8 172.8s172.8-77.5 172.8-172.8c0.2-18.6-14.8-33.6-33.4-33.6z" fill="#494949" p-id="2522"></path></svg>',
"children": [
# {
# "name": 'dataset_market',
# "title": '数据集',
# "icon": '<svg t="1660895595231" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5135" width="200" height="200"><path d="M685.6 444l171.7 68.7-354.8 141.9-337.2-141.9 175-73.7-37.3-17-208.6 90.7 408.1 177.4 425.8-177.4-201.7-84-41 15.3z m0 230.7l171.7 68.7-354.8 141.9-337.2-141.9 175-73.7-37.4-17-208.5 90.7 408.1 177.4 425.8-177.4-201.7-84-41 15.3zM928.3 282L502.5 104.6 94.4 282l408.1 177.4L928.3 282z m-763 0l337.1-141.9L857.3 282 502.5 424 165.3 282z m586.1 17.8V282L503 388.5 254.5 282v17.7L503 406.2l248.4-106.4z" fill="" p-id="5136"></path></svg>',
# "menu_type": "api",
# "disable":True,
# },
{
"name": 'model_market',
"title": '模型市场',
"icon": '<svg t="1664182396322" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3003" width="64" height="64"><path d="M891.821291 547.404654l0.039999-0.099999 0.03-0.109999c5.999941-24.019765 5.789943-47.799533-0.639994-67.029345C856.901632 397.756116 751.182664 206.087987 511.995 206.087987c-239.317663 0-345.186629 192.268122-379.626293 275.007315-6.369938 19.049814-6.249939 43.059579 0.339997 62.749387 34.389664 82.409195 140.198631 274.097323 379.286296 274.097323 224.037812 0.02 334.136737-169.498345 379.826291-270.537358zM511.995 737.502798c-198.068066 0-283.65723-164.488394-305.287019-215.257898l-0.859991-16.069843c14.589858-36.409644 96.759055-214.407906 306.14701-214.407906 198.118065 0 283.65723 164.578393 305.277019 215.367897l0.849992 10.699895C803.142157 555.164578 719.272976 737.502798 511.995 737.502798z" fill="#2c2c2c" p-id="3004"></path><path d="M511.995 365.516431c-82.139198 0-146.47857 64.339372-146.478569 146.478569 0 82.159198 64.339372 146.518569 146.478569 146.518569 82.139198 0 146.47857-64.359371 146.47857-146.518569 0-82.139198-64.339372-146.47857-146.47857-146.478569z m0 212.577924c-35.229656 0-66.139354-30.889698-66.139354-66.099355 0-35.209656 30.909698-66.099354 66.139354-66.099354 35.209656 0 66.099354 30.889698 66.099355 66.099354 0 35.209656-30.889698 66.099354-66.099355 66.099355zM246.187596 938.170838H105.46897c-10.839894 0-19.659808-8.809914-19.659808-19.639808V777.812404c0-23.659769-19.239812-42.909581-42.889581-42.909581C19.259812 734.892823 0 754.142635 0 777.812404v140.718626c0 57.739436 46.649544 104.798977 104.238982 105.44897v0.02h141.948614c23.659769 0 42.909581-19.249812 42.909581-42.909581 0.01-23.669769-19.239812-42.919581-42.909581-42.919581zM981.080419 734.892823c-23.649769 0-42.889581 19.249812-42.889581 42.909581v140.708626c0 10.829894-8.819914 19.639808-19.659808 19.639808H777.812404c-23.659769 0-42.909581 19.249812-42.909581 42.909581 0 23.659769 19.249812 42.909581 42.909581 42.909581h140.728626c58.149432 0 105.44897-47.309538 105.44897-105.44897V777.812404c0-23.669769-19.249812-42.919581-42.909581-42.919581zM777.812404 85.819162h140.698626c10.839894 0 19.659808 8.809914 19.659808 19.639808v140.718626c0 23.659769 19.249812 42.909581 42.909581 42.909581 23.659769 0 42.909581-19.249812 42.909581-42.909581V105.45897C1023.99 47.309538 976.670462 0 918.51103 0h-140.698626c-23.659769 0-42.909581 19.249812-42.909581 42.899581-0.01 23.669769 19.239812 42.919581 42.909581 42.919581zM42.919581 289.097177c23.649769 0 42.879581-19.249812 42.879581-42.899581V105.46897c0-10.829894 8.819914-19.639808 19.659808-19.639808h140.718626c23.659769 0 42.909581-19.249812 42.909581-42.909581C289.097177 19.259812 269.847365 0 246.177596 0H105.45897C47.309538 0 0 47.309538 0 105.45897v140.718626c0 23.669769 19.259812 42.919581 42.919581 42.919581z" fill="#2c2c2c" p-id="3005"></path></svg>',
# "menu_type": "api",
# "url": "/aihub/api/"
"isMenu": True,
'hidden': 0,
"isExpand": True,
"children": [
{
"name": 'model_all',
"title": '所有模型',
"icon": '<svg t="1664182396322" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3003" width="64" height="64"><path d="M891.821291 547.404654l0.039999-0.099999 0.03-0.109999c5.999941-24.019765 5.789943-47.799533-0.639994-67.029345C856.901632 397.756116 751.182664 206.087987 511.995 206.087987c-239.317663 0-345.186629 192.268122-379.626293 275.007315-6.369938 19.049814-6.249939 43.059579 0.339997 62.749387 34.389664 82.409195 140.198631 274.097323 379.286296 274.097323 224.037812 0.02 334.136737-169.498345 379.826291-270.537358zM511.995 737.502798c-198.068066 0-283.65723-164.488394-305.287019-215.257898l-0.859991-16.069843c14.589858-36.409644 96.759055-214.407906 306.14701-214.407906 198.118065 0 283.65723 164.578393 305.277019 215.367897l0.849992 10.699895C803.142157 555.164578 719.272976 737.502798 511.995 737.502798z" fill="#2c2c2c" p-id="3004"></path><path d="M511.995 365.516431c-82.139198 0-146.47857 64.339372-146.478569 146.478569 0 82.159198 64.339372 146.518569 146.478569 146.518569 82.139198 0 146.47857-64.359371 146.47857-146.518569 0-82.139198-64.339372-146.47857-146.47857-146.478569z m0 212.577924c-35.229656 0-66.139354-30.889698-66.139354-66.099355 0-35.209656 30.909698-66.099354 66.139354-66.099354 35.209656 0 66.099354 30.889698 66.099355 66.099354 0 35.209656-30.889698 66.099354-66.099355 66.099355zM246.187596 938.170838H105.46897c-10.839894 0-19.659808-8.809914-19.659808-19.639808V777.812404c0-23.659769-19.239812-42.909581-42.889581-42.909581C19.259812 734.892823 0 754.142635 0 777.812404v140.718626c0 57.739436 46.649544 104.798977 104.238982 105.44897v0.02h141.948614c23.659769 0 42.909581-19.249812 42.909581-42.909581 0.01-23.669769-19.239812-42.919581-42.909581-42.919581zM981.080419 734.892823c-23.649769 0-42.889581 19.249812-42.889581 42.909581v140.708626c0 10.829894-8.819914 19.639808-19.659808 19.639808H777.812404c-23.659769 0-42.909581 19.249812-42.909581 42.909581 0 23.659769 19.249812 42.909581 42.909581 42.909581h140.728626c58.149432 0 105.44897-47.309538 105.44897-105.44897V777.812404c0-23.669769-19.249812-42.919581-42.909581-42.919581zM777.812404 85.819162h140.698626c10.839894 0 19.659808 8.809914 19.659808 19.639808v140.718626c0 23.659769 19.249812 42.909581 42.909581 42.909581 23.659769 0 42.909581-19.249812 42.909581-42.909581V105.45897C1023.99 47.309538 976.670462 0 918.51103 0h-140.698626c-23.659769 0-42.909581 19.249812-42.909581 42.899581-0.01 23.669769 19.239812 42.919581 42.909581 42.919581zM42.919581 289.097177c23.649769 0 42.879581-19.249812 42.879581-42.899581V105.46897c0-10.829894 8.819914-19.639808 19.659808-19.639808h140.718626c23.659769 0 42.909581-19.249812 42.909581-42.909581C289.097177 19.259812 269.847365 0 246.177596 0H105.45897C47.309538 0 0 47.309538 0 105.45897v140.718626c0 23.669769 19.259812 42.919581 42.919581 42.919581z" fill="#2c2c2c" p-id="3005"></path></svg>',
"menu_type": "api",
"url": "/aihub/api/"
},
{
"name": 'model_visual',
"title": '视觉',
"icon": '<svg t="1664182396322" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3003" width="64" height="64"><path d="M891.821291 547.404654l0.039999-0.099999 0.03-0.109999c5.999941-24.019765 5.789943-47.799533-0.639994-67.029345C856.901632 397.756116 751.182664 206.087987 511.995 206.087987c-239.317663 0-345.186629 192.268122-379.626293 275.007315-6.369938 19.049814-6.249939 43.059579 0.339997 62.749387 34.389664 82.409195 140.198631 274.097323 379.286296 274.097323 224.037812 0.02 334.136737-169.498345 379.826291-270.537358zM511.995 737.502798c-198.068066 0-283.65723-164.488394-305.287019-215.257898l-0.859991-16.069843c14.589858-36.409644 96.759055-214.407906 306.14701-214.407906 198.118065 0 283.65723 164.578393 305.277019 215.367897l0.849992 10.699895C803.142157 555.164578 719.272976 737.502798 511.995 737.502798z" fill="#2c2c2c" p-id="3004"></path><path d="M511.995 365.516431c-82.139198 0-146.47857 64.339372-146.478569 146.478569 0 82.159198 64.339372 146.518569 146.478569 146.518569 82.139198 0 146.47857-64.359371 146.47857-146.518569 0-82.139198-64.339372-146.47857-146.47857-146.478569z m0 212.577924c-35.229656 0-66.139354-30.889698-66.139354-66.099355 0-35.209656 30.909698-66.099354 66.139354-66.099354 35.209656 0 66.099354 30.889698 66.099355 66.099354 0 35.209656-30.889698 66.099354-66.099355 66.099355zM246.187596 938.170838H105.46897c-10.839894 0-19.659808-8.809914-19.659808-19.639808V777.812404c0-23.659769-19.239812-42.909581-42.889581-42.909581C19.259812 734.892823 0 754.142635 0 777.812404v140.718626c0 57.739436 46.649544 104.798977 104.238982 105.44897v0.02h141.948614c23.659769 0 42.909581-19.249812 42.909581-42.909581 0.01-23.669769-19.239812-42.919581-42.909581-42.919581zM981.080419 734.892823c-23.649769 0-42.889581 19.249812-42.889581 42.909581v140.708626c0 10.829894-8.819914 19.639808-19.659808 19.639808H777.812404c-23.659769 0-42.909581 19.249812-42.909581 42.909581 0 23.659769 19.249812 42.909581 42.909581 42.909581h140.728626c58.149432 0 105.44897-47.309538 105.44897-105.44897V777.812404c0-23.669769-19.249812-42.919581-42.909581-42.919581zM777.812404 85.819162h140.698626c10.839894 0 19.659808 8.809914 19.659808 19.639808v140.718626c0 23.659769 19.249812 42.909581 42.909581 42.909581 23.659769 0 42.909581-19.249812 42.909581-42.909581V105.45897C1023.99 47.309538 976.670462 0 918.51103 0h-140.698626c-23.659769 0-42.909581 19.249812-42.909581 42.899581-0.01 23.669769 19.239812 42.919581 42.909581 42.919581zM42.919581 289.097177c23.649769 0 42.879581-19.249812 42.879581-42.899581V105.46897c0-10.829894 8.819914-19.639808 19.659808-19.639808h140.718626c23.659769 0 42.909581-19.249812 42.909581-42.909581C289.097177 19.259812 269.847365 0 246.177596 0H105.45897C47.309538 0 0 47.309538 0 105.45897v140.718626c0 23.669769 19.259812 42.919581 42.919581 42.919581z" fill="#2c2c2c" p-id="3005"></path></svg>',
"menu_type": "api",
"url": "/aihub/visual/api/"
},
{
"name": 'model_voice',
"title": '语音',
"icon": '<svg t="1664182529451" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3966" width="64" height="64"><path d="M544 851.946667V906.666667a32 32 0 0 1-64 0v-54.72C294.688 835.733333 149.333333 680.170667 149.333333 490.666667v-21.333334a32 32 0 0 1 64 0v21.333334c0 164.949333 133.717333 298.666667 298.666667 298.666666s298.666667-133.717333 298.666667-298.666666v-21.333334a32 32 0 0 1 64 0v21.333334c0 189.514667-145.354667 345.066667-330.666667 361.28zM298.666667 298.56C298.666667 180.8 394.165333 85.333333 512 85.333333c117.781333 0 213.333333 95.541333 213.333333 213.226667v192.213333C725.333333 608.533333 629.834667 704 512 704c-117.781333 0-213.333333-95.541333-213.333333-213.226667V298.56z m64 0v192.213333C362.666667 573.12 429.557333 640 512 640c82.496 0 149.333333-66.805333 149.333333-149.226667V298.56C661.333333 216.213333 594.442667 149.333333 512 149.333333c-82.496 0-149.333333 66.805333-149.333333 149.226667z" p-id="3967"></path></svg>',
"menu_type": "api",
"url": "/aihub/voice/api/"
},
{
"name": 'model_language',
"title": '自然语言',
"icon": '<svg t="1664182544584" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4180" width="64" height="64"><path d="M988.542936 354.570637c2.836565-8.509695 5.67313-17.019391 5.67313-28.365651 0-31.202216-25.529086-56.731302-56.731301-56.731302s-56.731302 25.529086-56.731302 56.731302 25.529086 56.731302 56.731302 56.731302c8.509695 36.875346 14.182825 76.587258 14.182825 113.462604 0 243.944598-198.559557 439.66759-439.66759 439.66759-76.587258 0-150.33795-19.855956-215.578947-56.731302l-11.346261-5.67313-161.68421 62.404432 73.750692-136.155125-14.182825-17.01939C114.880886 703.468144 75.168975 601.351801 75.168975 496.398892c0-243.944598 198.559557-439.66759 439.66759-439.66759 93.606648 0 181.540166 28.365651 255.290859 82.260388l-28.365651 31.202216L875.080332 201.396122l-39.711911-136.155125-28.365651 31.202216C721.905817 34.038781 616.952909 0 512 0 236.853186 0 15.601108 221.252078 15.601108 496.398892c0 110.626039 36.875346 218.415512 107.789474 306.34903L24.110803 1018.32687l255.290859-85.096953c70.914127 36.875346 153.174515 59.567867 232.598338 59.567867 275.146814 0 496.398892-224.088643 496.398892-496.398892 0-48.221607-5.67313-96.443213-19.855956-141.828255z" p-id="4181"></path><path d="M599.933518 499.235457l45.385042 138.99169H710.559557l-164.520776-453.850416h-68.077562l-164.520776 453.850416h62.404432l48.221607-138.99169h175.867036z m-138.99169-116.299169c17.019391-51.058172 34.038781-99.279778 48.221607-153.174515h2.836565c17.019391 53.894737 31.202216 102.116343 48.221607 153.174515l22.69252 68.077562h-147.501385l25.529086-68.077562zM285.074792 694.958449h453.850416v56.731302H285.074792z" p-id="4182"></path></svg>',
"menu_type": "api",
"url": "/aihub/language/api/"
},
{
"name": 'model_reinforcement',
"title": '强化学习',
"icon": '<svg t="1664182563495" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4370" width="64" height="64"><path d="M77.052 500.449c1.986 1.731 4.348 3.061 6.638 4.407 63.842 37.536 127.699 75.046 191.548 112.57 45.053 26.478 90.093 52.976 135.146 79.454 11.153 6.555 22.178 7.912 34.583 2.149 60.935-28.307 122.102-56.113 183.185-84.102 106.592-48.842 213.183-97.685 319.765-146.547 2.503-1.147 5.802-1.8 5.953-5.293 0.148-3.4-2.561-5.206-5.041-6.94a20.009 20.009 0 0 0-2.578-1.519c-22.502-11.156-45.011-22.299-67.517-33.448-1.345-0.667-2.517-1.19-4.158-0.325-17.448 9.199-34.947 18.3-53.044 27.748l23.55 11.819c-2.081 1.013-3.557 1.769-5.063 2.459-134.875 61.776-269.76 123.529-404.587 185.411-3.772 1.731-6.482 1.621-10.032-0.471-81.006-47.747-162.085-95.368-243.13-143.048-1.513-0.89-3.449-1.342-4.37-3.448l29.19-12.792c-17.216-9.806-33.879-19.185-50.395-28.817-2.802-1.634-4.973-1.694-7.825-0.432-17.032 7.535-34.133 14.914-51.211 22.345-6.404 2.787-12.862 5.458-19.198 8.392-5.434 2.518-5.964 6.459-1.409 10.428z" p-id="4371"></path><path d="M949.521 579.958a22.083 22.083 0 0 0-2.58-1.516c-22.358-11.074-44.725-22.129-67.077-33.215-1.552-0.77-2.862-1.146-4.618-0.219-17.343 9.154-34.739 18.208-52.718 27.602l23.52 11.779c-1.937 0.969-3.398 1.755-4.902 2.445-134.876 61.774-269.765 123.518-404.583 185.417-4.022 1.847-6.807 1.547-10.475-0.615-80.862-47.662-161.799-95.197-242.703-142.788-1.524-0.897-3.398-1.409-4.546-3.489l29.243-12.814c-17.689-10.089-34.894-19.835-52.005-29.741-2.391-1.384-4.127-0.341-6.053 0.492-13.889 6.008-27.764 12.047-41.64 18.084-9.607 4.18-19.249 8.281-28.797 12.592-5.526 2.495-6.125 6.401-1.635 10.381 1.969 1.746 4.332 3.084 6.62 4.429 73.455 43.187 146.924 86.349 220.386 129.522 35.583 20.912 71.129 41.889 106.757 62.725 9.873 5.774 20.099 8.321 31.339 3.167 168.56-77.292 337.158-154.501 505.737-231.751 2.501-1.146 5.843-1.786 6.064-5.22 0.233-3.626-2.691-5.474-5.334-7.267z" p-id="4372"></path><path d="M83.448 381.08c35.858 21.107 71.734 42.184 107.603 63.271 73.461 43.187 146.919 86.379 220.383 129.56 11.16 6.56 22.17 7.8 34.586 2.091 150.657-69.276 301.449-138.258 452.205-207.318 17.389-7.966 34.793-15.899 52.151-23.932 5.669-2.623 6.14-6.184 1.352-10.139-1.9-1.569-4.129-2.808-6.352-3.908-116.886-57.835-233.787-115.638-350.684-173.45-5.301-2.622-10.881-4.084-18.184-4.326-2.907-0.256-6.78 1.115-10.65 2.796-160.462 69.718-320.939 139.4-481.389 209.144-3.632 1.579-8.985 1.94-9.247 7.122-0.258 5.089 4.538 6.917 8.226 9.089z m100.644-5.054c129.953-56.432 259.914-112.846 389.836-169.35 3.021-1.314 5.34-1.316 8.308 0.154 86.441 42.826 172.93 85.554 259.407 128.306 1.331 0.658 2.614 1.411 4.428 2.396-14.621 6.696-28.788 13.181-42.953 19.671-122.315 56.033-244.639 112.048-366.904 168.191-3.612 1.659-6.198 1.555-9.589-0.444-81.005-47.738-162.078-95.363-243.134-143.016-1.543-0.907-3.033-1.904-5.111-3.214 2.281-1.08 3.974-1.939 5.712-2.694z" p-id="4373"></path></svg>',
"menu_type": "api",
"url": "/aihub/reinforcement/api/"
},
{
"name": 'model_graph',
"title": '图论',
"icon": '<svg t="1664182607492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6053" width="64" height="64"><path d="M554.666667 682.666667h85.333333v128h-213.333333v-128h85.333333v-128H256v128h85.333333v128H128v-128h85.333333v-170.666667h298.666667V384h-85.333333V256h213.333333v128h-85.333333v128h298.666666v170.666667h85.333334v128h-213.333334v-128h85.333334v-128h-256v128z m42.666666-384h-128v42.666666h128V298.666667zM298.666667 725.333333H170.666667v42.666667h128v-42.666667z m597.333333 0h-128v42.666667h128v-42.666667z m-298.666667 0h-128v42.666667h128v-42.666667z" fill="#444444" p-id="6054"></path></svg>',
"menu_type": "api",
"url": "/aihub/graph/api/"
},
{
"name": 'model_common',
"title": '通用',
"icon": '<svg t="1664182648445" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6999" width="64" height="64"><path d="M358.4 480 121.6 480C57.6 480 0 422.4 0 358.4L0 121.6C0 57.6 57.6 0 121.6 0l230.4 0c70.4 0 121.6 57.6 121.6 121.6l0 230.4C480 422.4 422.4 480 358.4 480zM121.6 64C89.6 64 64 89.6 64 121.6l0 230.4c0 32 25.6 57.6 57.6 57.6l230.4 0c32 0 57.6-25.6 57.6-57.6L409.6 121.6C416 89.6 390.4 64 358.4 64L121.6 64z" p-id="7000"></path><path d="M358.4 1024 121.6 1024C57.6 1024 0 966.4 0 902.4l0-230.4c0-70.4 57.6-121.6 121.6-121.6l230.4 0c70.4 0 121.6 57.6 121.6 121.6l0 230.4C480 966.4 422.4 1024 358.4 1024zM121.6 608C89.6 608 64 633.6 64 665.6l0 230.4C64 934.4 89.6 960 121.6 960l230.4 0c32 0 57.6-25.6 57.6-57.6l0-230.4c0-32-25.6-57.6-57.6-57.6L121.6 614.4z" p-id="7001"></path><path d="M780.8 1024c-134.4 0-243.2-108.8-243.2-243.2s108.8-243.2 243.2-243.2 243.2 108.8 243.2 243.2S915.2 1024 780.8 1024zM780.8 608c-96 0-179.2 76.8-179.2 179.2s76.8 179.2 179.2 179.2 179.2-76.8 179.2-179.2S883.2 608 780.8 608z" p-id="7002"></path><path d="M902.4 480l-230.4 0c-70.4 0-121.6-57.6-121.6-121.6L550.4 121.6C544 57.6 601.6 0 665.6 0l230.4 0C966.4 0 1024 57.6 1024 121.6l0 230.4C1024 422.4 966.4 480 902.4 480zM665.6 64C633.6 64 608 89.6 608 121.6l0 230.4c0 32 25.6 57.6 57.6 57.6l230.4 0c32 0 57.6-25.6 57.6-57.6L953.6 121.6C960 89.6 934.4 64 902.4 64L665.6 64z" p-id="7003"></path></svg>',
"menu_type": "api",
"url": "/aihub/common/api/"
},
]
},
{
"name": 'business_market',
"title": '需求市场',
"icon": '<svg t="1660896350755" class="icon" viewBox="0 0 1075 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11649" width="200" height="200"><path d="M563.2 998.64381H102.4c-14.140952 0-25.35619-11.215238-25.35619-25.356191V204.8c0-42.422857 34.620952-77.04381 77.043809-77.04381h358.4c42.422857 0 76.55619 34.620952 76.556191 77.04381v768a26.331429 26.331429 0 0 1-25.84381 25.84381z m-435.44381-51.68762h409.6V204.8c0-14.140952-11.702857-25.84381-25.35619-25.84381H153.6c-14.140952 0-25.84381 11.702857-25.84381 25.84381v742.15619z" p-id="11650"></path><path d="M870.4 998.64381h-307.2c-14.140952 0-25.84381-11.215238-25.84381-25.356191v-409.6c0-42.422857 34.620952-76.55619 77.04381-76.55619h204.8c42.422857 0 77.04381 34.620952 77.04381 76.55619v409.6c0 13.653333-11.702857 25.35619-25.84381 25.356191z m-281.84381-51.68762h256v-383.75619c0-14.140952-11.702857-25.84381-25.843809-25.84381h-204.8c-14.140952 0-25.84381 11.702857-25.84381 25.84381v383.75619z" p-id="11651"></path><path d="M435.44381 537.35619H204.8c-14.140952 0-25.35619-11.215238-25.35619-25.35619s11.215238-25.35619 25.35619-25.35619h230.64381c14.140952 0 25.35619 11.215238 25.35619 25.35619s-11.215238 25.35619-25.35619 25.35619z" p-id="11652"></path><path d="M435.44381 384.24381H204.8c-14.140952 0-25.35619-11.215238-25.35619-25.84381s11.215238-25.84381 25.35619-25.84381h230.64381c14.140952 0 25.35619 11.215238 25.35619 25.84381s-11.215238 25.84381-25.35619 25.84381z" p-id="11653"></path><path d="M435.44381 691.44381H204.8c-14.140952 0-25.35619-11.215238-25.35619-25.84381 0-14.140952 11.215238-25.35619 25.35619-25.35619h230.64381c14.140952 0 25.35619 11.215238 25.35619 25.35619 0 14.140952-11.215238 25.84381-25.35619 25.84381z" p-id="11654"></path><path d="M435.44381 845.04381H204.8c-14.140952 0-25.35619-11.215238-25.35619-25.84381 0-14.140952 11.215238-25.84381 25.35619-25.84381h230.64381c14.140952 0 25.35619 11.215238 25.35619 25.84381 0 14.140952-11.215238 25.84381-25.35619 25.84381z" p-id="11655"></path><path d="M768 691.44381h-102.4c-14.140952 0-25.35619-11.215238-25.35619-25.84381 0-14.140952 11.215238-25.35619 25.35619-25.35619h102.4c14.140952 0 25.35619 11.215238 25.35619 25.35619 0 14.140952-11.215238 25.84381-25.35619 25.84381z" p-id="11656"></path><path d="M768 845.04381h-102.4c-14.140952 0-25.35619-11.215238-25.35619-25.84381 0-14.140952 11.215238-25.84381 25.35619-25.84381h102.4c14.140952 0 25.35619 11.215238 25.35619 25.84381 0 14.140952-11.215238 25.84381-25.35619 25.84381z" p-id="11657"></path><path d="M950.857143 999.619048H24.380952c-13.653333 0-24.380952-10.727619-24.380952-24.380953s10.727619-24.380952 24.380952-24.380952h926.476191c13.653333 0 24.380952 10.727619 24.380952 24.380952s-10.727619 24.380952-24.380952 24.380953z" p-id="11658"></path></svg>',
"menu_type": "api",
'hidden': 0,
"disable": True
}
]
}
]
if g.user.username in conf.get('ADMIN_USER','').split(','):
setting={
"name": 'security',
"title": '安全设置',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": 'security-user',
"title": '用户列表',
"icon": '<svg t="1653295961491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4397" width="200" height="200"><path d="M545.784454 962.539206l-65.943898 0c-29.341259 0-54.624085-25.281803-54.624085-54.615898L425.216471 868.462574c0-9.623171-7.826246-20.911262-16.690124-23.680329l-1.566682-0.611937-55.725162-23.104207-0.880043-0.494257c-8.153704-4.41045-22.017456-2.376117-28.55229 4.187369l-28.17469 28.123524c-9.930163 9.977235-23.239284 15.494902-37.432541 15.494902-14.195304 0-27.507494-5.517667-37.487799-15.541975l-46.682205-46.630017c-20.60427-20.603247-20.6319-54.233182-0.069585-74.974575l28.15013-28.106128c6.637164-6.574742 8.676613-20.599154 4.253884-28.909423l-0.831948-1.768273-23.164582-56.128345-0.26913-0.682545c-2.803859-9.03477-14.279215-17.394159-23.611767-17.394159l-39.631626 0c-29.391401 0-52.861952-24.065092-52.861952-53.193503l0-65.943898c0-28.770254 22.998807-51.754734 52.919257-51.754734l39.575344 0c9.081843 0 20.803815-8.830109 23.666002-18.057261l0.567935-1.476631 23.163559-57.088206 0.505513-0.913812c4.40431-8.220219 2.319835-22.224164-4.2897-28.830629l-28.04166-28.087709c-9.964956-9.921977-15.486716-23.216771-15.502066-37.396725-0.01535-14.201443 5.492084-27.53717 15.507182-37.552268l46.6556-46.614667c9.94142-9.985422 23.248494-15.503089 37.432541-15.503089 0.001023 0 0 0 0.001023 0 14.184047 0 27.490098 5.51869 37.46938 15.540951l28.039613 28.05087c6.557346 6.525624 20.500916 8.596795 28.655643 4.231371l0.893346-0.478907 57.375755-23.64963c8.836249-2.731204 16.634866-14.037714 16.634866-23.719214l0-39.632649c0-28.967752 24.777313-52.095495 54.624085-52.095495L545.784454 64.076364c29.161157 0 52.370765 22.636556 52.370765 52.095495l0 39.632649c0 9.127891 8.709359 20.85498 17.767666 23.674189l1.51654 0.577145 56.639998 23.113417 0.923022 0.509606c8.202822 4.424776 22.184255 2.353604 28.788673-4.254907l28.163433-27.912723c9.895371-9.94142 23.179932-15.33936 37.352723-15.33936 0.019443 0 0.040932 0 0.060375 0 14.18814 0 27.508517 5.375427 37.516452 15.384385l46.709835 46.554292c10.004865 9.960863 15.524578 23.254633 15.524578 37.47552 0 14.18814-5.498224 27.506471-15.479553 37.532825l-28.16855 28.152177c-6.580882 6.610558-8.640798 20.771069-4.204765 29.107945l0.478907 0.896416 23.654746 57.956993c2.902096 9.255805 14.635325 18.114566 23.686469 18.114566l39.132252 0 0-0.573051c27.629267 0 52.188616 22.984481 52.188616 52.327786l0 65.998133c0 29.590945-22.985504 53.138244-51.746548 53.138244l-39.630602 0c-9.337669 0-20.84884 8.372691-23.686469 17.423835l-0.580215 1.51654-23.086811 56.240909-0.468674 0.860601c-4.419659 8.30413-2.393513 22.320355 4.169973 28.855188l28.135804 28.02017c10.031471 10.029424 15.539928 23.350824 15.537881 37.541011-0.004093 14.186094-5.514597 27.505447-15.518438 37.505195l-46.747697 46.682205c-9.920954 9.964956-23.219841 15.506159-37.406958 15.506159-0.019443 0-0.040932 0-0.060375 0-14.192234 0-27.514657-5.514597-37.518498-15.517415l-28.039613-28.095895c-6.490831-6.490831-20.807908-8.575306-28.887934-4.206812l-0.951675 0.514723-57.93755 23.680329c-9.087982 2.859118-17.823947 14.594393-17.823947 23.691585l0 39.460734C598.155219 937.76394 574.45954 962.539206 545.784454 962.539206zM421.86719 806.892287c25.192775 8.370645 44.282552 34.650171 44.282552 61.570287l0 39.460734c0 7.114025 6.569626 13.68365 13.691837 13.68365L545.784454 921.606958c6.496971 0 12.461823-6.043646 12.461823-13.68365L558.246277 868.462574c0-26.273387 19.516496-53.131081 44.901653-61.58052l53.859675-22.062482c23.62814-12.116969 56.342216-7.098675 75.118861 11.6749l28.009937 28.1532c2.432399 2.430352 5.678326 3.837398 9.179057 3.837398 0.00614 0 0.011256 0 0.01535 0 3.482311 0 6.726192-1.39886 9.135054-3.820002l46.780443-46.738487c2.436492-2.436492 3.783163-5.724375 3.78521-9.224082 0-3.495614-1.344624-6.774287-3.787256-9.216919l-28.106128-27.998681c-18.693758-18.609847-23.762193-51.349505-11.773138-75.036997l22.083971-53.603849c8.374738-25.167193 35.224246-44.51382 61.578474-44.51382l39.630602 0c7.745405 0 10.8143-7.086395 10.8143-13.229303l0-65.998133c0-6.862291-5.116531-12.07399-11.256368-12.302187l0 1.479701-39.132252 0c-26.236548 0-53.099359-20.149922-61.585637-45.735647l-22.083971-54.261834c-11.960403-23.654746-6.913457-56.502875 11.728112-75.228355l28.16855-28.192086c2.430352-2.441609 3.78828-5.764284 3.78828-9.295714 0-3.498684-1.334391-6.762007-3.759627-9.17394l-46.741557-46.577828c-2.462075-2.462075-5.736655-3.734044-9.234315-3.734044-0.004093 0-0.010233 0-0.013303 0-3.465938 0-6.700609 1.255597-9.105379 3.671623l-28.198226 28.037567c-18.703991 18.710131-51.417043 23.734564-75.000158 11.69025l-53.865815-22.072715c-25.403576-8.388041-44.934398-35.255968-44.934398-61.60508l0-39.632649c0-7.253194-5.517667-12.186554-12.461823-12.186554l-65.943898 0c-7.517207 0-13.691837 5.51869-13.691837 12.186554l0 39.632649c0 27.027563-19.107173 53.336766-44.325531 61.643965l-53.501518 21.99699c-23.834848 12.168134-55.857169 7.234775-74.878384-11.69639l-28.130687-28.115338c-2.441609-2.451842-5.690606-3.787256-9.152451-3.787256-3.462868-0.001023-6.704702 1.334391-9.117658 3.758604l-46.690392 46.64639c-2.438539 2.438539-3.784186 5.710049-3.781116 9.207709 0.004093 3.474125 1.339508 6.716982 3.762697 9.128915l28.068266 28.121478c18.698874 18.690688 23.782659 51.389414 11.808954 74.973552l-22.124903 54.813397c-8.413624 25.616424-35.281551 45.783743-61.603033 45.783743l-39.575344 0c-6.630001 0-13.010315 3.411703-13.010315 10.822486l0 65.943898c0 6.942109 5.753027 13.284561 12.95301 13.284561l39.631626 0c26.380834 0 53.195549 19.35072 61.524239 44.537356l22.182208 53.629431c12.027941 23.731494 6.918573 56.449663-11.863189 75.05644l-28.022217 27.949562c-5.021364 5.066389-5.048993 13.348006 0.010233 18.409279l46.713928 46.653553c2.452865 2.464121 5.695722 3.794419 9.168824 3.794419 3.472078 0 6.711865-1.336438 9.124821-3.759627l28.181853-28.122501c18.641569-18.730597 51.440579-23.752983 75.011414-11.642155L421.86719 806.892287z" p-id="4398"></path><path d="M513.734504 731.880873c-120.639614 0-218.786958-98.147344-218.786958-218.786958s98.147344-218.786958 218.786958-218.786958 218.786958 98.147344 218.786958 218.786958S634.375142 731.880873 513.734504 731.880873zM513.734504 334.324368c-98.573039 0-178.769546 80.195483-178.769546 178.769546s80.195483 178.769546 178.769546 178.769546 178.769546-80.195483 178.769546-178.769546S612.308567 334.324368 513.734504 334.324368z" p-id="4399"></path></svg>',
"menu_type": "iframe",
"url": '/users/list/?_flt_2_username=',
},
{
"name": 'security-role',
"title": '角色列表',
"icon": '<svg t="1653295961491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4397" width="200" height="200"><path d="M545.784454 962.539206l-65.943898 0c-29.341259 0-54.624085-25.281803-54.624085-54.615898L425.216471 868.462574c0-9.623171-7.826246-20.911262-16.690124-23.680329l-1.566682-0.611937-55.725162-23.104207-0.880043-0.494257c-8.153704-4.41045-22.017456-2.376117-28.55229 4.187369l-28.17469 28.123524c-9.930163 9.977235-23.239284 15.494902-37.432541 15.494902-14.195304 0-27.507494-5.517667-37.487799-15.541975l-46.682205-46.630017c-20.60427-20.603247-20.6319-54.233182-0.069585-74.974575l28.15013-28.106128c6.637164-6.574742 8.676613-20.599154 4.253884-28.909423l-0.831948-1.768273-23.164582-56.128345-0.26913-0.682545c-2.803859-9.03477-14.279215-17.394159-23.611767-17.394159l-39.631626 0c-29.391401 0-52.861952-24.065092-52.861952-53.193503l0-65.943898c0-28.770254 22.998807-51.754734 52.919257-51.754734l39.575344 0c9.081843 0 20.803815-8.830109 23.666002-18.057261l0.567935-1.476631 23.163559-57.088206 0.505513-0.913812c4.40431-8.220219 2.319835-22.224164-4.2897-28.830629l-28.04166-28.087709c-9.964956-9.921977-15.486716-23.216771-15.502066-37.396725-0.01535-14.201443 5.492084-27.53717 15.507182-37.552268l46.6556-46.614667c9.94142-9.985422 23.248494-15.503089 37.432541-15.503089 0.001023 0 0 0 0.001023 0 14.184047 0 27.490098 5.51869 37.46938 15.540951l28.039613 28.05087c6.557346 6.525624 20.500916 8.596795 28.655643 4.231371l0.893346-0.478907 57.375755-23.64963c8.836249-2.731204 16.634866-14.037714 16.634866-23.719214l0-39.632649c0-28.967752 24.777313-52.095495 54.624085-52.095495L545.784454 64.076364c29.161157 0 52.370765 22.636556 52.370765 52.095495l0 39.632649c0 9.127891 8.709359 20.85498 17.767666 23.674189l1.51654 0.577145 56.639998 23.113417 0.923022 0.509606c8.202822 4.424776 22.184255 2.353604 28.788673-4.254907l28.163433-27.912723c9.895371-9.94142 23.179932-15.33936 37.352723-15.33936 0.019443 0 0.040932 0 0.060375 0 14.18814 0 27.508517 5.375427 37.516452 15.384385l46.709835 46.554292c10.004865 9.960863 15.524578 23.254633 15.524578 37.47552 0 14.18814-5.498224 27.506471-15.479553 37.532825l-28.16855 28.152177c-6.580882 6.610558-8.640798 20.771069-4.204765 29.107945l0.478907 0.896416 23.654746 57.956993c2.902096 9.255805 14.635325 18.114566 23.686469 18.114566l39.132252 0 0-0.573051c27.629267 0 52.188616 22.984481 52.188616 52.327786l0 65.998133c0 29.590945-22.985504 53.138244-51.746548 53.138244l-39.630602 0c-9.337669 0-20.84884 8.372691-23.686469 17.423835l-0.580215 1.51654-23.086811 56.240909-0.468674 0.860601c-4.419659 8.30413-2.393513 22.320355 4.169973 28.855188l28.135804 28.02017c10.031471 10.029424 15.539928 23.350824 15.537881 37.541011-0.004093 14.186094-5.514597 27.505447-15.518438 37.505195l-46.747697 46.682205c-9.920954 9.964956-23.219841 15.506159-37.406958 15.506159-0.019443 0-0.040932 0-0.060375 0-14.192234 0-27.514657-5.514597-37.518498-15.517415l-28.039613-28.095895c-6.490831-6.490831-20.807908-8.575306-28.887934-4.206812l-0.951675 0.514723-57.93755 23.680329c-9.087982 2.859118-17.823947 14.594393-17.823947 23.691585l0 39.460734C598.155219 937.76394 574.45954 962.539206 545.784454 962.539206zM421.86719 806.892287c25.192775 8.370645 44.282552 34.650171 44.282552 61.570287l0 39.460734c0 7.114025 6.569626 13.68365 13.691837 13.68365L545.784454 921.606958c6.496971 0 12.461823-6.043646 12.461823-13.68365L558.246277 868.462574c0-26.273387 19.516496-53.131081 44.901653-61.58052l53.859675-22.062482c23.62814-12.116969 56.342216-7.098675 75.118861 11.6749l28.009937 28.1532c2.432399 2.430352 5.678326 3.837398 9.179057 3.837398 0.00614 0 0.011256 0 0.01535 0 3.482311 0 6.726192-1.39886 9.135054-3.820002l46.780443-46.738487c2.436492-2.436492 3.783163-5.724375 3.78521-9.224082 0-3.495614-1.344624-6.774287-3.787256-9.216919l-28.106128-27.998681c-18.693758-18.609847-23.762193-51.349505-11.773138-75.036997l22.083971-53.603849c8.374738-25.167193 35.224246-44.51382 61.578474-44.51382l39.630602 0c7.745405 0 10.8143-7.086395 10.8143-13.229303l0-65.998133c0-6.862291-5.116531-12.07399-11.256368-12.302187l0 1.479701-39.132252 0c-26.236548 0-53.099359-20.149922-61.585637-45.735647l-22.083971-54.261834c-11.960403-23.654746-6.913457-56.502875 11.728112-75.228355l28.16855-28.192086c2.430352-2.441609 3.78828-5.764284 3.78828-9.295714 0-3.498684-1.334391-6.762007-3.759627-9.17394l-46.741557-46.577828c-2.462075-2.462075-5.736655-3.734044-9.234315-3.734044-0.004093 0-0.010233 0-0.013303 0-3.465938 0-6.700609 1.255597-9.105379 3.671623l-28.198226 28.037567c-18.703991 18.710131-51.417043 23.734564-75.000158 11.69025l-53.865815-22.072715c-25.403576-8.388041-44.934398-35.255968-44.934398-61.60508l0-39.632649c0-7.253194-5.517667-12.186554-12.461823-12.186554l-65.943898 0c-7.517207 0-13.691837 5.51869-13.691837 12.186554l0 39.632649c0 27.027563-19.107173 53.336766-44.325531 61.643965l-53.501518 21.99699c-23.834848 12.168134-55.857169 7.234775-74.878384-11.69639l-28.130687-28.115338c-2.441609-2.451842-5.690606-3.787256-9.152451-3.787256-3.462868-0.001023-6.704702 1.334391-9.117658 3.758604l-46.690392 46.64639c-2.438539 2.438539-3.784186 5.710049-3.781116 9.207709 0.004093 3.474125 1.339508 6.716982 3.762697 9.128915l28.068266 28.121478c18.698874 18.690688 23.782659 51.389414 11.808954 74.973552l-22.124903 54.813397c-8.413624 25.616424-35.281551 45.783743-61.603033 45.783743l-39.575344 0c-6.630001 0-13.010315 3.411703-13.010315 10.822486l0 65.943898c0 6.942109 5.753027 13.284561 12.95301 13.284561l39.631626 0c26.380834 0 53.195549 19.35072 61.524239 44.537356l22.182208 53.629431c12.027941 23.731494 6.918573 56.449663-11.863189 75.05644l-28.022217 27.949562c-5.021364 5.066389-5.048993 13.348006 0.010233 18.409279l46.713928 46.653553c2.452865 2.464121 5.695722 3.794419 9.168824 3.794419 3.472078 0 6.711865-1.336438 9.124821-3.759627l28.181853-28.122501c18.641569-18.730597 51.440579-23.752983 75.011414-11.642155L421.86719 806.892287z" p-id="4398"></path><path d="M513.734504 731.880873c-120.639614 0-218.786958-98.147344-218.786958-218.786958s98.147344-218.786958 218.786958-218.786958 218.786958 98.147344 218.786958 218.786958S634.375142 731.880873 513.734504 731.880873zM513.734504 334.324368c-98.573039 0-178.769546 80.195483-178.769546 178.769546s80.195483 178.769546 178.769546 178.769546 178.769546-80.195483 178.769546-178.769546S612.308567 334.324368 513.734504 334.324368z" p-id="4399"></path></svg>',
"menu_type": "iframe",
"url": '/roles/list/?_flt_2_name=',
},
{
"name": 'security-logs',
"title": '日志列表',
"icon": '<svg t="1653295961491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4397" width="200" height="200"><path d="M545.784454 962.539206l-65.943898 0c-29.341259 0-54.624085-25.281803-54.624085-54.615898L425.216471 868.462574c0-9.623171-7.826246-20.911262-16.690124-23.680329l-1.566682-0.611937-55.725162-23.104207-0.880043-0.494257c-8.153704-4.41045-22.017456-2.376117-28.55229 4.187369l-28.17469 28.123524c-9.930163 9.977235-23.239284 15.494902-37.432541 15.494902-14.195304 0-27.507494-5.517667-37.487799-15.541975l-46.682205-46.630017c-20.60427-20.603247-20.6319-54.233182-0.069585-74.974575l28.15013-28.106128c6.637164-6.574742 8.676613-20.599154 4.253884-28.909423l-0.831948-1.768273-23.164582-56.128345-0.26913-0.682545c-2.803859-9.03477-14.279215-17.394159-23.611767-17.394159l-39.631626 0c-29.391401 0-52.861952-24.065092-52.861952-53.193503l0-65.943898c0-28.770254 22.998807-51.754734 52.919257-51.754734l39.575344 0c9.081843 0 20.803815-8.830109 23.666002-18.057261l0.567935-1.476631 23.163559-57.088206 0.505513-0.913812c4.40431-8.220219 2.319835-22.224164-4.2897-28.830629l-28.04166-28.087709c-9.964956-9.921977-15.486716-23.216771-15.502066-37.396725-0.01535-14.201443 5.492084-27.53717 15.507182-37.552268l46.6556-46.614667c9.94142-9.985422 23.248494-15.503089 37.432541-15.503089 0.001023 0 0 0 0.001023 0 14.184047 0 27.490098 5.51869 37.46938 15.540951l28.039613 28.05087c6.557346 6.525624 20.500916 8.596795 28.655643 4.231371l0.893346-0.478907 57.375755-23.64963c8.836249-2.731204 16.634866-14.037714 16.634866-23.719214l0-39.632649c0-28.967752 24.777313-52.095495 54.624085-52.095495L545.784454 64.076364c29.161157 0 52.370765 22.636556 52.370765 52.095495l0 39.632649c0 9.127891 8.709359 20.85498 17.767666 23.674189l1.51654 0.577145 56.639998 23.113417 0.923022 0.509606c8.202822 4.424776 22.184255 2.353604 28.788673-4.254907l28.163433-27.912723c9.895371-9.94142 23.179932-15.33936 37.352723-15.33936 0.019443 0 0.040932 0 0.060375 0 14.18814 0 27.508517 5.375427 37.516452 15.384385l46.709835 46.554292c10.004865 9.960863 15.524578 23.254633 15.524578 37.47552 0 14.18814-5.498224 27.506471-15.479553 37.532825l-28.16855 28.152177c-6.580882 6.610558-8.640798 20.771069-4.204765 29.107945l0.478907 0.896416 23.654746 57.956993c2.902096 9.255805 14.635325 18.114566 23.686469 18.114566l39.132252 0 0-0.573051c27.629267 0 52.188616 22.984481 52.188616 52.327786l0 65.998133c0 29.590945-22.985504 53.138244-51.746548 53.138244l-39.630602 0c-9.337669 0-20.84884 8.372691-23.686469 17.423835l-0.580215 1.51654-23.086811 56.240909-0.468674 0.860601c-4.419659 8.30413-2.393513 22.320355 4.169973 28.855188l28.135804 28.02017c10.031471 10.029424 15.539928 23.350824 15.537881 37.541011-0.004093 14.186094-5.514597 27.505447-15.518438 37.505195l-46.747697 46.682205c-9.920954 9.964956-23.219841 15.506159-37.406958 15.506159-0.019443 0-0.040932 0-0.060375 0-14.192234 0-27.514657-5.514597-37.518498-15.517415l-28.039613-28.095895c-6.490831-6.490831-20.807908-8.575306-28.887934-4.206812l-0.951675 0.514723-57.93755 23.680329c-9.087982 2.859118-17.823947 14.594393-17.823947 23.691585l0 39.460734C598.155219 937.76394 574.45954 962.539206 545.784454 962.539206zM421.86719 806.892287c25.192775 8.370645 44.282552 34.650171 44.282552 61.570287l0 39.460734c0 7.114025 6.569626 13.68365 13.691837 13.68365L545.784454 921.606958c6.496971 0 12.461823-6.043646 12.461823-13.68365L558.246277 868.462574c0-26.273387 19.516496-53.131081 44.901653-61.58052l53.859675-22.062482c23.62814-12.116969 56.342216-7.098675 75.118861 11.6749l28.009937 28.1532c2.432399 2.430352 5.678326 3.837398 9.179057 3.837398 0.00614 0 0.011256 0 0.01535 0 3.482311 0 6.726192-1.39886 9.135054-3.820002l46.780443-46.738487c2.436492-2.436492 3.783163-5.724375 3.78521-9.224082 0-3.495614-1.344624-6.774287-3.787256-9.216919l-28.106128-27.998681c-18.693758-18.609847-23.762193-51.349505-11.773138-75.036997l22.083971-53.603849c8.374738-25.167193 35.224246-44.51382 61.578474-44.51382l39.630602 0c7.745405 0 10.8143-7.086395 10.8143-13.229303l0-65.998133c0-6.862291-5.116531-12.07399-11.256368-12.302187l0 1.479701-39.132252 0c-26.236548 0-53.099359-20.149922-61.585637-45.735647l-22.083971-54.261834c-11.960403-23.654746-6.913457-56.502875 11.728112-75.228355l28.16855-28.192086c2.430352-2.441609 3.78828-5.764284 3.78828-9.295714 0-3.498684-1.334391-6.762007-3.759627-9.17394l-46.741557-46.577828c-2.462075-2.462075-5.736655-3.734044-9.234315-3.734044-0.004093 0-0.010233 0-0.013303 0-3.465938 0-6.700609 1.255597-9.105379 3.671623l-28.198226 28.037567c-18.703991 18.710131-51.417043 23.734564-75.000158 11.69025l-53.865815-22.072715c-25.403576-8.388041-44.934398-35.255968-44.934398-61.60508l0-39.632649c0-7.253194-5.517667-12.186554-12.461823-12.186554l-65.943898 0c-7.517207 0-13.691837 5.51869-13.691837 12.186554l0 39.632649c0 27.027563-19.107173 53.336766-44.325531 61.643965l-53.501518 21.99699c-23.834848 12.168134-55.857169 7.234775-74.878384-11.69639l-28.130687-28.115338c-2.441609-2.451842-5.690606-3.787256-9.152451-3.787256-3.462868-0.001023-6.704702 1.334391-9.117658 3.758604l-46.690392 46.64639c-2.438539 2.438539-3.784186 5.710049-3.781116 9.207709 0.004093 3.474125 1.339508 6.716982 3.762697 9.128915l28.068266 28.121478c18.698874 18.690688 23.782659 51.389414 11.808954 74.973552l-22.124903 54.813397c-8.413624 25.616424-35.281551 45.783743-61.603033 45.783743l-39.575344 0c-6.630001 0-13.010315 3.411703-13.010315 10.822486l0 65.943898c0 6.942109 5.753027 13.284561 12.95301 13.284561l39.631626 0c26.380834 0 53.195549 19.35072 61.524239 44.537356l22.182208 53.629431c12.027941 23.731494 6.918573 56.449663-11.863189 75.05644l-28.022217 27.949562c-5.021364 5.066389-5.048993 13.348006 0.010233 18.409279l46.713928 46.653553c2.452865 2.464121 5.695722 3.794419 9.168824 3.794419 3.472078 0 6.711865-1.336438 9.124821-3.759627l28.181853-28.122501c18.641569-18.730597 51.440579-23.752983 75.011414-11.642155L421.86719 806.892287z" p-id="4398"></path><path d="M513.734504 731.880873c-120.639614 0-218.786958-98.147344-218.786958-218.786958s98.147344-218.786958 218.786958-218.786958 218.786958 98.147344 218.786958 218.786958S634.375142 731.880873 513.734504 731.880873zM513.734504 334.324368c-98.573039 0-178.769546 80.195483-178.769546 178.769546s80.195483 178.769546 178.769546 178.769546 178.769546-80.195483 178.769546-178.769546S612.308567 334.324368 513.734504 334.324368z" p-id="4399"></path></svg>',
"menu_type": "iframe",
"url": '/logmodelview/list/',
}
]
}
links = {
"name": 'link',
"title": '链接',
'hidden': 0,
"icon": '<svg t="1653033023483" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2982" width="200" height="200"><path d="M618.24 439.381333a152.746667 152.746667 0 0 1 0 216l-135.893333 135.893334a163.370667 163.370667 0 1 1-231.04-231.04l66.922666-66.944 45.269334 45.269333-66.944 66.944a99.370667 99.370667 0 1 0 140.522666 140.522667l135.893334-135.893334a88.746667 88.746667 0 0 0 0-125.482666z m182.528-197.589333a163.370667 163.370667 0 0 1 0 231.04L733.866667 539.776l-45.269334-45.248 66.944-66.944a99.370667 99.370667 0 1 0-140.522666-140.522667l-135.893334 135.893334a88.746667 88.746667 0 0 0 0 125.482666l-45.269333 45.269334a152.746667 152.746667 0 0 1 0-216l135.893333-135.893334a163.370667 163.370667 0 0 1 231.04 0z" p-id="2983"></path></svg>',
"isMenu": True,
"isExpand": True,
"children": [
{
"name": link.get('name',''),
"title": link.get('label',''),
"icon": '<svg t="1653033023483" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2982" width="200" height="200"><path d="M618.24 439.381333a152.746667 152.746667 0 0 1 0 216l-135.893333 135.893334a163.370667 163.370667 0 1 1-231.04-231.04l66.922666-66.944 45.269334 45.269333-66.944 66.944a99.370667 99.370667 0 1 0 140.522666 140.522667l135.893334-135.893334a88.746667 88.746667 0 0 0 0-125.482666z m182.528-197.589333a163.370667 163.370667 0 0 1 0 231.04L733.866667 539.776l-45.269334-45.248 66.944-66.944a99.370667 99.370667 0 1 0-140.522666-140.522667l-135.893334 135.893334a88.746667 88.746667 0 0 0 0 125.482666l-45.269333 45.269334a152.746667 152.746667 0 0 1 0-216l135.893333-135.893334a163.370667 163.370667 0 0 1 231.04 0z" p-id="2983"></path></svg>',
"menu_type": "out_link",
"url": request.host_url.strip('/')+link.get('url','') if 'http' not in link.get('url','') else link.get('url',''),
} for link in conf.get('ALL_LINKS',[])
]
}
print(request.host_url)
menu[0]['children'].append(setting)
menu[0]['children'].append(links)
# menu = menu+setting
return jsonify(menu)
@expose("/web/log/<cluster_name>/<namespace>/<pod_name>", methods=["GET",])
def web_log(self,cluster_name,namespace,pod_name):
from myapp.utils.py.py_k8s import K8s
all_clusters = conf.get('CLUSTERS',{})
if cluster_name in all_clusters:
kubeconfig = all_clusters[cluster_name].get('KUBECONFIG','')
pod_url = all_clusters[cluster_name].get('K8S_DASHBOARD_CLUSTER') + "#/log/%s/%s/pod?namespace=%s&container=%s" % (namespace, pod_name, namespace, pod_name)
else:
kubeconfig = None
pod_url = conf.get('K8S_DASHBOARD_CLUSTER') + "#/log/%s/%s/pod?namespace=%s&container=%s" % (namespace, pod_name, namespace, pod_name)
k8s = K8s(kubeconfig)
pod = k8s.get_pods(namespace=namespace, pod_name=pod_name)
if pod:
pod = pod[0]
flash('当前pod状态%s'%pod['status'],category='warning')
data = {
"url": pod_url,
"target": 'div.kd-scroll-container', # kd-logs-container :nth-of-type(0)
"delay": 2000,
"loading":True,
"currentHeight": 128
}
# 返回模板
if cluster_name == conf.get('ENVIRONMENT'):
return self.render_template('link.html', data=data)
else:
return self.render_template('external_link.html', data=data)
@expose("/tail/log/<cluster_name>/<namespace>/<pod_name>/<lines>", methods=["GET",])
def tail_log(self,cluster_name,namespace,pod_name,lines=100):
from myapp.utils.py.py_k8s import K8s
all_clusters = conf.get('CLUSTERS',{})
if cluster_name in all_clusters:
kubeconfig = all_clusters[cluster_name].get('KUBECONFIG','')
else:
kubeconfig = None
k8s = K8s(kubeconfig)
pod = k8s.get_pods(namespace=namespace, pod_name=pod_name)
if pod:
pod = pod[0]
flash('当前pod状态%s'%pod['status'],category='warning')
# tail_lines = request.values.get("tail_lines", 1000)
try:
resp = Response(stream_with_context(k8s.get_pod_log_stream(pod_name,namespace, int(lines))), mimetype="text/plain")
return resp
except Exception as e:
return jsonify(dict(
code=7000,
message=str(e)
))
@expose("/web/debug/<cluster_name>/<namespace>/<pod_name>/<container_name>", methods=["GET", "POST"])
def web_debug(self,cluster_name,namespace,pod_name,container_name):
cluster=conf.get('CLUSTERS',{})
if cluster_name in cluster:
pod_url = cluster[cluster_name].get('K8S_DASHBOARD_CLUSTER') + '#/shell/%s/%s/%s?namespace=%s' % (namespace, pod_name,container_name, namespace)
else:
pod_url = conf.get('K8S_DASHBOARD_CLUSTER') + '#/shell/%s/%s/%s?namespace=%s' % (namespace, pod_name, container_name, namespace)
print(pod_url)
data = {
"url": pod_url,
"target":'div.kd-scroll-container', # 'div.kd-scroll-container.ng-star-inserted',
"delay": 2000,
"loading": True
}
# 返回模板
if cluster_name==conf.get('ENVIRONMENT'):
return self.render_template('link.html', data=data)
else:
return self.render_template('external_link.html', data=data)
# 机器学习首页资源弹窗
def mlops_traffic(self,url):
if 1 or not node_resource_used['check_time'] or node_resource_used['check_time'] < (datetime.datetime.now() - datetime.timedelta(minutes=10)):
clusters = conf.get('CLUSTERS', {})
for cluster_name in clusters:
cluster = clusters[cluster_name]
k8s_client = K8s(cluster.get('KUBECONFIG',''))
all_node = k8s_client.get_node()
all_node_json = {}
for node in all_node: # list 转dict
ip = node['hostip']
if 'cpu' in node['labels'] or 'gpu' in node['labels']:
all_node_json[ip] = node
all_node_json[ip]['used_memory'] = []
all_node_json[ip]['used_cpu'] = []
all_node_json[ip]['used_gpu'] = []
all_node_json[ip]['user'] = []
# print(all_node_json)
for namespace in ['jupyter', 'pipeline', 'automl', 'service']:
all_pods = k8s_client.get_pods(namespace=namespace)
for pod in all_pods:
if pod['status'] == 'Running' and pod['host_ip'] in all_node_json:
# print(namespace,pod)
all_node_json[pod['host_ip']]['used_memory'].append(pod['memory'])
all_node_json[pod['host_ip']]['used_cpu'].append(pod['cpu'])
all_node_json[pod['host_ip']]['used_gpu'].append(pod['gpu'])
# user = pod['labels'].get('user','')
# if not user:
# user = pod['labels'].get('run-rtx','')
# if not user:
# user = pod['labels'].get('rtx-user','')
# if user:
# all_node_json[pod['host_ip']]['user'].append(user)
# print(all_node_json[pod['host_ip']])
for node in all_node_json:
all_node_json[node]['used_memory'] = int(sum(all_node_json[node]['used_memory']))
all_node_json[node]['used_cpu'] = int(sum(all_node_json[node]['used_cpu']))
all_node_json[node]['used_gpu'] = int(sum(all_node_json[node]['used_gpu']))
node_resource_used['data'][cluster_name] = all_node_json
node_resource_used['check_time'] = datetime.datetime.now()
all_node_json = node_resource_used['data']
# 数据格式说明 dict:
# 'delay': Integer 延时隐藏 单位: 毫秒 0为不隐藏
# 'hit': Boolean 是否命中
# 'target': String 当前目标
# 'type': String 类型 目前仅支持html类型
# 'title': String 标题
# 'content': String 内容html内容
# /static/appbuilder/mnt/make_pipeline.mp4
message = ''
td_html = '<td style="border: 1px solid black;padding: 10px">%s</th>'
message += "<tr>%s %s %s %s %s %s %s<tr>" % (
td_html % "集群", td_html % "资源组(监控)", td_html % "机器", td_html % "机型", td_html % "cpu占用率", td_html % "内存占用率",td_html % "gpu占用率")
global_cluster_load = {}
for cluster_name in all_node_json:
global_cluster_load[cluster_name] = {
"cpu_req": 0,
"cpu_all": 0,
"mem_req": 0,
"mem_all": 0,
"gpu_req": 0,
"gpu_all": 0
}
nodes = all_node_json[cluster_name]
# nodes = sorted(nodes.items(), key=lambda item: item[1]['labels'].get('org','public'))
# ips = [node[0] for node in nodes]
# values = [node[1] for node in nodes]
# nodes = dict(zip(ips,values))
# 按项目组和设备类型分组
stored_nodes = {}
for ip in nodes:
org = nodes[ip]['labels'].get('org', 'public')
device = 'gpu/' + nodes[ip]['labels'].get('gpu-type', '') if 'gpu' in nodes[ip]['labels'] else 'cpu'
if org not in stored_nodes:
stored_nodes[org] = {}
if device not in stored_nodes[org]:
stored_nodes[org][device] = {}
stored_nodes[org][device][ip] = nodes[ip]
nodes = {}
for org in stored_nodes:
for device in stored_nodes[org]:
nodes.update(stored_nodes[org][device])
cluster_config = conf.get('CLUSTERS', {}).get(cluster_name, {})
grafana_url = cluster_config.get('GRAFANA_HOST', '').strip('/') + conf.get('GRAFANA_CLUSTER_PATH')
for ip in nodes:
org = nodes[ip]['labels'].get('org', 'public')
enable_train = nodes[ip]['labels'].get('train', 'true')
if g.user.is_admin():
if enable_train == 'true':
ip_html = '<a href="%s">%s</a>' % ("/myapp/schedule/node/%s" % ip, ip)
else:
ip_html = '<a href="%s"><strike>%s</strike></a>' % (cluster_config.get('K8S_DASHBOARD_CLUSTER', '').strip('/')+'/#/node/%s?namespace=default' % ip, ip)
else:
if enable_train == 'true':
ip_html = ip
else:
ip_html = '<strike>%s</strike>' % (ip,)
share = nodes[ip]['labels'].get('share', 'true')
clolr = "#FFFFFF" if share == 'true' else '#F0F0F0'
message += '<tr bgcolor="%s">%s %s %s %s %s %s %s<tr>' % (
clolr,
td_html % cluster_name,
td_html % ('<a target="blank" href="%s">%s</a>' % (grafana_url + org, org)),
td_html % ip_html,
td_html % ('gpu/' + nodes[ip]['labels'].get('gpu-type', '') if 'gpu' in nodes[ip]['labels'] else 'cpu'),
td_html % ("cpu:%s/%s" % (nodes[ip]['used_cpu'], nodes[ip]['cpu'])),
td_html % ("mem:%s/%s" % (nodes[ip]['used_memory'], nodes[ip]['memory'])),
td_html % ("gpu:%s/%s" % (nodes[ip]['used_gpu'], nodes[ip]['gpu'])),
# td_html % (','.join(list(set(nodes[ip]['user']))[0:1]))
)
global_cluster_load[cluster_name]['cpu_req'] += int(nodes[ip]['used_cpu'])
global_cluster_load[cluster_name]['cpu_all'] += int(nodes[ip]['cpu'])
global_cluster_load[cluster_name]['mem_req'] += int(nodes[ip]['used_memory'])
global_cluster_load[cluster_name]['mem_all'] += int(nodes[ip]['memory'])
global_cluster_load[cluster_name]['gpu_req'] += int(nodes[ip]['used_gpu'])
global_cluster_load[cluster_name]['gpu_all'] += int(nodes[ip]['gpu'])
message = Markup('<table>%s</table>' % message)
# print(message)
cluster_global_info = ''
# for cluster_name in global_cluster_load:
# cluster_global_info+='\n集群:%s,CPU:%s/%s,MEM:%s/%s,GPU::%s/%s'%(
# cluster_name,
# global_cluster_load[cluster_name]['cpu_req'],global_cluster_load[cluster_name]['cpu_all'],
# global_cluster_load[cluster_name]['mem_req'], global_cluster_load[cluster_name]['mem_all'],
# global_cluster_load[cluster_name]['gpu_req'], global_cluster_load[cluster_name]['gpu_all'],
# )
data = {
'content': message,
'delay': 300000,
'hit': True,
'target': url,
'title': '当前负载(%s)' % cluster_global_info,
'type': 'html',
}
# 返回模板
return jsonify(data)
# pipeline每个任务的资源占用情况
def pipeline_task_resource(self,url):
if not pipeline_resource_used['check_time'] or pipeline_resource_used['check_time'] < (datetime.datetime.now() - datetime.timedelta(minutes=10)):
clusters = conf.get('CLUSTERS', {})
all_tasks_json = {}
for cluster_name in clusters:
cluster = clusters[cluster_name]
k8s_client = K8s(cluster.get('KUBECONFIG',''))
try:
# 获取pod的资源占用
all_tasks_json[cluster_name]={}
# print(all_node_json)
for namespace in ['pipeline', 'automl', 'service']:
all_tasks_json[cluster_name][namespace]={}
all_pods = k8s_client.get_pods(namespace=namespace)
for pod in all_pods:
org = pod['node_selector'].get("org", 'public')
if org not in all_tasks_json[cluster_name][namespace]:
all_tasks_json[cluster_name][namespace][org]={}
if pod['status'] == 'Running':
user = pod['labels'].get('user',pod['labels'].get('username',pod['labels'].get('run-rtx',pod['labels'].get('rtx-user',''))))
if user:
all_tasks_json[cluster_name][namespace][org][pod['name']] = {}
all_tasks_json[cluster_name][namespace][org][pod['name']]['username'] = user
# print(namespace,pod)
all_tasks_json[cluster_name][namespace][org][pod['name']]['request_memory']=pod['memory']
all_tasks_json[cluster_name][namespace][org][pod['name']]['request_cpu']=pod['cpu']
all_tasks_json[cluster_name][namespace][org][pod['name']]['request_gpu']=pod['gpu']
all_tasks_json[cluster_name][namespace][org][pod['name']]['used_memory'] = '0'
all_tasks_json[cluster_name][namespace][org][pod['name']]['used_cpu'] = '0'
# print(namespace,org,pod['name'])
# 获取pod的资源使用
all_pods_metrics=k8s_client.get_pod_metrics(namespace=namespace)
for pod in all_pods_metrics:
for org in all_tasks_json[cluster_name][namespace]:
if pod['name'] in all_tasks_json[cluster_name][namespace][org]:
all_tasks_json[cluster_name][namespace][org][pod['name']]['used_memory']=pod['memory']
all_tasks_json[cluster_name][namespace][org][pod['name']]['used_cpu']=pod['cpu']
# print(namespace,org,pod['name'])
break
# print(all_tasks_json)
except Exception as e:
print(e)
pipeline_resource_used['data'] = all_tasks_json
pipeline_resource_used['check_time'] = datetime.datetime.now()
# 数据格式说明 dict:
# 'delay': Integer 延时隐藏 单位: 毫秒 0为不隐藏
# 'hit': Boolean 是否命中
# 'target': String 当前目标
# 'type': String 类型 目前仅支持html类型
# 'title': String 标题
# 'content': String 内容html内容
# /static/appbuilder/mnt/make_pipeline.mp4
all_tasks_json = pipeline_resource_used['data']
message = ''
td_html = '<td class="ellip1" style="border: 1px solid black;padding: 10px">%s</th>'
message += "<tr>%s %s %s %s %s %s %s %s<tr>" % (
td_html % "集群", td_html % "项目组",td_html % "空间",td_html % "容器", td_html % "用户", td_html % "cpu", td_html % "内存",td_html % "gpu")
exist_pod = False
for cluster_name in all_tasks_json:
cluster_config = conf.get('CLUSTERS', {}).get(cluster_name, {})
for namespace in all_tasks_json[cluster_name]:
for org in all_tasks_json[cluster_name][namespace]:
for pod_name in all_tasks_json[cluster_name][namespace][org]:
exist_pod=True
pod = all_tasks_json[cluster_name][namespace][org][pod_name]
# print(pod)
dashboard_url = cluster_config.get('K8S_DASHBOARD_CLUSTER', request.host_url).rstrip('/') + '/#/search?namespace=%s&q=%s'%(namespace,pod_name)
grafana_url = cluster_config.get('GRAFANA_HOST', request.host_url).rstrip('/') + conf.get('GRAFANA_TASK_PATH')
message += '<tr>%s %s %s %s %s %s %s %s<tr>' % (
td_html % cluster_name,
td_html % org,
td_html % ('<a target="blank" href="%s">%s</a>' % (dashboard_url, namespace)),
'<td class="ellip1" style="border: 1px solid black;padding: 10px">%s</th>' % ('<a target="blank" href="%s">%s</a>' % (grafana_url+pod_name, pod_name)),
td_html % pod['username'],
td_html % ("cpu:%s/%s" % (int(int(pod.get('used_cpu','0'))/1000), int(pod.get('request_cpu','0')))),
td_html % ("mem:%s/%s" % (int(pod.get('used_memory','0')), int(pod.get('request_memory','0')))),
td_html % ("gpu:%s" % (pod.get('request_gpu','')),),
)
message = Markup('<table>%s</table>' % message)
# print(message)
data = {
'content': message,
'delay': 3000,
'hit': True,
'target': url,
'title': '所有用户容器负载(仅管理员可见)',
'type': 'html',
}
# 返回模板
if exist_pod:
return jsonify(data)
else:
return jsonify({})
@expose('/feature/check')
# @trace(tracer,depth=1,trace_content='line')
# @pysnooper.snoop()
def featureCheck(self):
url = request.values.get("url", type=str, default=None)
print(url)
if '/myapp/home' in url:
try:
return self.mlops_traffic(url)
except Exception as e:
print(e)
data = {
'content': '未能成功获取负算力负载信息请检查kubeconfig文件配置',
'delay': 30000,
'hit': True,
'target': url,
'title': '检查失败',
'type': 'html',
}
flash('未能成功获取负算力负载信息', 'warning')
return jsonify(data)
if url=='/group/security/security-user':
if g.user.username in conf.get('ADMIN_USER',''):
return self.pipeline_task_resource(url)
# pipeline_url = conf.get('MODEL_URLS',{}).get('pipeline','')
# if url in pipeline_url:
# data = {
# 'content': '',
# 'delay': 3000,
# 'hit': True,
# 'target': url,
# 'title': '重要通知',
# 'type': 'html',
# }
# # 返回模板
# return jsonify(data)
# data = {
# 'content': url,
# 'delay': 3000,
# 'hit': True,
# 'target': url,
# 'title': url,
# 'type': 'html',
# }
# return jsonify(data)
# flash('xxxxxxx','success')
return jsonify({})
# add_view_no_menu添加视图但是没有菜单栏显示
appbuilder.add_view_no_menu(Myapp)