@appscode/design-system 2.17.25 → 2.17.26-alpha-1
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/main.scss +4 -1
- package/package.json +1 -1
- package/vue-components/styles/base/utilities/_global.scss +8 -0
- package/vue-components/styles/base/utilities/_typography.scss +5 -0
- package/vue-components/styles/components/_ac-duration.scss +50 -0
- package/vue-components/styles/components/_file-explore.scss +31 -0
- package/vue-components/styles/components/_time-picker.scss +140 -0
- package/vue-components/styles/components/cards/_all.scss +1 -1
- package/vue-components/styles/components/cards/_cards-group.scss +26 -0
- package/vue-components/styles/components/form-fields/_input-card.scss +3 -1
- package/vue-components/styles/components/form-fields/_input.scss +65 -2
- package/vue-components/v3/alert/AlertLinked.vue +32 -0
- package/vue-components/v3/cards/UsageTableCard.vue +56 -4
- package/vue-components/v3/cards/UsageTableCardTwo.vue +162 -0
- package/vue-components/v3/config-secret/ConfigSecret.vue +61 -0
- package/vue-components/v3/editor/Editor.vue +3 -4
- package/vue-components/v3/form-fields/AcSingleInput.vue +20 -0
- package/vue-components/v3/form-fields/CheckRadio.vue +3 -1
- package/vue-components/v3/icons/ArrowDownLongIcon.vue +8 -0
- package/vue-components/v3/icons/ArrowRightIcon.vue +14 -0
- package/vue-components/v3/icons/BillableInfo.vue +13 -0
- package/vue-components/v3/icons/InfoLightIcon.vue +15 -0
- package/vue-components/v3/icons/MachineCpuIcon.vue +8 -0
- package/vue-components/v3/icons/MachineMemoryIcon.vue +8 -0
- package/vue-components/v3/icons/StorageIcon-2.vue +14 -0
- package/vue-components/v3/navbar/Appdrawer.vue +1 -1
- package/vue-components/v3/node-selection/NodeSelection.vue +82 -0
- package/vue-components/v3/postgres/Postgres.vue +33 -0
- package/vue-components/v3/replica-set/MachineProfile.vue +119 -0
- package/vue-components/v3/replica-set/MultiMachineProfile.vue +100 -0
- package/vue-components/v3/replica-set/UpgradeSet.vue +40 -0
- package/vue-components/v3/scaling-rules/ScalingRules.vue +93 -0
- package/vue-components/v3/section/SectionContent.vue +1 -1
- package/vue-components/v3/threshold/UsageThreshold.vue +24 -0
- package/vue-components/v3/time/AcDuration.vue +167 -0
- package/vue-components/v3/time/AcDurationNew.vue +235 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
const SectionContent = defineAsyncComponent(() => import("@/components/vue-components/v3/section/SectionContent.vue"));
|
|
4
|
+
const AlertMessage = defineAsyncComponent(() => import("@/components/vue-components/v3/alert/AlertMessage.vue"));
|
|
5
|
+
const InfoLightIcon = defineAsyncComponent(() => import("@/components/vue-components/v3/icons/InfoLightIcon.vue"));
|
|
6
|
+
|
|
7
|
+
import CustomSelect from "@/components/vue-components/v3/form-fields/CustomSelect.vue";
|
|
8
|
+
import CodeGroup from "@/components/vue-components/v3/code-preview/CodeGroup.vue";
|
|
9
|
+
</script>
|
|
10
|
+
<template>
|
|
11
|
+
<SectionContent class="mt-24" :custom="true">
|
|
12
|
+
<template #custom-header>
|
|
13
|
+
<div class="tabs ac-tabs" style="margin: -8px -16px">
|
|
14
|
+
<ul>
|
|
15
|
+
<li class="is-active"><a href="#">NEW CONFIG SECRET</a></li>
|
|
16
|
+
<li><a href="#">APPLY CONFIG</a></li>
|
|
17
|
+
<li><a href="#">REMOVE</a></li>
|
|
18
|
+
</ul>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<template #section-body>
|
|
22
|
+
<h5>Config Secret</h5>
|
|
23
|
+
<p>Select a configuration secret from the available list to update your database settings</p>
|
|
24
|
+
<CustomSelect :multiselect="false" class="mt-16 mb-0 width-300" />
|
|
25
|
+
|
|
26
|
+
<p>You have selected <strong>db_config</strong> secret</p>
|
|
27
|
+
<code-group code="code here">
|
|
28
|
+
<template #left>
|
|
29
|
+
<h5>Value *</h5>
|
|
30
|
+
</template>
|
|
31
|
+
</code-group>
|
|
32
|
+
|
|
33
|
+
<br />
|
|
34
|
+
|
|
35
|
+
<div class="is-flex gap-8 file-explore">
|
|
36
|
+
<div class="left-content content-sidebar">
|
|
37
|
+
<ul>
|
|
38
|
+
<li class="is-active"><a href="#">db_config</a></li>
|
|
39
|
+
<li><a href="#">user.conf</a></li>
|
|
40
|
+
<li><a href="#">mongod.conf</a></li>
|
|
41
|
+
</ul>
|
|
42
|
+
<AlertMessage modifier-classes="is-info" class="mt-8">
|
|
43
|
+
<template #icon>
|
|
44
|
+
<InfoLightIcon />
|
|
45
|
+
</template>
|
|
46
|
+
<template #custom-text>
|
|
47
|
+
<p>Kubedb er <a href="#">link</a> asbe for config secret</p>
|
|
48
|
+
</template>
|
|
49
|
+
</AlertMessage>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="right-content">
|
|
52
|
+
<code-group code="code here">
|
|
53
|
+
<template #left>
|
|
54
|
+
<h5>Value *</h5>
|
|
55
|
+
</template>
|
|
56
|
+
</code-group>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
</SectionContent>
|
|
61
|
+
</template>
|
|
@@ -15,7 +15,7 @@ interface Props {
|
|
|
15
15
|
schema?: Record<string, unknown>;
|
|
16
16
|
uri: string;
|
|
17
17
|
};
|
|
18
|
-
needsUpdateOnChange?: boolean
|
|
18
|
+
needsUpdateOnChange?: boolean;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -29,7 +29,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
29
29
|
editorTheme: "",
|
|
30
30
|
wordWrap: "on",
|
|
31
31
|
validation: () => ({ uri: "" }),
|
|
32
|
-
needsUpdateOnChange: false
|
|
32
|
+
needsUpdateOnChange: false,
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
const emit = defineEmits(["update:modelValue"]);
|
|
@@ -65,8 +65,7 @@ const theme = computed(() => {
|
|
|
65
65
|
const onChange = (e: Event) => {
|
|
66
66
|
if (typeof e === "string") {
|
|
67
67
|
editorContent.value = e;
|
|
68
|
-
if(props.needsUpdateOnChange)
|
|
69
|
-
emit("update:modelValue", e);
|
|
68
|
+
if (props.needsUpdateOnChange) emit("update:modelValue", e);
|
|
70
69
|
}
|
|
71
70
|
};
|
|
72
71
|
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import ArrowIcon from "../icons/ArrowIcon.vue";
|
|
2
3
|
interface Props {
|
|
3
4
|
modifierClasses?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
hasModifierBtn?: boolean;
|
|
4
7
|
}
|
|
5
8
|
|
|
6
9
|
withDefaults(defineProps<Props>(), {
|
|
7
10
|
modifierClasses: "",
|
|
11
|
+
type: "",
|
|
12
|
+
hasModifierBtn: false,
|
|
8
13
|
});
|
|
14
|
+
|
|
15
|
+
const emit = defineEmits(["updateCount"]);
|
|
16
|
+
|
|
17
|
+
function changes(value: number) {
|
|
18
|
+
emit("updateCount", value);
|
|
19
|
+
}
|
|
9
20
|
</script>
|
|
10
21
|
|
|
11
22
|
<template>
|
|
@@ -15,6 +26,15 @@ withDefaults(defineProps<Props>(), {
|
|
|
15
26
|
<slot />
|
|
16
27
|
<slot name="eye-switcher" />
|
|
17
28
|
<slot name="error" />
|
|
29
|
+
|
|
30
|
+
<div class="up-down-btns" v-if="hasModifierBtn">
|
|
31
|
+
<button class="arrow-up" title="Button Up" @click="changes(1)">
|
|
32
|
+
<ArrowIcon direction="down" />
|
|
33
|
+
</button>
|
|
34
|
+
<button class="arrow-down" title="Button Down" @click="changes(-1)">
|
|
35
|
+
<ArrowIcon />
|
|
36
|
+
</button>
|
|
37
|
+
</div>
|
|
18
38
|
</div>
|
|
19
39
|
</template>
|
|
20
40
|
|
|
@@ -12,6 +12,7 @@ interface Props {
|
|
|
12
12
|
errorMsg?: string;
|
|
13
13
|
isRow?: boolean;
|
|
14
14
|
hasDescription?: boolean;
|
|
15
|
+
ellipsis?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -20,6 +21,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
20
21
|
errorMsg: "",
|
|
21
22
|
isRow: false,
|
|
22
23
|
hasDescription: false,
|
|
24
|
+
ellipsis: "is-ellipsis-2",
|
|
23
25
|
});
|
|
24
26
|
const includeSelectedClass = (optionValue: unknown) => {
|
|
25
27
|
return props.hasDescription && JSON.stringify(model.value) === JSON.stringify(optionValue);
|
|
@@ -62,7 +64,7 @@ const bodyClass = computed(() => {
|
|
|
62
64
|
<p v-show="errorMsg" class="has-text-danger">
|
|
63
65
|
<slot name="message" />
|
|
64
66
|
</p>
|
|
65
|
-
<p v-if="hasDescription" class="
|
|
67
|
+
<p v-if="hasDescription" class="mt-8" :class="ellipsis" :title="option.description">
|
|
66
68
|
{{ option.description }}
|
|
67
69
|
</p>
|
|
68
70
|
<p v-show="errorMsg" class="has-text-danger mb-16">
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg width="6" height="45" viewBox="0 0 6 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path
|
|
4
|
+
d="M3.5 1C3.5 0.723858 3.27614 0.5 3 0.5C2.72386 0.5 2.5 0.723858 2.5 1H3.5ZM3 45L5.88675 40H0.113249L3 45ZM3 1H2.5V40.5H3H3.5V1H3Z"
|
|
5
|
+
fill="#CBD5E1"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
3
|
+
<!-- Icon from Huge Icons by Hugeicons - undefined -->
|
|
4
|
+
<path
|
|
5
|
+
fill="none"
|
|
6
|
+
stroke="currentColor"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
stroke-linejoin="round"
|
|
9
|
+
stroke-width="1.5"
|
|
10
|
+
d="M20 12H4m11 5s5-3.682 5-5s-5-5-5-5"
|
|
11
|
+
color="currentColor"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">
|
|
3
|
+
<!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE -->
|
|
4
|
+
<path
|
|
5
|
+
fill="none"
|
|
6
|
+
stroke="currentColor"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
stroke-linejoin="round"
|
|
9
|
+
stroke-width="2"
|
|
10
|
+
d="M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
3
|
+
<g
|
|
4
|
+
fill="none"
|
|
5
|
+
stroke="currentColor"
|
|
6
|
+
stroke-linecap="round"
|
|
7
|
+
stroke-linejoin="round"
|
|
8
|
+
stroke-width="1.5"
|
|
9
|
+
color="currentColor"
|
|
10
|
+
>
|
|
11
|
+
<path d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12s4.477 10 10 10s10-4.477 10-10" />
|
|
12
|
+
<path d="M12.242 17v-5c0-.471 0-.707-.146-.854c-.147-.146-.382-.146-.854-.146m.75-3h.009" />
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M152 96h-48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8m-8 48h-32v-32h32Zm88 0h-16v-32h16a8 8 0 0 0 0-16h-16V56a16 16 0 0 0-16-16h-40V24a8 8 0 0 0-16 0v16h-32V24a8 8 0 0 0-16 0v16H56a16 16 0 0 0-16 16v40H24a8 8 0 0 0 0 16h16v32H24a8 8 0 0 0 0 16h16v40a16 16 0 0 0 16 16h40v16a8 8 0 0 0 16 0v-16h32v16a8 8 0 0 0 16 0v-16h40a16 16 0 0 0 16-16v-40h16a8 8 0 0 0 0-16m-32 56H56V56h144z"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M232 56H24A16 16 0 0 0 8 72v128a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0V72a16 16 0 0 0-16-16M24 72h208v96H24Zm88 80a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8H48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8Zm-56-48h48v32H56Zm88 48h64a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8h-64a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8m8-48h48v32h-48Z"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 16 16">
|
|
3
|
+
<!-- Icon from OpenSearch UI by OpenSearch Contributors - https://github.com/opensearch-project/oui/blob/main/LICENSE.txt -->
|
|
4
|
+
<g fill="currentColor" fill-rule="evenodd" transform="translate(0 2)">
|
|
5
|
+
<path
|
|
6
|
+
fill-rule="nonzero"
|
|
7
|
+
d="M2 6a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1zm13 2v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1m1-3V2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v3c0 .601.271 1.133.69 1.5C.271 6.867 0 7.399 0 8v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8c0-.601-.271-1.133-.689-1.5c.418-.367.689-.899.689-1.5"
|
|
8
|
+
/>
|
|
9
|
+
<circle cx="4.5" cy="9.5" r="1.5" />
|
|
10
|
+
<circle cx="4.5" cy="3.5" r="1.5" />
|
|
11
|
+
<path d="M12 8h1v3h-1zm-2 0h1v3h-1zm2-6h1v3h-1zm-2 0h1v3h-1z" />
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
14
|
+
</template>
|
|
@@ -131,7 +131,7 @@ const handleClick = (name: string) => {
|
|
|
131
131
|
<navbar-item-content class="navbar-dropdown-wrapper" style="right: -30px">
|
|
132
132
|
<ul class="ac-scrollbar p-0 app-drawer">
|
|
133
133
|
<li v-for="app in filteredAppList" :key="app.url">
|
|
134
|
-
<a :href="app.url"
|
|
134
|
+
<a :href="app.url" @click="handleClick(app.name)">
|
|
135
135
|
<article class="media">
|
|
136
136
|
<figure class="media-left">
|
|
137
137
|
<p class="image">
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref } from "vue";
|
|
3
|
+
const SectionContent = defineAsyncComponent(() => import("@/components/vue-components/v3/section/SectionContent.vue"));
|
|
4
|
+
const AcSelect = defineAsyncComponent(() => import("@/components/vue-components/v3/form-fields/AcSelect.vue"));
|
|
5
|
+
const AlertMessage = defineAsyncComponent(() => import("@/components/vue-components/v3/alert/AlertMessage.vue"));
|
|
6
|
+
const AcSingleInput = defineAsyncComponent(
|
|
7
|
+
() => import("@/components/vue-components/v3/form-fields/AcSingleInput.vue"),
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
sectionTitle?: string;
|
|
12
|
+
policyTitle?: string;
|
|
13
|
+
policyDescription?: string;
|
|
14
|
+
policyOptions: Array<{ name: string; id?: string }>;
|
|
15
|
+
hasInfo?: boolean;
|
|
16
|
+
infoMessage?: string;
|
|
17
|
+
topologyTitle?: string;
|
|
18
|
+
topologyDescription?: string;
|
|
19
|
+
topologyKey: string;
|
|
20
|
+
topologyValue: string;
|
|
21
|
+
modifierClasses?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
withDefaults(defineProps<Props>(), {
|
|
25
|
+
hasInfo: false,
|
|
26
|
+
infoMessage: "",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const machine = ref("");
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<SectionContent :title="sectionTitle" :class="modifierClasses">
|
|
34
|
+
<template #section-body>
|
|
35
|
+
<div class="columns" style="align-items: end">
|
|
36
|
+
<div class="column is-6">
|
|
37
|
+
<h6>{{ policyTitle }}</h6>
|
|
38
|
+
<p>{{ policyDescription }}</p>
|
|
39
|
+
<AcSelect
|
|
40
|
+
v-model="machine"
|
|
41
|
+
:options="policyOptions"
|
|
42
|
+
:label="policyTitle"
|
|
43
|
+
group-label="language"
|
|
44
|
+
show-by="name"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
<div v-if="hasInfo" class="column is-6">
|
|
48
|
+
<AlertMessage modifier-classes="is-info">
|
|
49
|
+
<template #custom-text>
|
|
50
|
+
<p><strong>Label Selector:</strong> {{ infoMessage }}</p>
|
|
51
|
+
</template>
|
|
52
|
+
</AlertMessage>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="columns is-multiline">
|
|
56
|
+
<div class="column is-12">
|
|
57
|
+
<h6>{{ topologyTitle }}</h6>
|
|
58
|
+
<p class="mb-0">{{ topologyDescription }}</p>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="column is-6">
|
|
61
|
+
<ac-single-input>
|
|
62
|
+
<label for="email" class="ac-label is-required show-label">Key </label>
|
|
63
|
+
<input id="Key" name="Key" type="Key" class="ac-input bg-white" :placeholder="topologyKey" disabled />
|
|
64
|
+
</ac-single-input>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="column is-6">
|
|
67
|
+
<ac-single-input>
|
|
68
|
+
<label for="Value" class="ac-label is-required show-label">Value </label>
|
|
69
|
+
<input
|
|
70
|
+
id="Value"
|
|
71
|
+
name="Value"
|
|
72
|
+
type="Value"
|
|
73
|
+
class="ac-input bg-white"
|
|
74
|
+
:placeholder="topologyValue"
|
|
75
|
+
disabled
|
|
76
|
+
/>
|
|
77
|
+
</ac-single-input>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
</SectionContent>
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref } from "vue";
|
|
3
|
+
const SectionContent = defineAsyncComponent(() => import("@/components/vue-components/v3/section/SectionContent.vue"));
|
|
4
|
+
import ScalingRules from "../scaling-rules/ScalingRules.vue";
|
|
5
|
+
import UsageThreshold from "../threshold/UsageThreshold.vue";
|
|
6
|
+
|
|
7
|
+
const threshold = ref(10);
|
|
8
|
+
</script>
|
|
9
|
+
<template>
|
|
10
|
+
<SectionContent title="Postgres" class="mt-24">
|
|
11
|
+
<template #section-body>
|
|
12
|
+
<UsageThreshold
|
|
13
|
+
title="Usage Threshold (%)"
|
|
14
|
+
subtitle="Set the threshold percentage of storage usage to trigger scaling."
|
|
15
|
+
v-model="threshold"
|
|
16
|
+
:min-range="0"
|
|
17
|
+
:max-range="100"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<ScalingRules
|
|
21
|
+
title="Scaling Rules"
|
|
22
|
+
:initialStorage="'100Gi'"
|
|
23
|
+
:rules="[
|
|
24
|
+
{ percent: '20%', size: '500Gi', role: '1st role', showAddButton: true, showSaveDeleteButtons: false },
|
|
25
|
+
{ percent: '10%', size: '2000Gi', showAddButton: false, showSaveDeleteButtons: true },
|
|
26
|
+
]"
|
|
27
|
+
@add-role="$emit('add-role')"
|
|
28
|
+
@save="$emit('save')"
|
|
29
|
+
@delete="$emit('delete')"
|
|
30
|
+
/>
|
|
31
|
+
</template>
|
|
32
|
+
</SectionContent>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref } from "vue";
|
|
3
|
+
const SectionContent = defineAsyncComponent(() => import("@/components/vue-components/v3/section/SectionContent.vue"));
|
|
4
|
+
const AcSelect = defineAsyncComponent(() => import("@/components/vue-components/v3/form-fields/AcSelect.vue"));
|
|
5
|
+
const AcSingleInput = defineAsyncComponent(
|
|
6
|
+
() => import("@/components/vue-components/v3/form-fields/AcSingleInput.vue"),
|
|
7
|
+
);
|
|
8
|
+
const ArrowRightIcon = defineAsyncComponent(() => import("@/components/vue-components/v3/icons/ArrowRightIcon.vue"));
|
|
9
|
+
const MachineCpuIcon = defineAsyncComponent(() => import("@/components/vue-components/v3/icons/MachineCpuIcon.vue"));
|
|
10
|
+
const MachineMemoryIcon = defineAsyncComponent(
|
|
11
|
+
() => import("@/components/vue-components/v3/icons/MachineMemoryIcon.vue"),
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
sectionTitle: string;
|
|
16
|
+
leftHeader?: string;
|
|
17
|
+
rightHeader?: string;
|
|
18
|
+
optionsTitle?: string;
|
|
19
|
+
currentOption: string;
|
|
20
|
+
newOptions: Array<{ name: string; id?: string }>;
|
|
21
|
+
currentCpu?: string;
|
|
22
|
+
currentMemory?: string;
|
|
23
|
+
newCpu?: string;
|
|
24
|
+
newMemory?: string;
|
|
25
|
+
modifierClasses?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
withDefaults(defineProps<Props>(), {
|
|
29
|
+
leftHeader: "",
|
|
30
|
+
rightHeader: "",
|
|
31
|
+
optionsTitle: "",
|
|
32
|
+
currentCpu: "",
|
|
33
|
+
currentMemory: "",
|
|
34
|
+
newCpu: "",
|
|
35
|
+
newMemory: "",
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const machine = ref("");
|
|
39
|
+
</script>
|
|
40
|
+
<template>
|
|
41
|
+
<SectionContent :title="sectionTitle" :is-expandable="true" :class="modifierClasses">
|
|
42
|
+
<template #section-body>
|
|
43
|
+
<div class="is-flex is-align-items-center gap-4">
|
|
44
|
+
<SectionContent :custom="true" class="single-machine">
|
|
45
|
+
<template #custom-header>
|
|
46
|
+
<h6>{{ leftHeader }}</h6>
|
|
47
|
+
</template>
|
|
48
|
+
<template #section-body>
|
|
49
|
+
<ac-single-input>
|
|
50
|
+
<label for="email" class="ac-label is-required show-label">{{ optionsTitle }} </label>
|
|
51
|
+
<input
|
|
52
|
+
id="email"
|
|
53
|
+
name="email"
|
|
54
|
+
type="email"
|
|
55
|
+
class="ac-input bg-white"
|
|
56
|
+
:placeholder="currentOption"
|
|
57
|
+
disabled
|
|
58
|
+
/>
|
|
59
|
+
</ac-single-input>
|
|
60
|
+
<div class="is-flex gap-12">
|
|
61
|
+
<p class="is-flex gap-4">
|
|
62
|
+
<span class="icon">
|
|
63
|
+
<MachineCpuIcon />
|
|
64
|
+
</span>
|
|
65
|
+
<span>{{ currentCpu }} CPU</span>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<p class="is-flex gap-4">
|
|
69
|
+
<span class="icon">
|
|
70
|
+
<MachineMemoryIcon />
|
|
71
|
+
</span>
|
|
72
|
+
<span>{{ currentMemory }} Memory</span>
|
|
73
|
+
</p>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
</SectionContent>
|
|
77
|
+
<div class="arrow-right-icon">
|
|
78
|
+
<ArrowRightIcon />
|
|
79
|
+
</div>
|
|
80
|
+
<SectionContent :custom="true" class="single-machine">
|
|
81
|
+
<template #custom-header>
|
|
82
|
+
<h6>{{ rightHeader }}</h6>
|
|
83
|
+
</template>
|
|
84
|
+
<template #section-body>
|
|
85
|
+
<AcSelect
|
|
86
|
+
v-model="machine"
|
|
87
|
+
:options="newOptions"
|
|
88
|
+
label="Machine"
|
|
89
|
+
group-label="language"
|
|
90
|
+
show-by="name"
|
|
91
|
+
track-by="name"
|
|
92
|
+
/>
|
|
93
|
+
<div class="is-flex gap-12">
|
|
94
|
+
<p class="is-flex gap-4">
|
|
95
|
+
<span class="icon">
|
|
96
|
+
<MachineCpuIcon />
|
|
97
|
+
</span>
|
|
98
|
+
<span>{{ newCpu }} CPU</span>
|
|
99
|
+
</p>
|
|
100
|
+
|
|
101
|
+
<p class="is-flex gap-4">
|
|
102
|
+
<span class="icon">
|
|
103
|
+
<MachineMemoryIcon />
|
|
104
|
+
</span>
|
|
105
|
+
<span>{{ newMemory }} Memory</span>
|
|
106
|
+
</p>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
109
|
+
</SectionContent>
|
|
110
|
+
</div>
|
|
111
|
+
</template>
|
|
112
|
+
</SectionContent>
|
|
113
|
+
</template>
|
|
114
|
+
|
|
115
|
+
<style lang="scss">
|
|
116
|
+
.single-machine {
|
|
117
|
+
min-width: 300px;
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref } from "vue";
|
|
3
|
+
const AcSelect = defineAsyncComponent(() => import("@/components/vue-components/v3/form-fields/AcSelect.vue"));
|
|
4
|
+
const AcSingleInput = defineAsyncComponent(
|
|
5
|
+
() => import("@/components/vue-components/v3/form-fields/AcSingleInput.vue"),
|
|
6
|
+
);
|
|
7
|
+
const ArrowRightIcon = defineAsyncComponent(() => import("@/components/vue-components/v3/icons/ArrowRightIcon.vue"));
|
|
8
|
+
const MachineCpuIcon = defineAsyncComponent(() => import("@/components/vue-components/v3/icons/MachineCpuIcon.vue"));
|
|
9
|
+
const MachineMemoryIcon = defineAsyncComponent(
|
|
10
|
+
() => import("@/components/vue-components/v3/icons/MachineMemoryIcon.vue"),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
interface item {
|
|
14
|
+
title?: string;
|
|
15
|
+
optionsTitle?: string;
|
|
16
|
+
currentOption: string;
|
|
17
|
+
newOptions: Array<{ name: string; id?: string }>;
|
|
18
|
+
currentCpu?: string;
|
|
19
|
+
currentMemory?: string;
|
|
20
|
+
newCpu?: string;
|
|
21
|
+
newMemory?: string;
|
|
22
|
+
}
|
|
23
|
+
interface Props {
|
|
24
|
+
items: item[];
|
|
25
|
+
modifierClasses?: string;
|
|
26
|
+
}
|
|
27
|
+
withDefaults(defineProps<Props>(), {
|
|
28
|
+
items: () => [],
|
|
29
|
+
});
|
|
30
|
+
const machines = ref<string[]>([]);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<div class="is-flex gap-4" :class="modifierClasses">
|
|
35
|
+
<div class="card-group mt-24" v-for="(item, index) in items" :key="index">
|
|
36
|
+
<h6 class="card-label">{{ item.title }}</h6>
|
|
37
|
+
<div class="is-flex">
|
|
38
|
+
<div class="card-content p-8 is-flex is-align-items-center gap-8">
|
|
39
|
+
<div class="has-background-white p-16 is-rounded-4">
|
|
40
|
+
<ac-single-input>
|
|
41
|
+
<label for="email" class="ac-label is-required show-label">{{ item.optionsTitle }} </label>
|
|
42
|
+
<input
|
|
43
|
+
id="email"
|
|
44
|
+
name="email"
|
|
45
|
+
type="email"
|
|
46
|
+
class="ac-input bg-white"
|
|
47
|
+
:placeholder="item.currentOption"
|
|
48
|
+
disabled
|
|
49
|
+
/>
|
|
50
|
+
</ac-single-input>
|
|
51
|
+
<div class="is-flex gap-12">
|
|
52
|
+
<p class="is-flex gap-4">
|
|
53
|
+
<span class="icon">
|
|
54
|
+
<MachineCpuIcon />
|
|
55
|
+
</span>
|
|
56
|
+
<span class="is-whitespace-nowrap">{{ item.currentCpu }} CPU</span>
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
<p class="is-flex gap-4">
|
|
60
|
+
<span class="icon">
|
|
61
|
+
<MachineMemoryIcon />
|
|
62
|
+
</span>
|
|
63
|
+
<span class="is-whitespace-nowrap">{{ item.currentMemory }} Memory</span>
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="arrow-right-icon">
|
|
68
|
+
<ArrowRightIcon />
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="has-background-white p-16 is-rounded-4">
|
|
72
|
+
<AcSelect
|
|
73
|
+
v-model="machines[index]"
|
|
74
|
+
:options="item.newOptions"
|
|
75
|
+
:label="item.optionsTitle"
|
|
76
|
+
group-label="language"
|
|
77
|
+
show-by="name"
|
|
78
|
+
class="mb-16"
|
|
79
|
+
/>
|
|
80
|
+
<div class="is-flex gap-12">
|
|
81
|
+
<p class="is-flex gap-4">
|
|
82
|
+
<span class="icon">
|
|
83
|
+
<MachineCpuIcon />
|
|
84
|
+
</span>
|
|
85
|
+
<span class="is-whitespace-nowrap">{{ item.newCpu }} CPU</span>
|
|
86
|
+
</p>
|
|
87
|
+
|
|
88
|
+
<p class="is-flex gap-4">
|
|
89
|
+
<span class="icon">
|
|
90
|
+
<MachineMemoryIcon />
|
|
91
|
+
</span>
|
|
92
|
+
<span class="is-whitespace-nowrap">{{ item.newMemory }} Memory</span>
|
|
93
|
+
</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref } from "vue";
|
|
3
|
+
const AcSingleInput = defineAsyncComponent(
|
|
4
|
+
() => import("@/components/vue-components/v3/form-fields/AcSingleInput.vue"),
|
|
5
|
+
);
|
|
6
|
+
const ArrowRightIcon = defineAsyncComponent(() => import("@/components/vue-components/v3/icons/ArrowRightIcon.vue"));
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
currentInputTitle?: string;
|
|
12
|
+
newInputTitle?: string;
|
|
13
|
+
currentValue: string;
|
|
14
|
+
modifierClasses?: string;
|
|
15
|
+
}
|
|
16
|
+
withDefaults(defineProps<Props>(), {});
|
|
17
|
+
const newValue = ref("");
|
|
18
|
+
</script>
|
|
19
|
+
<template>
|
|
20
|
+
<div :class="modifierClasses">
|
|
21
|
+
<h6>{{ title }}</h6>
|
|
22
|
+
<p>{{ description }}</p>
|
|
23
|
+
|
|
24
|
+
<div class="is-flex">
|
|
25
|
+
<ac-single-input>
|
|
26
|
+
<label for="Value" class="ac-label is-required show-label">{{ currentInputTitle }}</label>
|
|
27
|
+
<input class="ac-input" :placeholder="currentValue" disabled />
|
|
28
|
+
</ac-single-input>
|
|
29
|
+
|
|
30
|
+
<div class="arrow-right-icon">
|
|
31
|
+
<ArrowRightIcon />
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<ac-single-input>
|
|
35
|
+
<label for="Value" class="ac-label is-required show-label">{{ newInputTitle }}</label>
|
|
36
|
+
<input v-model="newValue" class="ac-input" :placeholder="currentValue" />
|
|
37
|
+
</ac-single-input>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|