dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.9
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/icons/demo.css +539 -0
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +216 -0
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +324 -0
- 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 +3 -0
- package/assets/images/action.svg +6 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +19 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/half-logo.svg +2 -23
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +63 -0
- package/assets/styles/app.scss +4 -0
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +14 -7
- package/assets/styles/global/_button.scss +43 -25
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +45 -13
- package/assets/styles/global/_labeled-input.scss +54 -26
- package/assets/styles/global/_layout.scss +8 -3
- package/assets/styles/global/_select.scss +25 -17
- package/assets/styles/global/_table.scss +7 -1
- package/assets/styles/global/_tooltip.scss +56 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +66 -43
- package/assets/styles/vendor/vue-select.scss +22 -9
- package/assets/translations/en-us.yaml +28 -4
- package/assets/translations/zh-hans.yaml +452 -189
- package/components/ActionDropdown.vue +2 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +2 -0
- package/components/AppModal.vue +46 -5
- package/components/BrandImage.vue +1 -0
- package/components/ButtonDropdown.vue +26 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +20 -6
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +9 -8
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- package/components/DotState.vue +84 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
- package/components/ExplorerMembers.vue +18 -3
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +112 -48
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +3 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/IndentedPanel.vue +4 -10
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +20 -1
- package/components/ModalWithCard.vue +12 -3
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +30 -11
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/index.vue +109 -24
- package/components/ResourceDetail/Masthead/legacy.vue +181 -38
- package/components/ResourceDetail/legacy.vue +32 -14
- package/components/ResourceList/Masthead.vue +226 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +24 -2
- package/components/SideNav.vue +74 -20
- package/components/SortableTable/THead.vue +33 -3
- package/components/SortableTable/index.vue +1016 -463
- package/components/SortableTable/paging.js +26 -16
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +47 -29
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +37 -13
- package/components/auth/RoleDetailEdit.vue +58 -7
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +316 -0
- package/components/form/ArrayList.vue +41 -33
- package/components/form/ArrayListGrouped.vue +10 -2
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Footer.vue +11 -8
- package/components/form/InputWithSelect.vue +8 -5
- package/components/form/KeyValue.vue +47 -7
- package/components/form/LabeledSelect.vue +214 -242
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +24 -7
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +59 -20
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +4 -5
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +3 -6
- package/components/form/Select.vue +5 -2
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/UnitInput.vue +8 -3
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +132 -99
- package/components/nav/Header.vue +124 -27
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +20 -17
- package/components/nav/TopLevelMenu.vue +182 -119
- package/components/nav/Type.vue +63 -41
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +15 -11
- package/config/product/auth.js +17 -7
- package/config/product/settings.js +19 -9
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +17 -4
- 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 +36 -12
- 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 +1 -2
- package/edit/token.vue +31 -12
- package/edit/workload/index.vue +4 -4
- package/list/management.cattle.io.setting.vue +22 -13
- package/list/management.cattle.io.user.vue +7 -3
- package/list/namespace.vue +3 -0
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/package.json +1 -1
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +220 -52
- package/pages/auth/setup.vue +142 -19
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +56 -5
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +174 -102
- package/pages/c/_cluster/settings/brand.vue +350 -302
- package/pages/c/_cluster/settings/performance.vue +61 -38
- package/pages/home.vue +70 -30
- package/pages/prefs.vue +27 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +38 -55
- package/rancher-components/Banner/Banner.vue +12 -8
- package/rancher-components/Card/Card.vue +7 -8
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
- package/rancher-components/Form/Radio/RadioButton.vue +35 -11
- package/rancher-components/Form/Radio/RadioGroup.vue +13 -5
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -4
- package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/rancher-components/StringList/StringList.vue +1 -1
- package/scripts/publish-shell.sh +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 +5 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +32 -2
- package/types/shell/index.d.ts +78 -97
- package/utils/error.js +89 -8
- package/utils/errorTranslate.json +1351 -0
- package/utils/router.js +21 -0
- package/utils/select.js +26 -3
- package/utils/string.js +8 -5
- package/utils/title.ts +1 -1
- package/vue.config.js +1 -1
|
@@ -212,6 +212,7 @@ export default {
|
|
|
212
212
|
border: 1px solid var(--dropdown-border);
|
|
213
213
|
padding: 0px;
|
|
214
214
|
text-align: left;
|
|
215
|
+
border-radius: 2px;
|
|
215
216
|
|
|
216
217
|
LI {
|
|
217
218
|
padding: 10px;
|
|
@@ -222,7 +223,7 @@ export default {
|
|
|
222
223
|
|
|
223
224
|
> .divider-inner {
|
|
224
225
|
padding: 0;
|
|
225
|
-
border-bottom:
|
|
226
|
+
border-bottom: 0px solid var(--dropdown-divider);
|
|
226
227
|
width: 125%;
|
|
227
228
|
margin: 0 auto;
|
|
228
229
|
}
|
|
@@ -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: 3px;
|
|
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: 0px solid var(--dropdown-divider);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
&:not(.divider):hover {
|
|
@@ -18,6 +18,7 @@ type RcDropdownMenuComponentProps = {
|
|
|
18
18
|
dataTestid?: string;
|
|
19
19
|
resource: Object;
|
|
20
20
|
customActions?: DropdownOption[];
|
|
21
|
+
showIcon: Boolean;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
const props = defineProps <RcDropdownMenuComponentProps>();
|
|
@@ -101,5 +102,6 @@ const menuOptions = () => {
|
|
|
101
102
|
:data-testid="dataTestid"
|
|
102
103
|
@update:open="openChanged"
|
|
103
104
|
@select="(e: MouseEvent, option: object) => execute(option, e)"
|
|
105
|
+
:showIcon="showIcon"
|
|
104
106
|
/>
|
|
105
107
|
</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: 610,
|
|
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 '610px';
|
|
105
105
|
},
|
|
106
106
|
stylesPropToObj(): object {
|
|
107
107
|
return this.styles.split(';')
|
|
@@ -164,6 +164,14 @@ 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
|
+
},
|
|
167
175
|
handleEscapeKey(event: KeyboardEvent) {
|
|
168
176
|
if (this.clickToClose && event.key === 'Escape') {
|
|
169
177
|
this.$emit('close');
|
|
@@ -206,8 +214,20 @@ export default defineComponent({
|
|
|
206
214
|
aria-modal="true"
|
|
207
215
|
@click.stop
|
|
208
216
|
>
|
|
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>
|
|
209
228
|
<slot><!--Empty content--></slot>
|
|
210
229
|
</div>
|
|
230
|
+
</div>
|
|
211
231
|
</div>
|
|
212
232
|
</transition>
|
|
213
233
|
</teleport>
|
|
@@ -220,18 +240,21 @@ export default defineComponent({
|
|
|
220
240
|
left: 0;
|
|
221
241
|
width: 100vw;
|
|
222
242
|
height: 100vh;
|
|
223
|
-
background-color: var(--overlay-bg);
|
|
243
|
+
/* background-color: var(--overlay-bg); */
|
|
244
|
+
background-color: var(--overlay-model-bg);
|
|
224
245
|
display: flex;
|
|
225
246
|
justify-content: center;
|
|
226
247
|
align-items: center;
|
|
227
|
-
z-index: z-index('modalOverlay');
|
|
248
|
+
/* z-index: z-index('modalOverlay'); */
|
|
249
|
+
z-index: 50;
|
|
228
250
|
|
|
229
251
|
.modal-container {
|
|
230
252
|
background-color: var(--modal-bg);
|
|
231
253
|
border-radius: var(--border-radius);
|
|
232
254
|
max-height: 95vh;
|
|
233
255
|
overflow: auto;
|
|
234
|
-
border:
|
|
256
|
+
border: 0px;
|
|
257
|
+
position: relative;
|
|
235
258
|
}
|
|
236
259
|
}
|
|
237
260
|
|
|
@@ -244,4 +267,22 @@ export default defineComponent({
|
|
|
244
267
|
.modal-fade-leave-to {
|
|
245
268
|
opacity: 0;
|
|
246
269
|
}
|
|
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
|
+
}
|
|
247
288
|
</style>
|
|
@@ -196,7 +196,8 @@ export default {
|
|
|
196
196
|
@update:modelValue="$emit('click-action', $event)"
|
|
197
197
|
>
|
|
198
198
|
<template #no-options>
|
|
199
|
-
|
|
199
|
+
暂无数据
|
|
200
|
+
<!-- <slot name="no-options" /> -->
|
|
200
201
|
</template>
|
|
201
202
|
|
|
202
203
|
<template #selected-option="option">
|
|
@@ -247,16 +248,35 @@ export default {
|
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
250
|
.button-dropdown {
|
|
250
|
-
background: var(--accent-btn);
|
|
251
|
+
/* background: var(--accent-btn); */
|
|
252
|
+
background: var(--accent-btn-hover);
|
|
251
253
|
border: solid 1px var(--link);
|
|
252
254
|
color: var(--link);
|
|
253
255
|
padding: 0;
|
|
254
256
|
|
|
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
|
+
|
|
255
274
|
&.vs--open :deep() {
|
|
256
275
|
outline: none;
|
|
257
276
|
box-shadow: none;
|
|
258
277
|
}
|
|
259
278
|
|
|
279
|
+
|
|
260
280
|
&:hover {
|
|
261
281
|
:deep() .vs__dropdown-toggle .vs__actions,
|
|
262
282
|
:deep() .vs__selected-options {
|
|
@@ -275,6 +295,7 @@ export default {
|
|
|
275
295
|
|
|
276
296
|
:deep() > .vs__dropdown-toggle {
|
|
277
297
|
width: 100%;
|
|
298
|
+
width: 100px;
|
|
278
299
|
display: grid;
|
|
279
300
|
grid-template-columns: 75% 25%;
|
|
280
301
|
border: none;
|
|
@@ -283,7 +304,7 @@ export default {
|
|
|
283
304
|
.vs__actions {
|
|
284
305
|
|
|
285
306
|
&:after {
|
|
286
|
-
color: var(--
|
|
307
|
+
color: var(--accent-btn-hover-text);
|
|
287
308
|
line-height: 1;
|
|
288
309
|
}
|
|
289
310
|
}
|
|
@@ -297,7 +318,8 @@ export default {
|
|
|
297
318
|
button {
|
|
298
319
|
border: none;
|
|
299
320
|
background: transparent;
|
|
300
|
-
color: var(--
|
|
321
|
+
color: var(--accent-btn-hover-text);
|
|
322
|
+
min-width: 83px;
|
|
301
323
|
}
|
|
302
324
|
}
|
|
303
325
|
.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(--primary);
|
|
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'],
|
|
9
9
|
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -140,9 +140,9 @@ export default {
|
|
|
140
140
|
},
|
|
141
141
|
|
|
142
142
|
watch: {
|
|
143
|
-
hasLintErrors(neu) {
|
|
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
|
-
this.$emit('validationChanged', true);
|
|
212
|
+
// this.$emit('validationChanged', true);
|
|
213
213
|
|
|
214
214
|
this.$nextTick(() => {
|
|
215
215
|
codeMirrorRef.refresh();
|
|
@@ -279,7 +279,7 @@ export default {
|
|
|
279
279
|
id="code-mirror-el"
|
|
280
280
|
ref="codeMirrorRef"
|
|
281
281
|
:value="value"
|
|
282
|
-
|
|
282
|
+
|
|
283
283
|
:disabled="isDisabled"
|
|
284
284
|
:original-style="true"
|
|
285
285
|
@ready="onReady"
|
|
@@ -288,6 +288,19 @@ export default {
|
|
|
288
288
|
@focus="onFocus"
|
|
289
289
|
@blur="onBlur"
|
|
290
290
|
/>
|
|
291
|
+
<!-- <Codemirror
|
|
292
|
+
id="code-mirror-el"
|
|
293
|
+
ref="codeMirrorRef"
|
|
294
|
+
:value="value"
|
|
295
|
+
:options="combinedOptions"
|
|
296
|
+
:disabled="isDisabled"
|
|
297
|
+
:original-style="true"
|
|
298
|
+
@ready="onReady"
|
|
299
|
+
@input="onInput"
|
|
300
|
+
@changes="onChanges"
|
|
301
|
+
@focus="onFocus"
|
|
302
|
+
@blur="onBlur"
|
|
303
|
+
/> -->
|
|
291
304
|
<span
|
|
292
305
|
v-show="isCodeMirrorFocused"
|
|
293
306
|
class="escape-text"
|
|
@@ -356,6 +369,7 @@ export default {
|
|
|
356
369
|
}
|
|
357
370
|
|
|
358
371
|
.CodeMirror-lines {
|
|
372
|
+
background-color: var(--input-bg);
|
|
359
373
|
color: var(--input-text);
|
|
360
374
|
padding: 0;
|
|
361
375
|
|
|
@@ -59,7 +59,11 @@ export default {
|
|
|
59
59
|
usedAsResourceName: {
|
|
60
60
|
type: Boolean,
|
|
61
61
|
defaut: false
|
|
62
|
-
}
|
|
62
|
+
},
|
|
63
|
+
reserveText: {
|
|
64
|
+
type: String,
|
|
65
|
+
defaut: '预留'
|
|
66
|
+
},
|
|
63
67
|
},
|
|
64
68
|
computed: {
|
|
65
69
|
displayUnits() {
|
|
@@ -91,13 +95,13 @@ export default {
|
|
|
91
95
|
</script>
|
|
92
96
|
|
|
93
97
|
<template>
|
|
94
|
-
<div class="consumption-gauge">
|
|
98
|
+
<!-- <div class="consumption-gauge">
|
|
95
99
|
<h3 v-if="resourceName && !usedAsResourceName">
|
|
96
100
|
{{ resourceName }}
|
|
97
101
|
</h3>
|
|
98
|
-
<div class="numbers">
|
|
102
|
+
<div class="numbers"> -->
|
|
99
103
|
<!-- @slot Optional slot to use as the title rather than showing the resource name -->
|
|
100
|
-
<slot
|
|
104
|
+
<!-- <slot
|
|
101
105
|
name="title"
|
|
102
106
|
:amountTemplateValues="amountTemplateValues"
|
|
103
107
|
:formattedPercentage="formattedPercentage"
|
|
@@ -118,7 +122,22 @@ export default {
|
|
|
118
122
|
:color-stops="colorStops"
|
|
119
123
|
/>
|
|
120
124
|
</div>
|
|
121
|
-
</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>
|
|
122
141
|
</template>
|
|
123
142
|
|
|
124
143
|
<style lang="scss">
|
|
@@ -42,3 +42,18 @@ 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
|
-
<button
|
|
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
|
-
<button
|
|
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
|
-
<section
|
|
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
|
-
:
|
|
838
|
+
:errors="errors"
|
|
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,7 +910,6 @@ export default {
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
.create-resource-container {
|
|
913
|
-
|
|
914
913
|
.resource-container {
|
|
915
914
|
display: flex; // Ensures content grows in child CruResources
|
|
916
915
|
flex-direction: column;
|
|
@@ -974,6 +973,7 @@ form.create-resource-container .cru {
|
|
|
974
973
|
}
|
|
975
974
|
}
|
|
976
975
|
.cru {
|
|
976
|
+
height: 100%;
|
|
977
977
|
display: flex;
|
|
978
978
|
flex-direction: column;
|
|
979
979
|
flex-grow: 1;
|
|
@@ -982,6 +982,7 @@ form.create-resource-container .cru {
|
|
|
982
982
|
display: flex;
|
|
983
983
|
flex-direction: column;
|
|
984
984
|
flex-grow: 1;
|
|
985
|
+
height: 100%;
|
|
985
986
|
}
|
|
986
987
|
|
|
987
988
|
&__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-start;
|
|
119
119
|
margin-top: 20px;
|
|
120
120
|
z-index: z-index('cruFooter');
|
|
121
121
|
|
|
122
122
|
.btn {
|
|
123
|
-
margin-left:
|
|
123
|
+
margin-left: 10px;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -102,26 +102,35 @@ 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" class="mr-10">
|
|
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
|
-
|
|
115
|
+
<div class="mr-10">
|
|
116
|
+
<LabeledSelect
|
|
117
|
+
v-model:value="value.range"
|
|
118
|
+
:options="rangeOptions"
|
|
119
|
+
class="gafanana-select"
|
|
120
|
+
:selectWidth="'60px'"
|
|
121
|
+
:label="t('graphOptions.range')"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
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')"
|
|
124
131
|
/>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
125
134
|
</div>
|
|
126
135
|
</div>
|
|
127
136
|
</template>
|
|
@@ -131,17 +140,20 @@ export default {
|
|
|
131
140
|
&, .range-refresh {
|
|
132
141
|
display: flex;
|
|
133
142
|
flex-direction: row;
|
|
134
|
-
justify-content: flex-end;
|
|
143
|
+
/* justify-content: flex-end; */
|
|
135
144
|
}
|
|
136
145
|
|
|
137
146
|
& {
|
|
138
|
-
justify-content: space-between;
|
|
147
|
+
/* justify-content: space-between; */
|
|
139
148
|
align-items: center;
|
|
140
149
|
}
|
|
141
150
|
|
|
142
|
-
.labeled-select {
|
|
151
|
+
/* .labeled-select {
|
|
143
152
|
width: 100px;
|
|
144
153
|
margin-left: 10px;
|
|
145
|
-
}
|
|
154
|
+
} */
|
|
155
|
+
}
|
|
156
|
+
.gafanana-select{
|
|
157
|
+
width: 300px;
|
|
146
158
|
}
|
|
147
159
|
</style>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Vue, { PropType, defineComponent } from 'vue';
|
|
3
|
+
import { mapGetters } from 'vuex';
|
|
4
|
+
|
|
5
|
+
interface Dot {
|
|
6
|
+
stateBackground: string;
|
|
7
|
+
stateDisplay: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
|
|
12
|
+
name: 'DotState',
|
|
13
|
+
|
|
14
|
+
props: {
|
|
15
|
+
value: {
|
|
16
|
+
type: Object as PropType<Dot>,
|
|
17
|
+
default: null
|
|
18
|
+
},
|
|
19
|
+
color: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: null
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: null
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
computed: {
|
|
30
|
+
...mapGetters({ t: 'i18n/t' }),
|
|
31
|
+
bg(): string | null {
|
|
32
|
+
return this.value?.stateBackground || this.color;
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
msg(): string | null {
|
|
36
|
+
let text = this.value?.stateDisplay || this.label;
|
|
37
|
+
let zhText = this.t(`stateLabel.${ text }`)
|
|
38
|
+
return zhText ? zhText : text
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div style="display: flex;flex-direction: row;align-items: center;">
|
|
47
|
+
<div :class="{ [bg]: true }"></div>
|
|
48
|
+
<span style="margin-left: 5px;">{{ msg }}</span>
|
|
49
|
+
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
</template>
|
|
53
|
+
<style lang="scss" scoped>
|
|
54
|
+
.bg-error {
|
|
55
|
+
width: 10px; /* 圆点的宽度 */
|
|
56
|
+
height: 10px; /* 圆点的高度 */
|
|
57
|
+
background-color: #DD0C17; /* 圆点的颜色 */
|
|
58
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
59
|
+
}
|
|
60
|
+
.bg-darker {
|
|
61
|
+
width: 10px; /* 圆点的宽度 */
|
|
62
|
+
height: 10px; /* 圆点的高度 */
|
|
63
|
+
background-color: #DD0C17; /* 圆点的颜色 */
|
|
64
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
65
|
+
}
|
|
66
|
+
.bg-success {
|
|
67
|
+
width: 10px; /* 圆点的宽度 */
|
|
68
|
+
height: 10px; /* 圆点的高度 */
|
|
69
|
+
background-color: #95F204 !important; /* 圆点的颜色 */
|
|
70
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
71
|
+
}
|
|
72
|
+
.bg-warning {
|
|
73
|
+
width: 10px; /* 圆点的宽度 */
|
|
74
|
+
height: 10px; /* 圆点的高度 */
|
|
75
|
+
background-color: #DAC342; /* 圆点的颜色 */
|
|
76
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
77
|
+
}
|
|
78
|
+
.bg-info {
|
|
79
|
+
width: 10px; /* 圆点的宽度 */
|
|
80
|
+
height: 10px; /* 圆点的高度 */
|
|
81
|
+
background-color: #1890FF; /* 圆点的颜色 */
|
|
82
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
83
|
+
}
|
|
84
|
+
</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">
|
|
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(--
|
|
96
|
+
background-color: var(--body-bg);
|
|
97
97
|
flex: 1;
|
|
98
98
|
overflow-y: scroll;
|
|
99
99
|
}
|