perf: 修改翻译 (#1650)

* perf: 修改 workspace

* perf: 修改翻译

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
This commit is contained in:
fit2bot
2022-04-12 13:52:21 +08:00
committed by GitHub
parent dcb87c6216
commit 364f2aaf12
12 changed files with 46 additions and 27 deletions

View File

@@ -418,7 +418,7 @@
"isValid": "Is valid",
"nav": {
"APIKey": "API Key",
"Workspace": "Workbench",
"Workbench": "Workbench",
"Navigation": "Navigation",
"Console": "Console",
"Audits": "Audit",

View File

@@ -430,7 +430,7 @@
"isValid": "有効",
"nav": {
"APIKey": "APIキー",
"Workspace": "作業台",
"Workbench": "作業台",
"Navigation": "ナビゲーション",
"Console": "コンソール",
"Audits": "監査台",

View File

@@ -431,7 +431,7 @@
"isValid": "有效",
"nav": {
"APIKey": "API Key",
"Workspace": "工作台",
"Workbench": "工作台",
"Navigation": "导航",
"Console": "控制台",
"Audits": "审计台",

View File

@@ -79,7 +79,7 @@ export const constantRoutes = [
// 权限路由
import consoleViewRoutes from './console'
import auditViewRoutes from './audit'
import workspaceViewRoutes from './workspace'
import workbenchViewRoutes from './workbench'
import ticketsRoutes from './tickets'
import settingsRoutes from './settings'
import profileRoutes from './profile'
@@ -92,7 +92,7 @@ import { getPermedPreferView } from '@/utils/jms'
export const viewRoutes = [
consoleViewRoutes,
auditViewRoutes,
workspaceViewRoutes,
workbenchViewRoutes,
ticketsRoutes,
settingsRoutes,
profileRoutes

View File

@@ -4,23 +4,23 @@ import { BASE_URL } from '@/utils/common'
import empty from '@/layout/empty'
export default {
path: '/workspace/',
path: '/workbench/',
component: Layout,
name: 'workspace',
redirect: '/workspace/home',
name: 'workbench',
redirect: '/workbench/home',
meta: {
title: i18n.t('common.nav.Workspace'),
title: i18n.t('common.nav.Workbench'),
type: 'view',
view: 'workspace',
view: 'workbench',
icon: 'el-icon-user-solid',
showNavSwitcher: true,
showOrganization: true,
permissions: ['rbac.view_workspace']
permissions: ['rbac.view_workbench']
},
children: [
// 404 page must be placed at the end !!!
{
path: '/workspace/home',
path: '/workbench/home',
name: 'MyHome',
component: () => import('@/views/myhome'),
meta: {
@@ -30,7 +30,7 @@ export default {
}
},
{
path: '/workspace/assets',
path: '/workbench/assets',
name: 'MyAssets',
component: () => import('@/views/myassets'),
meta: {
@@ -40,7 +40,7 @@ export default {
}
},
{
path: '/workspace/apps',
path: '/workbench/apps',
name: 'Apps',
component: empty,
redirect: 'remoteapp',
@@ -82,7 +82,7 @@ export default {
]
},
{
path: '/workspace/ops',
path: '/workbench/ops',
component: empty,
meta: {
permissions: ['ops.add_commandexecution'],

View File

@@ -109,7 +109,7 @@ export function getApiPath(that) {
// ticket ...
pagePath = pagePathArray.slice(1, pagePathArray.length).join('/')
} else {
// console,audit,workspace
// console,audit,workbench
pagePath = pagePathArray.slice(2, pagePathArray.length).join('/')
}
return `/api/v1/${pagePath}/`

View File

@@ -83,7 +83,7 @@ export function hasActionPerm(route, action) {
const viewRequirePermsMapper = {
console: 'rbac.view_console',
audit: 'rbac.view_audit',
workspace: 'rbac.view_workspace'
workbench: 'rbac.view_workbench'
}
export function getViewRequirePerms(view) {

View File

@@ -51,7 +51,11 @@
<script>
import GenericTreeListPage from '@/layout/components/GenericTreeListPage/index'
import { DetailFormatter, ActionsFormatter, TagsFormatter } from '@/components/TableFormatters'
import {
DetailFormatter,
ActionsFormatter,
TagsFormatter
} from '@/components/TableFormatters'
import $ from '@/utils/jquery-vendor'
import Dialog from '@/components/Dialog'
import { mapGetters } from 'vuex'
@@ -88,17 +92,14 @@ export default {
hasTree: true,
columns: [
'hostname', 'ip', 'public_ip', 'admin_user_display',
'protocols', 'platform', 'hardware_info', 'model',
'cpu_model', 'cpu_cores', 'cpu_count', 'cpu_vcpus',
'disk_info', 'disk_total', 'memory', 'os', 'os_arch',
'os_version', 'number', 'vendor', 'sn', 'is_active',
'protocols', 'category', 'type', 'platform', 'sn', 'is_active',
'connectivity', 'labels_display',
'created_by', 'date_created', 'comment', 'org_name', 'actions'
],
columnsShow: {
min: ['hostname', 'ip', 'actions'],
default: [
'hostname', 'ip', 'platform', 'protocols', 'hardware_info',
'hostname', 'ip', 'platform', 'category', 'type',
'connectivity', 'actions'
]
},

View File

@@ -1,6 +1,11 @@
<template>
<div>
<GenericTreeListPage :table-config="tableConfig" :header-actions="headerActions" :tree-setting="treeSetting" />
<Announcement />
<GenericTreeListPage
:table-config="tableConfig"
:header-actions="headerActions"
:tree-setting="treeSetting"
/>
</div>
</template>
@@ -36,6 +41,10 @@ export default {
url: '/api/v1/perms/users/assets/',
hasTree: true,
columns: ['hostname', 'ip', 'system_users', 'platform', 'comment', 'actions'],
columnsShow: {
default: ['hostname', 'ip', 'system_users', 'platform', 'actions'],
min: ['hostname', 'actions']
},
columnsMeta: {
hostname: {
prop: 'hostname',
@@ -83,7 +92,7 @@ export default {
showOverflowTooltip: true,
align: 'center',
label: this.$t('assets.SystemUsers'),
width: '150px',
width: '120px',
formatter: SystemUserFormatter,
formatterArgs: {
getUrl: ({ row }) => {
@@ -99,6 +108,8 @@ export default {
width: '100px'
},
actions: {
width: '150px',
align: 'center',
formatterArgs: {
hasDelete: false,
loading: true,

View File

@@ -34,6 +34,7 @@ export default {
[this.$t('common.Other'), ['is_active', 'date_start', 'date_expired', 'comment']]
],
url: `/api/v1/perms/application-permissions/?category=${this.$route.query.category}&type=${this.$route.query.type}`,
createSuccessNextRoute: { name: 'ApplicationPermissionDetail' },
fieldsMeta: {
users: {
el: {

View File

@@ -1,5 +1,10 @@
<template>
<GenericCreateUpdatePage :fields="fields" :initial="initial" :fields-meta="fieldsMeta" :url="url" />
<GenericCreateUpdatePage
:fields="fields"
:initial="initial"
:fields-meta="fieldsMeta"
:url="url"
/>
</template>
<script>
@@ -37,6 +42,7 @@ export default {
[this.$t('common.Other'), ['is_active', 'date_start', 'date_expired', 'comment']]
],
url: '/api/v1/perms/asset-permissions/',
createSuccessNextRoute: { name: 'AssetPermissionDetail' },
fieldsMeta: {
users: {
el: {

View File

@@ -77,7 +77,7 @@ export default {
nodesDeps: {
'view_console': ['rbac.view_console'],
'view_audit': ['rbac.view_audit'],
'view_workspace': ['rbac.view_workspace'],
'view_workbench': ['rbac.view_workbench'],
'view_setting': ['settings.view_setting'],
'cloud_import': ['assets.view_asset'],
'terminal_node': ['settings.change_terminal'],