mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-08 19:02:40 +00:00
Compare commits
21 Commits
pr@dev@fix
...
v2.25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8df1753101 | ||
|
|
faafa1a7b6 | ||
|
|
9d3874a61c | ||
|
|
d222ca0684 | ||
|
|
40655ca239 | ||
|
|
ec28702181 | ||
|
|
4bb4d3fbf4 | ||
|
|
a34fff2caa | ||
|
|
a9eb32de6c | ||
|
|
776090d6ba | ||
|
|
3a37952288 | ||
|
|
62b8fc0e3b | ||
|
|
b2028869cb | ||
|
|
5277a725f8 | ||
|
|
f137788c1a | ||
|
|
f7d17c8de7 | ||
|
|
feea70b0be | ||
|
|
04696ef3d6 | ||
|
|
1731f4f788 | ||
|
|
6f25d93909 | ||
|
|
46461ec324 |
@@ -38,7 +38,7 @@
|
||||
"krry-transfer": "^1.7.3",
|
||||
"less": "^3.10.3",
|
||||
"less-loader": "^5.0.0",
|
||||
"lodash": "^4.17.15",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.frompairs": "^4.0.1",
|
||||
"lodash.get": "^4.4.2",
|
||||
@@ -50,8 +50,8 @@
|
||||
"lodash.set": "^4.3.2",
|
||||
"lodash.topairs": "^4.3.0",
|
||||
"lodash.values": "^4.3.0",
|
||||
"moment": "^2.29.1",
|
||||
"moment-parseformat": "^3.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"moment-parseformat": "^4.0.0",
|
||||
"normalize.css": "7.0.0",
|
||||
"npm": "^7.8.0",
|
||||
"nprogress": "0.2.0",
|
||||
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
const reader = new FileReader()
|
||||
reader.onload = function() {
|
||||
let result = this.result
|
||||
if (vm.toFormat === 'object') {
|
||||
if (vm.toFormat === 'object' && vm.fileName.endsWith('.json')) {
|
||||
result = JSON.parse(result)
|
||||
}
|
||||
vm.$emit('input', result)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"name": "Name",
|
||||
"username": "Username",
|
||||
"ip_group": "IP group",
|
||||
"ip_group_help_text": "IP segments should be separated by comma, with * indicating a match all. Such as: 192.168.10.1, 192.168.1.0/24, 10.1.1.1-10.1.1.20, 2001:db8:2de::e13, 2001:db8:1a:1110::/64",
|
||||
"action": "Action",
|
||||
"priority": "Priority",
|
||||
"date_created": "Date created",
|
||||
@@ -424,6 +425,7 @@
|
||||
"downloadImportTemplateMsg": "Download import template",
|
||||
"downloadUpdateTemplateMsg": "Download update template",
|
||||
"onlyCSVFilesTips": "Only csv supported",
|
||||
"ImportFail": "Import fail",
|
||||
"updateSuccessMsg": "Update success, total: {count}",
|
||||
"dragUploadFileInfo": "Drag file here or click here to upload",
|
||||
"uploadCsvLth10MHelpText": "csv/xlsx files with a size less than 10M",
|
||||
@@ -1303,6 +1305,10 @@
|
||||
"Receivers": "Receivers",
|
||||
"Subscription": "Subscription",
|
||||
"ChangeReceiver": "Change Receivers",
|
||||
"Constituency": "Available Fields",
|
||||
"Selected": "Selected Fields",
|
||||
"PrePage": "Previous",
|
||||
"NextPage": "Next",
|
||||
"Subject": "Subject",
|
||||
"Message": "Message",
|
||||
"DeliveryTime": "Delivery time",
|
||||
|
||||
@@ -435,6 +435,7 @@
|
||||
"downloadImportTemplateMsg": "作成テンプレートのダウンロード",
|
||||
"downloadUpdateTemplateMsg": "更新テンプレートのダウンロード",
|
||||
"onlyCSVFilesTips": "Csvファイルのインポートのみサポート",
|
||||
"ImportFail": "インポートに失敗しました",
|
||||
"updateSuccessMsg": "更新のインポートに成功しました。合計:{count}",
|
||||
"uploadCsvLth10MHelpText": "Csv/xlsxのみアップロードでき、10m以下です",
|
||||
"dragUploadFileInfo": "ここにファイルをドラッグするか、ここをクリックしてアップロードしてください",
|
||||
@@ -1343,6 +1344,10 @@
|
||||
"Receivers": "受取人",
|
||||
"Subscription": "メッセージ購読",
|
||||
"ChangeReceiver": "メッセージ受信者の修正",
|
||||
"Constituency": "未選択",
|
||||
"Selected": "選択済み",
|
||||
"PrePage": "前のページ",
|
||||
"NextPage": "次のページ",
|
||||
"Subject": "テーマ",
|
||||
"Message": "メッセージ",
|
||||
"DeliveryTime": "送信時間",
|
||||
|
||||
@@ -435,6 +435,7 @@
|
||||
"downloadImportTemplateMsg": "下载创建模板",
|
||||
"downloadUpdateTemplateMsg": "下载更新模板",
|
||||
"onlyCSVFilesTips": "仅支持csv文件导入",
|
||||
"ImportFail": "导入失败",
|
||||
"updateSuccessMsg": "导入更新成功,总共:{count}",
|
||||
"uploadCsvLth10MHelpText": "只能上传 csv/xlsx, 且不超过 10M",
|
||||
"dragUploadFileInfo": "将文件拖到此处,或点击此处上传",
|
||||
@@ -1344,6 +1345,10 @@
|
||||
"Receivers": "接收人",
|
||||
"Subscription": "消息订阅",
|
||||
"ChangeReceiver": "修改消息接收人",
|
||||
"Constituency": "待选区",
|
||||
"Selected": "已选中",
|
||||
"PrePage": "上一页",
|
||||
"NextPage": "下一页",
|
||||
"Subject": "主题",
|
||||
"Message": "消息",
|
||||
"DeliveryTime": "发送时间",
|
||||
@@ -1509,8 +1514,8 @@
|
||||
"DeleteReleasedAssets": "删除已释放资产"
|
||||
},
|
||||
"Template": {
|
||||
"Template": "模版管理"
|
||||
},
|
||||
"Template": "模版管理"
|
||||
},
|
||||
"Corporation": "公司",
|
||||
"Edition": "版本",
|
||||
"Execute": "执行",
|
||||
|
||||
@@ -233,6 +233,10 @@ export default {
|
||||
encryptedFields: {
|
||||
type: Array,
|
||||
default: () => ['password', 'token', 'private_key']
|
||||
},
|
||||
needGetObjectDetail: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -312,7 +316,7 @@ export default {
|
||||
},
|
||||
async getFormValue() {
|
||||
const cloneFrom = this.$route.query['clone_from']
|
||||
if (!this.isUpdateMethod() && !cloneFrom) {
|
||||
if ((!this.isUpdateMethod() && !cloneFrom) || !this.needGetObjectDetail) {
|
||||
return Object.assign(this.form, this.initial)
|
||||
}
|
||||
let object = this.object
|
||||
|
||||
@@ -97,6 +97,7 @@ export default {
|
||||
getDefaultFormSetting() {
|
||||
const vm = this
|
||||
return {
|
||||
needGetObjectDetail: false,
|
||||
submitMethod: () => 'patch',
|
||||
cleanFormValue: (value) => {
|
||||
const filterValue = {}
|
||||
|
||||
@@ -91,13 +91,17 @@ export default {
|
||||
const attrs = values.attrs
|
||||
for (const item of encryptedFields) {
|
||||
const value = attrs[item]
|
||||
if (value) {
|
||||
attrs[item] = encryptPassword(value)
|
||||
if (!value) {
|
||||
continue
|
||||
}
|
||||
attrs[item] = encryptPassword(value)
|
||||
}
|
||||
const toListFields = ['ip_group']
|
||||
for (const item of toListFields) {
|
||||
let value = attrs[item]
|
||||
if (!value) {
|
||||
continue
|
||||
}
|
||||
value = value?.split(',') || []
|
||||
value = value.filter((value, index) => { if (value) return true })
|
||||
attrs[item] = value
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
import ListTable from '@/components/ListTable'
|
||||
import Dialog from '@/components/Dialog'
|
||||
import { importLdapUser, refreshLdapUserCache, startLdapUserCache } from '@/api/settings'
|
||||
import { getErrorResponseMsg } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
name: 'ImportDialog',
|
||||
@@ -103,7 +104,12 @@ export default {
|
||||
importLdapUser(data).then(res => {
|
||||
this.$message.success(res.msg)
|
||||
// eslint-disable-next-line no-return-assign
|
||||
}).finally(() => this.dialogLdapUserImportLoginStatus = false)
|
||||
}).catch(error => {
|
||||
const errorMessage = getErrorResponseMsg(error) || this.$t('common.imExport.ImportFail')
|
||||
this.$message.error(errorMessage)
|
||||
}).finally(() => {
|
||||
this.dialogLdapUserImportLoginStatus = false
|
||||
})
|
||||
}
|
||||
},
|
||||
importAllUserClick() {
|
||||
|
||||
@@ -67,6 +67,8 @@ export default {
|
||||
return results
|
||||
},
|
||||
selectedData: [],
|
||||
boxTitle: [this.$t('notifications.Constituency'), this.$t('notifications.Selected')],
|
||||
pageTexts: [this.$t('notifications.PrePage'), this.$t('notifications.NextPage')],
|
||||
showClearBtn: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,8 @@ export default {
|
||||
InviteLoading: false,
|
||||
formConfig: {
|
||||
url: '/api/v1/users/users/invite/',
|
||||
method: 'post',
|
||||
getUrl: () => '/api/v1/users/users/invite/',
|
||||
submitMethod: () => 'post',
|
||||
hasReset: false,
|
||||
hasSaveContinue: false,
|
||||
createSuccessMsg: this.$t('users.InviteSuccess'),
|
||||
|
||||
17
yarn.lock
17
yarn.lock
@@ -6883,7 +6883,7 @@ lodash@4.17.11:
|
||||
version "4.17.11"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
|
||||
|
||||
lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.3.0:
|
||||
lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.3.0:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.21.tgz?cache=0&sync_timestamp=1613835817439&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=
|
||||
@@ -7381,16 +7381,21 @@ mockjs@1.0.1-beta3:
|
||||
dependencies:
|
||||
commander "*"
|
||||
|
||||
moment-parseformat@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/moment-parseformat/-/moment-parseformat-3.0.0.tgz#3a1dc438b4bc073b7e93cc298cfb6c5daac26dba"
|
||||
integrity sha512-dVgXe6b6DLnv4CHG7a1zUe5mSXaIZ3c6lSHm/EKeVeQI2/4pwe0VRde8OyoCE1Ro2lKT5P6uT9JElF7KDLV+jw==
|
||||
moment-parseformat@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmmirror.com/moment-parseformat/-/moment-parseformat-4.0.0.tgz#44cffc3b3be3b3d033475869fbfa9066abb66cb0"
|
||||
integrity sha512-0V4ICKnI1npglqrMSDK2y8WxOdN79DkMoIexzY3P+jr2wNfbB4J81BgjFfHsj18wBsV7FdKCWyCHcezzH0xlyg==
|
||||
|
||||
moment@^2.19.2, moment@^2.29.1:
|
||||
moment@^2.19.2:
|
||||
version "2.29.2"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.2.tgz#00910c60b20843bcba52d37d58c628b47b1f20e4"
|
||||
integrity sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==
|
||||
|
||||
moment@^2.29.4:
|
||||
version "2.29.4"
|
||||
resolved "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
|
||||
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
|
||||
|
||||
move-concurrently@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
|
||||
|
||||
Reference in New Issue
Block a user