@appscode/design-system 0.0.21-alpha.2 → 0.4.27
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/base/utilities/_all.scss +7 -0
- package/base/utilities/_customize-bulma.scss +191 -0
- package/base/utilities/_default.scss +319 -110
- package/base/utilities/_derived-variables.scss +8 -15
- package/base/utilities/_grid.scss +29 -0
- package/base/utilities/_initial-variables.scss +111 -72
- package/base/utilities/_mixin.scss +90 -10
- package/base/utilities/_typography.scss +29 -19
- package/base/utilities/dark-theme.scss +26 -0
- package/components/_ac-accordion.scss +15 -5
- package/components/_ac-alert-box.scss +109 -26
- package/components/_ac-card.scss +71 -24
- package/components/_ac-code-highlight.scss +7 -1
- package/components/_ac-content-layout.scss +5 -5
- package/components/_ac-drag.scss +8 -6
- package/components/_ac-input.scss +196 -38
- package/components/_ac-modal.scss +6 -5
- package/components/_ac-multi-select.scss +281 -23
- package/components/_ac-options.scss +31 -16
- package/components/_ac-report.scss +53 -0
- package/components/_ac-select-box.scss +15 -5
- package/components/_ac-table.scss +160 -39
- package/components/_ac-tabs.scss +86 -23
- package/components/_ac-tags.scss +87 -2
- package/components/_ac-terminal.scss +270 -0
- package/components/_all.scss +28 -0
- package/components/_app-drawer.scss +134 -0
- package/components/_breadcumb.scss +8 -3
- package/components/_buttons.scss +96 -62
- package/components/_card-body-wrapper.scss +3 -3
- package/components/_dashboard-header.scss +33 -1
- package/components/_direct-deploy.scss +69 -0
- package/components/_go-to-top.scss +1 -1
- package/components/_graph.scss +45 -0
- package/components/_image-upload.scss +6 -4
- package/components/_left-sidebar-menu.scss +212 -52
- package/components/_monaco-editor.scss +1 -1
- package/components/_navbar.scss +193 -31
- package/components/_overview-info.scss +4 -4
- package/components/_overview-page.scss +1 -2
- package/components/_pagination.scss +45 -7
- package/components/_payment-card.scss +28 -12
- package/components/_preloader.scss +1 -1
- package/components/_preview-modal.scss +22 -9
- package/components/_pricing-table.scss +1 -1
- package/components/_progress-bar.scss +5 -5
- package/components/_subscription-card.scss +15 -8
- package/components/_table-of-content.scss +1 -1
- package/components/_tfa.scss +69 -0
- package/components/_transitions.scss +261 -0
- package/components/_widget-menu.scss +9 -9
- package/components/_wizard.scss +33 -20
- package/components/ac-toaster/_ac-toasted.scss +40 -8
- package/components/bbum/_all.scss +9 -0
- package/components/bbum/_card-team.scss +18 -10
- package/components/bbum/_information-center.scss +19 -5
- package/components/bbum/_mobile-desktop.scss +6 -6
- package/components/bbum/_post.scss +5 -4
- package/components/bbum/_sign-up-notification.scss +6 -6
- package/components/bbum/_single-post-preview.scss +10 -10
- package/components/bbum/_user-profile.scss +97 -90
- package/components/ui-builder/_ui-builder.scss +98 -21
- package/components/ui-builder/_vue-open-api.scss +104 -0
- package/layouts/_404.scss +159 -0
- package/layouts/_all.scss +2 -0
- package/layouts/_code-preview.scss +19 -8
- package/main.scss +6 -53
- package/package.json +4 -7
- package/plugins/caching.ts +243 -0
- package/plugins/theme.js +142 -0
- package/plugins/time-convert.js +49 -0
- package/plugins/vue-toaster.js +10 -6
- package/vue-components/v2/banner/Banner.vue +2 -2
- package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
- package/vue-components/v2/button/Button.vue +10 -1
- package/vue-components/v2/button/DownloadBtn.vue +45 -0
- package/vue-components/v2/card/Card.vue +1 -0
- package/vue-components/v2/card/CardContent.vue +5 -0
- package/vue-components/v2/card/CardHeader.vue +12 -0
- package/vue-components/v2/card/OverviewCard.vue +10 -0
- package/vue-components/v2/card/OverviewCards.vue +5 -0
- package/vue-components/v2/card/PaymentCard.vue +69 -0
- package/vue-components/v2/card/PaymentCardOptionButtons.vue +35 -0
- package/vue-components/v2/card/PaymentCards.vue +44 -0
- package/vue-components/v2/content/ContentHeader.vue +9 -5
- package/vue-components/v2/content/ContentTable.vue +12 -7
- package/vue-components/v2/editor/Editor.vue +38 -5
- package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
- package/vue-components/v2/editor/MonacoEditor.vue +125 -0
- package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
- package/vue-components/v2/form/Form.vue +12 -7
- package/vue-components/v2/form-fields/Input.vue +1 -1
- package/vue-components/v2/header/Header.vue +0 -1
- package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
- package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
- package/vue-components/v2/modal/Modal.vue +40 -7
- package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -0
- package/vue-components/v2/modals/JsonShowModal.vue +12 -3
- package/vue-components/v2/navbar/Appdrawer.vue +10 -9
- package/vue-components/v2/navbar/ThemeMode.vue +120 -0
- package/vue-components/v2/navbar/User.vue +229 -17
- package/vue-components/v2/notification/Notification.vue +101 -0
- package/vue-components/v2/notification/NotificationItem.vue +44 -0
- package/vue-components/v2/pagination/Pagination.vue +24 -4
- package/vue-components/v2/preloader/Preloader.vue +5 -5
- package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
- package/vue-components/v2/sidebar/SidebarItem.vue +24 -2
- package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
- package/vue-components/v2/tab/TabItem.vue +1 -1
- package/vue-components/v2/table/FakeTableCell.vue +36 -0
- package/vue-components/v2/table/InfoTable.vue +13 -3
- package/vue-components/v2/table/NarrowTable.vue +0 -2
- package/vue-components/v2/table/Table.vue +170 -10
- package/vue-components/v2/table/TableRow.vue +29 -2
- package/vue-components/v2/table/table-cell/CellValue.vue +33 -4
- package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
- package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
- package/vue-components/v2/tabs/EditorTabs.vue +1 -1
- package/vue-components/v3/button/Button.vue +78 -0
- package/vue-components/v3/content/ContentHeader.vue +55 -0
- package/vue-components/v3/content/ContentTable.vue +83 -0
- package/vue-components/v3/dropdown/DropdownDivider.vue +3 -0
- package/vue-components/v3/dropdown/DropdownItem.vue +5 -0
- package/vue-components/v3/dropdown/DropdownMenu.vue +111 -0
- package/vue-components/v3/editor/Editor.vue +160 -0
- package/vue-components/v3/editor/FilteredFileEditor.vue +186 -0
- package/vue-components/v3/editor/MonacoEditor.vue +131 -0
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
- package/vue-components/v3/form/Form.vue +63 -0
- package/vue-components/v3/form-fields/Input.vue +22 -0
- package/vue-components/v3/header/Header.vue +45 -0
- package/vue-components/v3/header/HeaderItem.vue +5 -0
- package/vue-components/v3/header/HeaderItems.vue +5 -0
- package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
- package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
- package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
- package/vue-components/v3/modal/Modal.vue +158 -0
- package/vue-components/v3/modals/DeleteConfirmationModal.vue +85 -0
- package/vue-components/v3/modals/JsonShowModal.vue +96 -0
- package/vue-components/v3/modals/LongRunningTasksModal.vue +373 -0
- package/vue-components/v3/navbar/Appdrawer.vue +63 -0
- package/vue-components/v3/navbar/ThemeMode.vue +120 -0
- package/vue-components/v3/navbar/User.vue +288 -0
- package/vue-components/v3/notification/Notification.vue +98 -0
- package/vue-components/v3/notification/NotificationItem.vue +52 -0
- package/vue-components/v3/pagination/Pagination.vue +172 -0
- package/vue-components/v3/searchbars/SearchBar.vue +47 -0
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
- package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
- package/vue-components/v3/tab/TabItem.vue +17 -0
- package/vue-components/v3/table/FakeTableCell.vue +39 -0
- package/vue-components/v3/table/InfoTable.vue +105 -0
- package/vue-components/v3/table/MultiInfoTable.vue +143 -0
- package/vue-components/v3/table/Table.vue +272 -0
- package/vue-components/v3/table/TableCell.vue +28 -0
- package/vue-components/v3/table/TableContainer.vue +34 -0
- package/vue-components/v3/table/TableRow.vue +147 -0
- package/vue-components/v3/table/table-cell/ArrayCell.vue +111 -0
- package/vue-components/v3/table/table-cell/CellValue.vue +133 -0
- package/vue-components/v3/table/table-cell/GenericCell.vue +75 -0
- package/vue-components/v3/table/table-cell/ObjectCell.vue +110 -0
- package/vue-components/v3/table/table-cell/ValueWithModal.vue +43 -0
- package/vue-components/v3/tabs/EditorTabs.vue +36 -0
- package/vue-components/v3/tag/Tag.vue +17 -0
- package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="monaco-editor-vue3" :style="style"></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { defineComponent, computed, toRefs } from "vue";
|
|
7
|
+
import * as monaco from "monaco-editor";
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
name: "MonacoEditor",
|
|
11
|
+
props: {
|
|
12
|
+
diffEditor: { type: Boolean, default: false },
|
|
13
|
+
width: { type: [String, Number], default: "100%" },
|
|
14
|
+
height: { type: [String, Number], default: "100%" },
|
|
15
|
+
original: String,
|
|
16
|
+
value: String,
|
|
17
|
+
language: { type: String, default: "javascript" },
|
|
18
|
+
theme: { type: String, default: "vs" },
|
|
19
|
+
options: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default() {
|
|
22
|
+
return {};
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
emits: ["editorWillMount", "editorDidMount", "change"],
|
|
27
|
+
setup(props) {
|
|
28
|
+
const { width, height } = toRefs(props);
|
|
29
|
+
const style = computed(() => {
|
|
30
|
+
const fixedWidth = width.value.toString().includes("%")
|
|
31
|
+
? width.value
|
|
32
|
+
: `${width.value}px`;
|
|
33
|
+
const fixedHeight = height.value.toString().includes("%")
|
|
34
|
+
? height.value
|
|
35
|
+
: `${height.value}px`;
|
|
36
|
+
return {
|
|
37
|
+
width: fixedWidth,
|
|
38
|
+
height: fixedHeight,
|
|
39
|
+
"text-align": "left",
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
style,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
mounted() {
|
|
47
|
+
this.initMonaco();
|
|
48
|
+
},
|
|
49
|
+
beforeUnmount() {
|
|
50
|
+
this.editor && this.editor.dispose();
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
initMonaco() {
|
|
54
|
+
this.$emit("editorWillMount", this.monaco);
|
|
55
|
+
const { value, language, theme, options } = this;
|
|
56
|
+
this.editor = monaco.editor[
|
|
57
|
+
this.diffEditor ? "createDiffEditor" : "create"
|
|
58
|
+
](this.$el, {
|
|
59
|
+
value: value,
|
|
60
|
+
language: language,
|
|
61
|
+
theme: theme,
|
|
62
|
+
...options,
|
|
63
|
+
});
|
|
64
|
+
this.diffEditor && this._setModel(this.value, this.original);
|
|
65
|
+
|
|
66
|
+
// @event `change`
|
|
67
|
+
const editor = this._getEditor();
|
|
68
|
+
editor.onDidChangeModelContent((event) => {
|
|
69
|
+
const value = editor.getValue();
|
|
70
|
+
if (this.value !== value) {
|
|
71
|
+
this.$emit("change", value, event);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
this.$emit("editorDidMount", this.editor);
|
|
76
|
+
},
|
|
77
|
+
_setModel(value, original) {
|
|
78
|
+
const { language } = this;
|
|
79
|
+
const originalModel = monaco.editor.createModel(original, language);
|
|
80
|
+
const modifiedModel = monaco.editor.createModel(value, language);
|
|
81
|
+
this.editor.setModel({
|
|
82
|
+
original: originalModel,
|
|
83
|
+
modified: modifiedModel,
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
_setValue(value) {
|
|
87
|
+
let editor = this._getEditor();
|
|
88
|
+
if (editor) return editor.setValue(value);
|
|
89
|
+
},
|
|
90
|
+
_getValue() {
|
|
91
|
+
let editor = this._getEditor();
|
|
92
|
+
if (!editor) return "";
|
|
93
|
+
return editor.getValue();
|
|
94
|
+
},
|
|
95
|
+
_getEditor() {
|
|
96
|
+
if (!this.editor) return null;
|
|
97
|
+
return this.diffEditor ? this.editor.getModifiedEditor() : this.editor;
|
|
98
|
+
},
|
|
99
|
+
_setOriginal() {
|
|
100
|
+
const { original } = this.editor.getModel();
|
|
101
|
+
original.setValue(this.original);
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
watch: {
|
|
105
|
+
options: {
|
|
106
|
+
deep: true,
|
|
107
|
+
handler(options) {
|
|
108
|
+
this.editor.updateOptions(options);
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
value() {
|
|
112
|
+
this.value !== this._getValue() && this._setValue(this.value);
|
|
113
|
+
},
|
|
114
|
+
original() {
|
|
115
|
+
this._setOriginal();
|
|
116
|
+
},
|
|
117
|
+
language() {
|
|
118
|
+
if (!this.editor) return;
|
|
119
|
+
if (this.diffEditor) {
|
|
120
|
+
const { original, modified } = this.editor.getModel();
|
|
121
|
+
monaco.editor.setModelLanguage(original, this.language);
|
|
122
|
+
monaco.editor.setModelLanguage(modified, this.language);
|
|
123
|
+
} else
|
|
124
|
+
monaco.editor.setModelLanguage(this.editor.getModel(), this.language);
|
|
125
|
+
},
|
|
126
|
+
theme() {
|
|
127
|
+
monaco.editor.setTheme(this.theme);
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
</script>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<content-table
|
|
3
|
+
:table-title="title"
|
|
4
|
+
:searchable="isSearchable"
|
|
5
|
+
:hide-header="hideHeader"
|
|
6
|
+
>
|
|
7
|
+
<template #content-right-controls>
|
|
8
|
+
<header-item v-if="showHideBtn">
|
|
9
|
+
<ac-button
|
|
10
|
+
modifier-classes="is-square is-primary"
|
|
11
|
+
:icon-class="toggleHideValue ? 'eye-slash' : 'eye'"
|
|
12
|
+
:disabled="previewYamls.length === 0"
|
|
13
|
+
@click.prevent="toggleHideValue = !toggleHideValue"
|
|
14
|
+
/>
|
|
15
|
+
</header-item>
|
|
16
|
+
<slot name="content-action" />
|
|
17
|
+
</template>
|
|
18
|
+
<template #content="{ searchText }">
|
|
19
|
+
<filtered-file-editor
|
|
20
|
+
:search-text="searchText"
|
|
21
|
+
:toggle-hide-value="toggleHideValue"
|
|
22
|
+
:is-preview-loading="isPreviewLoading"
|
|
23
|
+
:is-editor-read-only="isEditorReadOnly"
|
|
24
|
+
:preview-yamls="previewYamls"
|
|
25
|
+
:show-minimap="showMinimap"
|
|
26
|
+
:editor-height="editorHeight"
|
|
27
|
+
@setActiveKey="setActiveKey"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</content-table>
|
|
31
|
+
</template>
|
|
32
|
+
<script>
|
|
33
|
+
import { defineComponent, defineAsyncComponent } from "vue";
|
|
34
|
+
export default defineComponent({
|
|
35
|
+
components: {
|
|
36
|
+
AcButton: defineAsyncComponent(() => import("../button/Button.vue")),
|
|
37
|
+
ContentTable: defineAsyncComponent(() =>
|
|
38
|
+
import("../content/ContentTable.vue")
|
|
39
|
+
),
|
|
40
|
+
HeaderItem: defineAsyncComponent(() => import("../header/HeaderItem.vue")),
|
|
41
|
+
FilteredFileEditor: defineAsyncComponent(() =>
|
|
42
|
+
import("./FilteredFileEditor.vue")
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
props: {
|
|
46
|
+
title: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "Title"
|
|
49
|
+
},
|
|
50
|
+
isSearchable: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
54
|
+
isPreviewLoading: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
58
|
+
isEditorReadOnly: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
previewYamls: {
|
|
63
|
+
type: Array,
|
|
64
|
+
default: () => {
|
|
65
|
+
[];
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
showHideBtn: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false,
|
|
71
|
+
},
|
|
72
|
+
showMinimap: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
isUpdateActive: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
80
|
+
deleteModalStatus: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: "closed"
|
|
83
|
+
},
|
|
84
|
+
editorHeight: {
|
|
85
|
+
type: Number,
|
|
86
|
+
default: 60
|
|
87
|
+
},
|
|
88
|
+
hideHeader: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
emits: ["activeKey"],
|
|
94
|
+
data() {
|
|
95
|
+
return {
|
|
96
|
+
activeKey: "",
|
|
97
|
+
toggleHideValue: "",
|
|
98
|
+
showDeleteDataModal: false
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
computed: {
|
|
102
|
+
activeFile() {
|
|
103
|
+
const activeFile = this.previewYamls.find(
|
|
104
|
+
element => element.uid === this.activeKey
|
|
105
|
+
);
|
|
106
|
+
return activeFile || { content: "", format: "yaml" };
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
setActiveKey(key) {
|
|
111
|
+
this.activeKey = key;
|
|
112
|
+
this.toggleHideValue = this.activeFile.isSecret;
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
watch: {
|
|
116
|
+
activeKey:{
|
|
117
|
+
immediate: true,
|
|
118
|
+
handler(n){
|
|
119
|
+
this.$emit("activeKey",this.activeKey);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
</script>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-wrapper">
|
|
3
|
+
<div
|
|
4
|
+
:class="{
|
|
5
|
+
'pt-20': !reducePaddingTop,
|
|
6
|
+
'pt-10': reducePaddingTop,
|
|
7
|
+
'pl-20': !isContainer,
|
|
8
|
+
'form-content': !isContainer,
|
|
9
|
+
container: isContainer,
|
|
10
|
+
}"
|
|
11
|
+
>
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
<div
|
|
15
|
+
class="form-footer b-t-1 pt-10 pb-10 pl-20 pr-20 mt-15"
|
|
16
|
+
v-if="hasFooter"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="ac-vcentered"
|
|
20
|
+
:class="{
|
|
21
|
+
'form-content': !isContainer,
|
|
22
|
+
container: isContainer,
|
|
23
|
+
}"
|
|
24
|
+
>
|
|
25
|
+
<form-footer-controls>
|
|
26
|
+
<slot name="form-left-controls" />
|
|
27
|
+
</form-footer-controls>
|
|
28
|
+
<form-footer-controls>
|
|
29
|
+
<slot name="form-right-controls" />
|
|
30
|
+
</form-footer-controls>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import { defineComponent, defineAsyncComponent, h } from "vue";
|
|
38
|
+
|
|
39
|
+
export default defineComponent({
|
|
40
|
+
props: {
|
|
41
|
+
isContainer: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
hasFooter: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true,
|
|
48
|
+
},
|
|
49
|
+
reducePaddingTop: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
components: {
|
|
56
|
+
FormFooterControls: defineAsyncComponent(() =>
|
|
57
|
+
import("../../v2/form/FormFooterControl.vue").then(
|
|
58
|
+
(module) => module.default
|
|
59
|
+
)
|
|
60
|
+
),
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<input
|
|
3
|
+
class="ac-input"
|
|
4
|
+
data-testid="ac-input"
|
|
5
|
+
:value="modelValue"
|
|
6
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import { defineComponent } from "vue";
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
props: {
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: null,
|
|
17
|
+
default: "",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:modelValue"],
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="inner-header">
|
|
3
|
+
<div
|
|
4
|
+
class="is-flex is-justify-content-space-between"
|
|
5
|
+
:class="{ container: isContainer }"
|
|
6
|
+
>
|
|
7
|
+
<header-items>
|
|
8
|
+
<header-item>
|
|
9
|
+
<transition name="fade" mode="out-in" appear>
|
|
10
|
+
<h5 :key="title">{{ title }}</h5>
|
|
11
|
+
</transition>
|
|
12
|
+
</header-item>
|
|
13
|
+
<slot name="header-left-controls" />
|
|
14
|
+
</header-items>
|
|
15
|
+
<header-items>
|
|
16
|
+
<slot />
|
|
17
|
+
</header-items>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import { defineComponent, defineAsyncComponent } from "vue";
|
|
24
|
+
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
props: {
|
|
27
|
+
title: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "No Title",
|
|
30
|
+
},
|
|
31
|
+
isContainer: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
components: {
|
|
37
|
+
HeaderItems: defineAsyncComponent(() =>
|
|
38
|
+
import("../../v2/header/HeaderItems.vue").then((module) => module.default)
|
|
39
|
+
),
|
|
40
|
+
HeaderItem: defineAsyncComponent(() =>
|
|
41
|
+
import("../../v2/header/HeaderItem.vue").then((module) => module.default)
|
|
42
|
+
),
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<content-loader>
|
|
4
|
+
<rect x="21" y="6" rx="3" ry="3" width="42" height="3" />
|
|
5
|
+
<rect x="69" y="6" rx="3" ry="3" width="39" height="3" />
|
|
6
|
+
<rect x="114" y="6" rx="3" ry="3" width="24" height="3" />
|
|
7
|
+
|
|
8
|
+
<rect x="39" y="12" rx="3" ry="3" width="24" height="3" />
|
|
9
|
+
<rect x="69" y="12" rx="3" ry="3" width="45" height="3" />
|
|
10
|
+
<rect x="120" y="12" rx="3" ry="3" width="12" height="3" />
|
|
11
|
+
|
|
12
|
+
<rect x="39" y="18" rx="3" ry="3" width="30" height="3" />
|
|
13
|
+
<rect x="75" y="18" rx="3" ry="3" width="60" height="3" />
|
|
14
|
+
|
|
15
|
+
<rect x="21" y="27" rx="3" ry="3" width="42" height="3" />
|
|
16
|
+
<rect x="69" y="27" rx="3" ry="3" width="39" height="3" />
|
|
17
|
+
<rect x="114" y="27" rx="3" ry="3" width="24" height="3" />
|
|
18
|
+
|
|
19
|
+
<rect x="39" y="33" rx="3" ry="3" width="24" height="3" />
|
|
20
|
+
<rect x="69" y="33" rx="3" ry="3" width="45" height="3" />
|
|
21
|
+
<rect x="120" y="33" rx="3" ry="3" width="12" height="3" />
|
|
22
|
+
|
|
23
|
+
<rect x="39" y="39" rx="3" ry="3" width="30" height="3" />
|
|
24
|
+
<rect x="75" y="39" rx="3" ry="3" width="60" height="3" />
|
|
25
|
+
|
|
26
|
+
<rect x="21" y="48" rx="3" ry="3" width="42" height="3" />
|
|
27
|
+
<rect x="69" y="48" rx="3" ry="3" width="39" height="3" />
|
|
28
|
+
<rect x="114" y="48" rx="3" ry="3" width="24" height="3" />
|
|
29
|
+
|
|
30
|
+
<rect x="39" y="54" rx="3" ry="3" width="24" height="3" />
|
|
31
|
+
<rect x="69" y="54" rx="3" ry="3" width="45" height="3" />
|
|
32
|
+
<rect x="120" y="54" rx="3" ry="3" width="12" height="3" />
|
|
33
|
+
|
|
34
|
+
<rect x="39" y="60" rx="3" ry="3" width="30" height="3" />
|
|
35
|
+
<rect x="75" y="60" rx="3" ry="3" width="60" height="3" />
|
|
36
|
+
|
|
37
|
+
<rect x="21" y="69" rx="3" ry="3" width="42" height="3" />
|
|
38
|
+
<rect x="69" y="69" rx="3" ry="3" width="39" height="3" />
|
|
39
|
+
<rect x="114" y="69" rx="3" ry="3" width="24" height="3" />
|
|
40
|
+
|
|
41
|
+
<rect x="39" y="75" rx="3" ry="3" width="24" height="3" />
|
|
42
|
+
<rect x="69" y="75" rx="3" ry="3" width="45" height="3" />
|
|
43
|
+
<rect x="120" y="75" rx="3" ry="3" width="12" height="3" />
|
|
44
|
+
|
|
45
|
+
<rect x="39" y="81" rx="3" ry="3" width="30" height="3" />
|
|
46
|
+
<rect x="75" y="81" rx="3" ry="3" width="60" height="3" />
|
|
47
|
+
|
|
48
|
+
<rect x="21" y="90" rx="3" ry="3" width="42" height="3" />
|
|
49
|
+
<rect x="69" y="90" rx="3" ry="3" width="39" height="3" />
|
|
50
|
+
<rect x="114" y="90" rx="3" ry="3" width="24" height="3" />
|
|
51
|
+
|
|
52
|
+
<rect x="39" y="96" rx="3" ry="3" width="24" height="3" />
|
|
53
|
+
<rect x="69" y="96" rx="3" ry="3" width="45" height="3" />
|
|
54
|
+
<rect x="120" y="96" rx="3" ry="3" width="12" height="3" />
|
|
55
|
+
|
|
56
|
+
<rect x="39" y="102" rx="3" ry="3" width="30" height="3" />
|
|
57
|
+
<rect x="75" y="102" rx="3" ry="3" width="60" height="3" />
|
|
58
|
+
|
|
59
|
+
<rect x="21" y="111" rx="3" ry="3" width="42" height="3" />
|
|
60
|
+
<rect x="69" y="111" rx="3" ry="3" width="39" height="3" />
|
|
61
|
+
<rect x="114" y="111" rx="3" ry="3" width="24" height="3" />
|
|
62
|
+
|
|
63
|
+
<rect x="39" y="117" rx="3" ry="3" width="24" height="3" />
|
|
64
|
+
<rect x="69" y="117" rx="3" ry="3" width="45" height="3" />
|
|
65
|
+
<rect x="120" y="117" rx="3" ry="3" width="12" height="3" />
|
|
66
|
+
|
|
67
|
+
<rect x="39" y="123" rx="3" ry="3" width="30" height="3" />
|
|
68
|
+
<rect x="75" y="123" rx="3" ry="3" width="60" height="3" />
|
|
69
|
+
</content-loader>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script>
|
|
74
|
+
import { defineAsyncComponent, defineComponent } from 'vue'
|
|
75
|
+
export default defineComponent({
|
|
76
|
+
name: 'LoaderElement',
|
|
77
|
+
components: {
|
|
78
|
+
ContentLoader: defineAsyncComponent(() =>
|
|
79
|
+
import('vue-content-loader').then((module) => module.ContentLoader)
|
|
80
|
+
),
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<content-loader :width="200" :height="350" :speed="2">
|
|
4
|
+
<rect x="0" y="24" rx="3" ry="3" width="200" height="20" />
|
|
5
|
+
<rect x="20" y="49" rx="3" ry="3" width="200" height="20" />
|
|
6
|
+
<rect x="20" y="74" rx="3" ry="3" width="200" height="20" />
|
|
7
|
+
<rect x="20" y="124" rx="3" ry="3" width="200" height="20" />
|
|
8
|
+
|
|
9
|
+
<rect x="0" y="149" rx="3" ry="3" width="200" height="20" />
|
|
10
|
+
<rect x="20" y="174" rx="3" ry="3" width="200" height="20" />
|
|
11
|
+
<rect x="20" y="199" rx="3" ry="3" width="200" height="20" />
|
|
12
|
+
<rect x="20" y="249" rx="3" ry="3" width="200" height="20" />
|
|
13
|
+
|
|
14
|
+
<rect x="0" y="274" rx="3" ry="3" width="200" height="20" />
|
|
15
|
+
<rect x="20" y="299" rx="3" ry="3" width="200" height="20" />
|
|
16
|
+
<rect x="20" y="324" rx="3" ry="3" width="200" height="20" />
|
|
17
|
+
<rect x="20" y="349" rx="3" ry="3" width="200" height="20" />
|
|
18
|
+
|
|
19
|
+
<rect x="0" y="374" rx="3" ry="3" width="200" height="20" />
|
|
20
|
+
</content-loader>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import { defineAsyncComponent, defineComponent } from 'vue'
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
name: 'LoaderElement',
|
|
28
|
+
components: {
|
|
29
|
+
ContentLoader: defineAsyncComponent(() =>
|
|
30
|
+
import('vue-content-loader').then((module) => module.ContentLoader)
|
|
31
|
+
),
|
|
32
|
+
},
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span href="" class="task-item" :class="[statusClass]">
|
|
3
|
+
<i class="fa" :class="`fa-${statusIcon}`" />
|
|
4
|
+
{{ title }}
|
|
5
|
+
</span>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { computed, toRefs } from "vue";
|
|
10
|
+
import { TaskStatus } from "../../../typings/long-running-tasks.ts";
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(
|
|
13
|
+
defineProps<{ title: string; status: TaskStatus }>(),
|
|
14
|
+
{
|
|
15
|
+
title: "",
|
|
16
|
+
status: "Pending",
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const { status } = toRefs(props);
|
|
21
|
+
const statusClass = computed(() => `is-${status.value.toLowerCase()}`);
|
|
22
|
+
const statusIcon = computed(() => {
|
|
23
|
+
if (status.value === "Running" || status.value === "Started")
|
|
24
|
+
return "circle-o-notch";
|
|
25
|
+
else if (status.value === "Success") return "check-circle";
|
|
26
|
+
else if (status.value === "Failed") return "times-circle";
|
|
27
|
+
else return "spinner";
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style scoped lang="scss">
|
|
32
|
+
.task-item {
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
display: block;
|
|
35
|
+
padding: 5px;
|
|
36
|
+
border-radius: 5px;
|
|
37
|
+
transition: all 0.3s ease-in-out;
|
|
38
|
+
&:hover {
|
|
39
|
+
background-color: var(--ac-white-light);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
&.is-active {
|
|
43
|
+
background-color: var(--ac-white-light);
|
|
44
|
+
}
|
|
45
|
+
&.is-pending {
|
|
46
|
+
color: var(--ac-gray-light);
|
|
47
|
+
i {
|
|
48
|
+
visibility: hidden;
|
|
49
|
+
}
|
|
50
|
+
&:hover {
|
|
51
|
+
background-color: transparent;
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
&.is-aborted {
|
|
56
|
+
color: var(--ac-gray-light);
|
|
57
|
+
&:hover {
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
&.is-running,
|
|
63
|
+
&.is-started {
|
|
64
|
+
i {
|
|
65
|
+
color: var(--ac-primary);
|
|
66
|
+
animation-name: spin;
|
|
67
|
+
animation-duration: 1000ms;
|
|
68
|
+
animation-iteration-count: infinite;
|
|
69
|
+
animation-timing-function: linear;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes spin {
|
|
73
|
+
from {
|
|
74
|
+
transform: rotate(0deg);
|
|
75
|
+
}
|
|
76
|
+
to {
|
|
77
|
+
transform: rotate(360deg);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
&.is-success {
|
|
82
|
+
i {
|
|
83
|
+
color: #158748;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&.is-failed {
|
|
87
|
+
i {
|
|
88
|
+
color: #ff3729;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</style>
|