diff --git a/.gitignore b/.gitignore index b9970b410..fc4e70ea3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules/ dist/ lina/ +ui/ npm-debug.log* yarn-debug.log* yarn-error.log* @@ -18,4 +19,4 @@ tests/**/coverage/ .env.development .python-version -helper.json \ No newline at end of file +helper.json diff --git a/Dockerfile b/Dockerfile index d0c78dcc7..51d52351e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM jumpserver/lina-base:20260114_045651 AS stage-build +FROM jumpserver/lina-base:20260331_081153 AS stage-build ARG VERSION ENV VERSION=$VERSION diff --git a/package.json b/package.json index c60995f40..ac3a747bb 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "npm": "^7.8.0", "nprogress": "0.2.0", "path-to-regexp": "3.3.0", + "sm-crypto": "^0.4.0", "sortablejs": "^1.15.6", "v-sanitize": "^0.0.13", "vue": "2.7.16", diff --git a/src/components/Apps/AccountCreateUpdateForm/index.vue b/src/components/Apps/AccountCreateUpdateForm/index.vue index c31abc1c9..12c672ecd 100644 --- a/src/components/Apps/AccountCreateUpdateForm/index.vue +++ b/src/components/Apps/AccountCreateUpdateForm/index.vue @@ -2,7 +2,7 @@ import AutoDataForm from '@/components/Form/AutoDataForm/index.vue' -import { encryptPassword } from '@/utils/secure' +import { encryptPassword } from '@/utils/session-encrypt' import { accountFieldsMeta } from '@/components/Apps/AccountCreateUpdateForm/const' export default { @@ -59,16 +59,27 @@ export default { ] }, url: '/api/v1/accounts/accounts/', - form: Object.assign({ 'on_invalid': 'error' }, this.account || {}), + form: Object.assign({ on_invalid: 'error' }, this.account || {}), encryptedFields: ['secret'], fields: [ - [this.$t('Basic'), ['name', 'username', 'privileged', 'su_from', 'su_from_username', 'template']], + [ + this.$t('Basic'), + ['name', 'username', 'privileged', 'su_from', 'su_from_username', 'template'] + ], [this.$t('Asset'), ['nodes', 'assets']], - [this.$t('Secret'), [ - 'secret_type', 'password', 'ssh_key', 'token', - 'access_key', 'passphrase', 'api_key', - 'secret_reset' - ]], + [ + this.$t('Secret'), + [ + 'secret_type', + 'password', + 'ssh_key', + 'token', + 'access_key', + 'passphrase', + 'api_key', + 'secret_reset' + ] + ], [this.$t('Other'), ['push_now', 'params', 'on_invalid', 'is_active', 'comment']] ], fieldsMeta: accountFieldsMeta(this), @@ -170,7 +181,7 @@ export default { } - + diff --git a/src/components/Apps/AccountListTable/UpdateSecretInfo.vue b/src/components/Apps/AccountListTable/UpdateSecretInfo.vue index 2d370139a..43c146cf3 100644 --- a/src/components/Apps/AccountListTable/UpdateSecretInfo.vue +++ b/src/components/Apps/AccountListTable/UpdateSecretInfo.vue @@ -23,7 +23,7 @@ + diff --git a/src/layout/components/NavHeader/AccountDropdown.vue b/src/layout/components/NavHeader/AccountDropdown.vue index 0cda571ba..e6517a13f 100644 --- a/src/layout/components/NavHeader/AccountDropdown.vue +++ b/src/layout/components/NavHeader/AccountDropdown.vue @@ -36,6 +36,7 @@ - + diff --git a/src/views/accounts/AccountTemplate/AccountTemplateCreateUpdate.vue b/src/views/accounts/AccountTemplate/AccountTemplateCreateUpdate.vue index 792b28416..805725578 100644 --- a/src/views/accounts/AccountTemplate/AccountTemplateCreateUpdate.vue +++ b/src/views/accounts/AccountTemplate/AccountTemplateCreateUpdate.vue @@ -1,14 +1,11 @@ - + diff --git a/src/views/assets/Cloud/const.js b/src/views/assets/Cloud/const.js index fc8bd621e..9dc090b7f 100644 --- a/src/views/assets/Cloud/const.js +++ b/src/views/assets/Cloud/const.js @@ -1,5 +1,5 @@ import i18n from '@/i18n/i18n' -import { encryptPassword } from '@/utils/secure' +import { encryptPassword } from '@/utils/session-encrypt' export const gcp = 'gcp' export const aliyun = 'aliyun' @@ -55,8 +55,18 @@ export const publicHostProviders = [ export const publicDBProviders = [aliyun] export const privateCloudProviders = [ - vmware, qingcloud_private, huaweicloud_private, ctyun_private, - openstack, zstack, nutanix, fc, scp, apsara_stack, smartx, proxmox + vmware, + qingcloud_private, + huaweicloud_private, + ctyun_private, + openstack, + zstack, + nutanix, + fc, + scp, + apsara_stack, + smartx, + proxmox ] export const ACCOUNT_PROVIDER_ATTRS_MAP = { diff --git a/src/views/audits/JobExecutionLogList.vue b/src/views/audits/JobExecutionLogList.vue index cbb989536..3c9d3d01f 100644 --- a/src/views/audits/JobExecutionLogList.vue +++ b/src/views/audits/JobExecutionLogList.vue @@ -95,6 +95,7 @@ export default { }, headerActions: { hasLeftActions: false, + hasReportExport: true, hasDatePicker: true, hasImport: false, searchConfig: { diff --git a/src/views/audits/JobPeriodTaskList.vue b/src/views/audits/JobPeriodTaskList.vue index f6a88e05c..ffca0da7d 100644 --- a/src/views/audits/JobPeriodTaskList.vue +++ b/src/views/audits/JobPeriodTaskList.vue @@ -73,6 +73,7 @@ export default { }, headerActions: { hasLeftActions: false, + hasReportExport: true, hasImport: false } } diff --git a/src/views/audits/LoginLog/LoginLogList.vue b/src/views/audits/LoginLog/LoginLogList.vue index 3ac0bb89b..661bc009a 100644 --- a/src/views/audits/LoginLog/LoginLogList.vue +++ b/src/views/audits/LoginLog/LoginLogList.vue @@ -36,6 +36,7 @@ export default { headerActions: { hasLeftActions: false, hasImport: false, + hasReportExport: true, hasDatePicker: true, searchConfig: { getUrlQuery: true diff --git a/src/views/audits/OperateLog/OperateLogList.vue b/src/views/audits/OperateLog/OperateLogList.vue index d6421194d..f1180e6c6 100644 --- a/src/views/audits/OperateLog/OperateLogList.vue +++ b/src/views/audits/OperateLog/OperateLogList.vue @@ -72,7 +72,11 @@ export default { headerActions: { hasLeftActions: false, hasImport: false, - hasDatePicker: true + hasReportExport: true, + hasDatePicker: true, + searchConfig: { + getUrlQuery: true + } } } } diff --git a/src/views/audits/PasswordChangeLogList.vue b/src/views/audits/PasswordChangeLogList.vue index 836052ad3..e39b79ae7 100644 --- a/src/views/audits/PasswordChangeLogList.vue +++ b/src/views/audits/PasswordChangeLogList.vue @@ -26,7 +26,11 @@ export default { headerActions: { hasLeftActions: false, hasImport: false, - hasDatePicker: true + hasReportExport: true, + hasDatePicker: true, + searchConfig: { + getUrlQuery: true + } } } } diff --git a/src/views/reports/accounts/AccountAutomation.vue b/src/views/reports/accounts/AccountAutomation.vue index 856480009..186c5e27d 100644 --- a/src/views/reports/accounts/AccountAutomation.vue +++ b/src/views/reports/accounts/AccountAutomation.vue @@ -4,11 +4,18 @@ :title="title" :nav="nav" :name="name" + :charts="charts" + :tables="tables" :show-display-mode-toggle="true" :display-mode.sync="displayMode" v-bind="$attrs" >
+