mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 11:24:17 +00:00
perf: update position
This commit is contained in:
@@ -46,7 +46,7 @@ export default {
|
||||
url: '/api/v1/settings/chatai-prompts/',
|
||||
value: '',
|
||||
multiple: false,
|
||||
placeholder: this.$t('Prompt'),
|
||||
placeholder: this.$t('Role'),
|
||||
ajax: {
|
||||
transformOption: (item) => {
|
||||
return { label: item.name, value: item.content }
|
||||
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '60%'
|
||||
default: '800px'
|
||||
},
|
||||
showConfirm: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -22,11 +22,11 @@ const i18n = new VueI18n({
|
||||
locale.i18n((key, value) => i18n.t(key, value)) // 重点: 为了实现element插件的多语言切换
|
||||
|
||||
// 自定义 tc 方法, 默认添加 s
|
||||
const originalTc = i18n.t.bind(i18n)
|
||||
const originalTc = i18n.tc.bind(i18n)
|
||||
|
||||
i18n.tc = function(key, choice, ...args) {
|
||||
// 获取原始翻译结果
|
||||
const translation = originalTc(key, choice, ...args)
|
||||
const translation = i18n.t(key, choice).toString()
|
||||
|
||||
// 仅处理英语且翻译不包含复数形式的情况
|
||||
if (this.locale === 'en') {
|
||||
@@ -36,7 +36,7 @@ i18n.tc = function(key, choice, ...args) {
|
||||
return choice > 1 ? `${translation}s` : translation
|
||||
}
|
||||
}
|
||||
return translation
|
||||
return originalTc(key, choice, ...args)
|
||||
}
|
||||
|
||||
Vue.prototype.$tc = i18n.tc.bind(i18n)
|
||||
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
{
|
||||
path: '/pam/accounts',
|
||||
name: 'PamAccounts',
|
||||
component: () => import('@/views/pam/Account/index.vue'),
|
||||
component: () => import('@/views/accounts/PAM/index.vue'),
|
||||
meta: {
|
||||
title: i18n.t('AccountList'),
|
||||
icon: 'accounts',
|
||||
|
||||
@@ -18,7 +18,7 @@ export default [
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/pam/Integration/index.vue'),
|
||||
component: () => import('@/views/accounts/Integration/index.vue'),
|
||||
name: 'IntegrationApplicationList',
|
||||
meta: {
|
||||
title: i18n.t('Applications'),
|
||||
@@ -27,7 +27,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
component: () => import('@/views/pam/Integration/ApplicationCreateUpdate.vue'),
|
||||
component: () => import('@/views/accounts/Integration/ApplicationCreateUpdate.vue'),
|
||||
name: 'IntegrationApplicationCreate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
@@ -37,7 +37,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: ':id/update',
|
||||
component: () => import('@/views/pam/Integration/ApplicationCreateUpdate.vue'),
|
||||
component: () => import('@/views/accounts/Integration/ApplicationCreateUpdate.vue'),
|
||||
name: 'IntegrationApplicationUpdate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
@@ -47,7 +47,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
component: () => import('@/views/pam/Integration/ApplicationDetail/index.vue'),
|
||||
component: () => import('@/views/accounts/Integration/ApplicationDetail/index.vue'),
|
||||
name: 'IntegrationApplicationDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
|
||||
@@ -10,7 +10,6 @@ export default [
|
||||
name: 'AccountChangeSecretList'
|
||||
},
|
||||
meta: {
|
||||
title: i18n.t('BaseAccountChangeSecret'),
|
||||
icon: 'change-password',
|
||||
app: 'accounts'
|
||||
},
|
||||
@@ -20,8 +19,8 @@ export default [
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/index.vue'),
|
||||
name: 'AccountChangeSecretList',
|
||||
meta: {
|
||||
menuTitle: i18n.t('ChangeSecret'),
|
||||
title: i18n.t('ChangeSecret'),
|
||||
menuTitle: i18n.t('MenuChangeSecret'),
|
||||
title: i18n.t('AccountChangeSecret'),
|
||||
permissions: ['accounts.view_changesecretautomation']
|
||||
}
|
||||
},
|
||||
@@ -93,7 +92,7 @@ export default [
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/pam/RiskDetect/index.vue'),
|
||||
component: () => import('@/views/accounts/RiskDetect/index.vue'),
|
||||
name: 'AccountCheckList',
|
||||
meta: {
|
||||
title: i18n.t('RiskDetection'),
|
||||
@@ -102,7 +101,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
component: () => import('@/views/pam/RiskDetect/AccountCheckCreateUpdate.vue'),
|
||||
component: () => import('@/views/accounts/RiskDetect/AccountCheckCreateUpdate.vue'),
|
||||
name: 'AccountCheckCreate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
@@ -112,7 +111,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: 'update/:id',
|
||||
component: () => import('@/views/pam/RiskDetect/AccountCheckCreateUpdate.vue'),
|
||||
component: () => import('@/views/accounts/RiskDetect/AccountCheckCreateUpdate.vue'),
|
||||
name: 'AccountCheckUpdate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
@@ -122,7 +121,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
component: () => import('@/views/pam/RiskDetect/AccountCheckDetail/index.vue'),
|
||||
component: () => import('@/views/accounts/RiskDetect/AccountCheckDetail/index.vue'),
|
||||
name: 'AccountCheckDetail',
|
||||
meta: {
|
||||
title: i18n.t('RiskDetectionDetail'),
|
||||
@@ -132,7 +131,7 @@ export default [
|
||||
},
|
||||
{
|
||||
path: 'executions/:id',
|
||||
component: () => import('@/views/pam/RiskDetect/RiskHistoryExecutionDetail/index.vue'),
|
||||
component: () => import('@/views/accounts/RiskDetect/RiskHistoryExecutionDetail/index.vue'),
|
||||
name: 'RiskHistoryExecutionDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
|
||||
@@ -680,3 +680,17 @@ li.rmenu i.fa {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.el-button:not(:disabled):not(.disabled):active:focus,
|
||||
.el-button:not(:disabled):not(.disabled).active:focus,
|
||||
.show > .btn-primary.dropdown-toggle:focus {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.el-button.el-button--default {
|
||||
&:focus,
|
||||
&:hover {
|
||||
//background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<script>
|
||||
import { QuickActions } from '@/components'
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto'
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
import SecretDialog from '@/components/Dialog/Secret.vue'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
|
||||
@@ -3,13 +3,18 @@
|
||||
<IBox class="radio-box">
|
||||
<div class="code-container">
|
||||
<el-tabs v-model="currentLanguage" @tab-click="handleInput">
|
||||
<el-tab-pane v-for="language in languages" :key="language.value" :label="language.label" :name="language.value">
|
||||
<el-tab-pane
|
||||
v-for="language in languages"
|
||||
:key="language.value"
|
||||
:label="language.label"
|
||||
:name="language.value"
|
||||
>
|
||||
<two-col>
|
||||
<template>
|
||||
<vue-markdown class="code-markdown" :source="readme" />
|
||||
<vue-markdown :source="readme" class="code-markdown" />
|
||||
</template>
|
||||
<template #right>
|
||||
<vue-markdown class="code-demo" :source="code" />
|
||||
<vue-markdown :source="code" class="code-demo" />
|
||||
</template>
|
||||
</two-col>
|
||||
</el-tab-pane>
|
||||
@@ -104,30 +109,36 @@ export default {
|
||||
.code-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.code-markdown {
|
||||
min-height: 210px;
|
||||
padding: 10px 20px;
|
||||
border: 1px solid #DCDFE6;
|
||||
|
||||
::v-deep .table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
|
||||
th, td {
|
||||
border: 1px solid #ebeef5;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
th {
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
}
|
||||
.code-demo{
|
||||
|
||||
.code-demo {
|
||||
@import "~highlight.js/styles/atom-one-light.css";
|
||||
min-height: 210px;
|
||||
padding: 10px 20px;
|
||||
border: 1px solid #DCDFE6;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
<script>
|
||||
import { TabPage } from '@/layout/components'
|
||||
// import TabPage from '@/layout/components/TabPage/index.vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'IntegrationnList',
|
||||
name: 'Integrationn',
|
||||
components: {
|
||||
TabPage
|
||||
},
|
||||
@@ -22,19 +21,19 @@ export default {
|
||||
name: 'application',
|
||||
title: this.$t('Applications'),
|
||||
hidden: !this.$hasPerm('accounts.view_integrationapplication'),
|
||||
component: () => import('@/views/pam/Integration/ApplicationList.vue')
|
||||
component: () => import('@/views/accounts/Integration/ApplicationList.vue')
|
||||
},
|
||||
{
|
||||
name: 'records',
|
||||
title: this.$t('CallRecords'),
|
||||
hidden: !this.$hasPerm('audits.view_integrationapplicationlog'),
|
||||
component: () => import('@/views/pam/Integration/components/CallRecords.vue')
|
||||
component: () => import('@/views/accounts/Integration/components/CallRecords.vue')
|
||||
},
|
||||
{
|
||||
name: 'docs',
|
||||
title: this.$t('Documentation'),
|
||||
hidden: !this.$hasPerm('accounts.view_integrationapplication'),
|
||||
component: () => import('@/views/pam/Integration/SDKList.vue')
|
||||
component: () => import('@/views/accounts/Integration/SDKList.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<BaseList
|
||||
:table-config="tableConfig"
|
||||
:header-actions="headerActions"
|
||||
:table-config="tableConfig"
|
||||
v-bind="config"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseList from '@/views/assets/Asset/AssetList/components/BaseList'
|
||||
import BaseList from '@/views/assets/Asset/AssetList/components/BaseList.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -26,19 +26,19 @@ export default {
|
||||
name: 'account',
|
||||
title: this.$t('Accounts'),
|
||||
icon: 'fa-key',
|
||||
component: () => import('@/views/pam/Account/AccountList.vue')
|
||||
component: () => import('@/views/accounts/PAM/AccountList.vue')
|
||||
},
|
||||
{
|
||||
name: 'asset',
|
||||
title: this.$t('Assets'),
|
||||
icon: 'fa-inbox',
|
||||
component: () => import('@/views/pam/Account/AssetList.vue')
|
||||
component: () => import('@/views/accounts/PAM/AssetList.vue')
|
||||
},
|
||||
{
|
||||
name: 'AccountTemplateList',
|
||||
title: this.$t('AccountTemplate'),
|
||||
icon: 'template',
|
||||
component: () => import('@/views/pam/Account/AccountTemplate.vue')
|
||||
component: () => import('@/views/accounts/PAM/AccountTemplate.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<script>
|
||||
import { QuickActions } from '@/components'
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto'
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<GenericListTable ref="listTable" :header-actions="headerActions" :table-config="tableConfig" />
|
||||
<ReportDialog :visible.sync="visible" :url="reportUrl" />
|
||||
<ReportDialog :url="reportUrl" :visible.sync="visible" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GenericListTable from '@/layout/components/GenericListTable'
|
||||
import GenericListTable from '@/layout/components/GenericListTable/index.vue'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import { DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import ReportDialog from '@/components/Dialog/ReportDialog.vue'
|
||||
@@ -7,7 +7,11 @@
|
||||
:table-config="tableConfig"
|
||||
:tree-setting="treeSetting"
|
||||
/>
|
||||
<BatchResolveDialog v-if="batchResolveDialog.visible" :visible.sync="batchResolveDialog.visible" v-bind="batchResolveDialog" />
|
||||
<BatchResolveDialog
|
||||
v-if="batchResolveDialog.visible"
|
||||
:visible.sync="batchResolveDialog.visible"
|
||||
v-bind="batchResolveDialog"
|
||||
/>
|
||||
<RiskScanDialog v-if="detectDialog.visible" :asset="detectDialog.asset" :visible.sync="detectDialog.visible" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -15,7 +19,7 @@
|
||||
<script>
|
||||
import AssetTreeTable from '@/components/Apps/AssetTreeTable/index.vue'
|
||||
import RiskHandleFormatter from './RiskHandlerFormatter/index.vue'
|
||||
import BatchResolveDialog from '@/views/pam/RiskDetect/RiskHandlerFormatter/BatchResolveDialog.vue'
|
||||
import BatchResolveDialog from '@/views/accounts/RiskDetect/RiskHandlerFormatter/BatchResolveDialog.vue'
|
||||
import RiskScanDialog from './RiskScanDialog.vue'
|
||||
import { DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
import ProcessingDialog from '@/components/Dialog/ProcessingDialog.vue'
|
||||
import BaseFormatter from '@/components/Table/TableFormatters/base.vue'
|
||||
import { sleep } from '@/utils/time'
|
||||
import ReviewDraw from '@/views/pam/RiskDetect/RiskHandlerFormatter/ReviewDrawer.vue'
|
||||
import ReviewDraw from '@/views/accounts/RiskDetect/RiskHandlerFormatter/ReviewDrawer.vue'
|
||||
import { riskActions } from './const'
|
||||
|
||||
export default {
|
||||
@@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto'
|
||||
import AutoDetailCard from '@/components/Cards/DetailCard/auto.vue'
|
||||
|
||||
export default {
|
||||
name: 'AccountPushExecutionInfo',
|
||||
@@ -10,7 +10,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GenericListTable from '@/layout/components/GenericListTable'
|
||||
import GenericListTable from '@/layout/components/GenericListTable/index.vue'
|
||||
import { ActionsFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import RecordViewSecret from '@/components/Apps/ChangeSecret/RecordViewSecret.vue'
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
<script>
|
||||
import { GenericDetailPage } from '@/layout/components'
|
||||
import AccountPushExecutionInfo from './AccountPushExecutionInfo'
|
||||
import AccountPushExecutionTaskList from './AccountPushExecutionTaskList'
|
||||
import AccountPushExecutionInfo from './AccountPushExecutionInfo.vue'
|
||||
import AccountPushExecutionTaskList from './AccountPushExecutionTaskList.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -16,7 +16,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog'
|
||||
import Dialog from '@/components/Dialog/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'RiskScanDialog',
|
||||
components: { Dialog },
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
title: this.$t('DetectResults'),
|
||||
name: 'AccountRisks',
|
||||
hidden: !this.$hasPerm('accounts.view_accountrisk'),
|
||||
component: () => import('@/views/pam/RiskDetect/AccountRiskList.vue')
|
||||
component: () => import('@/views/accounts/RiskDetect/AccountRiskList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('DetectTasks'),
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
title: this.$t('DetectEngines'),
|
||||
name: 'AccountCheckEngine',
|
||||
hidden: !this.$hasPerm('accounts.view_checkaccountautomation'),
|
||||
component: () => import('@/views/pam/RiskDetect/AccountCheckEngine.vue')
|
||||
component: () => import('@/views/accounts/RiskDetect/AccountCheckEngine.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -33,8 +33,8 @@ export default {
|
||||
form: {
|
||||
url: '/api/v1/settings/setting/?category=basic',
|
||||
fields: ['GLOBAL_ORG_DISPLAY_NAME'],
|
||||
fieldsMeta: {
|
||||
},
|
||||
labelWidth: '200px',
|
||||
fieldsMeta: {},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
}
|
||||
@@ -54,19 +54,19 @@ export default {
|
||||
],
|
||||
columnsMeta: {
|
||||
'resource_statistics.users_amount': {
|
||||
label: this.$t('UsersAmount'),
|
||||
label: this.$t('Users'),
|
||||
width: '100px'
|
||||
},
|
||||
'resource_statistics.groups_amount': {
|
||||
label: this.$t('GroupsAmount'),
|
||||
label: this.$t('Groups'),
|
||||
width: '100px'
|
||||
},
|
||||
'resource_statistics.assets_amount': {
|
||||
label: this.$t('AssetsAmount'),
|
||||
label: this.$t('Assets'),
|
||||
width: '100px'
|
||||
},
|
||||
'resource_statistics.asset_perms_amount': {
|
||||
label: this.$t('AssetPermsAmount'),
|
||||
label: this.$tc('AssetPermission', 2),
|
||||
width: '200px'
|
||||
},
|
||||
actions: {
|
||||
|
||||
Reference in New Issue
Block a user