mirror of
https://github.com/tencentmusic/cube-studio.git
synced 2024-12-15 06:09:57 +08:00
修正内部服务名称不能编辑
This commit is contained in:
parent
601e046f55
commit
d38d1b0bd1
@ -98,6 +98,15 @@ class Metadata_table_ModelView_base():
|
||||
"visits_thirty": {"type": "ellip2", "width": 200}
|
||||
}
|
||||
|
||||
import_data = True
|
||||
download_data = True
|
||||
|
||||
def pre_upload(self,data):
|
||||
|
||||
if not data.get('recent_visit',None):
|
||||
data['recent_visit']=None
|
||||
return data
|
||||
|
||||
add_form_extra_fields = {
|
||||
"table": StringField(
|
||||
label= _('表名'),
|
||||
@ -225,7 +234,7 @@ class Metadata_table_ModelView_base():
|
||||
item.creator = g.user.username
|
||||
|
||||
# @event_logger.log_this
|
||||
@action("ddl", "update remote", "If the update fails, please manually modify the remote database table structure.", "fa-save", multiple=False, single=True)
|
||||
@action("ddl", "更新远程表", "如果更新失败,请手动更改远程数据库的表结构", "fa-save", multiple=False, single=True)
|
||||
def ddl(self, item):
|
||||
pass
|
||||
# 自己实现更新到hive表
|
||||
|
@ -93,8 +93,7 @@ class Service_ModelView_base():
|
||||
}
|
||||
|
||||
edit_form_extra_fields = copy.deepcopy(add_form_extra_fields)
|
||||
# 服务的名称是不能变的,因为变了还要删除
|
||||
edit_form_extra_fields['name'] = StringField(_('名称'), description= _('英文名(小写字母、数字、- 组成),最长50个字符'), widget=MyBS3TextFieldWidget(readonly=True), validators=[DataRequired(), Regexp("^[a-z][a-z0-9\-]*[a-z0-9]$"), Length(1, 54)])
|
||||
|
||||
|
||||
def set_column(self, service=None):
|
||||
host_field = StringField(_('域名'), default=Service.host.default.arg,description= _('访问域名,') + self.host_rule, widget=BS3TextFieldWidget())
|
||||
|
@ -37,9 +37,9 @@ engine_impls = {
|
||||
}
|
||||
db_uri_demo = {
|
||||
'mysql': ['mysql+pymysql://username:password@host:port/database'],
|
||||
'postgres': ['postgresql+psycopg2://username:password@host:port/database'],
|
||||
'presto': ['presto://username:password@host:port/database'],
|
||||
'clikchouse': ['clickhouse+native://username:password@host:port/database'],
|
||||
'postgres': ['postgresql+psycopg2://username:password@host:port/database'],
|
||||
"impala": ['impala://host:port/database'],
|
||||
"oracle": ['oracle://username:password@host:port/database'],
|
||||
"mssql": ['mssql+pymssql://username:password@host:port/database']
|
||||
|
Loading…
Reference in New Issue
Block a user