main
vue 72 lines 2.32 KB
Raw
1 <template>
2 <div class="sigma-queries-actions flex flex-wrap gap-2">
3 <QueryActiveAllForm v-slot="{ loading, togglePopup }" @updated="emitUpdate()">
4 <n-button size="small" type="primary" secondary strong :loading @click.stop="togglePopup()">
5 <template #icon>
6 <Icon :name="EditIcon" />
7 </template>
8 Update queries status
9 </n-button>
10 </QueryActiveAllForm>
11
12 <QueryUploadFile v-slot="{ loading, togglePopup }" @updated="emitUpdate()">
13 <n-button size="small" type="success" secondary strong :loading @click.stop="togglePopup()">
14 <template #icon>
15 <Icon :name="UploadFileIcon" />
16 </template>
17 Upload queries from FIle
18 </n-button>
19 </QueryUploadFile>
20
21 <QueryUploadDB v-slot="{ loading, togglePopup }" @updated="emitUpdate()">
22 <n-button size="small" type="success" secondary strong :loading @click.stop="togglePopup()">
23 <template #icon>
24 <Icon :name="UploadIcon" />
25 </template>
26 Upload queries to DB
27 </n-button>
28 </QueryUploadDB>
29
30 <QueryDownloadAll v-slot="{ loading, togglePopup }" @updated="emitUpdate()">
31 <n-button size="small" type="success" secondary strong :loading @click.stop="togglePopup()">
32 <template #icon>
33 <Icon :name="DownloadIcon" />
34 </template>
35 Download queries
36 </n-button>
37 </QueryDownloadAll>
38
39 <QueryDeleteAll v-slot="{ loading, togglePopup }" @updated="emitUpdate()">
40 <n-button size="small" type="error" secondary strong :loading @click.stop="togglePopup()">
41 <template #icon>
42 <Icon :name="DeleteIcon" />
43 </template>
44 Delete all queries
45 </n-button>
46 </QueryDeleteAll>
47 </div>
48 </template>
49
50 <script setup lang="ts">
51 import { NButton } from "naive-ui"
52 import Icon from "@/components/common/Icon.vue"
53 import QueryActiveAllForm from "./actionsProviders/QueryActiveAllForm.vue"
54 import QueryDeleteAll from "./actionsProviders/QueryDeleteAll.vue"
55 import QueryDownloadAll from "./actionsProviders/QueryDownloadAll.vue"
56 import QueryUploadDB from "./actionsProviders/QueryUploadDB.vue"
57 import QueryUploadFile from "./actionsProviders/QueryUploadFile.vue"
58
59 const emit = defineEmits<{
60 (e: "updated"): void
61 }>()
62
63 const EditIcon = "uil:edit-alt"
64 const DeleteIcon = "ph:trash"
65 const DownloadIcon = "carbon:cloud-download"
66 const UploadIcon = "carbon:cloud-upload"
67 const UploadFileIcon = "carbon:upload"
68
69 function emitUpdate() {
70 emit("updated")
71 }
72 </script>