diff --git a/studio/package.json b/studio/package.json index cd4a9be..fff539d 100644 --- a/studio/package.json +++ b/studio/package.json @@ -9,7 +9,7 @@ "lint": "eslint --ext .js,.vue ./", "format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore", "test": "echo \"No test specified\" && exit 0", - "dev": "concurrently \"quasar dev\" \"node connect-ws.js\"", + "dev": "quasar dev", "build": "quasar build" }, "dependencies": { diff --git a/studio/quasar.config.js b/studio/quasar.config.js index 265e339..ab0d9fa 100644 --- a/studio/quasar.config.js +++ b/studio/quasar.config.js @@ -19,7 +19,8 @@ module.exports = configure(function (/* ctx */) { // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli-vite/boot-files boot: [ - 'ws' + 'ws', + 'axios' ], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css @@ -102,7 +103,8 @@ module.exports = configure(function (/* ctx */) { // Quasar plugins plugins: [ - 'Notify' + 'Notify', + 'Loading' ], }, diff --git a/studio/src/App.vue b/studio/src/App.vue index e35d950..6aabb00 100644 --- a/studio/src/App.vue +++ b/studio/src/App.vue @@ -5,5 +5,8 @@ diff --git a/studio/src/boot/axios.js b/studio/src/boot/axios.js new file mode 100644 index 0000000..bb07c3e --- /dev/null +++ b/studio/src/boot/axios.js @@ -0,0 +1,27 @@ +import axios from 'axios'; +import { boot } from 'quasar/wrappers' +import { hideLoader, showLoader } from 'src/services/loading'; + +export default boot(({ app }) => { + axios.interceptors.request.use( + (config) => { + showLoader(); + return config; + }, + (error) => { + hideLoader(); + return Promise.reject(error); + } + ); + + axios.interceptors.response.use( + (response) => { + hideLoader(); + return response; + }, + (error) => { + hideLoader(); + return Promise.reject(error); + } + ); +}) \ No newline at end of file diff --git a/studio/src/pages/shared/CommonTable.vue b/studio/src/pages/shared/CommonTable.vue index 2b1c2ec..f3dbdc4 100644 --- a/studio/src/pages/shared/CommonTable.vue +++ b/studio/src/pages/shared/CommonTable.vue @@ -32,17 +32,17 @@ unelevated icon="img:icons/trash-white.svg" :ripple="false" - v-if="showStorage" + v-if="showStorage && selectedRows.length > 0" color="negative" class="rounded-10 text-white text-capitalize self-center btn-add-new" - @click="handleClick" + @click="handleDelete" /> = 1 && page <= this.totalPages) { this.pagination.page = page; diff --git a/studio/src/pages/user_account/FunctionComponent.vue b/studio/src/pages/user_account/FunctionComponent.vue index d5d31f8..2205e66 100644 --- a/studio/src/pages/user_account/FunctionComponent.vue +++ b/studio/src/pages/user_account/FunctionComponent.vue @@ -325,65 +325,9 @@ export default defineComponent({ field: "type", sortable: true, }, - // { - // name: "bodyOrExternalName", - // label: "Body/ External Name", - // align: "center", - // field: "bodyOrExternalName", - // sortable: true, - // }, { name: "actions", label: "Actions", align: "center" }, ], - tableData: [ - { - id: 1, - name: "Example Data Table", - parameters: "Lorem ipsum", - returnType: "Lorem ipsum", - language: "PHP", - type: "External", - }, - { - id: 2, - name: "Example Data Table", - parameters: "Lorem ipsum", - returnType: "Lorem ipsum", - language: "JavaScript", - type: "Embedded", - }, - { - id: 3, - name: "Example Data Table", - parameters: "Lorem ipsum", - returnType: "Lorem ipsum", - language: "R", - type: "External", - }, - { - id: 4, - name: "Example Data Table", - parameters: "Lorem ipsum", - returnType: "Lorem ipsum", - language: "PHP", - type: "Embedded", - }, - { - id: 5, - name: "Example Data Table", - parameters: "Lorem ipsum", - returnType: "Lorem ipsum", - language: "SQL", - type: "External", - }, - { - id: 6, - name: "Example Data Table", - parameters: "Lorem ipsum", - returnType: "Lorem ipsum", - language: "Python", - type: "Embedded", - }, - ], + tableData: [], functionTypeRow: [ { name: "", type: "", defaultValue: "" }, { name: "", type: "", defaultValue: "" }, @@ -530,19 +474,7 @@ export default defineComponent({ }, getFunctionInformations() { this.$ws.sendMessage( - `SELECT - p.proname as "name", - pg_catalog.pg_get_function_arguments(p.oid) as "parameters", - pg_catalog.pg_get_function_result(p.oid) as "returnType" -FROM - pg_catalog.pg_proc p - LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace -WHERE - pg_catalog.pg_function_is_visible(p.oid) - AND n.nspname <> 'pg_catalog' - AND n.nspname <> 'information_schema' -ORDER BY p.proname; -`, + `SHOW FUNCTIONS;`, "get_function" ); }, @@ -554,7 +486,7 @@ ORDER BY p.proname; return defaultValue ? `${name} ${type} DEFAULT ${defaultValue}` : `${name} ${type}`; - }) + }) .join(", "); return ` diff --git a/studio/src/pages/user_account/StorageComponent.vue b/studio/src/pages/user_account/StorageComponent.vue index f169a09..3f16587 100644 --- a/studio/src/pages/user_account/StorageComponent.vue +++ b/studio/src/pages/user_account/StorageComponent.vue @@ -40,7 +40,12 @@ - + @@ -124,41 +129,44 @@ :showAddButton="false" :hideBottom="false" noDataLabel="No Data" - @add-new="openTableDialog" + @delete-item="deleteBucketItems" @move-row="openMoveDialog" @rename-row="openRenameDialog" + @delete-row="openBucketObjectDeleteDialog" + @add-item="addNewBucketObjectDialog" showStorage isMultipleChecked /> - + @@ -272,12 +280,14 @@ label="Rename" unelevated color="light-green" + @click="updateStorageObject" class="rounded-10 text-capitalize min-w-80" /> + @@ -322,16 +333,229 @@ label="Add Now" unelevated color="light-green" + @click="addStorageBuckets" class="rounded-10 text-capitalize min-w-80" /> + + + + + +
+ +

+ Add New {{ selectedTab }} +

+
+ +
+ + +

+ Write Bucket Object Name +

+ +
+ + + + + +
+
+ + + + + +
+ +

+ Delete {{ deletedBucket.bucketName }}? +

+
+ +
+ + +

+ Are you sure you want to delete this + {{ deletedBucket.bucketName }}? This action is irreversible. +

+
+ + + + + +
+
+ + + + + +
+ +

+ Delete {{ isOpenBucketObjectDeleteDialog.selectedRow?.name }}? +

+
+ +
+ + +

+ Are you sure you want to delete this + {{ + isOpenBucketObjectDeleteDialog.selectedRow?.name + }}? This action is irreversible. +

+
+ + + + + +
+
+ + + + + +
+ +

+ Delete Objects? +

+
+ +
+ + +

+ Are you sure you want to delete this + {{ + deleteMultipleSelectedRows.selectedRows + ?.map((row) => row?.name) + .join(", ") + }}? This action is irreversible. +

+
+ + + + + +
+