mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-09 11:19:11 +00:00
Compare commits
136 Commits
pr@pam@per
...
v4.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56aa3caa83 | ||
|
|
9b6f54c1ed | ||
|
|
611341307b | ||
|
|
f8479c53ff | ||
|
|
e25bf46659 | ||
|
|
6d07307e56 | ||
|
|
6fb7fe8fa1 | ||
|
|
19cd497095 | ||
|
|
d858489367 | ||
|
|
341a30ba06 | ||
|
|
8390fb7429 | ||
|
|
5389f1d011 | ||
|
|
bde642570f | ||
|
|
3e7b970fe7 | ||
|
|
2421e822b4 | ||
|
|
b2e474e3f6 | ||
|
|
541836390a | ||
|
|
bb92e3f22b | ||
|
|
c9ad797b40 | ||
|
|
2a08310efc | ||
|
|
3b2803b9a1 | ||
|
|
1b8ac9112e | ||
|
|
9cc3dd4de9 | ||
|
|
120ef70eb1 | ||
|
|
541f4ebc62 | ||
|
|
a47636abc7 | ||
|
|
78f6f4b36a | ||
|
|
5abc0b77cf | ||
|
|
464638e782 | ||
|
|
37cfeb2077 | ||
|
|
44e297f01a | ||
|
|
febc283e36 | ||
|
|
dae33f55e8 | ||
|
|
c62cd27690 | ||
|
|
83443f8187 | ||
|
|
cb46f393e0 | ||
|
|
ddf5ac2151 | ||
|
|
88173f852a | ||
|
|
d5f16e90e2 | ||
|
|
d1c0aca4ff | ||
|
|
a42edf17ec | ||
|
|
dac5dfcd1c | ||
|
|
8e6ca146e1 | ||
|
|
9c06d36eab | ||
|
|
ab7bd574f8 | ||
|
|
6007dc8621 | ||
|
|
a0e7c48dc9 | ||
|
|
71dea791bf | ||
|
|
e1b9184f41 | ||
|
|
730d47f02a | ||
|
|
e82ec68935 | ||
|
|
e8e5975d7f | ||
|
|
19b1dc0dbc | ||
|
|
3cb9dec978 | ||
|
|
c025441075 | ||
|
|
050b50fa74 | ||
|
|
e26befabc3 | ||
|
|
8545fc6136 | ||
|
|
e343e0df9d | ||
|
|
74519e6f3c | ||
|
|
1305f90372 | ||
|
|
bbc3f53c0a | ||
|
|
aa605adbc7 | ||
|
|
49ea7d0969 | ||
|
|
4221bdb2ab | ||
|
|
af4010e299 | ||
|
|
879df90503 | ||
|
|
77ef172a23 | ||
|
|
4596887bf1 | ||
|
|
0a3dc30c85 | ||
|
|
51d24bc8e5 | ||
|
|
1b15a4d043 | ||
|
|
7d3f818242 | ||
|
|
4e26f18d77 | ||
|
|
b22613617a | ||
|
|
e971cbf4a8 | ||
|
|
4672abae35 | ||
|
|
ba36d72602 | ||
|
|
4bfbbba4c5 | ||
|
|
ea038ce43a | ||
|
|
e16b19666c | ||
|
|
c7f5409eb6 | ||
|
|
fdbd7d2222 | ||
|
|
ddbaeeafea | ||
|
|
efb0e9dacb | ||
|
|
f6f8301ad5 | ||
|
|
9a63ae63d4 | ||
|
|
1e007ccda3 | ||
|
|
d1d0b06b53 | ||
|
|
5fb70d2f24 | ||
|
|
b54a95430f | ||
|
|
4d8b4c45af | ||
|
|
a6d642df60 | ||
|
|
2e74f1522f | ||
|
|
fe615e0314 | ||
|
|
09f734e6fc | ||
|
|
3117046342 | ||
|
|
b68aecb5cc | ||
|
|
1c9b155d97 | ||
|
|
75b1be9864 | ||
|
|
615c3c1cf4 | ||
|
|
4d82231af4 | ||
|
|
c6cf6571b6 | ||
|
|
8ea990d070 | ||
|
|
f4a32170d5 | ||
|
|
073508675e | ||
|
|
1d6ca0a93a | ||
|
|
36aea652d6 | ||
|
|
1a42ce90ab | ||
|
|
31a401b55d | ||
|
|
582a84178d | ||
|
|
9b9f7c936c | ||
|
|
2a6100957f | ||
|
|
16606d6a27 | ||
|
|
0a612f50e6 | ||
|
|
fe36fa9390 | ||
|
|
ba109900ec | ||
|
|
ec7768267f | ||
|
|
cc58b374ab | ||
|
|
04ffbb8fd6 | ||
|
|
49880f6739 | ||
|
|
e6f98d58c4 | ||
|
|
fd1f16d43c | ||
|
|
968b2415b1 | ||
|
|
776090d6ba | ||
|
|
3a37952288 | ||
|
|
62b8fc0e3b | ||
|
|
b2028869cb | ||
|
|
5277a725f8 | ||
|
|
f137788c1a | ||
|
|
f7d17c8de7 | ||
|
|
feea70b0be | ||
|
|
04696ef3d6 | ||
|
|
1731f4f788 | ||
|
|
6f25d93909 | ||
|
|
46461ec324 |
@@ -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",
|
||||
@@ -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",
|
||||
|
||||
@@ -15,6 +15,7 @@ export function testEmailSetting(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function importLicense(formData) {
|
||||
return request({
|
||||
url: '/api/v1/xpack/license/import',
|
||||
@@ -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) {
|
||||
@@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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/'
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -123,6 +123,7 @@ export default {
|
||||
|
||||
&__body {
|
||||
padding: 20px 30px;
|
||||
font-size: 13px;
|
||||
|
||||
&:has(.el-table) {
|
||||
background: #f3f3f4;
|
||||
|
||||
@@ -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"
|
||||
@@ -18,7 +18,7 @@
|
||||
:index="i"
|
||||
:line="i !== 0 && !groupHidden(groups[i - 1], i - 1)"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</DataForm>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -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 {
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -322,4 +322,9 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.help-tip-content {
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,6 +15,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultValue: 24,
|
||||
displayMapper: {
|
||||
'second': this.$t('Second'), // 'sec' is the default value of 'unit
|
||||
'min': this.$t('Minute'), // 'min' is the default value of 'unit
|
||||
|
||||
@@ -48,7 +48,8 @@ export default {
|
||||
type: 'input-number',
|
||||
el: {
|
||||
min: 8,
|
||||
max: 30
|
||||
max: 36,
|
||||
size: 'mini'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -234,10 +234,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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -593,3 +593,9 @@ li.rmenu i.fa {
|
||||
height: 6px; /* 设置水平滚动条的高度 */
|
||||
}
|
||||
}
|
||||
|
||||
.black-theme-popover {
|
||||
width: 300px;
|
||||
max-height: 700px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ $single-menu-height: 38px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-menu--vertical {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.el-menu {
|
||||
border-right: none !important;
|
||||
background-color: inherit !important;
|
||||
@@ -139,6 +143,10 @@ $single-menu-height: 38px;
|
||||
.nest-menu .level2-menu {
|
||||
line-height: $single-menu-height;
|
||||
}
|
||||
|
||||
.el-tooltip {
|
||||
width: 55px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
initial: {
|
||||
is_periodic: false,
|
||||
password_rules: {
|
||||
length: 16
|
||||
length: 36
|
||||
},
|
||||
interval: 24,
|
||||
accounts: [],
|
||||
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
initial: {
|
||||
is_periodic: false,
|
||||
password_rules: {
|
||||
length: 30
|
||||
length: 36
|
||||
},
|
||||
interval: 24,
|
||||
secret_type: 'password',
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<TabPage
|
||||
:active-menu.sync="config.activeMenu"
|
||||
:submenu="config.submenu"
|
||||
@tab-click="handleTabClick"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
let tlsFields = ['use_ssl', 'ca_cert']
|
||||
const platformFieldsMap = {
|
||||
redis: ['client_cert', 'client_key'],
|
||||
postgresql: ['client_cert', 'client_key', 'allow_invalid_cert'],
|
||||
postgresql: ['client_cert', 'client_key', 'pg_ssl_mode'],
|
||||
mysql: ['client_cert', 'client_key', 'allow_invalid_cert'],
|
||||
mongodb: ['client_key', 'allow_invalid_cert']
|
||||
}
|
||||
@@ -52,7 +52,14 @@ export default {
|
||||
},
|
||||
use_ssl: {
|
||||
label: this.$t('UseSSL'),
|
||||
component: 'el-switch'
|
||||
component: 'el-switch',
|
||||
on: {
|
||||
change: ([event], updateForm) => {
|
||||
updateForm({
|
||||
pg_ssl_mode: event ? 'require' : 'prefer'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
allow_invalid_cert: {
|
||||
label: this.$t('AllowInvalidCert'),
|
||||
|
||||
@@ -48,7 +48,8 @@ export default {
|
||||
},
|
||||
tableConfig: {
|
||||
url: tableUrl,
|
||||
category: 'all'
|
||||
category: 'all',
|
||||
extraQuery: { 'order': '-date_updated' }
|
||||
},
|
||||
headerActions: {
|
||||
handleImportClick: ({ selectedRows }) => {
|
||||
|
||||
@@ -61,7 +61,7 @@ export default {
|
||||
row['auto_config'].ansible_enabled &&
|
||||
row['auto_config'].ping_enabled,
|
||||
callback: ({ row }) => {
|
||||
if (row.platform.name === 'Gateway') {
|
||||
if (row.platform.name.startsWith('Gateway')) {
|
||||
this.GatewayVisible = true
|
||||
const port = row.protocols.find(item => item.name === 'ssh').port
|
||||
if (!port) {
|
||||
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
row?.auto_config?.ansible_enabled &&
|
||||
row?.auto_config?.ping_enabled,
|
||||
callback: ({ row }) => {
|
||||
if (row.platform.name === 'Gateway') {
|
||||
if (row.platform.name.startsWith('Gateway')) {
|
||||
this.GatewayVisible = true
|
||||
const port = row.protocols.find(item => item.name === 'ssh').port
|
||||
if (!port) {
|
||||
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('Timer'),
|
||||
title: this.$t('TimerExecution'),
|
||||
attrs: {
|
||||
model: this.object.task,
|
||||
type: 'primary',
|
||||
|
||||
@@ -39,7 +39,8 @@ export default {
|
||||
submitBtnSize: 'mini',
|
||||
submitBtnText: this.$t('Add'),
|
||||
hasReset: false,
|
||||
onSubmit: () => {},
|
||||
onSubmit: () => {
|
||||
},
|
||||
submitMethod: () => 'post',
|
||||
getUrl: () => '',
|
||||
cleanFormValue(data) {
|
||||
@@ -86,7 +87,11 @@ export default {
|
||||
this.formConfig.fieldsMeta.protocols.el.hidden = true
|
||||
}
|
||||
this.resourceType = val
|
||||
this.formConfig.fieldsMeta.value.el.ajax.url = url
|
||||
if (url) {
|
||||
this.formConfig.fieldsMeta.value.el.ajax.url = url
|
||||
} else {
|
||||
this.formConfig.fieldsMeta.attr.el.remote = false
|
||||
}
|
||||
this.formConfig.fieldsMeta.value.el.options = options
|
||||
}
|
||||
}
|
||||
@@ -151,21 +156,31 @@ export default {
|
||||
tableConfig: {
|
||||
columns: [
|
||||
{ prop: 'attr', label: this.$t('ResourceType'), formatter: tableFormatter('resource_type') },
|
||||
{ prop: 'value', label: this.$t('Resource'), formatter: tableFormatter('resource', () => { return this.globalResource }) },
|
||||
{
|
||||
prop: 'value', label: this.$t('Resource'), formatter: tableFormatter('resource', () => {
|
||||
return this.globalResource
|
||||
})
|
||||
},
|
||||
{ prop: 'protocols', label: this.$t('Other'), formatter: tableFormatter('protocols') },
|
||||
{ prop: 'action', label: this.$t('Action'), align: 'center', width: '100px', formatter: (row, col, cellValue, index) => {
|
||||
return (
|
||||
<div className='input-button'>
|
||||
<el-button
|
||||
icon='el-icon-minus'
|
||||
size='mini'
|
||||
style={{ 'flexShrink': 0 }}
|
||||
type='danger'
|
||||
onClick={ this.handleDelete(index) }
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
} }
|
||||
{
|
||||
prop: 'action',
|
||||
label: this.$t('Action'),
|
||||
align: 'center',
|
||||
width: '100px',
|
||||
formatter: (row, col, cellValue, index) => {
|
||||
return (
|
||||
<div className='input-button'>
|
||||
<el-button
|
||||
icon='el-icon-minus'
|
||||
size='mini'
|
||||
style={{ 'flexShrink': 0 }}
|
||||
type='danger'
|
||||
onClick={this.handleDelete(index)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
totalData: this.value || [],
|
||||
hasPagination: false
|
||||
@@ -177,7 +192,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.nameOptions.map((o) => { this.globalResource[o.value] = o.label })
|
||||
this.nameOptions.map((o) => {
|
||||
this.globalResource[o.value] = o.label
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$emit('input', this.tableConfig.totalData)
|
||||
@@ -218,9 +235,11 @@ export default {
|
||||
::v-deep .el-form-item:nth-child(-n+3) {
|
||||
width: 43.5%;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item:last-child {
|
||||
width: 6%;
|
||||
}
|
||||
|
||||
.action-input {
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
domain_enabled: true
|
||||
},
|
||||
canSelect: (row) => {
|
||||
return row.platform?.name !== 'Gateway'
|
||||
return !row.platform?.name.startsWith('Gateway')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
return {
|
||||
tableConfig: {
|
||||
category: 'all',
|
||||
url: `/api/v1/assets/assets/?domain=${this.$route.params.id}&exclude_platform=Gateway`,
|
||||
url: `/api/v1/assets/assets/?domain=${this.$route.params.id}&is_gateway=0`,
|
||||
tableConfig: {
|
||||
columnsMeta: {
|
||||
actions: {
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfig: {
|
||||
url: `/api/v1/assets/gateways/?domain=${this.$route.params.id}&platform=Gateway`,
|
||||
url: `/api/v1/assets/gateways/?domain=${this.$route.params.id}`,
|
||||
columnsExclude: [
|
||||
'info', 'spec_info', 'auto_config'
|
||||
],
|
||||
@@ -174,7 +174,7 @@ export default {
|
||||
name: 'GatewayAdd',
|
||||
title: this.$t('Add'),
|
||||
callback: function() {
|
||||
this.AddGatewaySetting.AddGatewayDialogVisible = true
|
||||
this.AddGatewaySetting.addGatewayDialogVisible = true
|
||||
}.bind(this)
|
||||
}
|
||||
]
|
||||
@@ -183,7 +183,7 @@ export default {
|
||||
cell: '',
|
||||
visible: false,
|
||||
AddGatewaySetting: {
|
||||
AddGatewayDialogVisible: false
|
||||
addGatewayDialogVisible: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
domain_enabled: true
|
||||
},
|
||||
canSelect: (row) => {
|
||||
return row.platform?.name !== 'Gateway' && this.object.assets.map(item => item.id).indexOf(row.id) === -1
|
||||
return !row.platform?.name.startsWith('Gateway') && this.object.assets.map(item => item.id).indexOf(row.id) === -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<Dialog
|
||||
v-if="setting.AddGatewayDialogVisible"
|
||||
v-if="setting.addGatewayDialogVisible"
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:show-confirm="false"
|
||||
:title="$tc('AddGatewayInDomain')"
|
||||
:visible.sync="setting.AddGatewayDialogVisible"
|
||||
:visible.sync="setting.addGatewayDialogVisible"
|
||||
after
|
||||
custom-class="asset-select-dialog"
|
||||
top="15vh"
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
setting: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return { AddGatewayDialogVisible: false }
|
||||
return { addGatewayDialogVisible: false }
|
||||
}
|
||||
},
|
||||
object: {
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
multiple: true,
|
||||
clearable: true,
|
||||
ajax: {
|
||||
url: '/api/v1/assets/assets/?domain_enabled=true&platform=Gateway'
|
||||
url: '/api/v1/assets/assets/?domain_enabled=true&is_gateway=1'
|
||||
},
|
||||
disabledValues: this.object.gateways.map(item => item.id)
|
||||
}
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onSubmitSuccess(res) {
|
||||
this.setting.AddGatewayDialogVisible = false
|
||||
this.setting.addGatewayDialogVisible = false
|
||||
this.$emit('close', res)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
activated() {
|
||||
setTimeout(() => {
|
||||
this.tab.activeMenu = window.localStorage.getItem('lastTab')
|
||||
this.tab.activeMenu = window.localStorage.getItem('lastTab') || 'host'
|
||||
this.$refs.genericListTable.reloadTable()
|
||||
}, 300)
|
||||
},
|
||||
|
||||
@@ -128,7 +128,8 @@ export default {
|
||||
tip += current.label + ':' + current.total + '<br/>'
|
||||
}
|
||||
return tip
|
||||
}
|
||||
},
|
||||
appendToBody: true
|
||||
},
|
||||
grid: {
|
||||
top: '60%',
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $ from '@/utils/jquery-vendor.js'
|
||||
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
|
||||
import QuickJobTerm from '@/views/ops/Adhoc/components/QuickJobTerm.vue'
|
||||
import CodeEditor from '@/components/Form/FormFields/CodeEditor'
|
||||
@@ -286,6 +287,14 @@ export default {
|
||||
view: {
|
||||
dblClickExpand: false,
|
||||
showLine: true
|
||||
},
|
||||
callback: {
|
||||
onCheck: function(_event, treeId, treeNode) {
|
||||
const treeObj = $.fn.zTree.getZTreeObj(treeId)
|
||||
if (treeNode.checked) {
|
||||
treeObj.expandNode(treeNode, true, false, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
iShowTree: true
|
||||
|
||||
@@ -75,6 +75,7 @@ export default {
|
||||
fontFamily: 'monaco, Consolas, "Lucida Console", monospace',
|
||||
lineHeight: 1.2,
|
||||
fontSize: 13,
|
||||
scrollback: 9999999,
|
||||
rightClickSelectsWord: true,
|
||||
theme: {
|
||||
background: '#fff',
|
||||
|
||||
@@ -98,6 +98,7 @@ export default {
|
||||
el: {
|
||||
baseUrl: '/api/v1/perms/users/self/assets/',
|
||||
baseNodeUrl: '/api/v1/perms/users/self/nodes/',
|
||||
typeUrl: '/api/v1/perms/users/self/nodes/children-with-assets/category/tree',
|
||||
value: []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
url: '/api/v1/ops/adhocs/',
|
||||
columnsShow: {
|
||||
min: ['name', 'actions'],
|
||||
default: ['name', 'module', 'args', 'comment', 'scope', 'date_created', 'actions']
|
||||
default: ['name', 'module', 'args', 'comment', 'scope', 'date_created', 'actions', 'created_by']
|
||||
},
|
||||
columnsMeta: {
|
||||
name: {
|
||||
@@ -38,7 +38,8 @@ export default {
|
||||
canDelete: ({ row }) => {
|
||||
return this.$hasPerm('ops.delete_adhoc') && row.creator === currentUserID
|
||||
},
|
||||
hasClone: false
|
||||
hasClone: true,
|
||||
cloneRoute: 'AdhocCreate'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
url: '/api/v1/ops/playbooks/',
|
||||
columnsShow: {
|
||||
min: ['name', 'actions'],
|
||||
default: ['name', 'comment', 'scope', 'date_created', 'actions']
|
||||
default: ['name', 'comment', 'scope', 'date_created', 'actions', 'created_by']
|
||||
},
|
||||
columnsMeta: {
|
||||
name: {
|
||||
@@ -45,7 +45,8 @@ export default {
|
||||
canDelete: ({ row }) => {
|
||||
return this.$hasPerm('ops.delete_playbook') && row.creator === currentUserID
|
||||
},
|
||||
hasClone: true
|
||||
hasClone: true,
|
||||
cloneRoute: 'PlaybookCreate'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,12 @@ export default {
|
||||
notShowBuiltinTree: true,
|
||||
url: '/api/v1/perms/asset-permissions/',
|
||||
nodeUrl: '/api/v1/perms/asset-permissions/',
|
||||
treeUrl: '/api/v1/assets/nodes/children/tree/?assets=1'
|
||||
treeUrl: '/api/v1/assets/nodes/children/tree/?assets=1',
|
||||
edit: {
|
||||
drag: {
|
||||
isMove: false
|
||||
}
|
||||
}
|
||||
},
|
||||
tableConfig: {
|
||||
url: '/api/v1/perms/asset-permissions/',
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<script>
|
||||
import GenericListPage from '@/layout/components/GenericListPage'
|
||||
import { download } from '@/utils/common'
|
||||
import store from '@/store'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -36,7 +37,24 @@ export default {
|
||||
return row.has_file
|
||||
},
|
||||
tip: ({ row }) => {
|
||||
return row.has_file ? this.$t('Download') : this.$t('DownloadFTPFileTip')
|
||||
const ftpFileMaxStore = store.getters.publicSettings['FTP_FILE_MAX_STORE']
|
||||
|
||||
const downloadTip = this.$t('Download')
|
||||
const fileNotStoredTip = this.$t('FTPFileNotStored')
|
||||
const storageNotEnabledTip = this.$t('FTPStorageNotEnabled')
|
||||
const unknownStorageStateTip = this.$t('FTPUnknownStorageState')
|
||||
|
||||
if (row.has_file) {
|
||||
return downloadTip
|
||||
}
|
||||
|
||||
if (ftpFileMaxStore === 0) {
|
||||
return storageNotEnabledTip
|
||||
} else if (ftpFileMaxStore > 0) {
|
||||
return fileNotStoredTip
|
||||
} else {
|
||||
return unknownStorageStateTip
|
||||
}
|
||||
},
|
||||
callback: function({ row }) {
|
||||
// 跳转下载页面
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<script type="text/jsx">
|
||||
import ListTable from '@/components/Table/ListTable'
|
||||
import { timeOffset } from '@/utils/time'
|
||||
import { ActionsFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import { ActionsFormatter, ChoicesFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
|
||||
export default {
|
||||
name: 'BaseList',
|
||||
@@ -119,7 +119,11 @@ export default {
|
||||
}
|
||||
},
|
||||
is_locked: {
|
||||
label: this.$t('IsLocked')
|
||||
label: this.$t('IsLocked'),
|
||||
formatter: ChoicesFormatter,
|
||||
formatterArgs: {
|
||||
showFalse: true
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
prop: 'actions',
|
||||
|
||||
@@ -23,6 +23,9 @@ export default {
|
||||
'AUTH_PASSKEY', 'FIDO_SERVER_ID', 'FIDO_SERVER_NAME'
|
||||
],
|
||||
fieldsMeta: {
|
||||
'FIDO_SERVER_ID': {
|
||||
placeholder: 'js.example.org'
|
||||
}
|
||||
},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
@@ -30,8 +33,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -26,11 +26,14 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$tc('Receivers')" show-overflow-tooltip>
|
||||
<template v-slot="scope">
|
||||
<span v-if="!scope.row.children">
|
||||
{{ scope.row.receivers.map(item => item.name).join(', ') }}
|
||||
</span>
|
||||
<el-table-column :label="$tc('Receivers')">
|
||||
<template slot-scope="scope">
|
||||
<el-popover trigger="hover" placement="top" popper-class="black-theme-popover">
|
||||
<p v-for="item in scope.row.receivers" :key="item.name">{{ item.name }}</p>
|
||||
<span v-if="!scope.row.children" slot="reference" class="name-wrapper">
|
||||
{{ scope.row.receivers.map(item => item.name).join(', ') }}
|
||||
</span>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$tc('Actions')" width="200">
|
||||
@@ -186,4 +189,25 @@ export default {
|
||||
margin-bottom: 0;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
::v-deep .el-table .cell {
|
||||
display: flex;
|
||||
|
||||
.name-wrapper {
|
||||
display: inline-block;
|
||||
max-height: 55px;
|
||||
max-width: 200px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .black-theme-popover .el-popover__inner {
|
||||
background-color: #000 !important;
|
||||
color: #fff !important;
|
||||
border-color: #000 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
'redis_port', 'sqlserver_port', 'oracle_port_range'
|
||||
]
|
||||
],
|
||||
[this.$t('Other'), ['comment']]
|
||||
[this.$t('Other'), ['is_active', 'comment']]
|
||||
],
|
||||
fieldsMeta: {
|
||||
host: {
|
||||
@@ -41,13 +41,17 @@ export default {
|
||||
},
|
||||
oracle_port_range: {
|
||||
disabled: true
|
||||
},
|
||||
is_active: {
|
||||
disabled: this.$route.params.id === '00000000-0000-0000-0000-000000000001'
|
||||
}
|
||||
},
|
||||
hasDetailInMsg: false
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
created() {
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
'name', 'host', 'actions',
|
||||
'http_port', 'https_port', 'ssh_port', 'rdp_port',
|
||||
'mysql_port', 'mariadb_port', 'postgresql_port',
|
||||
'redis_port', 'sqlserver_port', 'oracle_port_range'
|
||||
'redis_port', 'sqlserver_port', 'oracle_port_range', 'is_active'
|
||||
]
|
||||
},
|
||||
columnsMeta: {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<el-form-item style="float: right">
|
||||
<template v-if="hasActionPerm">
|
||||
<el-button
|
||||
:disabled="object.status.value === 'closed'"
|
||||
:disabled="isDisabled || object.status.value === 'closed'"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="handleApprove"
|
||||
@@ -33,7 +33,7 @@
|
||||
<i class="fa fa-check" /> {{ $t('Accept') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="object.status.value === 'closed'"
|
||||
:disabled="isDisabled || object.status.value === 'closed'"
|
||||
size="small"
|
||||
type="warning"
|
||||
@click="handleReject"
|
||||
@@ -43,7 +43,7 @@
|
||||
</template>
|
||||
<el-button
|
||||
v-if="isSelfTicket"
|
||||
:disabled="object.status.value === 'closed'"
|
||||
:disabled="isDisabled || object.status.value === 'closed'"
|
||||
size="small"
|
||||
type="danger"
|
||||
@click="handleClose"
|
||||
@@ -92,6 +92,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisabled: false,
|
||||
comments: '',
|
||||
type_api: '',
|
||||
imageUrl: require('@/assets/img/avatar.png'),
|
||||
@@ -154,17 +155,35 @@ export default {
|
||||
this.createComment(function() {
|
||||
})
|
||||
const url = `/api/v1/tickets/${this.type_api}/${this.object.id}/approve/`
|
||||
this.$axios.put(url).then(res => this.reloadPage()).catch(err => this.$message.error(err))
|
||||
this.$axios.put(url).then(res => {
|
||||
this.reloadPage()
|
||||
}).catch(err => {
|
||||
this.$message.error(err)
|
||||
}).finally(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
},
|
||||
defaultReject() {
|
||||
this.createComment(function() {
|
||||
})
|
||||
const url = `/api/v1/tickets/${this.type_api}/${this.object.id}/reject/`
|
||||
this.$axios.put(url).then(res => this.reloadPage()).catch(err => this.$message.error(err))
|
||||
this.$axios.put(url).then(res => {
|
||||
this.reloadPage()
|
||||
}).catch(err => {
|
||||
this.$message.error(err)
|
||||
}).finally(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
},
|
||||
defaultClose() {
|
||||
const url = `/api/v1/tickets/${this.type_api}/${this.object.id}/close/`
|
||||
this.$axios.put(url).then(res => this.reloadPage()).catch(err => this.$message.error(err))
|
||||
this.$axios.put(url).then(res => {
|
||||
this.reloadPage()
|
||||
}).catch(err => {
|
||||
this.$message.error(err)
|
||||
}).finally(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
},
|
||||
createComment(successCallback) {
|
||||
const commentText = this.form.comments
|
||||
@@ -185,17 +204,42 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAction(actionType) {
|
||||
if (this.isDisabled) {
|
||||
return
|
||||
}
|
||||
|
||||
this.isDisabled = true
|
||||
let handler
|
||||
switch (actionType) {
|
||||
case 'approve':
|
||||
handler = this.approve || this.defaultApprove
|
||||
break
|
||||
case 'reject':
|
||||
handler = this.reject || this.defaultReject
|
||||
break
|
||||
case 'close':
|
||||
handler = this.close || this.defaultClose
|
||||
break
|
||||
default:
|
||||
handler = null
|
||||
break
|
||||
}
|
||||
|
||||
if (handler) {
|
||||
handler()
|
||||
} else {
|
||||
this.$message.error('No handler for action')
|
||||
}
|
||||
},
|
||||
handleApprove() {
|
||||
const handler = this.approve || this.defaultApprove
|
||||
handler()
|
||||
this.handleAction('approve')
|
||||
},
|
||||
handleReject() {
|
||||
const handler = this.reject || this.defaultReject
|
||||
handler()
|
||||
this.handleAction('reject')
|
||||
},
|
||||
handleClose() {
|
||||
const handler = this.close || this.defaultClose
|
||||
handler()
|
||||
this.handleAction('close')
|
||||
},
|
||||
handleComment() {
|
||||
this.createComment(
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
<script>
|
||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import TransSelect from '@/components/Form/FormFields/TransferSelect.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -23,7 +22,6 @@ export default {
|
||||
],
|
||||
fieldsMeta: {
|
||||
users: {
|
||||
component: TransSelect,
|
||||
el: {
|
||||
url: '/api/v1/users/users/?fields_size=mini&order=name',
|
||||
ajax: {
|
||||
|
||||
@@ -19,6 +19,7 @@ import AssetPermissionAsset from '@/views/perms/AssetPermission/AssetPermissionD
|
||||
import AssetPermissionDetail from '@/views/perms/AssetPermission/AssetPermissionDetail/index.vue'
|
||||
import AssetPermissionAccount from '@/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionAccount.vue'
|
||||
import UserAssetPermissionRules from './UserAssetPermissionRules'
|
||||
import store from '@/store'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -63,7 +64,7 @@ export default {
|
||||
{
|
||||
title: this.$t('UserAclLists'),
|
||||
name: 'UserLoginAcl',
|
||||
hidden: () => !vm.$hasPerm('acls.view_loginacl')
|
||||
hidden: () => !vm.$hasPerm('acls.view_loginacl') || !store.getters.publicSettings.XPACK_LICENSE_IS_VALID
|
||||
},
|
||||
{
|
||||
title: this.$t('UserSession'),
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
import GrantedAssets from '@/components/Apps/GrantedAssets/index.vue'
|
||||
import Page from '@/layout/components/Page/index.vue'
|
||||
import { EditableInputFormatter } from '@/components/Table/TableFormatters'
|
||||
import { getPreference } from '@/api/settings'
|
||||
import { openNewWindow } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -25,6 +27,7 @@ export default {
|
||||
return {
|
||||
treeUrl: `/api/v1/perms/users/self/nodes/children/tree/`,
|
||||
tableUrl: `/api/v1/perms/users/self/assets/`,
|
||||
preference: {},
|
||||
actions: {
|
||||
width: '88px',
|
||||
align: 'center',
|
||||
@@ -41,8 +44,13 @@ export default {
|
||||
can: ({ row }) => row.is_active,
|
||||
callback: ({ row }) => {
|
||||
const oid = this.$store.getters.currentOrg ? this.$store.getters.currentOrg.id : ''
|
||||
const url = `/luna/?login_to=${row.id}${oid ? `&oid=${oid}` : ''}`
|
||||
window.open(url, '_blank')
|
||||
const url = `/luna/connect?login_to=${row.id}`
|
||||
if (this.preference?.basic?.connect_default_open_method === 'new') {
|
||||
openNewWindow(url)
|
||||
} else {
|
||||
const url = `/luna/?login_to=${row.id}${oid ? `&oid=${oid}` : ''}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -81,6 +89,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.refreshAllFavorites()
|
||||
this.preference = getPreference().then((resp) => {
|
||||
this.preference = resp
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
refreshAllFavorites() {
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
<script>
|
||||
import HomeCard from './HomeCard.vue'
|
||||
import { getPreference } from '@/api/settings'
|
||||
import { openNewWindow } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
name: 'Announcement',
|
||||
@@ -13,6 +15,7 @@ export default {
|
||||
data() {
|
||||
const vm = this
|
||||
return {
|
||||
preference: {},
|
||||
cardConfig: {
|
||||
title: this.$t('RecentSession')
|
||||
},
|
||||
@@ -71,7 +74,11 @@ export default {
|
||||
type: 'primary',
|
||||
can: ({ row }) => row.is_active,
|
||||
callback: ({ row }) => {
|
||||
window.open(`/luna/?login_to=${row.asset_id}&login_account=${row.account_id}`, '_blank')
|
||||
if (this.preference?.basic?.connect_default_open_method === 'new') {
|
||||
openNewWindow(`/luna/connect?login_to=${row.asset_id}&login_account=${row.account_id}`)
|
||||
} else {
|
||||
window.open(`/luna/?login_to=${row.asset_id}&login_account=${row.account_id}`, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -82,6 +89,11 @@ export default {
|
||||
paginationSize: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getPreference().then(resp => {
|
||||
this.preference = resp
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
24
yarn.lock
24
yarn.lock
@@ -9227,7 +9227,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1:
|
||||
resolved "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz"
|
||||
integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==
|
||||
|
||||
npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-package-arg@^8.1.2, npm-package-arg@^8.1.4, npm-package-arg@^8.1.5:
|
||||
npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-package-arg@^8.1.1, npm-package-arg@^8.1.2, npm-package-arg@^8.1.5:
|
||||
version "8.1.5"
|
||||
resolved "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.5.tgz"
|
||||
integrity sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q==
|
||||
@@ -9733,7 +9733,7 @@ p-try@^2.0.0:
|
||||
resolved "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz"
|
||||
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
|
||||
|
||||
pacote@^11.1.11, pacote@^11.2.6, pacote@^11.3.1, pacote@^11.3.4, pacote@^11.3.5:
|
||||
pacote@^11.1.11, pacote@^11.2.6, pacote@^11.3.0, pacote@^11.3.1, pacote@^11.3.5:
|
||||
version "11.3.5"
|
||||
resolved "https://registry.npmjs.org/pacote/-/pacote-11.3.5.tgz"
|
||||
integrity sha512-fT375Yczn4zi+6Hkk2TBe1x1sP8FgFsEIZ2/iWaXY2r/NkhDJfxbcn5paz1+RTFCyNf+dPnaoBDJoAxXSU8Bkg==
|
||||
@@ -9931,10 +9931,10 @@ path-to-regexp@0.1.7:
|
||||
resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
|
||||
integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==
|
||||
|
||||
path-to-regexp@2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-2.4.0.tgz"
|
||||
integrity sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w==
|
||||
path-to-regexp@3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.3.0.tgz#f7f31d32e8518c2660862b644414b6d5c63a611b"
|
||||
integrity sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==
|
||||
|
||||
path-type@^1.0.0:
|
||||
version "1.1.0"
|
||||
@@ -11538,7 +11538,7 @@ serve-index@^1.9.1:
|
||||
mime-types "~2.1.17"
|
||||
parseurl "~1.3.2"
|
||||
|
||||
serve-static@1.15.0, serve-static@^1.13.2:
|
||||
serve-static@1.15.0:
|
||||
version "1.15.0"
|
||||
resolved "https://registry.npmmirror.com/serve-static/-/serve-static-1.15.0.tgz"
|
||||
integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==
|
||||
@@ -11548,6 +11548,16 @@ serve-static@1.15.0, serve-static@^1.13.2:
|
||||
parseurl "~1.3.3"
|
||||
send "0.18.0"
|
||||
|
||||
serve-static@^1.16.0:
|
||||
version "1.16.0"
|
||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.0.tgz#2bf4ed49f8af311b519c46f272bf6ac3baf38a92"
|
||||
integrity sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==
|
||||
dependencies:
|
||||
encodeurl "~1.0.2"
|
||||
escape-html "~1.0.3"
|
||||
parseurl "~1.3.3"
|
||||
send "0.18.0"
|
||||
|
||||
set-blocking@^2.0.0, set-blocking@~2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz"
|
||||
|
||||
Reference in New Issue
Block a user