First WIP commit for the new Integrations panel.

This commit is contained in:
Fabio Manganiello 2023-09-23 23:28:32 +02:00
parent 4d52fd35b9
commit 4da3c13976
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
3 changed files with 72 additions and 1 deletions

View file

@ -5,6 +5,7 @@
v-if="selectedPanel === 'users' && currentUser" /> v-if="selectedPanel === 'users' && currentUser" />
<Token :session-token="sessionToken" :current-user="currentUser" <Token :session-token="sessionToken" :current-user="currentUser"
v-else-if="selectedPanel === 'tokens' && currentUser" /> v-else-if="selectedPanel === 'tokens' && currentUser" />
<Integrations v-else-if="selectedPanel === 'integrations'" />
</main> </main>
</div> </div>
</template> </template>
@ -12,11 +13,12 @@
<script> <script>
import Token from "@/components/panels/Settings/Token"; import Token from "@/components/panels/Settings/Token";
import Users from "@/components/panels/Settings/Users"; import Users from "@/components/panels/Settings/Users";
import Integrations from "@/components/panels/Settings/Integrations";
import Utils from "@/Utils"; import Utils from "@/Utils";
export default { export default {
name: "Settings", name: "Settings",
components: {Users, Token}, components: {Users, Token, Integrations},
mixins: [Utils], mixins: [Utils],
props: { props: {

View file

@ -0,0 +1,62 @@
<template>
<div class="integrations-container">
<Loading v-if="loading" />
<div class="body">
<!-- TODO -->
</div>
</div>
</template>
<script>
import Loading from "@/components/Loading";
import Utils from "@/Utils";
export default {
name: "Integrations",
components: {Loading},
mixins: [Utils],
data() {
return {
loading: false,
plugins: {},
backends: {},
}
},
methods: {
async loadIntegrations() {
this.loading = true
try {
[this.plugins, this.backends] =
await Promise.all([
this.request('inspect.get_all_plugins'),
this.request('inspect.get_all_backends'),
])
} finally {
this.loading = false
}
},
},
mounted() {
this.loadIntegrations()
}
}
</script>
<style lang="scss">
.integrations-container {
width: 100%;
display: flex;
flex-direction: column;
margin-top: .15em;
.body {
background: $background-color;
display: flex;
}
}
</style>

View file

@ -11,5 +11,12 @@
"icon": { "icon": {
"class": "fas fa-key" "class": "fas fa-key"
} }
},
"integrations": {
"name": "Integrations",
"icon": {
"class": "fas fa-puzzle-piece"
}
} }
} }