diff --git a/src/main/client/app/pages/credentials/credentials-list.vue b/src/main/client/app/pages/credentials/credentials-list.vue new file mode 100644 index 000000000..9e4b25fc0 --- /dev/null +++ b/src/main/client/app/pages/credentials/credentials-list.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/src/main/client/app/pages/credentials/credentials-routes.js b/src/main/client/app/pages/credentials/credentials-routes.js index 99da4388b..7274aab51 100644 --- a/src/main/client/app/pages/credentials/credentials-routes.js +++ b/src/main/client/app/pages/credentials/credentials-routes.js @@ -1,14 +1,25 @@ const credentialsRoutes = [ { path: '/credentials', - name: 'credentials', - component: () => import(/* webpackChunkName: "chunk-stacks" */ '@/pages/credentials/credentials.vue'), + name: 'credentialsList', + component: () => import(/* webpackChunkName: "chunk-credentials" */ '@/pages/credentials/credentials-list.vue'), meta: { authorities: ['ROLE_USER'], breadcrumb: [{ text: 'Credentials' }], title: 'Gaia - Credentials', }, }, + { + path: '/credentials/:credentialsId', + name: 'credentials', + component: () => import(/* webpackChunkName: "chunk-credentials" */ '@/pages/credentials/credentials.vue'), + props: true, + meta: { + authorities: ['ROLE_USER'], + breadcrumb: [{ text: 'Credentials', to: { name: 'credentialsList' } }, { text: 'Credentials edition' }], + title: 'Gaia - Credentials edition', + }, + }, ]; export default credentialsRoutes; diff --git a/src/main/client/app/pages/credentials/credentials.vue b/src/main/client/app/pages/credentials/credentials.vue index 61ce8ef48..4dadc025d 100644 --- a/src/main/client/app/pages/credentials/credentials.vue +++ b/src/main/client/app/pages/credentials/credentials.vue @@ -1,72 +1,106 @@ diff --git a/src/main/client/app/pages/credentials/providers/credentials-azurerm.vue b/src/main/client/app/pages/credentials/providers/credentials-azurerm.vue new file mode 100644 index 000000000..9ac43c3d3 --- /dev/null +++ b/src/main/client/app/pages/credentials/providers/credentials-azurerm.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/main/client/app/pages/credentials/providers/credentials-google.vue b/src/main/client/app/pages/credentials/providers/credentials-google.vue new file mode 100644 index 000000000..c0af165b1 --- /dev/null +++ b/src/main/client/app/pages/credentials/providers/credentials-google.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/main/client/app/shared/components/sidebar/side-bar-links.vue b/src/main/client/app/shared/components/sidebar/side-bar-links.vue index de5792513..890e6844a 100644 --- a/src/main/client/app/shared/components/sidebar/side-bar-links.vue +++ b/src/main/client/app/shared/components/sidebar/side-bar-links.vue @@ -36,7 +36,7 @@ route: 'stacks', icon: 'layer-group', class: 'blue2_color', title: 'Stacks', roles: ['ROLE_USER'], }, { - route: 'credentials', icon: 'lock', class: 'orange_color', title: 'Credentials', roles: ['ROLE_USER'], + route: 'credentialsList', icon: 'lock', class: 'orange_color', title: 'Credentials', roles: ['ROLE_USER'], }, { route: 'settings', icon: 'cog', class: 'yellow_color', title: 'Settings', roles: ['ROLE_ADMIN'], diff --git a/src/main/java/io/gaia_app/credentials/CredentialsRestController.java b/src/main/java/io/gaia_app/credentials/CredentialsRestController.java index 92bd53784..d3d6e8d7f 100644 --- a/src/main/java/io/gaia_app/credentials/CredentialsRestController.java +++ b/src/main/java/io/gaia_app/credentials/CredentialsRestController.java @@ -21,6 +21,11 @@ public List getAllCredentials(){ return this.credentialsRepository.findAll(); } + @GetMapping("/{id}") + public Credentials getCredentials(@PathVariable String id){ + return this.credentialsRepository.findById(id).orElse(null); + } + @PostMapping public Credentials createCredentials(@RequestBody Credentials credentials){ return this.credentialsRepository.save(credentials);