dashboard-shell-shell 1.0.113 → 1.0.114
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/components/ActionDropdown.vue +1 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -1
- package/components/AppModal.vue +6 -78
- package/components/AssignTo.vue +11 -25
- package/components/AsyncButton.vue +7 -24
- package/components/BannerGraphic.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonGroup.vue +0 -4
- package/components/ButtonMultiAction.vue +0 -1
- package/components/CommunityLinks.vue +3 -3
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CopyToClipboardText.vue +1 -2
- package/components/CruResource.vue +7 -12
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +15 -21
- package/components/DetailText.vue +0 -5
- package/components/DisableAuthProviderModal.vue +0 -1
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +14 -56
- package/components/FixedBanner.vue +12 -19
- package/components/GlobalRoleBindings.vue +1 -5
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -4
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -16
- package/components/LandingPagePreference.vue +3 -5
- package/components/LocaleSelector.vue +93 -39
- package/components/ModalWithCard.vue +0 -2
- package/components/MoveModal.vue +0 -1
- package/components/PromptChangePassword.vue +1 -1
- package/components/PromptModal.vue +2 -15
- package/components/PromptRemove.vue +8 -28
- package/components/PromptRestore.vue +0 -1
- package/components/ResourceCancelModal.vue +0 -1
- package/components/ResourceDetail/Masthead.vue +43 -188
- package/components/ResourceDetail/__tests__/Masthead.test.ts +1 -5
- package/components/ResourceDetail/index.vue +14 -49
- package/components/ResourceList/Masthead.vue +18 -80
- package/components/ResourceTable.vue +19 -60
- package/components/SideNav.vue +12 -32
- package/components/SortableTable/THead.vue +5 -34
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +142 -649
- package/components/SortableTable/paging.js +28 -36
- package/components/SortableTable/selection.js +11 -0
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +26 -44
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +2 -2
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/auth/Principal.vue +3 -10
- package/components/auth/__tests__/RoleDetailEdit.test.ts +2 -3
- package/components/form/ArrayList.vue +85 -123
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/Command.vue +15 -6
- package/components/form/EnvVars.vue +8 -16
- package/components/form/Footer.vue +5 -8
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +16 -11
- package/components/form/KeyValue.vue +7 -16
- package/components/form/LabeledSelect.vue +76 -59
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +12 -35
- package/components/form/NameNsDescription.vue +115 -147
- package/components/form/Networking.vue +12 -20
- package/components/form/NodeAffinity.vue +23 -31
- package/components/form/NodeScheduling.vue +3 -13
- package/components/form/Password.vue +5 -11
- package/components/form/PodAffinity.vue +44 -43
- package/components/form/Probe.vue +66 -68
- package/components/form/ResourceQuota/Project.vue +1 -5
- package/components/form/ResourceSelector.vue +9 -7
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +3 -6
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +1 -12
- package/components/form/SSHKnownHosts/index.vue +2 -16
- package/components/form/Security.vue +56 -54
- package/components/form/Select.vue +7 -41
- package/components/form/ShellInput.vue +1 -5
- package/components/form/Tolerations.vue +1 -5
- package/components/form/UnitInput.vue +2 -2
- package/components/form/ValueFromResource.vue +121 -134
- package/components/form/WorkloadPorts.vue +18 -18
- package/components/form/__tests__/ArrayList.test.ts +2 -5
- package/components/form/__tests__/MatchExpressions.test.ts +12 -12
- package/components/form/__tests__/NameNsDescription.test.ts +14 -115
- package/components/form/__tests__/Probe.test.ts +8 -12
- package/components/form/__tests__/SSHKnownHosts.test.ts +0 -11
- package/components/form/__tests__/Select.test.ts +0 -37
- package/components/form/__tests__/UnitInput.test.ts +5 -4
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/ExtensionCache.vue +74 -0
- package/components/formatter/InternalExternalIP.vue +0 -2
- package/components/formatter/Port.vue +24 -0
- package/components/formatter/SecretData.vue +7 -20
- package/components/formatter/SecretType.vue +41 -0
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +27 -60
- package/components/nav/Header.vue +13 -39
- package/components/nav/Jump.vue +0 -7
- package/components/nav/NamespaceFilter.vue +8 -14
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.vue +17 -5
- package/components/nav/Type.vue +35 -32
- package/components/nav/__tests__/TopLevelMenu.test.ts +40 -0
- package/components/templates/blank.vue +1 -4
- package/components/templates/default.vue +0 -8
- package/components/templates/home.vue +1 -10
- package/components/templates/plain.vue +1 -10
- package/package.json +1 -1
- package/components/ActionDropdownShell.vue +0 -71
- package/components/DotState.vue +0 -84
- package/components/ModalManager.vue +0 -55
- package/components/SlideInPanelManager.vue +0 -126
- package/components/StatusBadge.vue +0 -77
- package/components/__tests__/ModalManager.spec.ts +0 -176
- package/components/__tests__/SlideInPanelManager.spec.ts +0 -166
|
@@ -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 {
|
package/components/AppModal.vue
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { defineComponent } from 'vue';
|
|
3
|
-
import {
|
|
4
|
-
DEFAULT_FOCUS_TRAP_OPTS,
|
|
5
|
-
useBasicSetupFocusTrap,
|
|
6
|
-
getFirstFocusableElement,
|
|
7
|
-
useWatcherBasedSetupFocusTrapWithDestroyIncluded
|
|
8
|
-
} from '@shell/composables/focusTrap';
|
|
3
|
+
import { DEFAULT_FOCUS_TRAP_OPTS, useBasicSetupFocusTrap, getFirstFocusableElement } from '@shell/composables/focusTrap';
|
|
9
4
|
|
|
10
5
|
export const DEFAULT_ITERABLE_NODE_SELECTOR = 'body;';
|
|
11
6
|
|
|
@@ -85,21 +80,7 @@ export default defineComponent({
|
|
|
85
80
|
returnFocusFirstIterableNodeSelector: {
|
|
86
81
|
type: String,
|
|
87
82
|
default: DEFAULT_ITERABLE_NODE_SELECTOR,
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* trigger focus trap - but watcher based
|
|
91
|
-
*/
|
|
92
|
-
triggerFocusTrapWatcherBased: {
|
|
93
|
-
type: Boolean,
|
|
94
|
-
default: false,
|
|
95
|
-
},
|
|
96
|
-
/**
|
|
97
|
-
* watcher-based focus trap variable to watch
|
|
98
|
-
*/
|
|
99
|
-
focusTrapWatcherBasedVariable: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
default: false,
|
|
102
|
-
},
|
|
83
|
+
}
|
|
103
84
|
},
|
|
104
85
|
computed: {
|
|
105
86
|
modalWidth(): string {
|
|
@@ -150,19 +131,7 @@ export default defineComponent({
|
|
|
150
131
|
};
|
|
151
132
|
}
|
|
152
133
|
|
|
153
|
-
|
|
154
|
-
useBasicSetupFocusTrap('#modal-container-element', opts);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
created() {
|
|
159
|
-
// This usecase is to cover the PromptModal scenario where it's renders a generic component inside.
|
|
160
|
-
// Due to the architecture of the PromptModal it needs to be handled with a watcher based focus trap
|
|
161
|
-
// but with a dedicated unmount hook
|
|
162
|
-
if (this.triggerFocusTrapWatcherBased) {
|
|
163
|
-
const opts:any = DEFAULT_FOCUS_TRAP_OPTS;
|
|
164
|
-
|
|
165
|
-
useWatcherBasedSetupFocusTrapWithDestroyIncluded(() => this.focusTrapWatcherBasedVariable, '#modal-container-element', opts, true);
|
|
134
|
+
useBasicSetupFocusTrap('#modal-container-element', opts);
|
|
166
135
|
}
|
|
167
136
|
},
|
|
168
137
|
mounted() {
|
|
@@ -181,14 +150,6 @@ export default defineComponent({
|
|
|
181
150
|
this.$emit('close');
|
|
182
151
|
}
|
|
183
152
|
},
|
|
184
|
-
close(event: MouseEvent) {
|
|
185
|
-
if (
|
|
186
|
-
this.$refs.modalRef
|
|
187
|
-
) {
|
|
188
|
-
this.$emit('close');
|
|
189
|
-
}
|
|
190
|
-
// this.$emit('close');
|
|
191
|
-
},
|
|
192
153
|
handleEscapeKey(event: KeyboardEvent) {
|
|
193
154
|
if (this.clickToClose && event.key === 'Escape') {
|
|
194
155
|
this.$emit('close');
|
|
@@ -229,20 +190,8 @@ export default defineComponent({
|
|
|
229
190
|
:style="modalStyles"
|
|
230
191
|
@click.stop
|
|
231
192
|
>
|
|
232
|
-
<div
|
|
233
|
-
class="close-dailog-icon"
|
|
234
|
-
>
|
|
235
|
-
<button
|
|
236
|
-
class="btn btn-sm role-link hide-bar"
|
|
237
|
-
@click="close"
|
|
238
|
-
>
|
|
239
|
-
<i class="icon icon-x" />
|
|
240
|
-
</button>
|
|
241
|
-
</div>
|
|
242
|
-
<div>
|
|
243
193
|
<slot><!--Empty content--></slot>
|
|
244
194
|
</div>
|
|
245
|
-
</div>
|
|
246
195
|
</div>
|
|
247
196
|
</transition>
|
|
248
197
|
</teleport>
|
|
@@ -255,21 +204,18 @@ export default defineComponent({
|
|
|
255
204
|
left: 0;
|
|
256
205
|
width: 100vw;
|
|
257
206
|
height: 100vh;
|
|
258
|
-
|
|
259
|
-
background-color: var(--overlay-model-bg);
|
|
207
|
+
background-color: var(--overlay-bg);
|
|
260
208
|
display: flex;
|
|
261
209
|
justify-content: center;
|
|
262
210
|
align-items: center;
|
|
263
|
-
|
|
264
|
-
z-index: 50;
|
|
211
|
+
z-index: z-index('modalOverlay');
|
|
265
212
|
|
|
266
213
|
.modal-container {
|
|
267
214
|
background-color: var(--modal-bg);
|
|
268
215
|
border-radius: var(--border-radius);
|
|
269
216
|
max-height: 95vh;
|
|
270
217
|
overflow: auto;
|
|
271
|
-
border:
|
|
272
|
-
position: relative;
|
|
218
|
+
border: 2px solid var(--modal-border);
|
|
273
219
|
}
|
|
274
220
|
}
|
|
275
221
|
|
|
@@ -282,22 +228,4 @@ export default defineComponent({
|
|
|
282
228
|
.modal-fade-leave-to {
|
|
283
229
|
opacity: 0;
|
|
284
230
|
}
|
|
285
|
-
.hide-bar{
|
|
286
|
-
width: 32px;
|
|
287
|
-
min-width: 32px !important;
|
|
288
|
-
}
|
|
289
|
-
.close-dailog-icon{
|
|
290
|
-
position: absolute;
|
|
291
|
-
right: 13px;
|
|
292
|
-
top: 18px;
|
|
293
|
-
& > button{
|
|
294
|
-
color:var(--body-text) !important;
|
|
295
|
-
min-width: 32px !important;
|
|
296
|
-
width: 32px !important;
|
|
297
|
-
& > button:hover{
|
|
298
|
-
color:var(--body-text) !important;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
}
|
|
303
231
|
</style>
|
package/components/AssignTo.vue
CHANGED
|
@@ -115,7 +115,6 @@ export default {
|
|
|
115
115
|
styles="background-color: var(--nav-bg); border-radius: var(--border-radius); max-height: 100vh;"
|
|
116
116
|
height="auto"
|
|
117
117
|
:scrollable="true"
|
|
118
|
-
:trigger-focus-trap="true"
|
|
119
118
|
@close="close"
|
|
120
119
|
>
|
|
121
120
|
<Card
|
|
@@ -158,20 +157,17 @@ export default {
|
|
|
158
157
|
</template>
|
|
159
158
|
|
|
160
159
|
<template #actions>
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
@click="apply"
|
|
173
|
-
/>
|
|
174
|
-
</div>
|
|
160
|
+
<button
|
|
161
|
+
class="btn role-secondary"
|
|
162
|
+
@click="close"
|
|
163
|
+
>
|
|
164
|
+
{{ t('generic.cancel') }}
|
|
165
|
+
</button>
|
|
166
|
+
|
|
167
|
+
<AsyncButton
|
|
168
|
+
mode="apply"
|
|
169
|
+
@click="apply"
|
|
170
|
+
/>
|
|
175
171
|
</template>
|
|
176
172
|
</Card>
|
|
177
173
|
</app-modal>
|
|
@@ -185,15 +181,5 @@ export default {
|
|
|
185
181
|
& ::-webkit-scrollbar-corner {
|
|
186
182
|
background: rgba(0,0,0,0);
|
|
187
183
|
}
|
|
188
|
-
|
|
189
|
-
.actions-container {
|
|
190
|
-
display: flex;
|
|
191
|
-
justify-content: flex-end;
|
|
192
|
-
width: 100%;
|
|
193
|
-
|
|
194
|
-
.apply-btn {
|
|
195
|
-
margin-left: 20px;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
184
|
}
|
|
199
185
|
</style>
|
|
@@ -11,7 +11,6 @@ export const ASYNC_BUTTON_STATES = {
|
|
|
11
11
|
|
|
12
12
|
const TEXT = 'text';
|
|
13
13
|
const TOOLTIP = 'tooltip';
|
|
14
|
-
const DISABLED_CLASS_STYLE = 'btn-disabled';
|
|
15
14
|
|
|
16
15
|
export type AsyncButtonCallback = (success: boolean) => void;
|
|
17
16
|
|
|
@@ -153,29 +152,9 @@ export default defineComponent({
|
|
|
153
152
|
out[`btn-${ this.size }`] = true;
|
|
154
153
|
}
|
|
155
154
|
|
|
156
|
-
// while we are waiting for the async button to get
|
|
157
|
-
// it's callback we want to the button to appear as disabled
|
|
158
|
-
// but not being actually disabled as need it to be
|
|
159
|
-
// able to return the keyboard navigation focus back to it
|
|
160
|
-
// which can't be done while actually disabled, as per
|
|
161
|
-
// https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols
|
|
162
|
-
if (this.phase === ASYNC_BUTTON_STATES.WAITING) {
|
|
163
|
-
out[DISABLED_CLASS_STYLE] = true;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// used to assist e2e testing mostly when waiting for button to return
|
|
167
|
-
// to it's normal state/phase
|
|
168
|
-
if (this.phase === ASYNC_BUTTON_STATES.ACTION) {
|
|
169
|
-
out['ready-for-action'] = true;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
155
|
return out;
|
|
173
156
|
},
|
|
174
157
|
|
|
175
|
-
appearsDisabled(): boolean {
|
|
176
|
-
return this.disabled || this.phase === ASYNC_BUTTON_STATES.WAITING;
|
|
177
|
-
},
|
|
178
|
-
|
|
179
158
|
displayIcon(): string {
|
|
180
159
|
const exists = this.$store.getters['i18n/exists'];
|
|
181
160
|
const t = this.$store.getters['i18n/t'];
|
|
@@ -225,6 +204,10 @@ export default defineComponent({
|
|
|
225
204
|
return this.phase === ASYNC_BUTTON_STATES.WAITING;
|
|
226
205
|
},
|
|
227
206
|
|
|
207
|
+
isDisabled(): boolean {
|
|
208
|
+
return this.disabled || this.phase === ASYNC_BUTTON_STATES.WAITING;
|
|
209
|
+
},
|
|
210
|
+
|
|
228
211
|
isManualRefresh() {
|
|
229
212
|
return this.mode === 'manual-refresh';
|
|
230
213
|
},
|
|
@@ -249,7 +232,7 @@ export default defineComponent({
|
|
|
249
232
|
|
|
250
233
|
methods: {
|
|
251
234
|
clicked() {
|
|
252
|
-
if ( this.
|
|
235
|
+
if ( this.isDisabled ) {
|
|
253
236
|
return;
|
|
254
237
|
}
|
|
255
238
|
|
|
@@ -300,8 +283,8 @@ export default defineComponent({
|
|
|
300
283
|
:class="classes"
|
|
301
284
|
:name="name"
|
|
302
285
|
:type="type"
|
|
303
|
-
:disabled="
|
|
304
|
-
:aria-disabled="
|
|
286
|
+
:disabled="isDisabled"
|
|
287
|
+
:aria-disabled="isDisabled"
|
|
305
288
|
:tab-index="tabIndex"
|
|
306
289
|
:data-testid="componentTestid + '-async-button'"
|
|
307
290
|
@click="clicked"
|
|
@@ -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 {
|
|
@@ -77,9 +77,6 @@ export default {
|
|
|
77
77
|
const tooltip = opt.tooltipKey ? this.t(opt.tooltipKey) : opt.tooltip;
|
|
78
78
|
|
|
79
79
|
return ariaLabel || tooltip || label || undefined;
|
|
80
|
-
},
|
|
81
|
-
isPressed(opt) {
|
|
82
|
-
return this.value === opt.value;
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
82
|
};
|
|
@@ -100,7 +97,6 @@ export default {
|
|
|
100
97
|
:disabled="disabled || opt.disabled"
|
|
101
98
|
role="button"
|
|
102
99
|
:aria-label="actionAriaLabel(opt)"
|
|
103
|
-
:aria-pressed="isPressed(opt)"
|
|
104
100
|
@click="change(opt.value)"
|
|
105
101
|
>
|
|
106
102
|
<slot
|
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
:aria-label="t('footer.wechat.title')"
|
|
141
141
|
role="link"
|
|
142
142
|
@click="show"
|
|
143
|
-
@
|
|
143
|
+
@keyup.enter="show"
|
|
144
144
|
>
|
|
145
145
|
{{ t('footer.wechat.title') }}
|
|
146
146
|
</a>
|
|
@@ -151,7 +151,6 @@ export default {
|
|
|
151
151
|
name="wechat-modal"
|
|
152
152
|
height="auto"
|
|
153
153
|
:width="640"
|
|
154
|
-
:trigger-focus-trap="true"
|
|
155
154
|
@close="close"
|
|
156
155
|
>
|
|
157
156
|
<div class="wechat-modal">
|
|
@@ -165,7 +164,8 @@ export default {
|
|
|
165
164
|
:aria-label="t('generic.close')"
|
|
166
165
|
role="button"
|
|
167
166
|
@click="close"
|
|
168
|
-
@
|
|
167
|
+
@keyup.enter="close"
|
|
168
|
+
@keyup.space="close"
|
|
169
169
|
>
|
|
170
170
|
{{ t('generic.close') }}
|
|
171
171
|
</button>
|
|
@@ -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">
|
|
@@ -49,10 +49,9 @@ export default {
|
|
|
49
49
|
v-if="text"
|
|
50
50
|
class="copy-to-clipboard-text"
|
|
51
51
|
role="button"
|
|
52
|
+
:aria-label="t('generic.copyToClipboard')"
|
|
52
53
|
:class="{ 'copied': copied, 'plain': plain}"
|
|
53
54
|
href="#"
|
|
54
|
-
:aria-label="t('generic.copyToClipboard')"
|
|
55
|
-
v-bind="$attrs"
|
|
56
55
|
@click="clicked"
|
|
57
56
|
@keyup.space="clicked"
|
|
58
57
|
>
|
|
@@ -544,10 +544,7 @@ export default {
|
|
|
544
544
|
class="flex-right"
|
|
545
545
|
>{{ t('generic.moreInfo') }} <i class="icon icon-external-link" /></a>
|
|
546
546
|
</div>
|
|
547
|
-
<hr
|
|
548
|
-
v-if="subtype.description"
|
|
549
|
-
role="none"
|
|
550
|
-
>
|
|
547
|
+
<hr v-if="subtype.description">
|
|
551
548
|
<div
|
|
552
549
|
v-if="subtype.description"
|
|
553
550
|
class="description"
|
|
@@ -624,14 +621,14 @@ export default {
|
|
|
624
621
|
</template>
|
|
625
622
|
</template>
|
|
626
623
|
<div class="controls-steps">
|
|
627
|
-
|
|
624
|
+
<button
|
|
628
625
|
v-if="showYaml"
|
|
629
626
|
type="button"
|
|
630
627
|
class="btn role-secondary"
|
|
631
628
|
@click="showPreviewYaml"
|
|
632
629
|
>
|
|
633
630
|
<t k="cruResource.previewYaml" />
|
|
634
|
-
</button>
|
|
631
|
+
</button>
|
|
635
632
|
<template
|
|
636
633
|
v-if="showPrevious"
|
|
637
634
|
name="back"
|
|
@@ -711,7 +708,7 @@ export default {
|
|
|
711
708
|
#default
|
|
712
709
|
>
|
|
713
710
|
<div>
|
|
714
|
-
|
|
711
|
+
<button
|
|
715
712
|
v-if="showYaml"
|
|
716
713
|
:data-testid="componentTestid + '-yaml'"
|
|
717
714
|
type="button"
|
|
@@ -719,7 +716,7 @@ export default {
|
|
|
719
716
|
@click="showPreviewYaml"
|
|
720
717
|
>
|
|
721
718
|
<t k="cruResource.previewYaml" />
|
|
722
|
-
</button>
|
|
719
|
+
</button>
|
|
723
720
|
<AsyncButton
|
|
724
721
|
v-if="!showSubtypeSelection"
|
|
725
722
|
ref="save"
|
|
@@ -735,7 +732,7 @@ export default {
|
|
|
735
732
|
</template>
|
|
736
733
|
<!------ YAML ------>
|
|
737
734
|
<!-- Hide this section until it's needed. This means we don't need to upfront create initialYaml -->
|
|
738
|
-
|
|
735
|
+
<section
|
|
739
736
|
v-else-if="showYaml && !showAsForm"
|
|
740
737
|
class="cru-resource-yaml-container resource-container cru__content"
|
|
741
738
|
>
|
|
@@ -809,7 +806,7 @@ export default {
|
|
|
809
806
|
</slot>
|
|
810
807
|
</template>
|
|
811
808
|
</ResourceYaml>
|
|
812
|
-
</section>
|
|
809
|
+
</section>
|
|
813
810
|
</component>
|
|
814
811
|
</section>
|
|
815
812
|
</template>
|
|
@@ -909,8 +906,6 @@ form.create-resource-container .cru {
|
|
|
909
906
|
position: sticky;
|
|
910
907
|
bottom: 0;
|
|
911
908
|
background-color: var(--header-bg);
|
|
912
|
-
height: $footer-height;
|
|
913
|
-
box-sizing: border-box;
|
|
914
909
|
|
|
915
910
|
// Overrides outlet padding
|
|
916
911
|
margin-left: -$space-m;
|
|
@@ -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-
|
|
123
|
+
margin-left: 20px;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -103,26 +103,24 @@ export default {
|
|
|
103
103
|
<template>
|
|
104
104
|
<div class="graph-options">
|
|
105
105
|
<div v-if="hasSummaryAndDetail">
|
|
106
|
-
<ButtonGroup
|
|
107
|
-
v-model:value="value.type"
|
|
108
|
-
:options="detailSummaryOptions"
|
|
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
|
-
<LabeledSelect
|
|
116
|
-
v-model:value="value.range"
|
|
117
|
-
:options="rangeOptions"
|
|
118
|
-
|
|
119
|
-
:label="t('graphOptions.range')"
|
|
115
|
+
<LabeledSelect
|
|
116
|
+
v-model:value="value.range"
|
|
117
|
+
:options="rangeOptions"
|
|
118
|
+
:label="t('graphOptions.range')"
|
|
120
119
|
/>
|
|
121
|
-
<LabeledSelect
|
|
122
|
-
v-model:value="value.refreshRate"
|
|
123
|
-
:options="refreshOptions"
|
|
124
|
-
|
|
125
|
-
:label="t('graphOptions.refresh')"
|
|
120
|
+
<LabeledSelect
|
|
121
|
+
v-model:value="value.refreshRate"
|
|
122
|
+
:options="refreshOptions"
|
|
123
|
+
:label="t('graphOptions.refresh')"
|
|
126
124
|
/>
|
|
127
125
|
</div>
|
|
128
126
|
</div>
|
|
@@ -133,21 +131,17 @@ export default {
|
|
|
133
131
|
&, .range-refresh {
|
|
134
132
|
display: flex;
|
|
135
133
|
flex-direction: row;
|
|
136
|
-
|
|
134
|
+
justify-content: flex-end;
|
|
137
135
|
}
|
|
138
136
|
|
|
139
137
|
& {
|
|
140
|
-
|
|
138
|
+
justify-content: space-between;
|
|
141
139
|
align-items: center;
|
|
142
140
|
}
|
|
143
141
|
|
|
144
|
-
|
|
142
|
+
.labeled-select {
|
|
145
143
|
width: 100px;
|
|
146
144
|
margin-left: 10px;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
.gafanana-select{
|
|
150
|
-
width: 300px;
|
|
151
|
-
margin-left: 10px;
|
|
145
|
+
}
|
|
152
146
|
}
|
|
153
147
|
</style>
|
|
@@ -58,10 +58,6 @@ export default {
|
|
|
58
58
|
},
|
|
59
59
|
|
|
60
60
|
computed: {
|
|
61
|
-
itemLabel() {
|
|
62
|
-
return this.labelKey ? this.t(this.labelKey) : this.label ? this.label : this.t('labels.annotations.singular');
|
|
63
|
-
},
|
|
64
|
-
|
|
65
61
|
isBinary() {
|
|
66
62
|
if ( this.binary === null ) {
|
|
67
63
|
return typeof this.value === 'string' && !asciiLike(this.value);
|
|
@@ -190,7 +186,6 @@ export default {
|
|
|
190
186
|
:text="value"
|
|
191
187
|
class="role-tertiary"
|
|
192
188
|
action-color=""
|
|
193
|
-
:aria-label="t('detailText.copyAriaLabel', {item: itemLabel })"
|
|
194
189
|
/>
|
|
195
190
|
</div>
|
|
196
191
|
</template>
|