mirror of
https://github.com/tencentmusic/cube-studio.git
synced 2024-11-27 05:33:10 +08:00
fix flash type
This commit is contained in:
parent
0b539d2b23
commit
9b24aa3560
@ -116,7 +116,7 @@ class ETL_Task_ModelView_Base():
|
||||
"created_by": g.user.id
|
||||
}
|
||||
def post_list(self, items):
|
||||
flash('此部分仅提供任务流编排能力,管理员自行对接调度Azkaban/Oozie/Airflow/argo等调度平台能力','success')
|
||||
flash('此部分仅提供任务流编排能力,管理员自行对接调度Azkaban/Oozie/Airflow/argo等调度平台能力','warning')
|
||||
return items
|
||||
show_columns = ['template','name','describe','etl_task_id','created_by','changed_by','created_on','changed_on','task_args']
|
||||
|
||||
@ -258,7 +258,7 @@ class ETL_Pipeline_ModelView_Base():
|
||||
# 删除前先把下面的task删除了
|
||||
# @pysnooper.snoop()
|
||||
def pre_delete(self, pipeline):
|
||||
flash('此处仅删除本地元数据,请及时删除远程任务','success')
|
||||
flash('此处仅删除本地元数据,请及时删除远程任务','warning')
|
||||
# 删除本地
|
||||
exist_tasks = db.session.query(ETL_Task).filter_by(etl_pipeline_id=pipeline.id).all()
|
||||
for exist_task in exist_tasks:
|
||||
@ -1767,7 +1767,7 @@ class ETL_Pipeline_ModelView_Api(ETL_Pipeline_ModelView_Base,MyappModelRestApi):
|
||||
}
|
||||
|
||||
def post_list(self, items):
|
||||
flash('此部分仅提供任务流编排能力,管理员自行对接调度Azkaban/Oozie/Airflow/argo等调度平台能力','success')
|
||||
flash('此部分仅提供任务流编排能力,管理员自行对接调度Azkaban/Oozie/Airflow/argo等调度平台能力','warning')
|
||||
return items
|
||||
|
||||
appbuilder.add_api(ETL_Pipeline_ModelView_Api)
|
||||
|
@ -267,7 +267,7 @@ class Notebook_ModelView_Base():
|
||||
db.session.commit()
|
||||
|
||||
def post_list(self,items):
|
||||
flash('注意:notebook会定时清理,如要运行长期任务请在pipeline中创建任务流进行。<br>个人持久化目录在/mnt/%s/下'%g.user.username,category='warning')
|
||||
flash('注意:notebook会定时清理,如要运行长期任务请在pipeline中创建任务流进行。<br>个人持久化目录在/mnt/%s/下'%g.user.username,category='info')
|
||||
# items.sort(key=lambda item:item.created_by.username==g.user.username,reverse=True)
|
||||
return items
|
||||
|
||||
@ -468,7 +468,7 @@ class Notebook_ModelView_Base():
|
||||
notebook = db.session.query(Notebook).filter_by(id=notebook_id).first()
|
||||
try:
|
||||
notebook_crd = self.reset_notebook(notebook)
|
||||
flash('已重置,Running状态后可进入。注意:notebook会定时清理,如要运行长期任务请在pipeline中创建任务流进行。','warning')
|
||||
flash('已重置,Running状态后可进入。注意:notebook会定时清理,如要运行长期任务请在pipeline中创建任务流进行。','info')
|
||||
except Exception as e:
|
||||
message = '重置失败,稍后重试。%s'%str(e)
|
||||
flash(message, 'warning')
|
||||
|
@ -61,7 +61,7 @@ class RunHistory_ModelView_Base():
|
||||
datamodel = SQLAInterface(RunHistory)
|
||||
base_order = ('id', 'desc')
|
||||
order_columns = ['id']
|
||||
|
||||
base_permissions = ['can_show', 'can_list', 'can_delete']
|
||||
list_columns = ['pipeline_url','creator','created_on','execution_date','status_url','log','history']
|
||||
cols_width={
|
||||
"pipeline_url": {"type": "ellip2", "width": 400},
|
||||
|
@ -77,7 +77,7 @@ class Crd_ModelView_Base():
|
||||
list_columns = ['name','namespace_url','create_time','status','username','stop']
|
||||
show_columns = ['name','namespace','create_time','status','annotations_html','labels_html','spec_html','status_more_html','info_json_html']
|
||||
order_columns = ['id']
|
||||
|
||||
base_permissions = ['can_show', 'can_list', 'can_delete']
|
||||
# base_permissions = ['list','delete','show']
|
||||
# label_columns = {
|
||||
# "annotations_html": _("Annotations"),
|
||||
|
Loading…
Reference in New Issue
Block a user