Compare commits

...

116 Commits

Author SHA1 Message Date
Jiangjie Bai
0fbdb3d94e Merge pull request #5293 from jumpserver/dev
v4.10.14
2025-12-18 17:23:42 +08:00
w940853815
65706509b1 fix:Disabled assets have no audit records 2025-12-18 11:48:17 +08:00
feng
3d668502e1 perf: chat ai custom model 2025-12-12 15:18:16 +08:00
w940853815
56e07c8568 fix: Remove 'Account' option from const.js 2025-12-11 17:01:08 +08:00
w940853815
c2f7a9e8e2 feat: Implement secret readability control based on system settings 2025-12-11 16:42:43 +08:00
w940853815
f0949f0e54 feat: Add permission check for reading account secrets based on system settings 2025-12-11 16:42:43 +08:00
w940853815
a165e45937 perf: Include 'id' in search and filter fields for AutomationExecution 2025-12-11 14:47:58 +08:00
zhaojisen
6350bdb42d Fixed: Fix the issue where the remote application details page is lost and the account needs to be regenerated 2025-12-10 17:31:49 +08:00
w940853815
4ecaee36f9 fix: Remove unused relevant_system_user option from BaseTicketList 2025-12-09 14:41:52 +08:00
w940853815
43e7e5cd74 fix: Remove unused CAS_CREATE_USER attribute from options 2025-12-04 17:40:54 +08:00
Bai
4332dbcc1c feat: add access token page 2025-12-01 17:54:55 +08:00
jiangweidong
a755b2ffa0 perf: increase joint camp areas 2025-12-01 10:56:32 +08:00
jiangweidong
d391592778 feat: Host cloud sync supports state cloud 2025-12-01 10:56:32 +08:00
Jiangjie Bai
88e10b34cd Merge pull request #5279 from jumpserver/dev
v4.10.13-lts
2025-11-20 20:20:44 +08:00
feng
3dd199ef01 fix: Ticket comment not display 2025-11-20 14:39:32 +08:00
w940853815
20e1c833a6 perf: Update asset detection logic in AccountRiskList for improved menu display 2025-11-20 10:32:05 +08:00
feng
f2c7a6bc71 perf: Account bulk error prompt 2025-11-19 17:38:52 +08:00
w940853815
6063e03d89 perf: Enhance error message handling for nested plain objects in getErrorResponseMsg 2025-11-19 15:42:26 +08:00
zhaojisen
e2d9eb5bae Fixed: Fix the issue where the global organization text is not displayed completely in the organization dropdown. 2025-11-19 15:31:10 +08:00
w940853815
84caf35f67 fix: Ensure progress display is shown correctly during job execution 2025-11-19 15:10:57 +08:00
zhaojisen
1d7a1bfff1 Fixed: Fix the issue where creating an SSH public key for a third-party user redirects to the login password tab. 2025-11-18 18:34:04 +08:00
w940853815
9039f572ac fix: Click Review to enter comments, and the page will be dimmed 2025-11-18 16:43:50 +08:00
w940853815
7798324a4b perf: Add support for error message extraction from plain objects in getErrorResponseMsg 2025-11-18 15:45:40 +08:00
feng
8e69206cfb fix: Account push show params 2025-11-17 17:29:44 +08:00
w940853815
338706247a perf: Add condition to check node type in AccountRiskList for asset detection 2025-11-17 11:15:53 +08:00
w940853815
2ae3e06484 perf: Refactor error handling and improve parameter assignment in job forms 2025-11-17 10:55:47 +08:00
w940853815
c1dcea1b29 perf: Improve error message formatting for array of strings 2025-11-12 16:22:44 +08:00
w940853815
59adc54f2d perf: Enhance AccountFormatter with options to exclude accounts 2025-11-11 18:55:34 +08:00
w940853815
afeafcbf49 perf: Job execution detail content add text-overflow class 2025-11-10 16:54:45 +08:00
w940853815
4e23107a21 perf: Support batch import of leak passwords 2025-11-06 18:36:40 +08:00
ibuler
3e267d07c1 perf: small size some png 2025-11-05 18:19:09 +08:00
fit2bot
7df6854a65 perf: upgrade vue version (#5260)
* perf: upgrade vue version

* perf: Update Dockerfile with new base image tag

---------

Co-authored-by: zhaojisen <1301338853@qq.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-05 17:36:47 +08:00
w940853815
4db8edce98 perf: Add confirmation dialog before syncing platform protocols 2025-11-04 15:09:30 +08:00
Jiangjie Bai
f7830e9b85 Merge pull request #5239 from jumpserver/dev
v4.10.10
2025-10-16 17:29:18 +08:00
Bryan
16a92d10bc Merge pull request #5212 from jumpserver/dev
v4.10.8-lts
2025-09-18 16:49:05 +08:00
Bryan
7b568ec84f 1 2025-08-21 18:59:54 +08:00
Bryan
73d6bda8c3 Merge pull request #5092 from jumpserver/dev
merge: v4.10.4-lts
2025-07-17 15:04:47 +08:00
Bryan
3934b45367 Merge pull request #5064 from jumpserver/dev
v4.10.2
2025-06-19 20:13:12 +08:00
Bryan
0c5e84d1e3 Merge pull request #5010 from jumpserver/dev
v4.10.0
2025-05-15 17:12:07 +08:00
Bryan
18a3f42717 Merge pull request #4972 from jumpserver/dev
v4.9.0
2025-04-17 20:18:08 +08:00
Bryan
68030d98b2 Merge pull request #4890 from jumpserver/dev
v4.8.0
2025-03-20 18:44:31 +08:00
Bryan
a861f77609 Merge pull request #4659 from jumpserver/dev
v4.7.0
2025-02-20 10:20:32 +08:00
Bryan
e58ec6057c Merge pull request #4600 from jumpserver/dev
v4.6.0
2025-01-15 14:39:21 +08:00
Bryan
7ab20c5885 Merge pull request #4537 from jumpserver/dev
v4.5.0
2024-12-19 15:57:44 +08:00
Bryan
e47ddb5355 Merge pull request #4451 from jumpserver/dev
v4.4.0
2024-11-21 19:01:11 +08:00
Bryan
56aa3caa83 Merge pull request #4410 from jumpserver/dev
v4.3.0
2024-10-17 14:56:18 +08:00
Bryan
19b1dc0dbc Merge pull request #4367 from jumpserver/dev
merge: from dev to master
2024-09-19 19:36:42 +08:00
Bryan
77ef172a23 Merge pull request #4320 from jumpserver/dev
v4.1.0
2024-08-15 21:42:42 +08:00
Bryan
4596887bf1 Merge pull request #4178 from jumpserver/dev
v4.0.0
2024-07-03 19:06:07 +08:00
Bryan
0a3dc30c85 Merge pull request #4072 from jumpserver/dev
v3.10.11-lts
2024-06-19 16:04:12 +08:00
Bryan
51d24bc8e5 Merge pull request #3941 from jumpserver/dev
v3.10.10-lts
2024-05-16 16:05:04 +08:00
Bryan
1b15a4d043 Merge pull request #3871 from jumpserver/dev
v3.10.9 (dev to master)
2024-04-22 19:44:33 +08:00
Bryan
7d3f818242 Merge pull request #3864 from jumpserver/v3.10
v3.10.8
2024-04-18 17:58:05 +08:00
Bryan
4e26f18d77 Merge pull request #3862 from jumpserver/dev
v3.10.8
2024-04-18 17:17:36 +08:00
Bryan
b22613617a Revert "build(deps): bump follow-redirects from 1.15.3 to 1.15.4"
This reverts commit e971cbf4a8.
2024-03-27 16:16:07 +08:00
dependabot[bot]
e971cbf4a8 build(deps): bump follow-redirects from 1.15.3 to 1.15.4
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 16:11:26 +08:00
wangruidong
4672abae35 fix: 刷新页面根据搜索条件过滤出对应的资源 2024-03-04 19:17:05 +08:00
Bryan
ba36d72602 Merge pull request #3761 from jumpserver/master
v3.10.4 (branch-v3.10)
2024-02-29 16:26:13 +08:00
Bryan
4bfbbba4c5 Merge pull request #3760 from jumpserver/dev
v3.10.4
2024-02-29 16:15:33 +08:00
Bryan
ea038ce43a Merge pull request #3697 from jumpserver/master
v3.10.2
2024-01-17 13:34:12 +00:00
Bryan
e16b19666c Merge pull request #3696 from jumpserver/dev
v3.10.2
2024-01-17 13:33:22 +00:00
Bryan
c7f5409eb6 Merge pull request #3694 from jumpserver/master
v3.10.2
2024-01-17 07:35:33 -04:00
Bryan
fdbd7d2222 Merge pull request #3693 from jumpserver/dev
v3.10.2
2024-01-17 07:24:50 -04:00
Bryan
ddbaeeafea Merge pull request #3668 from jumpserver/master
v3.10.1
2023-12-29 11:34:04 +05:00
Bryan
efb0e9dacb Merge pull request #3665 from jumpserver/dev
v3.10.1
2023-12-29 11:14:54 +05:00
huailei
f6f8301ad5 Revert "perf: 账号收集翻译"
This reverts commit 9a63ae63d4.
2023-12-22 15:25:31 +08:00
“huailei000”
9a63ae63d4 perf: 账号收集翻译 2023-12-22 11:31:45 +08:00
Bryan
1e007ccda3 Merge pull request #3642 from jumpserver/dev
v3.10
2023-12-21 15:15:52 +05:00
老广
d1d0b06b53 Merge pull request #3546 from jumpserver/dev
v3.9.0
2023-11-16 18:25:10 +08:00
Bryan
5fb70d2f24 Merge pull request #3450 from jumpserver/dev
v3.8.0
2023-10-19 03:33:53 -05:00
Bryan
b54a95430f Merge pull request #3404 from jumpserver/dev
v3.7.0
2023-09-21 17:04:42 +08:00
Bryan
4d8b4c45af Merge pull request #3355 from jumpserver/dev
v3.6.0
2023-08-17 14:00:33 +05:00
Bryan
a6d642df60 Merge pull request #3283 from jumpserver/dev
v3.5.0
2023-07-20 19:04:29 +08:00
Jiangjie.Bai
2e74f1522f Merge pull request #3222 from jumpserver/dev
v3.4.0
2023-06-15 14:51:36 +08:00
Jiangjie.Bai
fe615e0314 Merge pull request #3219 from jumpserver/dev
v3.4.0
2023-06-15 14:17:46 +08:00
Jiangjie.Bai
09f734e6fc Merge pull request #3135 from jumpserver/dev
v3.3.0
2023-05-18 19:18:11 +08:00
Jiangjie.Bai
3117046342 Merge pull request #3061 from jumpserver/dev
v3.2.0
2023-04-20 18:40:08 +08:00
Bai
b68aecb5cc fix: 批量更新资产平台help-text 2023-04-20 18:39:22 +08:00
Jiangjie.Bai
1c9b155d97 Merge pull request #3057 from jumpserver/dev
v3.2.0
2023-04-20 18:22:46 +08:00
Jiangjie.Bai
75b1be9864 Merge pull request #3019 from jumpserver/dev
v3.2.0 rc2
2023-04-14 19:01:37 +08:00
Jiangjie.Bai
615c3c1cf4 Merge pull request #3014 from jumpserver/dev
v3.2.0 rc1
2023-04-13 20:02:38 +08:00
Jiangjie.Bai
4d82231af4 Merge pull request #3012 from jumpserver/dev
v3.2.0 rc1
2023-04-13 19:22:38 +08:00
“huailei000”
c6cf6571b6 perf: ldap导入用户列表-组织下拉框设置最大宽度 2023-03-16 16:44:36 +08:00
Bai
8ea990d070 fix: 修复创建资产添加账号模版报错问题 2023-03-16 16:44:36 +08:00
“huailei000”
f4a32170d5 perf: message 2023-03-16 16:44:36 +08:00
ibuler
073508675e perf: 添加默认的信息 2023-03-16 16:44:36 +08:00
Jiangjie.Bai
1d6ca0a93a Merge pull request #2924 from jumpserver/dev
v3.1.0 rc4
2023-03-15 19:46:31 +08:00
Jiangjie.Bai
36aea652d6 Merge pull request #2788 from jumpserver/dev
v3.0.0
2023-02-23 20:16:41 +08:00
Jiangjie.Bai
1a42ce90ab Merge pull request #2760 from jumpserver/dev
v3.0.0-rc-latest
2023-02-22 22:21:54 +08:00
Jiangjie.Bai
31a401b55d Merge pull request #2463 from jumpserver/dev
v3.0.0-rc4
2023-01-31 18:55:34 +08:00
Jiangjie.Bai
582a84178d Merge pull request #2187 from jumpserver/dev
v2.28.0
2022-11-17 17:44:19 +08:00
Jiangjie.Bai
9b9f7c936c Merge pull request #2184 from jumpserver/dev
v2.28.0-rc5
2022-11-17 14:18:15 +08:00
Jiangjie.Bai
2a6100957f Merge pull request #2182 from jumpserver/dev
v2.28.0-rc4
2022-11-16 21:08:55 +08:00
Jiangjie.Bai
16606d6a27 Merge pull request #2176 from jumpserver/dev
v2.28.0-rc2
2022-11-14 10:01:05 +08:00
Jiangjie.Bai
0a612f50e6 Merge pull request #2164 from jumpserver/dev
v2.28.0-rc1
2022-11-10 17:45:47 +08:00
Jiangjie.Bai
fe36fa9390 Merge pull request #2117 from jumpserver/dev
v2.27.0-rc4
2022-10-18 21:02:10 +08:00
Jiangjie.Bai
ba109900ec Merge pull request #2113 from jumpserver/dev
v2.27.0-rc3
2022-10-18 11:20:57 +08:00
Jiangjie.Bai
ec7768267f Merge pull request #2105 from jumpserver/dev
v2.27.0-rc2
2022-10-14 11:01:32 +08:00
Jiangjie.Bai
cc58b374ab Merge pull request #2101 from jumpserver/dev
v2.27.0-rc1
2022-10-13 17:44:53 +08:00
Jiangjie.Bai
04ffbb8fd6 Merge pull request #2097 from jumpserver/dev
v2.27.0-rc1
2022-10-13 15:14:40 +08:00
Jiangjie.Bai
49880f6739 Merge pull request #2059 from jumpserver/dev
v2.26.0
2022-09-15 17:49:44 +08:00
Jiangjie.Bai
e6f98d58c4 Merge pull request #2057 from jumpserver/dev
v2.26.0-rc4
2022-09-15 16:18:03 +08:00
Jiangjie.Bai
fd1f16d43c Merge pull request #2050 from jumpserver/dev
v2.26.0-rc2
2022-09-13 17:41:39 +08:00
Jiangjie.Bai
968b2415b1 Merge pull request #2043 from jumpserver/dev
v2.26.0-rc1
2022-09-08 15:46:44 +08:00
Jiangjie.Bai
776090d6ba Merge pull request #2001 from jumpserver/dev
v2.25.0
2022-08-18 16:12:45 +08:00
Jiangjie.Bai
3a37952288 Merge pull request #1996 from jumpserver/dev
v2.25.0-rc4
2022-08-17 16:53:23 +08:00
Jiangjie.Bai
62b8fc0e3b Merge pull request #1994 from jumpserver/dev
v2.25.0-rc3
2022-08-16 19:08:23 +08:00
Jiangjie.Bai
b2028869cb Merge pull request #1986 from jumpserver/dev
v2.25.0-rc2
2022-08-12 18:06:56 +08:00
Jiangjie.Bai
5277a725f8 Merge pull request #1973 from jumpserver/dev
v2.25.0-rc1
2022-08-11 14:11:59 +08:00
Jiangjie.Bai
f137788c1a Merge pull request #1957 from jumpserver/dev
v2.24.0-rc5
2022-07-20 19:06:03 +08:00
Jiangjie.Bai
f7d17c8de7 Merge pull request #1954 from jumpserver/dev
v2.24.0-rc4
2022-07-19 16:18:13 +08:00
Jiangjie.Bai
feea70b0be Merge pull request #1944 from jumpserver/dev
v2.24.0-rc3
2022-07-18 12:05:42 +08:00
Jiangjie.Bai
04696ef3d6 Merge pull request #1940 from jumpserver/dev
v2.24.0-rc2
2022-07-15 18:07:37 +08:00
Jiangjie.Bai
1731f4f788 Merge pull request #1934 from jumpserver/dev
v2.24.0-rc1
2022-07-14 18:27:51 +08:00
Jiangjie.Bai
6f25d93909 Merge pull request #1931 from jumpserver/dev
v2.24.0-rc1
2022-07-14 17:51:58 +08:00
Jiangjie.Bai
46461ec324 Merge pull request #1925 from jumpserver/dev
v2.24.0-rc1
2022-07-14 15:12:15 +08:00
55 changed files with 552 additions and 331 deletions

View File

@@ -1,4 +1,4 @@
FROM jumpserver/lina-base:20251030_071727 AS stage-build
FROM jumpserver/lina-base:20251105_092554 AS stage-build
ARG VERSION
ENV VERSION=$VERSION

View File

@@ -61,7 +61,7 @@
"path-to-regexp": "3.3.0",
"sortablejs": "^1.15.6",
"v-sanitize": "^0.0.13",
"vue": "2.6.10",
"vue": "2.7.16",
"vue-codemirror": "4.0.6",
"vue-cookie": "^1.1.4",
"vue-echarts": "^5.0.0-beta.0",
@@ -119,11 +119,11 @@
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-i18n-extract": "^1.1.1",
"vue-template-compiler": "2.6.10",
"vue-template-compiler": "2.7.16",
"webpack": "^4.28.4"
},
"engines": {
"node": ">=8.9",
"node": ">=12",
"npm": ">= 3.0.0"
},
"browserslist": [
@@ -140,5 +140,6 @@
"src/**/*.{js,vue}": [
"eslint --fix"
]
}
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -107,6 +107,10 @@ export default {
this.$emit('add', true)
}
}).catch(error => {
if (error?.response?.data?.code === 'no_valid_assets') {
this.$message.error(error?.response?.data?.detail)
return
}
this.iVisible = true
this.handleResult(null, error)
})

View File

@@ -62,6 +62,7 @@ import Dialog from '@/components/Dialog/index.vue'
import PasswordHistoryDialog from './PasswordHistoryDialog.vue'
import { SecretViewerFormatter } from '@/components/Table/TableFormatters'
import { encryptPassword } from '@/utils/secure'
import { mapGetters } from 'vuex'
export default {
name: 'ShowSecretInfo',
@@ -111,6 +112,9 @@ export default {
}
},
computed: {
...mapGetters({
publicSettings: 'publicSettings'
}),
secretTypeLabel() {
return this.account['secret_type'].label || 'Password'
},
@@ -146,7 +150,11 @@ export default {
})
},
showSecretDialog() {
return this.$axios.get(this.url, { disableFlashErrorMsg: true }).then((res) => {
if (!this.publicSettings.SECURITY_ACCOUNT_SECRET_READ) {
this.$message.warning(this.$tc('AccountSecretReadDisabled'))
return
}
return this.$axios.get(this.url).then((res) => {
this.secretInfo = res
this.sshKeyFingerprint = res?.spec_info?.ssh_key_fingerprint || '-'
this.showSecret = true
@@ -167,54 +175,54 @@ export default {
</script>
<style lang="scss" scoped>
.item-textarea ::v-deep .el-textarea__inner {
height: 110px;
.item-textarea ::v-deep .el-textarea__inner {
height: 110px;
}
.el-form-item {
border-bottom: 1px solid #EBEEF5;
padding: 5px 0;
margin-bottom: 0;
&:last-child {
border-bottom: none;
}
.el-form-item {
border-bottom: 1px solid #EBEEF5;
padding: 5px 0;
margin-bottom: 0;
&:last-child {
border-bottom: none;
}
::v-deep .el-form-item__label {
display: flex;
align-items: center;
justify-content: flex-start;
padding-right: 20px;
line-height: 30px;
word-break: keep-all;
overflow-wrap: break-word;
white-space: normal;
}
::v-deep .el-form-item__content {
line-height: 30px;
pre {
margin: 0;
}
}
::v-deep .el-form-item__label {
display: flex;
align-items: center;
justify-content: flex-start;
padding-right: 20px;
line-height: 30px;
word-break: keep-all;
overflow-wrap: break-word;
white-space: normal;
}
ul {
margin: 0;
}
::v-deep .el-form-item__content {
line-height: 30px;
li {
display: block;
font-size: 13px;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.title {
color: #303133;
font-weight: 500;
pre {
margin: 0;
}
}
}
ul {
margin: 0;
}
li {
display: block;
font-size: 13px;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.title {
color: #303133;
font-weight: 500;
}
}
</style>

View File

@@ -37,8 +37,12 @@ export default {
},
headerActions: {
hasExport: false,
hasImport: false,
hasExport: true,
hasImport: true,
importOptions: {
encryptFields: [''], // 这里不加密 password''只是为了保证数组有值
canImportUpdate: false
},
hasCreate: true,
hasSearch: true,
hasRefresh: true,

View File

@@ -73,28 +73,28 @@ export default {
}
</script>
<style>
.help-dialog.dialog .el-dialog__footer {
<style lang="scss" scoped>
::v-deep .help-dialog.dialog .el-dialog__footer {
border-top: none;
padding: 8px;
}
</style>
<style lang="scss" scoped>
.help-table {
width: 100%;
border-collapse: collapse;
border: 1px solid #dee2e6;
}
&::v-deep th, td {
height: 40px;
padding: 0 8px;
text-align: left;
}
::v-deep .help-table th,
::v-deep .help-table td {
height: 40px;
padding: 0 8px;
text-align: left;
}
&::v-deep .item-td, .item-label {
cursor: pointer;
color: var(--color-primary);
}
::v-deep .help-table .item-td,
::v-deep .help-table .item-label {
cursor: pointer;
color: var(--color-primary);
}
</style>

View File

@@ -223,8 +223,21 @@ export default {
const mapped = {}
Object.entries(errors || {}).forEach(([k, v]) => {
let msg = v
if (Array.isArray(v)) msg = v.join('; ')
else if (typeof v === 'object' && v !== null) msg = JSON.stringify(v)
console.log(k, v)
// v是数组并且数组都是字符串则拼接为字符串
if (Array.isArray(v) && v.every(item => typeof item === 'string')) msg = v.join('; ')
// 处理 [{"port":["请确保该值小于或者等于 65535。"]},{},{}] 这种情况
else if (Array.isArray(v) && v.every(item => _.isPlainObject(item))) {
const subMsg = []
v.forEach((subItem) => {
Object.values(subItem).forEach((subMsgArr) => {
if (Array.isArray(subMsgArr)) {
subMsg.push(...subMsgArr)
}
})
})
msg = subMsg.join(' ')
} else if (typeof v === 'object' && v !== null) msg = JSON.stringify(v)
mapped[k] = String(msg || '')
})
this.serverErrors = mapped

View File

@@ -58,6 +58,7 @@
:import-option="importOption"
:json-data="jsonData"
:url="url"
v-bind="$attrs"
@cancel="cancelUpload"
@finish="closeDialog"
/>
@@ -247,46 +248,46 @@ export default {
</script>
<style lang='scss' scoped>
@import "~@/styles/variables";
@import "~@/styles/variables";
.error-msg {
color: $--color-danger;
.error-msg {
color: $--color-danger;
}
.error-msg.error-results {
background-color: #f3f3f4;
max-height: 200px;
overflow: auto
}
.file-uploader ::v-deep .el-upload {
width: 100%;
//padding-right: 150px;
}
.file-uploader ::v-deep .el-upload-dragger {
width: 100%;
}
.importTableZone {
padding: 0 20px;
.importTable {
overflow: auto;
}
.error-msg.error-results {
background-color: #f3f3f4;
max-height: 200px;
overflow: auto
.tableFilter {
padding-bottom: 10px;
}
}
.file-uploader ::v-deep .el-upload {
width: 100%;
//padding-right: 150px;
}
.importTable ::v-deep .el-dialog__body {
padding-bottom: 20px;
}
.file-uploader ::v-deep .el-upload-dragger {
width: 100%;
}
.importTableZone {
padding: 0 20px;
.importTable {
overflow: auto;
}
.tableFilter {
padding-bottom: 10px;
}
}
.importTable ::v-deep .el-dialog__body {
padding-bottom: 20px;
}
.export-item {
margin-left: 80px;
}
.export-item {
margin-left: 80px;
}
.export-item:first-child {
margin-left: 0;

View File

@@ -97,6 +97,10 @@ export default {
origin: {
type: String,
default: ''
},
encryptFields: {
type: Array,
default: () => []
}
},
data() {
@@ -273,11 +277,15 @@ export default {
}
return columns
},
getEncryptFields() {
const fromProp = Array.isArray(this.encryptFields) && this.encryptFields.length ? this.encryptFields : null
return fromProp || ['password', 'secret', 'private_key']
},
generateTableData(tableTitles, tableData) {
const totalData = []
tableData.forEach(item => {
this.$set(item, '@status', 'pending')
const encryptFields = ['password', 'secret', 'private_key']
const encryptFields = this.getEncryptFields()
for (const field of encryptFields) {
if (item[field]) {
item[field] = encryptPassword(item[field])

View File

@@ -38,6 +38,7 @@
<script>
import { copy, downloadText } from '@/utils/common/index'
import BaseFormatter from '@/components/Table/TableFormatters/base.vue'
import { mapGetters } from 'vuex'
export default {
name: 'SecretViewerFormatter',
@@ -69,6 +70,9 @@ export default {
}
},
computed: {
...mapGetters({
publicSettings: 'publicSettings'
}),
hasShow: function() {
return this.formatterArgs.hasShow
},
@@ -140,6 +144,10 @@ export default {
},
methods: {
async getAccountSecret() {
if (!this.publicSettings.SECURITY_ACCOUNT_SECRET_READ) {
this.$message.warning(this.$tc('AccountSecretReadDisabled'))
return
}
if (this.formatterArgs.secretFrom === 'cellValue' || this.getIt) {
return
}
@@ -178,48 +186,48 @@ export default {
}
</script>
<style lang="scss" scoped>
.content {
display: inline-block;
width: 100%;
.content {
display: inline-block;
width: 100%;
overflow: hidden;
//white-space: nowrap;
text-overflow: ellipsis;
font-size: 13px;
.text {
flex: 1;
display: inline;
margin: 0;
padding: 0;
overflow: hidden;
//white-space: nowrap;
white-space: nowrap;
text-overflow: ellipsis;
}
.action {
font-size: 13px;
cursor: pointer;
margin-left: 1px;
display: inline;
.text {
flex: 1;
display: inline;
margin: 0;
padding: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
&.right {
float: right;
}
.action {
font-size: 13px;
cursor: pointer;
margin-left: 1px;
display: inline;
.fa {
margin-right: 5px;
&.right {
float: right;
}
.fa {
margin-right: 5px;
&:hover {
color: var(--color-primary);
}
&:hover {
color: var(--color-primary);
}
}
}
}
.edit-input ::v-deep input {
border-left: none;
border-right: none;
border-top: none;
height: 30px;
}
.edit-input ::v-deep input {
border-left: none;
border-right: none;
border-top: none;
height: 30px;
}
</style>

View File

@@ -243,10 +243,12 @@ export default {
delete routeFilter.search
}
const asFilterTags = _.cloneDeep(this.filterTags)
this.filterTags = {
...asFilterTags,
...routeFilter
}
setTimeout(() => {
this.filterTags = {
...asFilterTags,
...routeFilter
}
}, 100)
},
getValueLabel(key, value) {
for (const field of this.options) {

View File

@@ -421,12 +421,8 @@ export default {
display: inline-block;
}
.data-z-tree {
::v-deep {
.icon {
width: 10px;
margin-right: 3px;
}
}
.data-z-tree ::v-deep .icon {
width: 10px;
margin-right: 3px;
}
</style>

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free v5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"/></svg>

After

Width:  |  Height:  |  Size: 691 B

View File

@@ -78,6 +78,3 @@ export default {
}
}
</style>
<style lang="scss">
</style>

View File

@@ -65,6 +65,17 @@ export default {
'usingOrgs',
'currentViewRoute'
]),
currentOrgDisplayName() {
const currentOrgId = this.currentOrg?.id
if (!currentOrgId) {
return this.$tc('Select')
}
const matchedOrg = this.usingOrgs.find(item => item.id === currentOrgId)
if (matchedOrg?.name) {
return matchedOrg.name
}
return this.currentOrg.name || this.$tc('Select')
},
orgActionsGroup() {
const orgActions = {
label: this.$t('OrganizationList'),
@@ -110,11 +121,8 @@ export default {
}
},
watch: {
currentOrg: {
handler() {
this.updateWidth()
},
deep: true
currentOrgDisplayName() {
this.updateWidth()
}
},
mounted() {
@@ -133,8 +141,9 @@ export default {
tempSpan.style.fontWeight = 'normal'
tempSpan.style.letterSpacing = 'normal'
// 获取当前组织名称
const orgName = this.currentOrg.name || this.$tc('Select')
// 获取当前组织显示名称
const orgName = this.currentOrgDisplayName
tempSpan.textContent = orgName
document.body.appendChild(tempSpan)

View File

@@ -369,7 +369,7 @@ export default {
}
}
.el-input__prefix .el-input__icon{
.el-input__prefix .el-input__icon {
font-size: 15px;
line-height: 32px;
}
@@ -402,11 +402,9 @@ export default {
}
}
}
</style>
<style lang="scss">
/* 搜索模态框全局样式 */
.search-modal {
::v-deep .search-modal {
&.el-dialog {
position: fixed;
top: 5px;
@@ -427,17 +425,17 @@ export default {
}
}
body .v-modal {
::v-deep body .v-modal {
opacity: 0.3;
}
.search-modal-content {
::v-deep .search-modal-content {
height: 70vh;
display: flex;
flex-direction: column;
}
.search-input-wrapper {
::v-deep .search-input-wrapper {
padding: 20px;
border-bottom: 1px solid #f0f0f0;
// background: #fff;
@@ -451,7 +449,7 @@ body .v-modal {
}
}
.search-results {
::v-deep .search-results {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
@@ -476,7 +474,7 @@ body .v-modal {
}
}
.section-title {
::v-deep .section-title {
padding: 12px 24px 6px;
font-size: 12px;
line-height: 1.5;
@@ -505,12 +503,12 @@ body .v-modal {
.clear-icon {
font-size: 14px;
color: red;
color: red;
}
}
}
.list {
::v-deep .list {
list-style: none;
margin: 0;
padding: 0;
@@ -581,15 +579,15 @@ body .v-modal {
}
}
.loading,
.empty {
::v-deep .loading,
::v-deep .empty {
padding: 32px 24px;
color: #909399;
text-align: center;
font-size: 14px;
}
.section.placeholder {
::v-deep .section.placeholder {
padding: 32px 24px;
.placeholder-content {
@@ -637,4 +635,3 @@ body .v-modal {
}
}
</style>

View File

@@ -167,8 +167,7 @@ export default {
}
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.page.no-title {
::v-deep {
.page-submenu .el-tabs__header {
@@ -199,6 +198,14 @@ export default {
opacity: 1;
}
}
&.is-disabled {
cursor: not-allowed;
&:hover {
color: #c0c4cc;
}
}
}
.el-tabs__nav-next {

View File

@@ -276,10 +276,8 @@ export default {
}
}
}
</style>
<style lang="scss">
//reset element css of el-icon-close
// reset element css of el-icon-close
.tags-view-wrapper {
.tags-view-item {
.el-icon-close {

View File

@@ -123,6 +123,16 @@ export default {
permissions: ['authentication.view_connectiontoken']
}
},
{
path: '/profile/access-token',
component: () => import('@/views/profile/AccessToken'),
name: 'AccessToken',
meta: {
title: i18n.t('AccessToken'),
icon: 'access-token',
permissions: ['oauth2_provider.view_accesstoken']
}
},
{
path: '/profile/preferences',
name: 'Preferences',

View File

@@ -149,6 +149,11 @@ export function getErrorResponseMsg(error) {
.join('; ')
} else if (typeof data === 'string') {
return data
} else if (_.isPlainObject(data)) {
return Object.values(data)
.map(item => getErrorResponseMsg(item))
.filter(i => i)
.join('; ')
} else {
msg = error.toString()
}

View File

@@ -144,11 +144,6 @@ export default {
deep: true
}
},
mounted() {
if (!this.$store.getters.hasValidLicense) {
delete this.fields[3]
}
},
methods: {
handleAfterGetRemoteMeta(meta) {
const needSetOptionFields = [

View File

@@ -137,8 +137,8 @@ export default {
getUrlQuery: true,
options: [
{
label: this.$t('TaskID'),
value: 'automation_id'
label: this.$t('ID'),
value: 'id'
},
{
label: this.$t('DisplayName'),

View File

@@ -43,7 +43,9 @@ export default {
asset: ''
},
treeSetting: {
showMenu: true,
showMenu: (node) => {
return node?.meta?.type === 'asset'
},
showRefresh: true,
showSearch: true,
showAssets: true,
@@ -55,7 +57,7 @@ export default {
menu: [
{
id: 'check',
name: this.$t('Check'),
name: this.$t('RiskDetection'),
icon: 'scan',
callback: (node) => {
vm.detectDialog.asset = node.id

View File

@@ -6,7 +6,6 @@
class="risk-review-drawer"
destroy-on-close
direction="rtl"
style="z-index: 999"
>
<div class="drawer-container">
<div class="drawer-body">

View File

@@ -61,8 +61,11 @@ export default {
},
callbacks: {
change: function(val) {
const category = this.object.category.value
const normalizedCategory =
category === 'ds' ? 'directorie' : category
this.$axios.patch(
`/api/v1/assets/assets/${this.object.id}/`,
`/api/v1/assets/${normalizedCategory}s/${this.object.id}/`,
{ is_active: val }
).then(res => {
this.$message.success(this.$tc('UpdateSuccessMsg'))

View File

@@ -77,7 +77,7 @@ export default {
[this.$tc('Platform'), 'platform'],
[this.$tc('Node'), 'node'],
[this.$tc('Protocol'), 'protocols'],
[this.$tc('Region'), 'region_id']
[this.$tc('Region'), 'region_name']
],
data: []
},
@@ -124,7 +124,7 @@ export default {
this.ws.onmessage = e => {
const data = JSON.parse(e.data)
if (data.action === 'sync_region') {
this.addRegion(data.region_id)
this.addRegion(data.id, data.name)
} else if (data.action === 'import') {
data['@status'] = 'pending'
this.$refs.importTable.addTableItem(data)
@@ -140,10 +140,10 @@ export default {
}
}
},
addRegion(region) {
if (!this.alreadySync.includes(region)) {
this.alreadySync.push(region)
this.tip = `${this.$t('SyncRegion')}: ${this.alreadySync.at(-1)}`
addRegion(regionId, regionName) {
if (!this.alreadySync.includes(regionId)) {
this.alreadySync.push(regionId)
this.tip = `${this.$t('SyncRegion')}: ${regionName}`
}
},
showResult() {

View File

@@ -17,6 +17,8 @@ export const ucloud = 'ucloud'
export const volcengine = 'volcengine'
export const ctyun = 'ctyun'
export const qingcloud_private = 'qingcloud_private'
export const huaweicloud_private = 'huaweicloud_private'
export const ctyun_private = 'ctyun_private'
@@ -46,7 +48,8 @@ export const publicHostProviders = [
gcp,
ucloud,
volcengine,
smartx
smartx,
ctyun
]
export const publicDBProviders = [aliyun]
@@ -141,6 +144,12 @@ export const ACCOUNT_PROVIDER_ATTRS_MAP = {
attrs: ['access_key_id', 'access_key_secret'],
image: require('@/assets/img/cloud/volcengine.svg')
},
[ctyun]: {
name: ctyun,
title: i18n.t('CTYun'),
attrs: ['access_key_id', 'access_key_secret', 'project_id'],
image: require('@/assets/img/cloud/state.svg')
},
[vmware]: {
name: vmware,
title: 'VMware',

View File

@@ -143,7 +143,20 @@ export default {
disabled: !this.canEdit
},
callbacks: Object.freeze({
click: () => {
click: async () => {
try {
await this.$confirm(
this.$t('overwriteProtocolsAndPortsMsg'),
this.$t('Confirm'),
{
confirmButtonText: this.$t('Confirm'),
cancelButtonText: this.$t('Cancel'),
type: 'warning'
}
)
} catch (e) {
return
}
const data = { platform_id: this.object.id }
this.$axios.post(
'/api/v1/assets/assets/sync-platform-protocols/', data).then(res => {

View File

@@ -125,17 +125,21 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
/* 修复input 背景不协调 和光标变色 */
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
$bg:#283443;
$light_gray:#fff;
$cursor: #fff;
$input-bg: #283443;
$input-light-gray: #fff;
$input-cursor: #fff;
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
$login-bg: #2d3a4b;
$login-dark-gray: #889aa4;
$login-light-gray: #eee;
@supports (-webkit-mask: none) and (not (cater-color: $input-cursor)) {
.login-container .el-input input {
color: $cursor;
color: $input-cursor;
}
}
@@ -147,17 +151,17 @@ $cursor: #fff;
input {
background: transparent;
border: 0px;
border: 0;
-webkit-appearance: none;
border-radius: 0px;
border-radius: 0;
padding: 12px 5px 12px 15px;
color: $light_gray;
color: $input-light-gray;
height: 47px;
caret-color: $cursor;
caret-color: $input-cursor;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: $cursor !important;
box-shadow: 0 0 0 1000px $input-bg inset !important;
-webkit-text-fill-color: $input-cursor !important;
}
}
}
@@ -169,17 +173,11 @@ $cursor: #fff;
color: #454545;
}
}
</style>
<style lang="scss" scoped>
$bg:#2d3a4b;
$dark_gray:#889aa4;
$light_gray:#eee;
.login-container {
min-height: 100%;
width: 100%;
background-color: $bg;
background-color: $login-bg;
overflow: hidden;
.login-form {
@@ -205,7 +203,7 @@ $light_gray:#eee;
.svg-container {
padding: 6px 5px 6px 15px;
color: $dark_gray;
color: $login-dark-gray;
vertical-align: middle;
width: 30px;
display: inline-block;
@@ -216,7 +214,7 @@ $light_gray:#eee;
.title {
font-size: 26px;
color: $light_gray;
color: $login-light-gray;
margin: 0px auto 40px auto;
text-align: center;
font-weight: bold;
@@ -228,7 +226,7 @@ $light_gray:#eee;
right: 10px;
top: 7px;
font-size: 16px;
color: $dark_gray;
color: $login-dark-gray;
cursor: pointer;
user-select: none;
}

View File

@@ -515,6 +515,8 @@ export default {
this.setBtn()
this.selectAssets = assets
this.selectNodes = nodes
}).catch(() => {
this.lastRequestPayload = null
})
},
viewConfirmRunAssets() {
@@ -525,8 +527,8 @@ export default {
.then(() => {
this.xterm.write(
'\x1b[31m' +
this.$tc('StopLogOutput').replace('currentTaskId', this.currentTaskId) +
'\x1b[0m'
this.$tc('StopLogOutput').replace('currentTaskId', this.currentTaskId) +
'\x1b[0m'
)
this.xterm.write(this.wrapperError(''))
this.getTaskStatus()

View File

@@ -67,28 +67,28 @@ export default {
}
</script>
<style>
.help-dialog.dialog .el-dialog__footer {
<style lang="scss" scoped>
::v-deep .help-dialog.dialog .el-dialog__footer {
border-top: none;
padding: 8px;
}
</style>
<style lang="scss" scoped>
.help-table {
width: 100%;
border-collapse: collapse;
border: 1px solid #dee2e6;
}
&::v-deep th, td {
height: 40px;
padding: 0 8px;
text-align: left;
}
::v-deep .help-table th,
::v-deep .help-table td {
height: 40px;
padding: 0 8px;
text-align: left;
}
&::v-deep .item-td, .item-label {
cursor: pointer;
color: var(--color-primary);
}
::v-deep .help-table .item-td,
::v-deep .help-table .item-label {
cursor: pointer;
color: var(--color-primary);
}
</style>

View File

@@ -1,66 +1,72 @@
<template>
<TwoCol>
<template>
<AutoDetailCard
:excludes="excludes"
:fields="detailFields"
:object="object"
:url="url"
/>
<AutoDetailCard :excludes="excludes" :fields="detailFields" :object="object" :url="url" />
</template>
<template v-if="hasSummary" #right class="detail-right-quick-actions">
<IBox
v-if="object.summary.ok"
:title="`${$tc('SuccessAsset')} (${object.summary.ok.length})` "
:title="`${$tc('SuccessAsset')} (${object.summary.ok.length})`"
type="success"
>
<el-collapse>
<el-collapse-item
v-for="(item,index) in object.summary.ok"
v-for="(item, index) in object.summary.ok"
:key="index"
:name="index"
:title="item"
disabled
/>
>
<template #title>
<el-tooltip :content="item" placement="top" class="text-overflow">
<span>{{ item }}</span>
</el-tooltip>
</template>
</el-collapse-item>
</el-collapse>
</IBox>
<IBox
v-if="object.summary.excludes"
:title="`${$tc('ExcludeAsset')} (${Object.keys(object.summary.excludes).length})` "
:title="`${$tc('ExcludeAsset')} (${Object.keys(object.summary.excludes).length})`"
type="warning"
>
<el-collapse>
<el-collapse-item
v-for="(val,key,index) in object.summary.excludes"
v-for="(val, key, index) in object.summary.excludes"
:key="index"
:name="index"
:title="key"
>
<template #title>
<el-tooltip :content="key" placement="top" class="text-overflow">
<span>{{ key }}</span>
</el-tooltip>
</template>
<div>{{ $tc('Reason') }}: {{ val }}</div>
</el-collapse-item>
</el-collapse>
</IBox>
<IBox
v-if="object.summary.failures"
:title="`${$tc('FailedAsset')} (${Object.keys(Object.assign(object.summary.failures,object.summary.dark)).length})` "
:title="`${$tc('FailedAsset')} (${Object.keys(Object.assign(object.summary.failures, object.summary.dark)).length})`"
type="danger"
>
<el-collapse>
<el-collapse-item
v-for="(val,key,index) in Object.assign(object.summary.failures,object.summary.dark)"
v-for="(val, key, index) in Object.assign(object.summary.failures, object.summary.dark)"
:key="index"
:name="index"
:title="key"
>
<template #title>
<el-tooltip :content="key" placement="top" class="text-overflow">
<span>{{ key }}</span>
</el-tooltip>
</template>
<div>{{ $tc('Reason') }}: {{ val }}</div>
</el-collapse-item>
</el-collapse>
</IBox>
<IBox
v-if="object.summary.error"
:title="$tc('SystemError') "
type="danger"
>
<IBox v-if="object.summary.error" :title="$tc('SystemError')" type="danger">
{{ object.summary.error }}
</IBox>
</template>
@@ -86,11 +92,10 @@ export default {
},
data() {
return {
excludes: [
'job', 'parameters', 'summary', 'task_id', 'timedelta'
],
excludes: ['job', 'parameters', 'summary', 'task_id', 'timedelta'],
detailFields: [
'task_id', 'time_cost',
'task_id',
'time_cost',
{
key: this.$t('IsFinished'),
value: this.object.is_finished ? this.$t('Yes') : this.$t('No')
@@ -99,8 +104,12 @@ export default {
key: this.$t('IsSuccess'),
value: this.object.is_success ? this.$t('Yes') : this.$t('No')
},
'job_type', 'material', 'org_name',
'date_start', 'date_finished', 'date_created'
'job_type',
'material',
'org_name',
'date_start',
'date_finished',
'date_created'
],
url: `/api/v1/ops/job-executions/${this.object.id}/`
}

View File

@@ -408,7 +408,6 @@ export default {
createJob(data).then(res => {
this.progressLength = 0
this.executionInfo.timeCost = 0
this.showProgress = true
this.speedText = ''
const form = new FormData()
const start = Date.now()
@@ -436,13 +435,13 @@ export default {
}
}
}).then(res => {
this.showProgress = true
this.executionInfo.status = 'running'
this.currentTaskId = res.task_id
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
this.setCostTimeInterval()
this.writeExecutionOutput()
}).catch((error) => {
this.$message.error(this.$tc('Error'), error)
}).catch(() => {
this.execute_stop()
})
})

View File

@@ -224,11 +224,12 @@ export default {
title: this.$t('ExecuteAfterSaving'),
callback: (value, form, btn) => {
form.value.run_after_save = true
const parameters = form.value.variable.reduce((acc, item) => {
acc[item.var_name] = item.default_value || ''
return acc
}, {})
form.value['parameters'] = parameters
if (form.value?.variable) {
form.value['parameters'] = form.value.variable.reduce((acc, item) => {
acc[item.var_name] = item.default_value || ''
return acc
}, {})
}
this.submitForm(form, btn)
}
}

View File

@@ -110,6 +110,8 @@ export default {
type: 'input',
component: AccountFormatter,
el: {
enableExcludeAccounts: true,
enableNoneAccount: true,
assets: [],
nodes: []
},

View File

@@ -3,7 +3,7 @@
<el-form-item>
<el-radio-group v-model="realRadioSelected" @input="handleRadioChanged">
<el-radio
v-for="(i) in realChoices"
v-for="(i) in iRealChoices"
:key="i.label"
:disabled="i.disabled"
:label="i.value"
@@ -125,6 +125,14 @@ export default {
type: Boolean,
default: true
},
enableNoneAccount: {
type: Boolean,
default: false
},
enableExcludeAccounts: {
type: Boolean,
default: false
},
addTemplateHelpText: {
type: String,
default() {
@@ -185,6 +193,18 @@ export default {
computed: {
virtualAccount() {
return virtualAccount
},
iRealChoices: {
get() {
let choices = this.realChoices.slice()
if (!this.enableNoneAccount) {
choices = choices.filter(i => i.value !== NoneAccount)
}
if (!this.enableExcludeAccounts) {
choices = choices.filter(i => i.value !== ExcludeAccount)
}
return choices
}
}
},
watch: {

View File

@@ -8,7 +8,6 @@ export const UserAssetPermissionListPageSearchConfigOptions = [
{ label: i18n.t('UserGroups'), value: 'user_group' },
{ label: i18n.t('AssetName'), value: 'asset_name' },
{ label: i18n.t('AssetAddress'), value: 'address' },
{ label: i18n.t('Account'), value: 'accounts' },
{
label: i18n.t('Valid'),
value: 'is_valid',

View File

@@ -0,0 +1,77 @@
<template>
<GenericListPage
ref="GenericListTable"
:header-actions="headerActions"
:help-tip="helpMessage"
:table-config="tableConfig"
/>
</template>
<script>
import { GenericListPage } from '@/layout/components'
export default {
components: {
GenericListPage
},
data() {
const ajaxUrl = '/api/v1/authentication/access-tokens/'
return {
helpMessage: this.$t('AccessTokenTip'),
tableConfig: {
hasSelection: false,
url: ajaxUrl,
columns: [
'token_preview', 'scope', 'is_valid', 'expires', 'updated', 'created', 'actions'
],
columnsMeta: {
actions: {
prop: '',
formatterArgs: {
hasUpdate: false,
hasClone: false,
hasDelete: false,
extraActions: [
{
name: 'Revoke',
title: this.$t('Revoke'),
can: ({ row }) => this.$hasPerm('oauth2_provider.delete_accesstoken'),
type: 'info',
callback: function({ row }) {
this.$axios.delete(`${ajaxUrl}${row.id}/revoke/`,
).then(res => {
this.reloadTable()
this.$message.success(this.$tc('UpdateSuccessMsg'))
}).catch(error => {
this.$message.error(this.$tc('UpdateErrorMsg' + ' ' + error))
})
}.bind(this)
}
]
}
}
}
},
headerActions: {
hasLeftActions: false,
hasSearch: false,
hasRightActions: true,
hasRefresh: true,
hasExport: false,
hasImport: false,
hasBulkDelete: false,
hasCreate: false,
extraActions: []
}
}
},
methods: {
reloadTable() {
this.$refs.GenericListTable.reloadTable()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -32,6 +32,22 @@ export default {
}
}
},
computed: {
passwordMenuDisabled() {
return this.$store.state.users.profile.source.value !== 'local'
}
},
watch: {
passwordMenuDisabled: {
immediate: true,
handler(disabled) {
this.config.submenu = this.getSubmenu()
if (disabled && this.config.activeMenu === 'Password') {
this.config.activeMenu = 'SSHKeyList'
}
}
}
},
methods: {
getSubmenu() {
return [

View File

@@ -1,36 +1,41 @@
<template>
<Account
:url="url"
:columns-meta="columnsMeta"
:extra-quick-actions="quickActions"
:object.sync="object"
/>
<TwoCol>
<template>
<Account :url="url" :columns-meta="columnsMeta" :object.sync="object" />
</template>
<template #right>
<QuickActions :actions="quickActions" type="primary" />
</template>
</TwoCol>
</template>
<script>
import { QuickActions } from '@/components'
import Account from '@/views/assets/Asset/AssetDetail/Account'
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
export default {
name: 'Accounts',
components: {
Account
TwoCol,
Account,
QuickActions
},
props: {
object: {
type: Object,
default: () => {
}
default: () => {}
}
},
data() {
return {
columnsMeta: {
name: {
formatter: (row) => <span>{row.name}</span>
formatter: row => <span>{row.name}</span>
},
asset: {
label: this.$t('Asset'),
formatter: (row) => <span>{row.asset.name}</span>
formatter: row => <span>{row.asset.name}</span>
}
},
quickActions: [

View File

@@ -29,7 +29,7 @@ export default {
'CAS_RENAME_ATTRIBUTES'
]],
[this.$t('Other'), [
'CAS_ORG_IDS', 'CAS_CREATE_USER', 'CAS_LOGOUT_COMPLETELY'
'CAS_ORG_IDS', 'CAS_LOGOUT_COMPLETELY'
]]
],
fieldsMeta: {

View File

@@ -222,13 +222,11 @@ export default {
}
</script>
<style>
.el-select-dropdown.select-org-dropdown {
<style lang="scss" scoped>
::v-deep .el-select-dropdown.select-org-dropdown {
max-width: 300px !important;
}
</style>
<style lang="scss" scoped>
.org-select {
float: left;
width: 300px;
@@ -245,5 +243,4 @@ export default {
width: 180px !important;
}
}
</style>

View File

@@ -53,7 +53,10 @@ export default {
'GPT_BASE_URL',
'GPT_API_KEY',
'GPT_PROXY',
'GPT_MODEL'
'GPT_MODEL',
'IS_CUSTOM_MODEL',
'CUSTOM_GPT_MODEL',
'CUSTOM_DEEPSEEK_MODEL'
],
fieldsMeta: {
CHAT_AI_TYPE: {
@@ -115,6 +118,16 @@ export default {
},
CHAT_AI_EMBED_URL: {
hidden: (formValue) => formValue.CHAT_AI_METHOD !== 'embed'
},
CUSTOM_GPT_MODEL: {
hidden: (formValue) => {
return formValue.CHAT_AI_METHOD !== 'api' || formValue.CHAT_AI_TYPE !== 'gpt' || !formValue.IS_CUSTOM_MODEL
}
},
CUSTOM_DEEPSEEK_MODEL: {
hidden: (formValue) => {
return formValue.CHAT_AI_METHOD !== 'api' || formValue.CHAT_AI_TYPE !== 'deep-seek' || !formValue.IS_CUSTOM_MODEL
}
}
},
submitMethod() {

View File

@@ -73,28 +73,28 @@ export default {
}
</script>
<style>
.help-dialog.dialog .el-dialog__footer {
<style lang="scss" scoped>
::v-deep .help-dialog.dialog .el-dialog__footer {
border-top: none;
padding: 8px;
}
</style>
<style lang="scss" scoped>
.help-table {
width: 100%;
border-collapse: collapse;
border: 1px solid #dee2e6;
}
&::v-deep th, td {
height: 40px;
padding: 0 8px;
text-align: left;
}
::v-deep .help-table th,
::v-deep .help-table td {
height: 40px;
padding: 0 8px;
text-align: left;
}
&::v-deep .item-td, .item-label {
cursor: pointer;
color: var(--color-primary);
}
::v-deep .help-table .item-td,
::v-deep .help-table .item-label {
cursor: pointer;
color: var(--color-primary);
}
</style>

View File

@@ -219,11 +219,12 @@ export default {
}
</script>
<style lang="scss">
.el-popover.el-popper.monitor-popover {
<style lang="scss" scoped>
:global(.el-popover.el-popper.monitor-popover) {
ul {
padding-left: 15px;
margin: 0;
li {
line-height: 24px;
color: var(--color-primary);
@@ -231,19 +232,19 @@ export default {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
&:hover {
filter: opacity(65%)!important;
filter: opacity(65%) !important;
}
}
}
}
</style>
<style lang="less" scoped>
.echarts {
width: 100%;
height: 150px;
}
.name {
display: inline-block;
margin-bottom: 8px;
@@ -256,6 +257,7 @@ export default {
justify-content: space-between;
font-size: 14px;
margin-bottom: 8px;
.num {
margin-left: 2px;
cursor: pointer;
@@ -279,9 +281,9 @@ export default {
line-height: 20px;
padding: 2px 0;
color: #fff;
-webkit-transition: width .6s ease;
-o-transition: width .6s ease;
transition: width .6s ease;
-webkit-transition: width 0.6s ease;
-o-transition: width 0.6s ease;
transition: width 0.6s ease;
overflow: hidden;
}
@@ -292,9 +294,11 @@ export default {
margin-right: 5px;
border-radius: 4px;
background-color: currentColor;
&:hover {
transform: scale(1.2);
}
&:last-child {
margin-right: 0;
}
@@ -303,6 +307,7 @@ export default {
.session {
margin-top: 13px;
border-left: 1px solid #f3f3f3;
.session-title {
margin-bottom: 8px;
color: #a3a3a4;

View File

@@ -189,10 +189,6 @@ export default {
value: 'relevant_asset',
label: this.$t('RelevantAsset')
},
{
value: 'relevant_system_user',
label: this.$t('RelevantCommand')
},
{
value: 'relevant_command',
label: this.$t('ApplyRunCommand')

View File

@@ -147,7 +147,7 @@ export default {
this.loading = true
const url = `/api/v1/tickets/comments/?ticket_id=${this.object.id}`
this.$axios.get(url).then(res => {
this.comments = res.results
this.comments = res
}).catch(err => {
this.$message.error(err)
}).finally(() => {

View File

@@ -115,14 +115,12 @@ export default {
}
</script>
<style>
.acceptance .el-message-box__content {
<style lang="scss" scoped>
::v-deep .acceptance .el-message-box__content {
overflow-y: auto;
max-height: 400px;
}
</style>
<style lang='scss' scoped>
.box {
margin-bottom: 15px;
}

View File

@@ -161,8 +161,7 @@ module.exports = {
target: process.env.VUE_APP_CORE_HOST || 'http://127.0.0.1:8080',
changeOrigin: true
}
},
after: require('./mock/mock-server.js')
}
},
css: {},
configureWebpack: {

View File

@@ -6916,7 +6916,7 @@ hasown@^2.0.0, hasown@^2.0.2:
dependencies:
function-bind "^1.1.2"
he@1.2.x, he@^1.1.0, he@^1.1.1:
he@1.2.x, he@^1.1.1, he@^1.2.0:
version "1.2.0"
resolved "https://registry.npmmirror.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
@@ -14423,32 +14423,27 @@ vue-style-loader@^4.1.0:
hash-sum "^1.0.2"
loader-utils "^1.0.2"
vue-template-compiler@2.6.10:
version "2.6.10"
resolved "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz#323b4f3495f04faa3503337a82f5d6507799c9cc"
integrity sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==
vue-template-compiler@2.7.16:
version "2.7.16"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz#c81b2d47753264c77ac03b9966a46637482bb03b"
integrity sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==
dependencies:
de-indent "^1.0.2"
he "^1.1.0"
he "^1.2.0"
vue-template-es2015-compiler@^1.6.0, vue-template-es2015-compiler@^1.9.0:
version "1.9.1"
resolved "https://registry.npmmirror.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
vue@2.6.10:
version "2.6.10"
resolved "https://registry.npmmirror.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==
vue@2.6.11:
version "2.6.11"
resolved "https://registry.npmmirror.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==
vue@^2.2.6:
vue@2.7.16, vue@^2.2.6:
version "2.7.16"
resolved "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz#98c60de9def99c0e3da8dae59b304ead43b967c9"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.7.16.tgz#98c60de9def99c0e3da8dae59b304ead43b967c9"
integrity sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==
dependencies:
"@vue/compiler-sfc" "2.7.16"