dashboard-shell-shell 3.0.5-test.5 → 3.0.5-test.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/images/pl/half-logo.svg +23 -2
- package/assets/images/pl/harvester.png +0 -0
- package/assets/styles/app.scss +0 -4
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +1 -2
- package/assets/styles/base/_variables.scss +4 -11
- package/assets/styles/global/_button.scss +25 -43
- package/assets/styles/global/_columns.scss +1 -3
- package/assets/styles/global/_form.scss +13 -45
- package/assets/styles/global/_labeled-input.scss +26 -54
- package/assets/styles/global/_layout.scss +3 -8
- package/assets/styles/global/_select.scss +17 -25
- package/assets/styles/global/_table.scss +1 -7
- package/assets/styles/global/_tooltip.scss +8 -56
- package/assets/styles/themes/_dark.scss +0 -3
- package/assets/styles/themes/_light.scss +43 -66
- package/assets/styles/vendor/vue-select.scss +9 -22
- package/assets/translations/en-us.yaml +4 -28
- package/assets/translations/zh-hans.yaml +189 -452
- package/components/ActionDropdown.vue +1 -2
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -2
- package/components/AppModal.vue +5 -46
- package/components/BrandImage.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonMultiAction.vue +0 -1
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +6 -20
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CopyToClipboard.vue +0 -15
- package/components/CruResource.vue +8 -9
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +17 -29
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +23 -23
- package/components/Drawer/ResourceDetailDrawer/index.vue +2 -2
- package/components/ExplorerMembers.vue +3 -18
- package/components/ExplorerProjectsNamespaces.vue +5 -19
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -3
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/IndentedPanel.vue +10 -4
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -20
- package/components/ModalWithCard.vue +3 -12
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +11 -30
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +3 -1
- package/components/Resource/Detail/Metadata/KeyValue.vue +4 -8
- package/components/Resource/Detail/Metadata/index.vue +1 -2
- package/components/Resource/Detail/TitleBar/Title.vue +3 -4
- package/components/Resource/Detail/TitleBar/index.vue +24 -103
- package/components/ResourceDetail/Masthead/legacy.vue +38 -181
- package/components/ResourceDetail/legacy.vue +14 -32
- package/components/ResourceList/Masthead.vue +54 -226
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +2 -24
- package/components/SideNav.vue +20 -74
- package/components/SortableTable/THead.vue +3 -33
- package/components/SortableTable/index.vue +464 -1017
- package/components/SortableTable/paging.js +16 -26
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +30 -48
- package/components/YamlEditor.vue +1 -0
- package/components/auth/Principal.vue +13 -37
- package/components/auth/RoleDetailEdit.vue +7 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/ArrayList.vue +33 -41
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +59 -64
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +8 -11
- package/components/form/InputWithSelect.vue +5 -8
- package/components/form/KeyValue.vue +7 -47
- package/components/form/LabeledSelect.vue +242 -214
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +7 -24
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +20 -59
- package/components/form/Password.vue +7 -16
- package/components/form/PodAffinity.vue +5 -4
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +17 -18
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +6 -3
- package/components/form/Select.vue +2 -5
- package/components/form/SimpleSecretSelector.vue +9 -29
- package/components/form/Taints.vue +1 -2
- package/components/form/UnitInput.vue +3 -8
- package/components/form/WorkloadPorts.vue +123 -143
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +99 -132
- package/components/nav/Header.vue +27 -124
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +15 -19
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +41 -63
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +11 -15
- package/config/product/auth.js +7 -17
- package/config/product/settings.js +9 -19
- package/config/settings.ts +0 -28
- package/config/table-headers.js +2 -3
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +12 -36
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +2 -1
- package/edit/token.vue +12 -31
- package/edit/workload/index.vue +4 -4
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +3 -7
- package/list/namespace.vue +0 -3
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/account/index.vue +25 -79
- package/pages/auth/login.vue +52 -220
- package/pages/auth/setup.vue +19 -142
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +1 -19
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +102 -174
- package/pages/c/_cluster/settings/brand.vue +302 -350
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +30 -70
- package/pages/prefs.vue +25 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +55 -38
- package/rancher-components/Banner/Banner.vue +8 -12
- package/rancher-components/Card/Card.vue +8 -7
- package/rancher-components/Form/Checkbox/Checkbox.vue +0 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +3 -42
- package/rancher-components/Form/Radio/RadioButton.vue +11 -35
- package/rancher-components/Form/Radio/RadioGroup.vue +5 -13
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -12
- package/rancher-components/RcDropdown/RcDropdown.vue +7 -35
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +6 -12
- package/rancher-components/RcDropdown/types.ts +0 -1
- package/rancher-components/StringList/StringList.vue +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +2 -5
- package/store/modal.ts +3 -3
- package/store/prefs.js +4 -11
- package/store/type-map.js +2 -32
- package/types/shell/index.d.ts +67 -74
- package/utils/error.js +8 -87
- package/utils/router.js +0 -21
- package/utils/select.js +3 -26
- package/utils/string.js +5 -8
- package/utils/title.ts +1 -1
- package/assets/icons/demo.css +0 -539
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +0 -1131
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +0 -216
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +0 -1
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +0 -324
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +0 -3
- package/assets/images/action.svg +0 -6
- package/assets/images/login/password.svg +0 -20
- package/assets/images/login/user.svg +0 -6
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +0 -19
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +0 -5
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +0 -63
- package/components/DotState.vue +0 -84
- package/components/breadcrumb/index.vue +0 -340
- package/pages/account/pri.vue +0 -229
- package/utils/errorTranslate.json +0 -1336
|
@@ -212,7 +212,6 @@ export default {
|
|
|
212
212
|
border: 1px solid var(--dropdown-border);
|
|
213
213
|
padding: 0px;
|
|
214
214
|
text-align: left;
|
|
215
|
-
border-radius: 2px;
|
|
216
215
|
|
|
217
216
|
LI {
|
|
218
217
|
padding: 10px;
|
|
@@ -223,7 +222,7 @@ export default {
|
|
|
223
222
|
|
|
224
223
|
> .divider-inner {
|
|
225
224
|
padding: 0;
|
|
226
|
-
border-bottom:
|
|
225
|
+
border-bottom: 1px solid var(--dropdown-divider);
|
|
227
226
|
width: 125%;
|
|
228
227
|
margin: 0 auto;
|
|
229
228
|
}
|
|
@@ -305,7 +305,7 @@ export default {
|
|
|
305
305
|
color: var(--dropdown-text);
|
|
306
306
|
background-color: var(--dropdown-bg);
|
|
307
307
|
border: 1px solid var(--dropdown-border);
|
|
308
|
-
border-radius:
|
|
308
|
+
border-radius: 5px;
|
|
309
309
|
box-shadow: 0 5px 20px var(--shadow);
|
|
310
310
|
|
|
311
311
|
LI {
|
|
@@ -326,7 +326,7 @@ export default {
|
|
|
326
326
|
|
|
327
327
|
&.divider {
|
|
328
328
|
padding: 0;
|
|
329
|
-
border-bottom:
|
|
329
|
+
border-bottom: 1px solid var(--dropdown-divider);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
&:not(.divider):hover {
|
|
@@ -18,7 +18,6 @@ type RcDropdownMenuComponentProps = {
|
|
|
18
18
|
dataTestid?: string;
|
|
19
19
|
resource: Object;
|
|
20
20
|
customActions?: DropdownOption[];
|
|
21
|
-
showIcon: Boolean;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
const props = defineProps <RcDropdownMenuComponentProps>();
|
|
@@ -102,6 +101,5 @@ const menuOptions = () => {
|
|
|
102
101
|
:data-testid="dataTestid"
|
|
103
102
|
@update:open="openChanged"
|
|
104
103
|
@select="(e: MouseEvent, option: object) => execute(option, e)"
|
|
105
|
-
:showIcon="showIcon"
|
|
106
104
|
/>
|
|
107
105
|
</template>
|
package/components/AppModal.vue
CHANGED
|
@@ -30,7 +30,7 @@ export default defineComponent({
|
|
|
30
30
|
*/
|
|
31
31
|
width: {
|
|
32
32
|
type: [Number, String],
|
|
33
|
-
default:
|
|
33
|
+
default: 600,
|
|
34
34
|
validator(value) {
|
|
35
35
|
if (typeof value === 'number') {
|
|
36
36
|
return value > 0;
|
|
@@ -101,7 +101,7 @@ export default defineComponent({
|
|
|
101
101
|
return `${ this.width }${ uom }`;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
return '
|
|
104
|
+
return '600px';
|
|
105
105
|
},
|
|
106
106
|
stylesPropToObj(): object {
|
|
107
107
|
return this.styles.split(';')
|
|
@@ -164,14 +164,6 @@ export default defineComponent({
|
|
|
164
164
|
this.$emit('close');
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
close(event: MouseEvent) {
|
|
168
|
-
if (
|
|
169
|
-
this.$refs.modalRef
|
|
170
|
-
) {
|
|
171
|
-
this.$emit('close');
|
|
172
|
-
}
|
|
173
|
-
// this.$emit('close');
|
|
174
|
-
},
|
|
175
167
|
handleEscapeKey(event: KeyboardEvent) {
|
|
176
168
|
if (this.clickToClose && event.key === 'Escape') {
|
|
177
169
|
this.$emit('close');
|
|
@@ -214,20 +206,8 @@ export default defineComponent({
|
|
|
214
206
|
aria-modal="true"
|
|
215
207
|
@click.stop
|
|
216
208
|
>
|
|
217
|
-
<div
|
|
218
|
-
class="close-dailog-icon"
|
|
219
|
-
>
|
|
220
|
-
<button
|
|
221
|
-
class="btn btn-sm role-link hide-bar"
|
|
222
|
-
@click="close"
|
|
223
|
-
>
|
|
224
|
-
<i class="icon icon-x" />
|
|
225
|
-
</button>
|
|
226
|
-
</div>
|
|
227
|
-
<div>
|
|
228
209
|
<slot><!--Empty content--></slot>
|
|
229
210
|
</div>
|
|
230
|
-
</div>
|
|
231
211
|
</div>
|
|
232
212
|
</transition>
|
|
233
213
|
</teleport>
|
|
@@ -240,21 +220,18 @@ export default defineComponent({
|
|
|
240
220
|
left: 0;
|
|
241
221
|
width: 100vw;
|
|
242
222
|
height: 100vh;
|
|
243
|
-
|
|
244
|
-
background-color: var(--overlay-model-bg);
|
|
223
|
+
background-color: var(--overlay-bg);
|
|
245
224
|
display: flex;
|
|
246
225
|
justify-content: center;
|
|
247
226
|
align-items: center;
|
|
248
|
-
|
|
249
|
-
z-index: 50;
|
|
227
|
+
z-index: z-index('modalOverlay');
|
|
250
228
|
|
|
251
229
|
.modal-container {
|
|
252
230
|
background-color: var(--modal-bg);
|
|
253
231
|
border-radius: var(--border-radius);
|
|
254
232
|
max-height: 95vh;
|
|
255
233
|
overflow: auto;
|
|
256
|
-
border:
|
|
257
|
-
position: relative;
|
|
234
|
+
border: 2px solid var(--modal-border);
|
|
258
235
|
}
|
|
259
236
|
}
|
|
260
237
|
|
|
@@ -267,22 +244,4 @@ export default defineComponent({
|
|
|
267
244
|
.modal-fade-leave-to {
|
|
268
245
|
opacity: 0;
|
|
269
246
|
}
|
|
270
|
-
.hide-bar{
|
|
271
|
-
width: 32px;
|
|
272
|
-
min-width: 32px !important;
|
|
273
|
-
}
|
|
274
|
-
.close-dailog-icon{
|
|
275
|
-
position: absolute;
|
|
276
|
-
right: 13px;
|
|
277
|
-
top: 18px;
|
|
278
|
-
& > button{
|
|
279
|
-
color:var(--body-text) !important;
|
|
280
|
-
min-width: 32px !important;
|
|
281
|
-
width: 32px !important;
|
|
282
|
-
& > button:hover{
|
|
283
|
-
color:var(--body-text) !important;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
}
|
|
288
247
|
</style>
|
|
@@ -196,8 +196,7 @@ export default {
|
|
|
196
196
|
@update:modelValue="$emit('click-action', $event)"
|
|
197
197
|
>
|
|
198
198
|
<template #no-options>
|
|
199
|
-
|
|
200
|
-
<!-- <slot name="no-options" /> -->
|
|
199
|
+
<slot name="no-options" />
|
|
201
200
|
</template>
|
|
202
201
|
|
|
203
202
|
<template #selected-option="option">
|
|
@@ -248,35 +247,16 @@ export default {
|
|
|
248
247
|
}
|
|
249
248
|
}
|
|
250
249
|
.button-dropdown {
|
|
251
|
-
|
|
252
|
-
background: var(--accent-btn-hover);
|
|
250
|
+
background: var(--accent-btn);
|
|
253
251
|
border: solid 1px var(--link);
|
|
254
252
|
color: var(--link);
|
|
255
253
|
padding: 0;
|
|
256
254
|
|
|
257
|
-
&{
|
|
258
|
-
:deep() .vs__dropdown-toggle .vs__actions,
|
|
259
|
-
:deep() .vs__selected-options {
|
|
260
|
-
background: var(--accent-btn-hover);
|
|
261
|
-
}
|
|
262
|
-
:deep() .vs__selected-options .vs__selected button {
|
|
263
|
-
background-color: transparent;
|
|
264
|
-
color: var(--accent-btn-hover-text);
|
|
265
|
-
}
|
|
266
|
-
:deep() .vs__dropdown-toggle .vs__actions {
|
|
267
|
-
&:after {
|
|
268
|
-
color: var(--accent-btn-hover-text);
|
|
269
|
-
padding-top: 10px;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
255
|
&.vs--open :deep() {
|
|
275
256
|
outline: none;
|
|
276
257
|
box-shadow: none;
|
|
277
258
|
}
|
|
278
259
|
|
|
279
|
-
|
|
280
260
|
&:hover {
|
|
281
261
|
:deep() .vs__dropdown-toggle .vs__actions,
|
|
282
262
|
:deep() .vs__selected-options {
|
|
@@ -295,7 +275,6 @@ export default {
|
|
|
295
275
|
|
|
296
276
|
:deep() > .vs__dropdown-toggle {
|
|
297
277
|
width: 100%;
|
|
298
|
-
width: 100px;
|
|
299
278
|
display: grid;
|
|
300
279
|
grid-template-columns: 75% 25%;
|
|
301
280
|
border: none;
|
|
@@ -304,7 +283,7 @@ export default {
|
|
|
304
283
|
.vs__actions {
|
|
305
284
|
|
|
306
285
|
&:after {
|
|
307
|
-
color: var(--
|
|
286
|
+
color: var(--link);
|
|
308
287
|
line-height: 1;
|
|
309
288
|
}
|
|
310
289
|
}
|
|
@@ -318,8 +297,7 @@ export default {
|
|
|
318
297
|
button {
|
|
319
298
|
border: none;
|
|
320
299
|
background: transparent;
|
|
321
|
-
color: var(--
|
|
322
|
-
min-width: 83px;
|
|
300
|
+
color: var(--link);
|
|
323
301
|
}
|
|
324
302
|
}
|
|
325
303
|
.vs__search {
|
|
@@ -159,7 +159,7 @@ export default {
|
|
|
159
159
|
display: flex;
|
|
160
160
|
align-items: center;
|
|
161
161
|
justify-content: center;
|
|
162
|
-
color: var(--
|
|
162
|
+
color: var(--default-active-text);
|
|
163
163
|
font-weight: bold;
|
|
164
164
|
background: var(--nav-icon-badge-bg);
|
|
165
165
|
border: 1px solid var(--border);
|
|
@@ -5,7 +5,7 @@ import { _EDIT, _VIEW } from '@shell/config/query-params';
|
|
|
5
5
|
export default {
|
|
6
6
|
name: 'CodeMirror',
|
|
7
7
|
|
|
8
|
-
emits: ['onReady', 'onInput', 'onChanges', 'onFocus'],
|
|
8
|
+
emits: ['onReady', 'onInput', 'onChanges', 'onFocus', 'validationChanged'],
|
|
9
9
|
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -140,9 +140,9 @@ export default {
|
|
|
140
140
|
},
|
|
141
141
|
|
|
142
142
|
watch: {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
hasLintErrors(neu) {
|
|
144
|
+
this.$emit('validationChanged', !neu);
|
|
145
|
+
},
|
|
146
146
|
|
|
147
147
|
isCodeMirrorContainerFocused: {
|
|
148
148
|
handler(neu) {
|
|
@@ -209,7 +209,7 @@ export default {
|
|
|
209
209
|
},
|
|
210
210
|
|
|
211
211
|
onReady(codeMirrorRef) {
|
|
212
|
-
|
|
212
|
+
this.$emit('validationChanged', true);
|
|
213
213
|
|
|
214
214
|
this.$nextTick(() => {
|
|
215
215
|
codeMirrorRef.refresh();
|
|
@@ -279,19 +279,6 @@ export default {
|
|
|
279
279
|
id="code-mirror-el"
|
|
280
280
|
ref="codeMirrorRef"
|
|
281
281
|
:value="value"
|
|
282
|
-
|
|
283
|
-
:disabled="isDisabled"
|
|
284
|
-
:original-style="true"
|
|
285
|
-
@ready="onReady"
|
|
286
|
-
@input="onInput"
|
|
287
|
-
@changes="onChanges"
|
|
288
|
-
@focus="onFocus"
|
|
289
|
-
@blur="onBlur"
|
|
290
|
-
/>
|
|
291
|
-
<!-- <Codemirror
|
|
292
|
-
id="code-mirror-el"
|
|
293
|
-
ref="codeMirrorRef"
|
|
294
|
-
:value="value"
|
|
295
282
|
:options="combinedOptions"
|
|
296
283
|
:disabled="isDisabled"
|
|
297
284
|
:original-style="true"
|
|
@@ -300,7 +287,7 @@ export default {
|
|
|
300
287
|
@changes="onChanges"
|
|
301
288
|
@focus="onFocus"
|
|
302
289
|
@blur="onBlur"
|
|
303
|
-
/>
|
|
290
|
+
/>
|
|
304
291
|
<span
|
|
305
292
|
v-show="isCodeMirrorFocused"
|
|
306
293
|
class="escape-text"
|
|
@@ -369,7 +356,6 @@ export default {
|
|
|
369
356
|
}
|
|
370
357
|
|
|
371
358
|
.CodeMirror-lines {
|
|
372
|
-
background-color: var(--input-bg);
|
|
373
359
|
color: var(--input-text);
|
|
374
360
|
padding: 0;
|
|
375
361
|
|
|
@@ -59,11 +59,7 @@ export default {
|
|
|
59
59
|
usedAsResourceName: {
|
|
60
60
|
type: Boolean,
|
|
61
61
|
defaut: false
|
|
62
|
-
}
|
|
63
|
-
reserveText: {
|
|
64
|
-
type: String,
|
|
65
|
-
defaut: '预留'
|
|
66
|
-
},
|
|
62
|
+
}
|
|
67
63
|
},
|
|
68
64
|
computed: {
|
|
69
65
|
displayUnits() {
|
|
@@ -95,13 +91,13 @@ export default {
|
|
|
95
91
|
</script>
|
|
96
92
|
|
|
97
93
|
<template>
|
|
98
|
-
|
|
94
|
+
<div class="consumption-gauge">
|
|
99
95
|
<h3 v-if="resourceName && !usedAsResourceName">
|
|
100
96
|
{{ resourceName }}
|
|
101
97
|
</h3>
|
|
102
|
-
<div class="numbers">
|
|
98
|
+
<div class="numbers">
|
|
103
99
|
<!-- @slot Optional slot to use as the title rather than showing the resource name -->
|
|
104
|
-
|
|
100
|
+
<slot
|
|
105
101
|
name="title"
|
|
106
102
|
:amountTemplateValues="amountTemplateValues"
|
|
107
103
|
:formattedPercentage="formattedPercentage"
|
|
@@ -122,22 +118,7 @@ export default {
|
|
|
122
118
|
:color-stops="colorStops"
|
|
123
119
|
/>
|
|
124
120
|
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<div class="consumption-gauge">
|
|
127
|
-
<div
|
|
128
|
-
v-if="resourceName && !usedAsResourceName"
|
|
129
|
-
class="mb-20"
|
|
130
|
-
>
|
|
131
|
-
{{ resourceName }}
|
|
132
|
-
</div>
|
|
133
|
-
<slot
|
|
134
|
-
name="content"
|
|
135
|
-
:amountTemplateValues="amountTemplateValues"
|
|
136
|
-
:formattedPercentage="formattedPercentage"
|
|
137
|
-
>
|
|
138
|
-
<p>{{ formattedPercentage + '(共' + amountTemplateValues.total + ' ' + amountTemplateValues.unit + ',' + reserveText + ' ' + amountTemplateValues.used + ' ' + amountTemplateValues.unit + ')' }}</p>
|
|
139
|
-
</slot>
|
|
140
|
-
</div>
|
|
121
|
+
</div>
|
|
141
122
|
</template>
|
|
142
123
|
|
|
143
124
|
<style lang="scss">
|
|
@@ -42,18 +42,3 @@ export default {
|
|
|
42
42
|
@click="clicked"
|
|
43
43
|
/>
|
|
44
44
|
</template>
|
|
45
|
-
|
|
46
|
-
<style lang="scss"scoped>
|
|
47
|
-
button {
|
|
48
|
-
min-width: auto;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.bg-success{
|
|
52
|
-
background-color: var(--success-hover-text) !important;
|
|
53
|
-
color: #333 !important;
|
|
54
|
-
}
|
|
55
|
-
.bg-success:hover{
|
|
56
|
-
background-color: var(--success-hover-text) !important;
|
|
57
|
-
color: var(--primary) !important;
|
|
58
|
-
}
|
|
59
|
-
</style>
|
|
@@ -711,14 +711,14 @@ export default {
|
|
|
711
711
|
</template>
|
|
712
712
|
</template>
|
|
713
713
|
<div class="controls-steps">
|
|
714
|
-
|
|
714
|
+
<button
|
|
715
715
|
v-if="showYaml"
|
|
716
716
|
type="button"
|
|
717
717
|
class="btn role-secondary"
|
|
718
718
|
@click="showPreviewYaml"
|
|
719
719
|
>
|
|
720
720
|
<t k="cruResource.previewYaml" />
|
|
721
|
-
</button>
|
|
721
|
+
</button>
|
|
722
722
|
<template
|
|
723
723
|
v-if="showPrevious"
|
|
724
724
|
name="back"
|
|
@@ -798,7 +798,7 @@ export default {
|
|
|
798
798
|
#default
|
|
799
799
|
>
|
|
800
800
|
<div>
|
|
801
|
-
|
|
801
|
+
<button
|
|
802
802
|
v-if="showYaml"
|
|
803
803
|
:data-testid="componentTestid + '-yaml'"
|
|
804
804
|
type="button"
|
|
@@ -806,7 +806,7 @@ export default {
|
|
|
806
806
|
@click="showPreviewYaml"
|
|
807
807
|
>
|
|
808
808
|
<t k="cruResource.previewYaml" />
|
|
809
|
-
</button>
|
|
809
|
+
</button>
|
|
810
810
|
<AsyncButton
|
|
811
811
|
v-if="!showSubtypeSelection"
|
|
812
812
|
ref="save"
|
|
@@ -822,7 +822,7 @@ export default {
|
|
|
822
822
|
</template>
|
|
823
823
|
<!------ YAML ------>
|
|
824
824
|
<!-- Hide this section until it's needed. This means we don't need to upfront create initialYaml -->
|
|
825
|
-
|
|
825
|
+
<section
|
|
826
826
|
v-else-if="showYaml && !showAsForm"
|
|
827
827
|
class="cru-resource-yaml-container resource-container cru__content"
|
|
828
828
|
>
|
|
@@ -835,7 +835,7 @@ export default {
|
|
|
835
835
|
:offer-preview="isEdit"
|
|
836
836
|
:done-route="doneRoute"
|
|
837
837
|
:done-override="resource.doneOverride"
|
|
838
|
-
:errors="
|
|
838
|
+
:show-errors="false"
|
|
839
839
|
:apply-hooks="applyHooks"
|
|
840
840
|
class="resource-container cru__content"
|
|
841
841
|
@error="e=>$emit('error', e)"
|
|
@@ -896,7 +896,7 @@ export default {
|
|
|
896
896
|
</slot>
|
|
897
897
|
</template>
|
|
898
898
|
</ResourceYaml>
|
|
899
|
-
</section>
|
|
899
|
+
</section>
|
|
900
900
|
</component>
|
|
901
901
|
</section>
|
|
902
902
|
</template>
|
|
@@ -910,6 +910,7 @@ export default {
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
.create-resource-container {
|
|
913
|
+
|
|
913
914
|
.resource-container {
|
|
914
915
|
display: flex; // Ensures content grows in child CruResources
|
|
915
916
|
flex-direction: column;
|
|
@@ -973,7 +974,6 @@ form.create-resource-container .cru {
|
|
|
973
974
|
}
|
|
974
975
|
}
|
|
975
976
|
.cru {
|
|
976
|
-
height: 100%;
|
|
977
977
|
display: flex;
|
|
978
978
|
flex-direction: column;
|
|
979
979
|
flex-grow: 1;
|
|
@@ -982,7 +982,6 @@ form.create-resource-container .cru {
|
|
|
982
982
|
display: flex;
|
|
983
983
|
flex-direction: column;
|
|
984
984
|
flex-grow: 1;
|
|
985
|
-
height: 100%;
|
|
986
985
|
}
|
|
987
986
|
|
|
988
987
|
&__content {
|
|
@@ -115,12 +115,12 @@ export default {
|
|
|
115
115
|
<style lang="scss">
|
|
116
116
|
.cru-resource-footer {
|
|
117
117
|
display: flex;
|
|
118
|
-
justify-content: flex-
|
|
118
|
+
justify-content: flex-end;
|
|
119
119
|
margin-top: 20px;
|
|
120
120
|
z-index: z-index('cruFooter');
|
|
121
121
|
|
|
122
122
|
.btn {
|
|
123
|
-
margin-left:
|
|
123
|
+
margin-left: 20px;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -102,35 +102,26 @@ export default {
|
|
|
102
102
|
|
|
103
103
|
<template>
|
|
104
104
|
<div class="graph-options">
|
|
105
|
-
<div v-if="hasSummaryAndDetail"
|
|
106
|
-
<ButtonGroup
|
|
107
|
-
v-model:value="value.type"
|
|
108
|
-
:options="detailSummaryOptions"
|
|
105
|
+
<div v-if="hasSummaryAndDetail">
|
|
106
|
+
<ButtonGroup
|
|
107
|
+
v-model:value="value.type"
|
|
108
|
+
:options="detailSummaryOptions"
|
|
109
109
|
/>
|
|
110
110
|
</div>
|
|
111
111
|
<div v-else>
|
|
112
112
|
<div />
|
|
113
113
|
</div>
|
|
114
114
|
<div class="range-refresh">
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<div class="mr-10">
|
|
125
|
-
<LabeledSelect
|
|
126
|
-
v-model:value="value.refreshRate"
|
|
127
|
-
:options="refreshOptions"
|
|
128
|
-
class="gafanana-select"
|
|
129
|
-
:selectWidth="'60px'"
|
|
130
|
-
:label="t('graphOptions.refresh')"
|
|
115
|
+
<LabeledSelect
|
|
116
|
+
v-model:value="value.range"
|
|
117
|
+
:options="rangeOptions"
|
|
118
|
+
:label="t('graphOptions.range')"
|
|
119
|
+
/>
|
|
120
|
+
<LabeledSelect
|
|
121
|
+
v-model:value="value.refreshRate"
|
|
122
|
+
:options="refreshOptions"
|
|
123
|
+
:label="t('graphOptions.refresh')"
|
|
131
124
|
/>
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
125
|
</div>
|
|
135
126
|
</div>
|
|
136
127
|
</template>
|
|
@@ -140,20 +131,17 @@ export default {
|
|
|
140
131
|
&, .range-refresh {
|
|
141
132
|
display: flex;
|
|
142
133
|
flex-direction: row;
|
|
143
|
-
|
|
134
|
+
justify-content: flex-end;
|
|
144
135
|
}
|
|
145
136
|
|
|
146
137
|
& {
|
|
147
|
-
|
|
138
|
+
justify-content: space-between;
|
|
148
139
|
align-items: center;
|
|
149
140
|
}
|
|
150
141
|
|
|
151
|
-
|
|
142
|
+
.labeled-select {
|
|
152
143
|
width: 100px;
|
|
153
144
|
margin-left: 10px;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
.gafanana-select{
|
|
157
|
-
width: 300px;
|
|
145
|
+
}
|
|
158
146
|
}
|
|
159
147
|
</style>
|
|
@@ -35,7 +35,7 @@ const ariaLabel = computed(() => i18n.t('component.drawer.chrome.ariaLabel.close
|
|
|
35
35
|
</div>
|
|
36
36
|
</slot>
|
|
37
37
|
</div>
|
|
38
|
-
<div class="body">
|
|
38
|
+
<div class="body pp-4">
|
|
39
39
|
<slot name="body" />
|
|
40
40
|
</div>
|
|
41
41
|
<div class="footer pp-4">
|
|
@@ -93,7 +93,7 @@ const ariaLabel = computed(() => i18n.t('component.drawer.chrome.ariaLabel.close
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.body {
|
|
96
|
-
background-color: var(--body-bg);
|
|
96
|
+
background-color: var(--drawer-body-bg);
|
|
97
97
|
flex: 1;
|
|
98
98
|
overflow-y: scroll;
|
|
99
99
|
}
|
|
@@ -16,37 +16,37 @@ const store = useStore();
|
|
|
16
16
|
const i18n = useI18n(store);
|
|
17
17
|
</script>
|
|
18
18
|
<template>
|
|
19
|
-
|
|
19
|
+
<Tab
|
|
20
20
|
class="config-tab"
|
|
21
21
|
name="config-tab"
|
|
22
22
|
:label="i18n.t('component.drawer.resourceDetailDrawer.configTab.title')"
|
|
23
23
|
>
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</
|
|
24
|
+
<div class="container">
|
|
25
|
+
<component
|
|
26
|
+
:is="props.component"
|
|
27
|
+
:value="props.resource"
|
|
28
|
+
:liveValue="props.resource"
|
|
29
|
+
:resourceType="props.resourceType"
|
|
30
|
+
:mode="_VIEW"
|
|
31
|
+
:real-mode="_VIEW"
|
|
32
|
+
:initial-value="props.resource"
|
|
33
|
+
:use-tabbed-hash="false /* Have to disable hashing on child components or it modifies the url and closes the drawer */"
|
|
34
|
+
as="config"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</Tab>
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<style lang="scss" scoped>
|
|
41
|
-
.container {
|
|
42
|
-
background-color: var(--body-bg);
|
|
43
|
-
border-radius: var(--border-radius-md);
|
|
44
|
-
padding: 16px;
|
|
45
|
-
max-width: 100%;
|
|
46
|
-
width: 100%;
|
|
47
|
-
position: relative;
|
|
48
|
-
}
|
|
49
41
|
.config-tab {
|
|
42
|
+
.container {
|
|
43
|
+
background-color: var(--body-bg);
|
|
44
|
+
border-radius: var(--border-radius-md);
|
|
45
|
+
padding: 16px;
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
width: 100%;
|
|
48
|
+
position: relative;
|
|
49
|
+
}
|
|
50
50
|
|
|
51
51
|
// Handle the loading indicator
|
|
52
52
|
:deep() .overlay-content-mode {
|