-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -54,29 +12,41 @@
diff --git a/gui/src/components/Modal/ResourceEditing.vue b/gui/src/components/Modal/ResourceEditing.vue
index 7cde981..f129963 100644
--- a/gui/src/components/Modal/ResourceEditing.vue
+++ b/gui/src/components/Modal/ResourceEditing.vue
@@ -1,51 +1,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -68,6 +24,7 @@ import Select from "@/base-components/Form/FormSelect.vue"
import { SNACKBAR_MESSAGE_TYPES } from "@/constants"
import { IResourcePayload } from "@/types/resource.ts"
import { IPlatform } from "@/interfaces/platform.interface.ts"
+import ResourceForm from "@/components/Modal/ResourceForm.vue";
interface ResourceEditingProps {
payload: IResourcePayload & { uuid: string }
@@ -78,21 +35,14 @@ const props = defineProps()
const resourceStore = useResourceStore()
const uiStore = useUIStore()
-const resourceData = reactive({
- title: props.payload.title ?? "",
- platform: props.payload.platform ?? "",
- appId: props.payload.appId ?? "",
- appSecret: props.payload.appSecret ?? ""
-})
+const resourceData = reactive(props.payload)
// HACK: https://github.com/vuelidate/vuelidate/issues/1147
const externalServerValidation = () => true
const rules = {
title: { required, externalServerValidation },
- platform: { required, externalServerValidation },
- appId: { required, externalServerValidation },
- appSecret: { required, externalServerValidation }
+ platform: { required, externalServerValidation }
}
const $externalResults = reactive({})
@@ -103,8 +53,11 @@ const closeModal = (skipConfirmation: boolean = false) => {
}
const editResource = async () => {
- if (!(await v$.value.$validate())) return
- if (!(await v$.value.$validate())) return
+ const validate = await v$.value.$validate()
+ if (!validate){
+ return
+ }
+
resourceStore
.editResource(props.payload.uuid, resourceData)
.then((editedResource) => {
@@ -120,11 +73,5 @@ const editResource = async () => {
})
}
-const platformsOptions = ref>([])
-const getPlatforms = async () => {
- platformsOptions.value = await resourceStore.getPlatforms()
-}
-
-getPlatforms()
diff --git a/gui/src/components/Modal/ResourceForm.vue b/gui/src/components/Modal/ResourceForm.vue
new file mode 100644
index 0000000..e7e4920
--- /dev/null
+++ b/gui/src/components/Modal/ResourceForm.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
SSH Credentials
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gui/src/components/Modal/index.vue b/gui/src/components/Modal/index.vue
index ac4ebcf..3a302f1 100644
--- a/gui/src/components/Modal/index.vue
+++ b/gui/src/components/Modal/index.vue
@@ -1,5 +1,5 @@
-
-
+
@@ -164,9 +164,7 @@ const removeApplication = (uuid: string) => {
}
const toApplicationEditing = (application: IApplication) => {
- if(application.status == 'draft' || !application.status){
- router.push({ name: "application", params: { appUuid: application.uuid } })
- }
+ router.push({ name: "application", params: { appUuid: application.uuid } })
}
const deployApplication = (application: IApplication) =>{
diff --git a/gui/src/containers/Applications/PolicyEditor/index.vue b/gui/src/containers/Applications/PolicyEditor/index.vue
new file mode 100644
index 0000000..9140b45
--- /dev/null
+++ b/gui/src/containers/Applications/PolicyEditor/index.vue
@@ -0,0 +1,32 @@
+
+
+
+
Policy Editor
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gui/src/containers/Applications/Resources/index.vue b/gui/src/containers/Applications/Resources/index.vue
index da98393..6fcebbd 100644
--- a/gui/src/containers/Applications/Resources/index.vue
+++ b/gui/src/containers/Applications/Resources/index.vue
@@ -11,7 +11,7 @@
Name
Platform
- AppId
+ UUID
App Secret
Action
@@ -21,35 +21,37 @@
- {{ resource.title }}
+
+ {{ resource.title }}
+
- {{ resource.platform }}
+ {{ resource.platform.title }}
- {{ resource.appId }}
+ {{ resource.uuid }}
- {{ resource.appSecret }}
+ *************
-
+
@@ -70,8 +72,43 @@
-