merge: with dev

This commit is contained in:
ibuler 2025-04-08 19:29:07 +08:00
commit 1b8c5e66bc
14 changed files with 55 additions and 50 deletions

View File

@ -1,4 +1,4 @@
FROM jumpserver/lina-base:20250327_104059 AS stage-build FROM jumpserver/lina-base:20250408_074136 AS stage-build
ARG VERSION ARG VERSION
ENV VERSION=$VERSION ENV VERSION=$VERSION

View File

@ -2,7 +2,7 @@
"name": "lina", "name": "lina",
"version": "v4.0.0", "version": "v4.0.0",
"description": "JumpServer Web UI", "description": "JumpServer Web UI",
"author": "JumpServer Team <support@fit2cloud.com>", "author": "JumpServer Team <support@lxware.hk>",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"scripts": { "scripts": {
"dev": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve", "dev": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
@ -143,5 +143,6 @@
"src/**/*.{js,vue}": [ "src/**/*.{js,vue}": [
"eslint --fix" "eslint --fix"
] ]
} },
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
} }

View File

@ -67,13 +67,13 @@
style="width: 100%; height: 800px;border: none;" style="width: 100%; height: 800px;border: none;"
/> />
<span v-if="subTypeSelected === 'sms'" style="margin: -1px 0 0 20px;"> <span v-if="subTypeSelected === 'sms' || subTypeSelected === 'email'" style="margin: -1px 0 0 20px;">
<el-button <el-button
:disabled="smsBtnDisabled" :disabled="smsBtnDisabled"
size="mini" size="mini"
style="line-height: 14px; float: right;" style="line-height: 14px; float: right;"
type="primary" type="primary"
@click="sendSMSCode" @click="sendCode"
> >
{{ smsBtnText }} {{ smsBtnText }}
</el-button> </el-button>
@ -204,8 +204,8 @@ export default {
logout() { logout() {
window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}` window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}`
}, },
sendSMSCode() { sendCode() {
this.$axios.post(`/api/v1/authentication/mfa/select/`, { type: 'sms' }).then(res => { this.$axios.post(`/api/v1/authentication/mfa/select/`, { type: this.subTypeSelected }).then(res => {
this.$message.success(this.$tc('VerificationCodeSent')) this.$message.success(this.$tc('VerificationCodeSent'))
let time = 60 let time = 60
this.smsBtnDisabled = true this.smsBtnDisabled = true

View File

@ -51,7 +51,7 @@ export default {
window.open(this.URLSite.HELP_SUPPORT_URL, '_blank') window.open(this.URLSite.HELP_SUPPORT_URL, '_blank')
break break
case 'enterprise': case 'enterprise':
window.open('https://jumpserver.org/enterprise.html', '_blank') window.open('https://www.jumpserver.com/#section-edition', '_blank')
break break
case 'about': case 'about':
this.visible = true this.visible = true

View File

@ -139,7 +139,7 @@ export default {
clearTimeout(this.longPressTimer) clearTimeout(this.longPressTimer)
}, },
handleUpgrade() { handleUpgrade() {
const url = 'http://www.jumpserver.org/support/' const url = 'https://www.lxware.hk/pages/about'
window.open(url, '_blank') window.open(url, '_blank')
} }
} }

View File

@ -41,7 +41,7 @@ export default {
] ]
}, },
tableConfig: { tableConfig: {
url: `/api/v1/xpack/cloud/sync-instance-tasks/${this.object.task?.id}/instances/`, url: '',
hasSelection: false, hasSelection: false,
columns: [ columns: [
'instance_id', 'instance_id',
@ -49,6 +49,10 @@ export default {
prop: 'asset_ip', prop: 'asset_ip',
label: this.$t('IP') label: this.$t('IP')
}, },
{
prop: 'asset_display',
label: this.$t('Asset')
},
'region', 'region',
{ {
prop: 'status', prop: 'status',
@ -76,9 +80,20 @@ export default {
} }
} }
}, },
computed: {
dynamicUrl() {
const baseUrl = '/api/v1/xpack/cloud/sync-instance-tasks/instances/'
return this.object ? `${baseUrl}?task_id=${this.object.task.id}` : baseUrl
}
},
mounted() {
this.tableConfig.url = this.dynamicUrl
},
methods: { methods: {
DeleteReleasedAssets() { DeleteReleasedAssets() {
this.$axios.delete(`/api/v1/xpack/cloud/sync-instance-tasks/${this.object.task?.id}/released-assets/`).then( const baseUrl = '/api/v1/xpack/cloud/sync-instance-tasks/released-assets/'
const url = this.object ? `${baseUrl}?task_id=${this.object.task.id}` : baseUrl
this.$axios.delete(url).then(
res => { res => {
this.$message.success(this.$tc('DeleteSuccessMsg')) this.$message.success(this.$tc('DeleteSuccessMsg'))
this.$refs.GenericListTable.$refs.ListTable.reloadTable() this.$refs.GenericListTable.$refs.ListTable.reloadTable()

View File

@ -33,7 +33,11 @@ export default {
<ul> <ul>
{ {
newArr.map((r, index) => { newArr.map((r, index) => {
return <li key={index}>{`${r.attr.label} ${r.match.label} ${r.value}`} </li> return <li>
<el-tag size='mini' key={index}>
{r.attr.label}<strong> {`${r.match.label}`} </strong>{r.value}
</el-tag>
</li>
}) })
} }
</ul> </ul>
@ -48,7 +52,11 @@ export default {
<ul> <ul>
{ {
newArr.map((a, index) => { newArr.map((a, index) => {
return <li key={index}>{`${a.attr.label}: ${a.value.label}`} </li> return <li>
<el-tag size='mini' key={index}>
<strong>{a.attr.label}: </strong>{`${a.value.label}`}
</el-tag>
</li>
}) })
} }
</ul> </ul>
@ -58,42 +66,21 @@ export default {
'comment', 'org_name' 'comment', 'org_name'
] ]
} }
},
computed: {
cardTitle() {
return this.object.name
}
} }
} }
</script> </script>
<style scoped> <style scoped>
ul { ul {
counter-reset: my-counter; display: flex;
list-style-type: none; flex-direction: column;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
li { li {
counter-increment: my-counter; list-style: none;
position: relative; margin: 3px 0;
padding-left: 20px;
}
li:before {
content: counter(my-counter);
display: block;
position: absolute;
left: 0;
top: 32%;
width: 14px;
height: 14px;
line-height: 12px;
text-align: center;
border: 1px solid;
border-radius: 50%;
background-color: #fff;
} }
</style> </style>

View File

@ -26,6 +26,12 @@ export default {
name: 'StrategyList', name: 'StrategyList',
hidden: () => !this.$hasPerm('xpack.view_strategy'), hidden: () => !this.$hasPerm('xpack.view_strategy'),
component: () => import('@/views/assets/Cloud/Strategy/StrategyList.vue') component: () => import('@/views/assets/Cloud/Strategy/StrategyList.vue')
},
{
title: this.$t('SyncInstanceTaskHistoryAssetList'),
name: 'TaskSyncAssetList',
hidden: () => !this.$hasLicense() || !this.$hasPerm('xpack.view_syncinstancedetail'),
component: () => import('@/views/assets/Cloud/Account/AccountDetail/TaskSyncAssetList.vue')
} }
], ],
actions: { actions: {

View File

@ -18,13 +18,13 @@ export default {
tableConfig: { tableConfig: {
url: '/api/v1/audits/jobs/', url: '/api/v1/audits/jobs/',
columnsShow: { columnsShow: {
min: ['name', 'material'], min: ['name', 'args'],
default: [ default: [
'name', 'material', 'type', 'crontab', 'interval', 'created_by', 'is_periodic_display', 'is_periodic' 'name', 'args', 'type', 'crontab', 'interval', 'created_by', 'is_periodic_display', 'is_periodic'
] ]
}, },
columns: [ columns: [
'name', 'args', 'material', 'type', 'crontab', 'interval', 'date_last_run', 'summary', 'name', 'args', 'type', 'crontab', 'interval', 'date_last_run', 'summary',
'created_by', 'is_periodic_display', 'is_periodic' 'created_by', 'is_periodic_display', 'is_periodic'
], ],
columnsMeta: { columnsMeta: {
@ -34,10 +34,6 @@ export default {
name: { name: {
formatter: (row) => row.name formatter: (row) => row.name
}, },
material: {
width: '200px',
label: this.$t('Command')
},
summary: { summary: {
width: '130px', width: '130px',
label: `${this.$t('Success')}/${this.$t('Total')}`, label: `${this.$t('Success')}/${this.$t('Total')}`,

View File

@ -46,7 +46,7 @@
<script> <script>
import store from '@/store' import store from '@/store'
import { DEFAULT_ORG_ID, SYSTEM_ORG_ID } from '@/utils/org' import { DEFAULT_ORG_ID, SYSTEM_ORG_ID } from '@/utils/org'
import { DrawerListTable as ListTable } from '@/components' import ListTable from '@/components/Table/ListTable'
import Dialog from '@/components/Dialog/index.vue' import Dialog from '@/components/Dialog/index.vue'
import Select2 from '@/components/Form/FormFields/Select2.vue' import Select2 from '@/components/Form/FormFields/Select2.vue'
import getStatusColumnMeta from '@/components/Table/ListTable/TableAction/const' import getStatusColumnMeta from '@/components/Table/ListTable/TableAction/const'

View File

@ -51,7 +51,7 @@ export default {
[ [
this.$t('Other'), this.$t('Other'),
[ [
'AUTH_LDAP_CONNECT_TIMEOUT', 'AUTH_LDAP_SEARCH_PAGED_SIZE', 'AUTH_LDAP_STRICT_SYNC', 'AUTH_LDAP_CONNECT_TIMEOUT', 'AUTH_LDAP_SEARCH_PAGED_SIZE',
'AUTH_LDAP_CACHE_TIMEOUT' 'AUTH_LDAP_CACHE_TIMEOUT'
] ]
] ]

View File

@ -51,7 +51,7 @@ export default {
[ [
this.$t('Other'), this.$t('Other'),
[ [
'AUTH_LDAP_HA_CONNECT_TIMEOUT', 'AUTH_LDAP_HA_SEARCH_PAGED_SIZE', 'AUTH_LDAP_HA_STRICT_SYNC', 'AUTH_LDAP_HA_CONNECT_TIMEOUT', 'AUTH_LDAP_HA_SEARCH_PAGED_SIZE',
'AUTH_LDAP_HA_CACHE_TIMEOUT' 'AUTH_LDAP_HA_CACHE_TIMEOUT'
] ]
] ]

View File

@ -159,7 +159,7 @@ export default {
this.dialogLicenseImport = true this.dialogLicenseImport = true
}, },
consultAction: function() { consultAction: function() {
const url = 'http://www.jumpserver.org/support/' const url = 'https://www.lxware.hk/pages/about'
window.open(url, '_blank') window.open(url, '_blank')
}, },
importLicense() { importLicense() {

View File

@ -31,7 +31,7 @@ export default {
'name', 'host', 'actions', 'name', 'host', 'actions',
'http_port', 'https_port', 'ssh_port', 'rdp_port', 'vnc_port', 'http_port', 'https_port', 'ssh_port', 'rdp_port', 'vnc_port',
'mysql_port', 'mariadb_port', 'postgresql_port', 'mysql_port', 'mariadb_port', 'postgresql_port',
'redis_port', 'sqlserver_port', 'oracle_port_range', 'is_active' 'redis_port', 'sqlserver_port', 'oracle_port', 'is_active'
] ]
}, },
columnsMeta: { columnsMeta: {