perf: 新增发布机的部署设置

This commit is contained in:
Eric
2023-02-02 15:30:42 +08:00
committed by Jiangjie.Bai
parent 059aa62ed8
commit 559fc8b837
3 changed files with 35 additions and 7 deletions

View File

@@ -15,12 +15,12 @@ export default {
config: { config: {
url: '/api/v1/terminal/applet-hosts/', url: '/api/v1/terminal/applet-hosts/',
addFields: [ addFields: [
[this.$t('common.Automations'), ['deploy_options'], 3] [this.$t('common.Automations'), ['deploy_options'], 2]
], ],
addFieldsMeta: { addFieldsMeta: {
deploy_options: { deploy_options: {
fields: [ fields: [
'RDS_Licensing', 'RDS_LicenseServer', 'RDS_LicensingMode', 'CORE_HOST', 'RDS_Licensing', 'RDS_LicenseServer', 'RDS_LicensingMode',
'RDS_fSingleSessionPerUser', 'RDS_MaxDisconnectionTime', 'RDS_fSingleSessionPerUser', 'RDS_MaxDisconnectionTime',
'RDS_RemoteAppLogoffTimeLimit' 'RDS_RemoteAppLogoffTimeLimit'
] ]

View File

@@ -45,8 +45,13 @@ export default {
formatter: DetailFormatter, formatter: DetailFormatter,
formatterArgs: { formatterArgs: {
getIcon: ({ row }) => row.applet?.icon, getIcon: ({ row }) => row.applet?.icon,
getTitle: ({ row }) => row.applet.display_name getTitle: ({ row }) => row.applet.display_name,
} getRoute: ({ row }) => ({
name: 'AppletDetail',
params: { id: row.applet.id }
})
},
id: ({ row }) => row.applet.id
}, },
'applet.version': { 'applet.version': {
label: this.$t('common.Version') label: this.$t('common.Version')

View File

@@ -3,17 +3,21 @@
<el-col :md="16" :sm="24"> <el-col :md="16" :sm="24">
<ListTable :table-config="config" :header-actions="headerConfig" /> <ListTable :table-config="config" :header-actions="headerConfig" />
</el-col> </el-col>
<el-col :md="8" :sm="24">
<QuickActions type="primary" :actions="quickActions" />
</el-col>
</el-row> </el-row>
</template> </template>
<script> <script>
import { ListTable } from '@/components' import { ListTable, QuickActions } from '@/components'
import { openTaskPage } from '@/utils/jms' import { openTaskPage } from '@/utils/jms'
export default { export default {
name: 'Developments', name: 'Developments',
components: { components: {
ListTable ListTable,
QuickActions
}, },
props: { props: {
object: { object: {
@@ -72,7 +76,26 @@ export default {
} }
} }
} }
} },
quickActions: [
{
title: this.$t('assets.InitialDeploy'),
attrs: {
type: 'primary',
label: this.$t('common.Deploy')
},
callbacks: {
click: function() {
this.$axios.post(
`/api/v1/terminal/applet-host-deployments/`,
{ host: this.object.id }
).then(res => {
openTaskPage(res['task'])
})
}.bind(this)
}
}
]
} }
} }
} }