Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.3.0 #4410

Merged
merged 53 commits into from
Oct 17, 2024
Merged

v4.3.0 #4410

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
879df90
chore(deps): bump path-to-regexp from 2.4.0 to 3.3.0
dependabot[bot] Sep 11, 2024
af4010e
chore(deps-dev): bump serve-static from 1.15.0 to 1.16.0
dependabot[bot] Sep 12, 2024
e8e5975
fix: fix after successfully creating an asset, the asset list cannot …
feng626 Sep 24, 2024
e82ec68
perf: The maximum length of the randomly generated password is change…
feng626 Sep 25, 2024
730d47f
fixed: Fixed an issue with draggable Tree nodes under asset authoriza…
ZhaoJiSen Sep 26, 2024
e1b9184
Merge pull request #4372 from jumpserver/pr@dev@fix_perm_list_tree
ZhaoJiSen Sep 26, 2024
71dea79
fix: xterm output truncate
w940853815 Sep 26, 2024
a0e7c48
perf: adhoc can clone
w940853815 Sep 20, 2024
6007dc8
perf: Endpoint add is_active field
w940853815 Sep 25, 2024
ab7bd57
fix: assets proportion tooltip cause page bounced at first time
wisonic-s Sep 27, 2024
9c06d36
Merge pull request #4351 from jumpserver/dependabot/npm_and_yarn/path…
ZhaoJiSen Sep 29, 2024
8e6ca14
Merge pull request #4353 from jumpserver/dependabot/npm_and_yarn/serv…
ZhaoJiSen Sep 29, 2024
dac5dfc
perf: Optimize file audit download prompt
feng626 Sep 29, 2024
a42edf1
fixed: Fixed an issue where the font size of the resource is too larg…
ZhaoJiSen Oct 9, 2024
d1c0aca
Merge pull request #4380 from jumpserver/pr@dev@fix_font_size
ZhaoJiSen Oct 9, 2024
d5f16e9
perf: add created_by field
w940853815 Oct 9, 2024
88173f8
perf: Default endpoint cannot be disabled
w940853815 Oct 9, 2024
ddf5ac2
fix: Determine the asset connection opening method based on the settings
w940853815 Oct 8, 2024
cb46f39
fixed: Fixed An issue where adding a tag to asset does not work
ZhaoJiSen Oct 9, 2024
83443f8
Merge pull request #4383 from jumpserver/pr@dev@fix_tab_refresh
ZhaoJiSen Oct 9, 2024
c62cd27
fixed: Fixed + and - not being special characters
ZhaoJiSen Oct 9, 2024
dae33f5
Merge pull request #4385 from jumpserver/pr@dev@fix_special_chara
ZhaoJiSen Oct 9, 2024
febc283
fixed: Fixed issue with sidebar toolTip placement
ZhaoJiSen Oct 10, 2024
44e297f
Merge pull request #4386 from jumpserver/pr@dev@fix_tooltip_position
ZhaoJiSen Oct 10, 2024
37cfeb2
style: Fixed the display of the account number input box
ZhaoJiSen Oct 10, 2024
464638e
Merge pull request #4387 from jumpserver/pr@dev@fix_input_border
ZhaoJiSen Oct 10, 2024
5abc0b7
fixed: Fixed the presentation format of asset notes
ZhaoJiSen Oct 10, 2024
78f6f4b
Merge pull request #4388 from jumpserver/pr@dev@fix_comments_style
ZhaoJiSen Oct 10, 2024
a47636a
style: Adjusting the styles of the remote application
ZhaoJiSen Oct 10, 2024
541f4eb
Merge pull request #4389 from jumpserver/pr@dev@fix_remote_app
ZhaoJiSen Oct 10, 2024
120ef70
style: Add Line Height
ZhaoJiSen Oct 10, 2024
9cc3dd4
Merge pull request #4390 from jumpserver/pr@dev@fix_add_lineHeight
ZhaoJiSen Oct 10, 2024
1b8ac91
fix: user lack permission to view the type tree
w940853815 Oct 10, 2024
3b2803b
fixed: Fixed the shortcut command selection node issue
ZhaoJiSen Oct 10, 2024
2a08310
fixed: Fixed the shortcut command selection node issue
ZhaoJiSen Oct 10, 2024
c9ad797
Merge pull request #4393 from jumpserver/pr@dev@fix_quick_job_node
ZhaoJiSen Oct 10, 2024
bb92e3f
fixed: Fixed command filtering and command group tab switching issues
ZhaoJiSen Oct 10, 2024
5418363
Merge pull request #4394 from jumpserver/pr@dev@fix_tab_change
ZhaoJiSen Oct 10, 2024
b2e474e
style: Optimize the number field style
ZhaoJiSen Oct 11, 2024
2421e82
Merge pull request #4396 from jumpserver/pr@dev@perf_number_style
ZhaoJiSen Oct 11, 2024
3e7b970
style: Set special receiver to optimize the scroll wheel display
ZhaoJiSen Oct 12, 2024
bde6425
Merge pull request #4397 from jumpserver/pr@dev@perf_reveiver
ZhaoJiSen Oct 12, 2024
5389f1d
perf: Help text automatic line wrapping
feng626 Oct 12, 2024
8390fb7
Merge pull request #4398 from jumpserver/pr@dev@help_tip
ZhaoJiSen Oct 12, 2024
341a30b
perf: The platform gets activeMenu and adds a default value
feng626 Oct 15, 2024
d858489
fix: modify getPreference url
w940853815 Oct 15, 2024
19cd497
fixed: Restores remote application styles
ZhaoJiSen Oct 15, 2024
6fb7fe8
fix: interval field check
w940853815 Oct 16, 2024
6d07307
perf: users use Select2
w940853815 Oct 16, 2024
e25bf46
perf: url is null set remote false
w940853815 Oct 16, 2024
f8479c5
perf: update passkey create
ibuler Oct 16, 2024
6113413
fix: ticket duplicate submission
feng626 Oct 16, 2024
9b6f54c
perf: update placeholder (#4409)
fit2bot Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"normalize.css": "7.0.0",
"npm": "^7.8.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"path-to-regexp": "3.3.0",
"v-sanitize": "^0.0.13",
"vue": "2.6.10",
"vue-codemirror": "4.0.6",
Expand Down Expand Up @@ -117,7 +117,7 @@
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"serve-static": "^1.16.0",
"strip-ansi": "^7.1.0",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
Expand Down
10 changes: 10 additions & 0 deletions src/api/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function testEmailSetting(data) {
data: data
})
}

export function importLicense(formData) {
return request({
url: '/api/v1/xpack/license/import',
Expand All @@ -25,6 +26,7 @@ export function importLicense(formData) {
data: formData
})
}

export function testLdapSetting(data, refresh = true) {
let url = '/api/v1/settings/ldap/testing/config/'
if (refresh) {
Expand Down Expand Up @@ -96,9 +98,17 @@ export function getPublicSettings(isOpen) {
method: 'get'
})
}

export function getLogo() {
return request({
url: '/api/v1/xpack/interface/setting/',
method: 'get'
})
}

export function getPreference() {
return request({
url: '/api/v1/users/preference/?category=luna',
method: 'get'
})
}
8 changes: 6 additions & 2 deletions src/components/Apps/AssetTreeTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export default {
type: String,
default: '/api/v1/assets/assets/'
},
typeUrl: {
type: String,
default: '/api/v1/assets/nodes/category/tree/'
},
nodeUrl: {
type: String,
default: '/api/v1/assets/nodes/'
Expand Down Expand Up @@ -105,9 +109,9 @@ export default {
showAssets: false,
showSearch: false,
customTreeHeaderName: this.$t('TypeTree'),
url: '/api/v1/assets/nodes/category/tree/',
url: this.typeUrl,
nodeUrl: this.treeSetting?.nodeUrl || this.nodeUrl,
treeUrl: `/api/v1/assets/nodes/category/tree/?assets=${showAssets ? '1' : '0'}&count_resource=${this.treeSetting.countResource || 'asset'}`,
treeUrl: `${this.typeUrl}?assets=${showAssets ? '1' : '0'}&count_resource=${this.treeSetting.countResource || 'asset'}`,
callback: {
onSelected: (event, treeNode) => this.getAssetsUrl(treeNode)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Cards/DetailCard/ItemValue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
formatterData = data
}
return (
<span>{formatterData}</span>
<span style={{ whiteSpace: 'pre-wrap', lineHeight: '1.2' }}>{formatterData}</span>
)
}
if (this.value instanceof Array) {
Expand Down
1 change: 1 addition & 0 deletions src/components/Dialog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export default {

&__body {
padding: 20px 30px;
font-size: 13px;

&:has(.el-table) {
background: #f3f3f4;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/AutoDataForm/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
v-bind="$attrs"
v-on="$listeners"
>
<span
<div
v-for="(group, i) in groups"
:key="'group-'+group.name"
:slot="'id:'+group.name"
Expand All @@ -18,7 +18,7 @@
:index="i"
:line="i !== 0 && !groupHidden(groups[i - 1], i - 1)"
/>
</span>
</div>
</DataForm>
</template>

Expand Down
4 changes: 0 additions & 4 deletions src/components/Form/AutoDataForm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import BasicTree from '@/components/Form/FormFields/BasicTree.vue'
import JsonEditor from '@/components/Form/FormFields/JsonEditor.vue'
import { assignIfNot, toSentenceCase } from '@/utils/common'
import TagInput from '@/components/Form/FormFields/TagInput.vue'
import TransferSelect from '@/components/Form/FormFields/TransferSelect.vue'
import i18n from '@/i18n/i18n'

export class FormFieldGenerator {
Expand Down Expand Up @@ -135,9 +134,6 @@ export class FormFieldGenerator {
case 'comment':
field.el.type = 'textarea'
break
case 'users':
field.component = TransferSelect
field.el.label = field.label
}
return field
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
placement="right"
popper-class="help-tips"
>
<div slot="content" v-sanitize="data.helpTip" /> <!-- Noncompliant -->
<div slot="content" v-sanitize="data.helpTip" class="help-tip-content" /> <!-- Noncompliant -->
<i class="fa fa-question-circle-o help-tip-icon" />
</el-tooltip>
</template>
Expand Down Expand Up @@ -322,4 +322,9 @@ export default {
cursor: pointer;
}
}

.help-tip-content {
white-space: pre-wrap;
word-wrap: break-word;
}
</style>
5 changes: 1 addition & 4 deletions src/components/Form/FormFields/InputWithUnit.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<el-input v-model="iValue" v-bind="$attrs" v-on="$listeners">
<el-input v-bind="$attrs" v-on="$listeners">
<template slot="append">{{ iUnit }}</template>
</el-input>
</template>
Expand Down Expand Up @@ -30,9 +30,6 @@ export default {
computed: {
iUnit() {
return this.displayMapper[this.unit] || this.unit
},
iValue() {
return this.$attrs.value ? this.$attrs.value : this.defaultValue
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Form/FormFields/PasswordRule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default {
type: 'input-number',
el: {
min: 8,
max: 30
max: 36,
size: 'mini'
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/FormFields/UserPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {
patterns.push([/\d/, i18n.t('NUMBER_REQUIRED')])
}
if (passwordRule['SECURITY_PASSWORD_SPECIAL_CHAR']) {
const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?_+-]")
patterns.push([pattern, i18n.t('SPECIAL_CHAR_REQUIRED')])
}
for (const [pattern, msg] of patterns) {
Expand Down
10 changes: 10 additions & 0 deletions src/components/Table/TableFormatters/LabelsFormatter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ export default {
}
},
computed: {},
watch: {
cellValue: {
handler(newValue) {
if (newValue) {
this.initial = this.formatterArgs.getLabels(this.cellValue)
this.iLabels = [...this.initial]
}
}
}
},
mounted() {
this.initial = this.formatterArgs.getLabels(this.cellValue)
this.iLabels = [...this.initial]
Expand Down
2 changes: 1 addition & 1 deletion src/layout/components/NavHeader/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default {

// 未找到与之对应的
& ::v-deep .el-submenu__title {
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 0 8px;
line-height: $headerHeight;
height: $headerHeight;
Expand Down
8 changes: 7 additions & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: auto;
color: var(--color-text-primary);
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 1.428;
}
Expand Down Expand Up @@ -593,3 +593,9 @@ li.rmenu i.fa {
height: 6px; /* 设置水平滚动条的高度 */
}
}

.black-theme-popover {
width: 300px;
max-height: 700px;
overflow-y: scroll;
}
8 changes: 8 additions & 0 deletions src/styles/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ $single-menu-height: 38px;
}
}

.el-menu--vertical {
background-color: #fff;
}

.el-menu {
border-right: none !important;
background-color: inherit !important;
Expand Down Expand Up @@ -139,6 +143,10 @@ $single-menu-height: 38px;
.nest-menu .level2-menu {
line-height: $single-menu-height;
}

.el-tooltip {
width: 55px !important;
}
}
}
}
24 changes: 24 additions & 0 deletions src/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ export function getErrorResponseMsg(error) {
}).filter(i => i).join('; ')
} else if (typeof data === 'string') {
return data
} else {
msg = error.toString()
}
return msg
}
Expand Down Expand Up @@ -310,4 +312,26 @@ export function toSentenceCase(string) {
}).join(' ')
return s[0].toUpperCase() + s.slice(1)
}

export { BASE_URL }

export function openNewWindow(url) {
let count
let top = 50
count = parseInt(window.sessionStorage.getItem('newWindowCount'), 10)
if (isNaN(count)) {
count = 0
}
let left = 100 + count * 100
top = 50 + count * 50
if (left + screen.width / 3 > screen.width) {
// 支持两排足以
top = screen.height / 3
count = 1
left = 100
}
let params = 'toolbar=yes,scrollbars=yes,resizable=yes'
params = params + `,top=${top},left=${left},width=${screen.width / 3},height=${screen.height / 3}`
window.sessionStorage.setItem('newWindowCount', `${count + 1}`)
window.open(url, '_blank', params)
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
initial: {
is_periodic: false,
password_rules: {
length: 16
length: 36
},
interval: 24,
accounts: [],
Expand Down
2 changes: 1 addition & 1 deletion src/views/accounts/AccountPush/AccountPushCreateUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
initial: {
is_periodic: false,
password_rules: {
length: 30
length: 36
},
interval: 24,
secret_type: 'password',
Expand Down
2 changes: 1 addition & 1 deletion src/views/accounts/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import InputWithUnit from '@/components/Form/FormFields/InputWithUnit.vue'
import store from '@/store'

const validatorInterval = (rule, value, callback) => {
if (parseInt(value) < 1) {
if (isNaN(parseInt(value, 10)) || parseInt(value) < 1) {
return callback(new Error(i18n.t('EnsureThisValueIsGreaterThanOrEqualTo1')))
}
callback()
Expand Down
13 changes: 0 additions & 13 deletions src/views/acl/CommandAcl/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<TabPage
:active-menu.sync="config.activeMenu"
:submenu="config.submenu"
@tab-click="handleTabClick"
/>
</template>

Expand Down Expand Up @@ -35,18 +34,6 @@ export default {
]
}
}
},
methods: {
handleTabClick(tab) {
const query = _.cloneDeep(this.$route.query)
const newQuery = {
...query,
tab: tab.name
}
this.$nextTick(() => {
this.$router.replace({ query: newQuery })
})
}
}
}
</script>
3 changes: 2 additions & 1 deletion src/views/assets/Asset/AssetList/AllList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default {
},
tableConfig: {
url: tableUrl,
category: 'all'
category: 'all',
extraQuery: { 'order': '-date_updated' }
},
headerActions: {
handleImportClick: ({ selectedRows }) => {
Expand Down
8 changes: 1 addition & 7 deletions src/views/assets/Cloud/Account/components/TimingPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,7 @@ export default {
btn.loading = true
}
})

if (form.value.interval && typeof form.value.interval === 'number') {
form.value.interval = parseInt(form.value.interval, 10)
} else {
form.value.interval = 24
}

form.value.interval = parseInt(form.value.interval, 10)
this.$refs.form.$refs.form.dataForm.submitForm('form', false)
},
handleSubmitSuccess(res) {
Expand Down
Loading