Skip to content

Commit

Permalink
fix: 屏蔽开源环境不存在的功能
Browse files Browse the repository at this point in the history
  • Loading branch information
demonray committed Jul 6, 2023
1 parent fd68934 commit ccf7a01
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
6 changes: 1 addition & 5 deletions web/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
}
},
"components": {
"WeEditorLsp": "editorLsp/index.js",
"WeEditor": "editor/index.js"
},
"conf": {
Expand All @@ -82,10 +81,7 @@
"template": "${username} ${time}",
"timeupdate": 60000
},
"lsp_service": {
"sql": "${protocol}//${host}/server",
"py": "${protocol}//${host}/python"
}
"env": "opensource"
},
"version": "1.1.12"
}
28 changes: 15 additions & 13 deletions web/packages/editor/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -458,19 +458,21 @@ export default {
vm.editor.updateOptions({wordWrap: 'on'});
},
});

this.editor.addAction({
id: 'newdbsuggest',
label: this.$t('message.common.monacoMenu.newdbcomplition'),
keybindings: [],
keybindingContext: null,
contextMenuGroupId: 'control',
contextMenuOrder: 2.5,
run() {
localStorage.setItem('scriptis-edditor-type', 'lsp');
location.reload();
},
});

if (this.$APP_CONF && this.$APP_CONF.lsp_service) {
this.editor.addAction({
id: 'newdbsuggest',
label: this.$t('message.common.monacoMenu.newdbcomplition'),
keybindings: [],
keybindingContext: null,
contextMenuGroupId: 'control',
contextMenuOrder: 2.5,
run() {
localStorage.setItem('scriptis-edditor-type', 'lsp');
location.reload();
},
});
}

if (this.language === 'hql') {
// 控制语法检查
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export default {
toggleShow(e) {
const item = e.target.innerText
const overDb = e.target.className.indexOf('fi-hivedb') > -1
if ( overDb && !this.dbnameDesc[item] ) {
if ( overDb && !this.dbnameDesc[item] && this.$APP_CONF && this.$APP_CONF.env === 'webank') {
// mouseover 在数据库项上且未获取描述信息
clearTimeout(this.fetchDbInfo)
this.fetchDbInfo = setTimeout(() => {
Expand Down
1 change: 1 addition & 0 deletions web/packages/workflows/module/process/module.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
</Form>
<div slot="footer">
<Button
v-if="$APP_CONF && $APP_CONF.env === 'webank'"
@click="showDiff">{{$t('message.workflow.showVersionDiff')}}</Button>
<Button
type="primary"
Expand Down
8 changes: 5 additions & 3 deletions web/packages/workspace/module/management/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export default {
// path: 'dataSourceAdministration',
// children: [],
// },
{
];
if (this.$APP_CONF && this.$APP_CONF.env === 'webank') {
manageMenus.push({
icon: 'engineinfo',
name: i18n.t('message.workspaceManagement.engineInfo'),
path: 'engineinfo',
Expand All @@ -86,8 +88,8 @@ export default {
children: [],
}
],
}
];
})
}
return {
mode: '',
activeName: '',
Expand Down

0 comments on commit ccf7a01

Please sign in to comment.