Skip to content

Commit

Permalink
Merge pull request #246 from ikun-Lg/master
Browse files Browse the repository at this point in the history
Add corresponding tab(Form View Tab and YAML View Tab) for all routing modules under traffic control module.
  • Loading branch information
chickenlj authored Apr 9, 2024
2 parents 5e0e450 + bcfe9ae commit d831f00
Show file tree
Hide file tree
Showing 24 changed files with 2,113 additions and 345 deletions.
170 changes: 92 additions & 78 deletions ui-vue3/src/api/mock/mockInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,87 +17,101 @@

import Mock from 'mockjs'

Mock.mock('/mock/instance/search', 'get', {
code: 200,
message: 'laborum qui',
data: {
total: 66,
curPage: 82,
pageSize: 31,
data: [
{
ip: '205.216.185.96',
name: '用省中际解理',
deployState: {
label: 'dolor',
value: 'in amet',
level: 'amet nisi incididunt',
tip: '133.16.55.40'
},
deployCluster: 'veniam elit irure',
registerStates: [
{
label: 'in consequat est',
value: 'esse non Lorem',
level: 'sit',
tip: '122.249.164.252'
}
],
registerClusters: ['cupidatat'],
cpu: 'officia cupidatat reprehenderit magna ex',
memory: 'mollit',
startTime: '2016-07-31 19:20:31',
registerTime: '2014-02-09 04:02:41',
labels: ['cupidat']
Mock.mock('/mock/instance/search', 'get', () => {
let total = Mock.mock('@integer(8, 1000)')
let list = []
for (let i = 0; i < total; i++) {
list.push({
ip: '121.90.211.162',
name: 'shop-user',
deployState: Mock.Random.pick(['Running', 'Pending', 'Terminating', 'Crashing']),
deployCluster: 'tx-shanghai-1',
registerStates: [
{
label: 'Registed',
value: 'Registed',
level: 'healthy'
}
],
registerClusters: ['ali-hangzhou-1', 'ali-hangzhou-2'],
cpu: '1.2c',
memory: '2349MB',
startTime: '2023-06-09 03:47:10',
registerTime: '2023-06-09 03:48:20',
labels: {
region: 'beijing',
version: 'v1'
}
})
}
return {
code: 200,
message: 'success',
data: Mock.mock({
total: total,
curPage: 1,
pageSize: 10,
data: list
})
}
})

Mock.mock('/mock/instance/detail', 'get', () => {
return {
code: 200,
message: 'success',
data: {
deployState: {
label: 'pariatur do nulla',
value: 'ut',
level: 'ullamco veniam laboris ex',
tip: '246.179.217.170'
},
{
ip: '117.23.142.162',
name: '之受力即此',
deployState: {
label: 'sint culpa elit quis id',
value: 'amet',
level: 'adipisicing do',
tip: '112.176.231.68'
registerStates: [
{
label: 'magna Duis non',
value: 'laboris',
level: 'et dolore pariatur ipsum adipisicing',
tip: '204.174.144.51'
}
],
dubboPort: 35,
ip: '15.1.144.52',
appName: '式团划',
workload: 'in labore enim',
labels: [null],
createTime: '2000-11-12 05:59:48',
startTime: '1986-03-29 11:48:17',
registerTime: '2000-01-26 19:09:48',
registerCluster: 'qui commodo dolore',
deployCluster: 'dolore laborum',
node: 'aliquip',
image: 'http://dummyimage.com/400x400',
probes: {
startupProbe: {
type: 'pariatur in quis',
port: 92,
open: false
},
deployCluster: 'esse sit',
registerStates: [
{
label: 'ut',
value: 'eu sit',
level: 'in eiusmod ullamco',
tip: '220.153.108.236'
}
],
registerClusters: ['ea consectetur'],
cpu: 'dolor sint deserunt',
memory: 'sint eu commodo proident',
startTime: '1994-12-22 18:24:57',
registerTime: '1986-07-24 03:18:24'
},
{
ip: '41.215.196.61',
name: '值青给值',
deployState: {
label: 'sunt',
value: 'consectetur in',
level: 'culpa dolore',
tip: '142.182.249.124'
readinessProbe: {
type: 'aute',
port: 52,
open: false
},
deployCluster: 'cupidatat eu nostrud',
registerStates: [
{
label: 'ad quis',
value: 'Excepteur esse dolore Ut dolore',
level: 'ipsum ad quis',
tip: '220.55.203.4'
}
],
registerClusters: ['Excepteur sit laboris'],
cpu: 'fugiat pariatur laborum ut',
memory: 'Lorem adipisicing sunt',
startTime: '1984-04-25 12:22:51',
registerTime: '1976-06-06 19:58:58'
livenessPronbe: {
type: 'reprehenderit aute nostrud',
port: 66,
open: false
}
}
]
}
}
})

Mock.mock('/mock/instance/metrics', 'get', () => {
return {
code: 200,
message: 'success',
data: 'http://8.147.104.101:3000/d/dcf5defe-d198-4704-9edf-6520838880e9/instance?orgId=1&refresh=1m&from=1710644821536&to=1710731221536&theme=light'
}
})
16 changes: 16 additions & 0 deletions ui-vue3/src/api/service/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@ export const searchInstances = (params: any): Promise<any> => {
params
})
}

export const getInstanceDetail = (params: any): Promise<any> => {
return request({
url: '/instance/detail',
method: 'get',
params
})
}

export const getInstanceMetricsInfo = (params: any): Promise<any> => {
return request({
url: '/instance/metrics',
method: 'get',
params
})
}
61 changes: 61 additions & 0 deletions ui-vue3/src/base/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,68 @@
import type { I18nType } from './type.ts'

const words: I18nType = {
destinationRuleDomain: {
YAMLView: 'YAML view',
formView: 'Form view'
},
virtualServiceDomain: {
YAMLView: 'YAML view',
formView: 'Form view'
},
dynamicConfigDomain: {
YAMLView: 'YAML view',
formView: 'Form view'
},
routingRuleDomain: {
YAMLView: 'YAML view',
formView: 'Form view'
},
tagRuleDomain: {
YAMLView: 'YAML view',
formView: 'Form view'
},
flowControlDomain: {
actuatingRange: 'Actuating range',
notSet: 'Not set',
versionRecords: 'Version records',
YAMLView: 'YAML View',
addConfiguration: 'Add configuration',
addConfigurationItem: 'Add configurationItem',
addFilter: 'Add filter',
configurationItem: 'Configuration item',
scopeScreening: 'Scope screening',
endOfAction: 'End of action',
addLabel: 'Add label',
actions: 'Actions',
filterType: 'Filter type',
labelName: 'Label name',
formView: 'Form view',
addMatch: 'Add match',
addRouter: 'Add router',
addressSubsetMatching: 'Address subset matching',
value: 'Value',
relation: 'Relation',
parameter: 'Parameter',
matchingDimension: 'Matching dimension',
requestParameterMatching: 'Request parameter matching',
ruleName: 'Rule name',
actionObject: 'Action object',
faultTolerantProtection: 'Fault-tolerant protection',
runTimeEffective: 'Run time effective',
ruleGranularity: 'Rule granularity',
timeOfTakingEffect: 'Time of taking effect',
enabledStatus: 'Enabled status',
priority: 'Priority',
off: 'off',
on: 'on',
opened: 'Opened',
closed: 'Closed',
enabled: 'Enabled',
disabled: 'Disabled'
},
instanceDomain: {
flowDisabled: 'Flow disabled',
operatorLog: 'Operator log',
enableAppInstanceLogs: 'Enable access logs for all instances of this application',
appServiceRetries: 'Adjust the number of retries for the service provided by this application',
appServiceLoadBalance:
Expand Down
63 changes: 62 additions & 1 deletion ui-vue3/src/base/i18n/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,68 @@
import type { I18nType } from './type.ts'

const words: I18nType = {
destinationRuleDomain: {
YAMLView: 'YAML视图',
formView: '表单视图'
},
virtualServiceDomain: {
YAMLView: 'YAML视图',
formView: '表单视图'
},
dynamicConfigDomain: {
YAMLView: 'YAML视图',
formView: '表单视图'
},
routingRuleDomain: {
YAMLView: 'YAML视图',
formView: '表单视图'
},
tagRuleDomain: {
YAMLView: 'YAML视图',
formView: '表单视图'
},
flowControlDomain: {
notSet: '未设置',
versionRecords: '版本记录',
YAMLView: 'YAML视图',
addConfiguration: '增加配置',
addConfigurationItem: '增加配置项',
addFilter: '增加筛选',
configurationItem: '配置项',
actuatingRange: '作用范围',
scopeScreening: '作用范围筛选',
endOfAction: '作用端',
actions: '操作',
filterType: '筛选类型',
labelName: '标签名',
formView: '表单视图',
addMatch: '增加匹配',
addRouter: '增加路由',
addLabel: '增加标签',
addressSubsetMatching: '地址子集匹配',
value: '值',
relation: '关系',
requestParameterMatching: '请求参数匹配',
matchingDimension: '匹配维度',
parameter: '参数',
ruleName: '规则名',
actionObject: '作用对象',
faultTolerantProtection: '容错保护',
runTimeEffective: '运行时生效',
ruleGranularity: '规则粒度',
timeOfTakingEffect: '生效时间',
enabledStatus: '启用状态',
priority: '优先级',
off: '关',
on: '开',
opened: '开启',
closed: '关闭',
enabled: '启用',
disabled: '禁用'
},
instanceDomain: {
flowDisabled: '流量禁用',
operatorLog: '执行日志',
CPU: 'CPU',
enableAppInstanceLogs: '开启该应用所有实例的访问日志',
appServiceLoadBalance: '调整应用提供服务的负载均衡策略',
Expand All @@ -35,7 +96,7 @@ const words: I18nType = {
loadBalance: '负载均衡',
monitor: '监控',
linkTracking: '链路追踪',
configuration: '配置',
configuration: '场景配置',
event: '事件',
healthExamination_k8s: '健康检查(k8s)',
instanceLabel: '实例标签',
Expand Down
Loading

0 comments on commit d831f00

Please sign in to comment.