Skip to content

Commit ed60e56

Browse files
authored
Merge pull request #189 from det101/master
change field
2 parents 6c6b87a + 83d43e4 commit ed60e56

File tree

12 files changed

+435
-138
lines changed

12 files changed

+435
-138
lines changed

web/src/assets/styles/workspace.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@
5252
color: #39f;
5353
}
5454

55+
.nodata-tips {
56+
font-size: 12px;
57+
margin: auto;
58+
height: 70px;
59+
line-height: 70px;
60+
text-align: center;
61+
}
62+
5563
.workspace-main {
5664
padding: 10px 25px;
5765
display: -webkit-box;

web/src/commonData/i18n/common/en.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@
805805
"clearCacheSuccess": "Successfully cleared local cache!",
806806
"comingSoon": "Not yet open source, please stay tuned!"
807807
},
808+
"header": {
809+
"home": "Home",
810+
"console": "Console"
811+
},
808812
"headerNavBar": {
809813
"Workflow": "Workflow Development",
810814
"Exchangis": "Data Exchange Component",
@@ -1057,7 +1061,8 @@
10571061
"cancel": "Cancel",
10581062
"running": "running",
10591063
"stop": "disable",
1060-
"searchPlaceholder": "Search application"
1064+
"searchPlaceholder": "Search application",
1065+
"tips": "No data or no addition"
10611066
}
10621067
},
10631068
"database": {

web/src/commonData/i18n/common/zh.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,10 @@
806806
"clearCacheSuccess": "清除本地数据缓存成功!",
807807
"comingSoon": "尚未开源,敬请期待!"
808808
},
809+
"header": {
810+
"home": "首页",
811+
"console": "控制台"
812+
},
809813
"headerNavBar": {
810814
"Workflow": "工作流开发",
811815
"Exchangis": "数据交换组件",
@@ -1058,7 +1062,8 @@
10581062
"cancel": "取消",
10591063
"running": "运行中",
10601064
"stop": "不可用",
1061-
"searchPlaceholder": "搜索应用系统"
1065+
"searchPlaceholder": "搜索应用系统",
1066+
"tips": "没有数据或者未添加"
10621067
}
10631068
},
10641069
"database": {

web/src/js/component/navMenu/index.vue

Lines changed: 198 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<div
66
class="nav-menu-left-item"
77
:key="index"
8-
:class="{'actived':current && item.subTitle === current.subTitle}"
8+
:class="{'actived':current && item.id === current.id}"
99
@mouseover.stop="onMouseOver(item)">
1010
<!-- <p class="nav-menu-left-sub-title">{{item.subTitle}}</p> -->
11-
<p class="nav-menu-left-main-title">{{item.mainTitle}}</p>
11+
<p class="nav-menu-left-main-title">{{item.title}}</p>
1212
<Icon
1313
size="14"
1414
type="ios-arrow-forward"
1515
class="nav-menu-left-icon"
16-
v-if="item.children"></Icon>
16+
v-if="item.appInstances"></Icon>
1717
</div>
1818
</template>
1919
</div>
@@ -22,121 +22,227 @@
2222
v-if="current">
2323
<div
2424
class="nav-menu-right-item"
25-
v-for="(item, index) in current.children"
26-
:key="index">
27-
<div class="nav-menu-right-item-title">{{item.classify}}</div>
25+
:key="current.id">
26+
<div class="nav-menu-right-item-title">{{current.title}}</div>
2827
<div
28+
v-for="item in current.appInstances"
2929
class="nav-menu-right-item-child"
30-
v-for="(child) in item.children"
31-
:key="child.title"
32-
@click.stop="handleClick(child)">
30+
:key="item.title"
31+
@click.stop="handleClick(item)">
3332
<i
34-
:class="child.icon"
3533
class="nav-menu-right-item-icon"
34+
:class="iconSplit(item.icon)[0]"
35+
:style="`color: ${iconSplit(item.icon)[1]}`"
3636
></i>
37-
<span>{{child.title}}</span>
37+
<span>{{item.title}}</span>
3838
</div>
3939
</div>
4040
</div>
4141
</div>
4242
</template>
4343
<script>
44-
44+
import api from '@/js/service/api';
45+
import storage from '@/js/helper/storage';
4546
export default {
4647
data() {
4748
return {
48-
menuList: [{
49-
mainTitle: this.$t('message.headerNavBar.Workflow'),
50-
subTitle: 'Workflow Development',
51-
children: [{
52-
classify: this.$t('message.headerNavBar.Workflow'),
53-
children: [{
54-
title: 'Workflow',
55-
path: 'workflow',
56-
icon: 'fi-workflow1',
57-
}]
49+
menuList: [
50+
{
51+
"id": 1,
52+
"title": "应用开发",
53+
"order": null,
54+
"appInstances": [
55+
{
56+
"id": 1,
57+
"title": "工作流开发",
58+
"description": "工作流开发是微众银行微数域(WeDataSphere)打造的数据应用开发工具,以任意桥(Linkis)做为内核,将满足从数据交换、脱敏清洗、分析挖掘、质量检测、可视化展现、定时调度到数据输出等数据应用开发全流程场景需求。",
59+
"labels": "工作流,数仓开发",
60+
"accessButton": "进入工作流开发",
61+
"accessButtonUrl": "/project",
62+
"manualButton": "用户手册",
63+
"manualButtonUrl": "https://www.baidu.com",
64+
"projectUrl": "/workflow",
65+
"name": "workflow",
66+
"icon": "fi-scriptis|rgb(102, 102, 255)",
67+
"order": null,
68+
"active": true
69+
},
70+
{
71+
"id": 2,
72+
"title": "StreamSQL开发",
73+
"description": "实时应用开发是微众银行微数域(WeDataSphere)、Boss直聘大数据团队 和 中国电信天翼云大数据团队 社区联合共建的流式解决方案,以 Linkis 做为内核,基于 Flink Engine 构建的批流统一的 Flink SQL,助力实时化转型。",
74+
"labels": "流式,实时",
75+
"accessButton": "联合共建中",
76+
"accessButtonUrl": "/streamSQL",
77+
"manualButton": "相关资讯",
78+
"manualButtonUrl": "https://www.baidu.com",
79+
"projectUrl": "/streamSQL/project",
80+
"name": "streamSQL",
81+
"icon": "fi-scriptis|rgb(102, 102, 255)",
82+
"order": null,
83+
"active": false
84+
},
85+
{
86+
"id": 3,
87+
"title": "数据服务开发",
88+
"description": "数据服务是微众银行微数域(WeDataSphere)与 艾佳生活大数据团队 社区联合共建的统一API服务,以 Linkis 和 DataSphere Studio 做为内核,提供快速将 Scriptis 脚本生成数据API的能力,协助企业统一管理对内对外的API服务。",
89+
"labels": "API,数据服务",
90+
"accessButton": "联合共建中",
91+
"accessButtonUrl": "/dataService",
92+
"manualButton": "相关资讯",
93+
"manualButtonUrl": "https://www.baidu.com",
94+
"projectUrl": "/dataService/project",
95+
"name": "dataService",
96+
"icon": "fi-scriptis|rgb(102, 102, 255)",
97+
"order": null,
98+
"active": false
99+
}]
100+
},
101+
{
102+
"id": 2,
103+
"title": "数据分析",
104+
"order": null,
105+
"appInstances": [
106+
{
107+
"id": 4,
108+
"title": "Scriptis",
109+
"description": "Scriptis是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiSpark等)、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。",
110+
"labels": "脚本开发,IDE",
111+
"accessButton": "进入Scriptis",
112+
"accessButtonUrl": "/home",
113+
"manualButton": "用户手册",
114+
"manualButtonUrl": "https://www.baidu.com",
115+
"projectUrl": "/home",
116+
"name": "scriptis",
117+
"icon": "fi-scriptis|rgb(102, 102, 255)",
118+
"order": null,
119+
"active": true
120+
},
121+
{
122+
"id": 5,
123+
"title": "Visualis",
124+
"description": "Visualis是基于宜信开源项目Davinci开发的数据可视化BI工具,以任意桥(Linkis)做为内核,支持拖拽式报表定义、图表联动、钻取、全局筛选、多维分析、实时查询等数据开发探索的分析模式,并做了水印、数据质量校验等金融级增强。",
125+
"labels": "可视化,报表",
126+
"accessButton": "进入Visualis",
127+
"accessButtonUrl": "http://42.123.106.20:8088/dss/visualis/#/projects ",
128+
"manualButton": "用户手册",
129+
"manualButtonUrl": "https://www.baidu.com",
130+
"projectUrl": "http://42.123.106.20:8088/dss/visualis/#/project/${projectId}",
131+
"name": "visualis",
132+
"icon": "fi-scriptis|rgb(102, 102, 255)",
133+
"order": null,
134+
"active": true
135+
}]
136+
},
137+
{
138+
"id": 3,
139+
"title": "生产运维",
140+
"order": null,
141+
"appInstances": [
142+
{
143+
"id": 6,
144+
"title": "Schedulis",
145+
"description": "Scriptis是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiSpark等)、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。",
146+
"labels": "调度,工作流",
147+
"accessButton": "进入Schedulis",
148+
"accessButtonUrl": "http://***REMOVED***:8091/homepage",
149+
"manualButton": "用户手册",
150+
"manualButtonUrl": "https://www.baidu.com",
151+
"projectUrl": "http://***REMOVED***:8091/manager?project=${projectName}",
152+
"name": "schedulis",
153+
"icon": "fi-scriptis|rgb(102, 102, 255)",
154+
"order": null,
155+
"active": true
156+
},
157+
{
158+
"id": 7,
159+
"title": "应用运维中心",
160+
"description": "Scriptis是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiSpark等)、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。",
161+
"labels": "生产,运维",
162+
"accessButton": "进入应用运维中心",
163+
"accessButtonUrl": "/devops",
164+
"manualButton": "用户手册",
165+
"manualButtonUrl": "https://www.baidu.com",
166+
"projectUrl": "/devops/project",
167+
"name": "devops",
168+
"icon": "fi-scriptis|rgb(102, 102, 255)",
169+
"order": null,
170+
"active": false
171+
}]
172+
},
173+
{
174+
"id": 4,
175+
"title": "数据质量",
176+
"order": null,
177+
"appInstances": [
178+
{
179+
"id": 8,
180+
"title": "Qualitis",
181+
"description": "Qualitis是一套金融级、一站式的数据质量管理平台,提供了数据质量模型定义,数据质量结果可视化、可监控等功能,并用一整套统一的流程来定义和检测数据集的质量并及时报告问题。",
182+
"labels": "生产,运维",
183+
"accessButton": "进入Qualitis",
184+
"accessButtonUrl": "http://***REMOVED***:8090/#/dashboard",
185+
"manualButton": "用户手册",
186+
"manualButtonUrl": "https://www.baidu.com",
187+
"projectUrl": "http://***REMOVED***:8090/#/projects/list?id=${projectId}&flow=true",
188+
"name": "qualitis",
189+
"icon": "fi-scriptis|rgb(102, 102, 255)",
190+
"order": null,
191+
"active": true
192+
},
193+
{
194+
"id": 9,
195+
"title": "Exchangis",
196+
"description": "Exchangis是一个轻量级的、高扩展性的数据交换平台,支持对结构化及无结构化的异构数据源之间的数据传输,在应用层上具有数据权限管控、节点服务高可用和多租户资源隔离等业务特性,而在数据层上又具有传输架构多样化、模块插件化和组件低耦合等架构特点。",
197+
"labels": "生产,运维",
198+
"accessButton": "进入Exchangis",
199+
"accessButtonUrl": "http://42.123.106.20:9503",
200+
"manualButton": "用户手册",
201+
"manualButtonUrl": "https://www.baidu.com",
202+
"projectUrl": "http://42.123.106.20:19503",
203+
"name": "exchangis",
204+
"icon": "fi-scriptis|rgb(102, 102, 255)",
205+
"order": null,
206+
"active": true
207+
}]
58208
}]
59-
}, {
60-
mainTitle: this.$t('message.headerNavBar.Exchangis'),
61-
subTitle: 'Exchangis',
62-
children: [{
63-
classify: this.$t('message.headerNavBar.Exchangis'),
64-
children: [{
65-
title: 'Exchangis',
66-
path: '',
67-
icon: 'fi-exchange',
68-
}]
69-
}]
70-
},{
71-
mainTitle: this.$t('message.headerNavBar.Scriptis'),
72-
subTitle: 'Application Development',
73-
children: [{
74-
classify: this.$t('message.headerNavBar.Scriptis'),
75-
children: [{
76-
title: 'Scriptis',
77-
path: 'linkis',
78-
icon: 'fi-scriptis',
79-
}]
80-
}]
81-
}, {
82-
mainTitle: this.$t('message.headerNavBar.Visualis'),
83-
subTitle: 'Data Visualization',
84-
children: [{
85-
classify: this.$t('message.headerNavBar.Visualis'),
86-
children: [{
87-
title: 'Visualis',
88-
path: 'visualis',
89-
icon: 'fi-visualis',
90-
}]
91-
}]
92-
}, {
93-
mainTitle: this.$t('message.headerNavBar.Qualitis'),
94-
subTitle: 'Data Development',
95-
children: [{
96-
classify: this.$t('message.headerNavBar.Qualitis'),
97-
children: [{
98-
title: 'Qualitis',
99-
path: 'qualitis',
100-
icon: 'fi-qualitis',
101-
}]
102-
}]
103-
}, {
104-
mainTitle: this.$t('message.headerNavBar.Schedulis'),
105-
subTitle: 'Schedulis',
106-
children: [{
107-
classify: this.$t('message.headerNavBar.Schedulis'),
108-
children: [{
109-
title: 'Schedulis',
110-
path: 'schedulis',
111-
icon: 'fi-schedule',
112-
}]
113-
}]
114-
}, {
115-
mainTitle: this.$t('message.headerNavBar.LinkisConsole'),
116-
subTitle: 'Linkis Console',
117-
children: [{
118-
classify: this.$t('message.headerNavBar.LinkisConsole'),
119-
children: [{
120-
title: 'Linkis Console',
121-
path: 'console',
122-
icon: 'fi-resource',
123-
}]
124-
}]
125-
}],
209+
,
126210
current: null
127211
}
128212
},
213+
watch: {
214+
'$route'(newValue) {
215+
const workspaceId = this.$route.query.workspaceId;
216+
const list = storage.get(`application-${workspaceId}`);
217+
if(list) {
218+
this.menuList = list
219+
}else {
220+
if(workspaceId){
221+
api.fetch(`dss/workspaces/${workspaceId}/applications`, 'get').then(data=>{
222+
this.menuList = data.applications || [];
223+
storage.set(`application-${workspaceId}`, this.menuList);
224+
})
225+
}
226+
}
227+
}
228+
},
129229
methods: {
230+
iconSplit(icon){
231+
if(icon){
232+
return icon.split('|')
233+
}
234+
return ['','']
235+
},
130236
onMouseOver(item) {
131-
if (item.children) {
237+
if (item.appInstances) {
132238
return this.current = item;
133239
}
134240
this.current = null;
135241
},
136242
handleClick(child) {
137-
if (child.path) {
243+
if (child.name) {
138244
let query = this.$route.query;
139-
this.gotoCommonIframe(child.path, query);
245+
this.gotoCommonIframe(child.name, query);
140246
} else {
141247
this.$Message.warning(this.$t('message.constants.warning.comingSoon'));
142248
}

0 commit comments

Comments
 (0)