fix flash type

This commit is contained in:
cdllp2 2022-09-09 21:17:20 +08:00
parent 0b539d2b23
commit 9b24aa3560
4 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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')

View File

@ -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},

View File

@ -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"),