mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 01:11:07 +00:00
perf: 优化资产创建更新 labels
This commit is contained in:
@@ -113,7 +113,6 @@
|
||||
v-if="item.type ==='button'"
|
||||
:disabled="item.disabled"
|
||||
size="mini"
|
||||
style="background-color: transparent"
|
||||
type="default"
|
||||
@click="item.callback()"
|
||||
>
|
||||
@@ -256,13 +255,16 @@ export default {
|
||||
.right-side {
|
||||
.el-button {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
color: #888;
|
||||
background-color: transparent;
|
||||
margin-left: 2px;
|
||||
background: none;
|
||||
|
||||
&:hover {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,10 +300,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-button.el-button--default {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.filter-label {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
|
5
src/icons/svg/info.svg
Normal file
5
src/icons/svg/info.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path d="M20,40 C8.955,40 0,31.045 0,20 C0,8.955 8.955,0 20,0 C31.045,0 40,8.955 40,20 C40,31.045 31.045,40 20,40 Z M20,36.6666667 C29.205,36.6666667 36.6666667,29.205 36.6666667,20 C36.6666667,10.795 29.205,3.33333332 20,3.33333332 C10.795,3.33333332 3.33333332,10.795 3.33333332,20 C3.33333332,29.205 10.795,36.6666667 20,36.6666667 Z M18.3333333,18.3333333 C18.3333333,17.4128587 19.0795254,16.6666666 20,16.6666666 C20.9204746,16.6666666 21.6666667,17.4128587 21.6666667,18.3333333 L21.6666667,30 C21.6666667,30.9204746 20.9204746,31.6666666 20,31.6666666 C19.0795254,31.6666666 18.3333333,30.9204746 18.3333333,30 L18.3333333,18.3333333 L18.3333333,18.3333333 Z M19.8333333,13 C18.5446689,13 17.5,11.9553311 17.5,10.6666667 C17.5,9.37800224 18.5446689,8.33333332 19.8333333,8.33333332 C21.1219977,8.33333332 22.1666667,9.37800224 22.1666667,10.6666667 C22.1666667,11.9553311 21.1219977,13 19.8333333,13 L19.8333333,13 Z"
|
||||
id="形状"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
11
src/icons/svg/load.svg
Normal file
11
src/icons/svg/load.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<g id="nav" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="编组" fill="#2C2C2C" fill-rule="nonzero">
|
||||
<path d="M36.2337155,40 L3.83950248,40 C1.72889418,40 0.0139775379,38.0453471 0,35.6236365 L0,4.37640088 C0.0139775379,1.95469028 1.72889418,1.85840768e-05 3.83950248,1.85840768e-05 L14.9511752,1.85840768e-05 C16.0640328,-0.00369883798 17.1228072,0.550449483 17.8498725,1.51717671 L20.1128905,4.4347524 C20.3423158,4.77835018 20.7020834,4.97388994 21.0791229,4.95991602 L36.157434,4.78486148 C38.2680423,4.78480837 39.9829589,6.7395144 39.9969365,9.16122501 L39.9969365,35.4194062 C40.038138,36.6028117 39.662346,37.7554113 38.9543292,38.6172097 C38.2463123,39.4790081 37.2657085,39.9774138 36.2337155,40 Z M3.83950248,2.91732087 C3.49793346,2.90977297 3.16798756,3.05999817 2.92403359,3.33442832 C2.68007963,3.60885847 2.54271685,3.9843978 2.54271685,4.37640088 L2.54271685,35.6236365 C2.54271685,36.0156396 2.68007963,36.3911789 2.92403359,36.665609 C3.16798756,36.9400392 3.49793346,37.0902644 3.83950248,37.0827165 L36.2337155,37.0827165 C36.5752845,37.0902644 36.9052304,36.9400392 37.1491844,36.665609 C37.3931384,36.3911789 37.5305011,36.0156396 37.5305011,35.6236365 L37.5305011,9.36545531 C37.5166505,8.55509182 36.9400969,7.90651164 36.2337155,7.90666746 L21.1808316,8.081722 C20.0457824,8.04929372 18.9788833,7.45316829 18.2567072,6.44787962 L16.0191163,3.53030393 C15.7683442,3.14277565 15.3718285,2.9152897 14.9511752,2.91732087 L3.83950248,2.91732087 Z"
|
||||
id="形状"></path>
|
||||
<path d="M19.6297743,34.1356729 C18.9193558,34.1379385 18.2358159,33.8242143 17.7227366,33.2604002 L10.094586,24.5076731 C9.79793204,24.0911239 9.71126472,23.5276067 9.86574148,23.0197095 C10.0642536,22.4650678 10.5383227,22.1062867 11.0608184,22.115261 L14.468059,22.115261 L14.5951949,15.9883521 C14.5951949,13.5713533 16.3028146,11.6119886 18.4092702,11.6119886 L21.2062588,11.6119886 C22.2222213,11.580666 23.2070622,12.0159004 23.9422295,12.8211064 C24.6773969,13.6263123 25.1020828,14.7348887 25.1220427,15.9008248 L25.1220427,22.0277338 L29.0123996,22.0277338 C29.5542971,22.0323518 30.0340795,22.4305961 30.2074765,23.0197095 C30.3892691,23.5821514 30.2589376,24.214844 29.8769233,24.6243761 L21.3842489,33.3771032 C20.9049863,33.8771605 20.2774602,34.1484795 19.6297743,34.1356729 L19.6297743,34.1356729 Z M14.0866515,24.9453095 L19.5280656,31.1889214 L25.6814405,24.9453095 L25.1220427,24.9453095 C24.4250554,24.9463098 23.7582658,24.61898 23.2775845,24.0398572 C22.7969032,23.4607345 22.5444759,22.6805956 22.5793259,21.881855 L22.5793259,16.0467036 C22.5793259,15.2410373 22.0101193,14.5879158 21.3079674,14.5879158 L18.4092702,14.5879158 C17.7071183,14.5879158 17.1379118,15.2410373 17.1379118,16.0467036 L17.1379118,21.881855 C17.1748463,22.7065969 16.9054399,23.5106656 16.3965175,24.0946156 C15.8875952,24.6785656 15.1868356,24.9876891 14.468059,24.9453095 L14.0866515,24.9453095 Z"
|
||||
id="形状"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
9
src/icons/svg/open.svg
Normal file
9
src/icons/svg/open.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<svg width="40px" height="36px" viewBox="0 0 40 36" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<g id="nav" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="编组" fill="#2C2C2C" fill-rule="nonzero">
|
||||
<path d="M39.5184707,15.1762497 C38.9863664,14.2562983 38.0741393,13.7049772 37.0985888,13.7137498 L34.3087251,13.7137498 L34.3087251,10.6199998 C34.3421381,7.71456558 32.2812764,5.32557051 29.6989502,5.27624991 L19.3494556,5.27624991 L12.1298083,0 L4.6101755,0 C2.02784931,0.0493205994 -0.0330123801,2.43831567 0.000400616465,5.3437499 L0.000400616465,33.8174995 C0.0328456322,35.0337025 0.918799731,36.0005471 2.00030296,36 L31.0988818,36 C32.2579248,36.0005366 33.3067275,35.2271541 33.7687514,34.0312495 L39.7684584,18.2024997 C40.1498854,17.2118994 40.0556235,16.0708043 39.5184707,15.1762497 Z M2.00030296,28.6424995 L2.00030296,5.3437499 C1.98149429,4.54404572 2.24595139,3.76871561 2.73544863,3.18846425 C3.22494587,2.6082129 3.89934938,2.27061512 4.6101755,2.24999993 L11.5398371,2.24999993 L18.7594845,7.52624989 L29.6989502,7.52624989 C30.4097763,7.54686508 31.0841798,7.88446285 31.573677,8.46471419 C32.0631743,9.04496554 32.3276314,9.82029564 32.3088227,10.6199998 L32.3088227,13.7137498 L8.99996109,13.7137498 C7.79333233,13.7127291 6.71132877,14.549632 6.28009396,15.8174997 L2.00030296,28.6424995 Z M37.9285483,17.3249997 L34.3087251,26.8649996 L31.9288413,33.1424995 C31.7849627,33.5134112 31.4585871,33.7523063 31.0988818,33.7499995 L2.41028295,33.8512495 L8.12000408,16.6387498 C8.2595245,16.2490292 8.59652713,15.994778 8.96996256,15.9974998 L37.0985888,15.9974998 C37.4037362,15.9909693 37.690574,16.1608157 37.8585517,16.4474997 C38.0057728,16.7103851 38.0318123,17.0368238 37.9285483,17.3249997 Z"
|
||||
id="形状"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="40px" height="39px" viewBox="0 0 40 39" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path d="M24,8.8817842e-16 L24,9.50399999 C24.000544,9.7366622 23.8405349,9.9389535 23.614,9.99200001 L23.5,10.004 L11.5,10.004 C11.2686763,10.0038344 11.0676671,9.84501227 11.014,9.62000001 L11,9.50399999 L11,8.8817842e-16 L24,8.8817842e-16 Z M30.518,24.08 C30.7941424,24.08 31.018,24.3038576 31.018,24.58 L31.016,39 L8.99800002,39 L8.99999999,24.58 C8.99999999,24.3038576 9.22385762,24.08 9.50000001,24.08 L30.518,24.08 Z M27.272,0 C27.824,0 28.358,0.182000015 28.792,0.514000031 L39.3,9.5 C39.794,9.97199999 40,10.636 40,11.32 L40,34.5 C40,36.9852813 37.9852814,39 35.5,39 L34.016,39 L34.016,24.58 C34.016,22.6470034 32.4489966,21.08 30.516,21.08 L9.5,21.08 C7.56700338,21.08 6,22.6470034 6,24.58 L5.99800003,39 L4.5,39 C2.01471862,39 -1.33226763e-15,36.9852813 -1.33226763e-15,34.5 L-1.33226763e-15,4.5 C-1.33226763e-15,2.01471862 2.01471862,0 4.5,0 L8,0 L8,9.50399999 C7.99902691,11.326053 9.39612568,12.8440713 11.212,12.994 L11.5,13.004 L23.5,13.004 C25.3212849,13.003932 26.8381343,11.6071085 26.988,9.79199999 L27,9.50399999 L27,0 L27.272,0 Z"
|
||||
<path d="M37.3333333,36 L37.3333333,11.76 C37.3333333,11.4133333 37.188,11.0666667 36.9333333,10.8133333 L29.1066667,3.05333333 C28.8599789,2.8045242 28.5237027,2.66520978 28.1733333,2.66665535 L26.6666667,2.66665535 L26.6666667,9.33333333 C26.6666667,11.5333333 24.8666667,13.3333333 22.6666667,13.3333333 L9.33333333,13.3333333 C7.13333333,13.3333333 5.33333333,11.5333333 5.33333333,9.33333333 L5.33333333,2.66665535 L4,2.66665535 C3.26666667,2.66665535 2.66666667,3.26666667 2.66666667,4 L2.66666667,36 C2.66666667,36.7333333 3.26666667,37.3333333 4,37.3333333 L6.66666667,37.3333333 L6.66666667,25.3333333 C6.66666667,23.1333333 8.46666667,21.3333333 10.6666667,21.3333333 L29.3333333,21.3333333 C31.5333333,21.3333333 33.3333333,23.1333333 33.3333333,25.3333333 L33.3333333,37.3333333 L36,37.3333333 C36.7346667,37.3333333 37.3333333,36.7333333 37.3333333,36 Z M30.6666667,37.3333333 L30.6666667,25.3333333 C30.6666667,24.6 30.068,24 29.3333333,24 L10.6666667,24 C9.93333333,24 9.33333333,24.6 9.33333333,25.3333333 L9.33333333,37.3333333 L30.6666667,37.3333333 Z M8,2.66666667 L8,9.33333333 C8,10.0666667 8.6,10.6666667 9.33333333,10.6666667 L22.6666667,10.6666667 C23.4013333,10.6666667 24,10.0666667 24,9.33333333 L24,2.66666667 L8,2.66666667 Z M38.8133333,8.92 C39.5746667,9.66666667 40,10.7066667 40,11.76 L40,36 C40,38.2 38.2,40 36,40 L4,40 C1.8,40 0,38.2 0,36 L0,4 C0,1.8 1.8,0 4,0 L28.1733333,0 C29.2413333,0 30.2413333,0.413333333 30.9866667,1.16 L38.8133333,8.92 Z M20,9.33333333 C19.2636203,9.33333333 18.6666667,8.73637967 18.6666667,8 L18.6666667,5.33333333 C18.6666667,4.59695367 19.2636203,4 20,4 C20.7363797,4 21.3333333,4.59695367 21.3333333,5.33333333 L21.3333333,8 C21.3333333,8.73637967 20.7363797,9.33333333 20,9.33333333 Z"
|
||||
id="形状"></path>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -190,7 +190,7 @@ export default {
|
||||
|
||||
.icons {
|
||||
vertical-align: middle !important;
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #1F2329;
|
||||
margin-right: 10px;
|
||||
@@ -198,7 +198,7 @@ export default {
|
||||
|
||||
.icons-title {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
|
||||
.menu-main.mobile-view-switch ::v-deep .el-submenu__icon-arrow {
|
||||
right: 10px;
|
||||
|
@@ -90,8 +90,8 @@ export default {
|
||||
children: [
|
||||
{
|
||||
path: 'adhoc',
|
||||
name: 'Adhoc',
|
||||
component: () => import('@/views/ops/Job/QuickJob'),
|
||||
name: 'QuickAdhoc',
|
||||
component: () => import('@/views/ops/Adhoc/QuickJob'),
|
||||
meta: {
|
||||
title: i18n.t('QuickJob'),
|
||||
icon: 'adhoc',
|
||||
@@ -185,7 +185,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'adhoc/:id/update',
|
||||
path: 'command/:id/update',
|
||||
name: 'AdhocUpdate',
|
||||
component: () => import('@/views/ops/Template/Adhoc/AdhocUpdateCreate'),
|
||||
hidden: true,
|
||||
@@ -196,7 +196,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'adhoc/create',
|
||||
path: 'command/create',
|
||||
name: 'AdhocCreate',
|
||||
hidden: true,
|
||||
component: () => import('@/views/ops/Template/Adhoc/AdhocUpdateCreate'),
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'adhoc/:id',
|
||||
path: 'command/:id',
|
||||
component: () => import('@/views/ops/Template/Adhoc/AdhocDetail'),
|
||||
name: 'AdhocDetail',
|
||||
hidden: true,
|
||||
|
@@ -2,7 +2,7 @@ import i18n from '@/i18n/i18n'
|
||||
import ProtocolSelector from '@/components/Form/FormFields/ProtocolSelector'
|
||||
import AssetAccounts from '@/views/assets/Asset/AssetCreateUpdate/components/AssetAccounts'
|
||||
import rules from '@/components/Form/DataForm/rules'
|
||||
import { JSONManyToManySelect, Select2 } from '@/components/Form/FormFields'
|
||||
import { JSONManyToManySelect, NestedObjectSelect2, Select2 } from '@/components/Form/FormFields'
|
||||
import { message } from '@/utils/message'
|
||||
|
||||
export const filterSelectValues = (values) => {
|
||||
@@ -142,13 +142,13 @@ export const assetFieldsMeta = (vm) => {
|
||||
labels: {
|
||||
name: 'labels',
|
||||
type: 'm2m',
|
||||
component: Select2,
|
||||
component: NestedObjectSelect2,
|
||||
el: {
|
||||
multiple: true,
|
||||
url: '/api/v1/labels/labels/',
|
||||
ajax: {
|
||||
transformOption: (item) => {
|
||||
return { label: `${item.name}:${item.value}`, value: `${item.name}:${item.value}` }
|
||||
return { label: `${item.name}:${item.value}`, value: `${item.id}` }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,9 +13,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog'
|
||||
import Dialog from '@/components/Dialog/index.vue'
|
||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||
import CodeEditor from '@/components/Form/FormFields/CodeEditor'
|
||||
import CodeEditor from '@/components/Form/FormFields/CodeEditor.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
@@ -54,9 +54,9 @@ import AssetTreeTable from '@/components/Apps/AssetTreeTable'
|
||||
import Term from '@/components/Widgets/Term'
|
||||
import CodeEditor from '@/components/Form/FormFields/CodeEditor'
|
||||
import Page from '@/layout/components/Page'
|
||||
import AdhocOpenDialog from '@/views/ops/Job/AdhocOpenDialog'
|
||||
import AdhocSaveDialog from '@/views/ops/Job/AdhocSaveDialog'
|
||||
import VariableHelpDialog from '@/views/ops/Job/VariableHelpDialog'
|
||||
import AdhocOpenDialog from './AdhocOpenDialog.vue'
|
||||
import AdhocSaveDialog from './AdhocSaveDialog.vue'
|
||||
import VariableHelpDialog from './VariableHelpDialog.vue'
|
||||
import { createJob, getJob, getTaskDetail, StopJob } from '@/api/ops'
|
||||
|
||||
export default {
|
||||
@@ -243,7 +243,7 @@ export default {
|
||||
openCommand: {
|
||||
type: 'button',
|
||||
align: 'right',
|
||||
icon: 'load-file',
|
||||
icon: 'open',
|
||||
tip: this.$t('OpenCommand'),
|
||||
callback: (val, setting) => {
|
||||
this.showOpenAdhocDialog = true
|
||||
@@ -252,7 +252,7 @@ export default {
|
||||
saveCommand: {
|
||||
type: 'button',
|
||||
align: 'right',
|
||||
icon: 'save-line',
|
||||
icon: 'save',
|
||||
tip: this.$t('SaveCommand'),
|
||||
callback: (val, setting) => {
|
||||
if (!this.command) {
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
help: {
|
||||
type: 'button',
|
||||
align: 'right',
|
||||
icon: 'help',
|
||||
icon: 'info',
|
||||
tip: this.$t('Help'),
|
||||
callback: (val, setting) => {
|
||||
this.showHelpDialog = true
|
@@ -11,7 +11,7 @@ import AssetSelect from '@/components/Apps/AssetSelect'
|
||||
import CodeEditor from '@/components/Form/FormFields/CodeEditor'
|
||||
import { CronTab } from '@/components'
|
||||
import i18n from '@/i18n/i18n'
|
||||
import VariableHelpDialog from '@/views/ops/Job/VariableHelpDialog'
|
||||
import VariableHelpDialog from '@/views/ops/Adhoc/VariableHelpDialog.vue'
|
||||
import { Required } from '@/components/Form/DataForm/rules'
|
||||
|
||||
export default {
|
||||
|
@@ -56,7 +56,6 @@ export default {
|
||||
width: '240px'
|
||||
},
|
||||
summary: {
|
||||
label: this.$t('Success/Total'),
|
||||
formatter: (row) => {
|
||||
return row.summary['success'] + '/' + row.summary['total']
|
||||
}
|
||||
|
Reference in New Issue
Block a user