fix: admin storage page display issues

pull/5698/head
Nicolas Giard 2 years ago
parent 7fe7fbb371
commit c9fc4a1611
No known key found for this signature in database
GPG Key ID: 85061B8F9D55B7C8

@ -12,7 +12,6 @@ module.exports = {
*/ */
async apiKeys (obj, args, context) { async apiKeys (obj, args, context) {
const keys = await WIKI.models.apiKeys.query().orderBy(['isRevoked', 'name']) const keys = await WIKI.models.apiKeys.query().orderBy(['isRevoked', 'name'])
console.info(keys)
return keys.map(k => ({ return keys.map(k => ({
id: k.id, id: k.id,
name: k.name, name: k.name,

@ -32,7 +32,6 @@ module.exports = {
// }), ['title', 'key']) // }), ['title', 'key'])
return _.sortBy(WIKI.storage.defs.map(md => { return _.sortBy(WIKI.storage.defs.map(md => {
const dbTarget = dbTargets.find(tg => tg.module === md.key) const dbTarget = dbTargets.find(tg => tg.module === md.key)
console.info(md.actions)
return { return {
id: dbTarget?.id ?? uuid(), id: dbTarget?.id ?? uuid(),
isEnabled: dbTarget?.isEnabled ?? false, isEnabled: dbTarget?.isEnabled ?? false,
@ -93,7 +92,8 @@ module.exports = {
} }
} }
}, {}), }, {}),
actions: md.actions actions: {}
// actions: md.actions
} }
}), ['title']) }), ['title'])
} }

@ -79,6 +79,7 @@ props:
sensitive: true sensitive: true
order: 13 order: 13
if: if:
- { key: 'authType', eq: 'ssh' }
- { key: 'sshPrivateKeyMode', eq: 'inline' } - { key: 'sshPrivateKeyMode', eq: 'inline' }
verifySSL: verifySSL:
type: Boolean type: Boolean

@ -1,7 +1,9 @@
import { boot } from 'quasar/wrappers' import { boot } from 'quasar/wrappers'
import BlueprintIcon from '../components/BlueprintIcon.vue' import BlueprintIcon from '../components/BlueprintIcon.vue'
import VNetworkGraph from 'v-network-graph'
export default boot(({ app }) => { export default boot(({ app }) => {
app.component('BlueprintIcon', BlueprintIcon) app.component('BlueprintIcon', BlueprintIcon)
app.use(VNetworkGraph)
}) })

@ -214,6 +214,8 @@ body::-webkit-scrollbar-thumb {
@import './animation.scss'; @import './animation.scss';
@import 'v-network-graph/lib/style.css'
// @import '~codemirror/lib/codemirror.css'; // @import '~codemirror/lib/codemirror.css';
// @import '~codemirror/theme/elegant.css'; // @import '~codemirror/theme/elegant.css';
// @import '~codemirror/theme/material-ocean.css'; // @import '~codemirror/theme/material-ocean.css';

@ -417,7 +417,7 @@ q-page.admin-storage
q-card-section q-card-section
.text-subtitle1 {{state.target.title}} .text-subtitle1 {{state.target.title}}
q-img.q-mt-sm.rounded-borders( q-img.q-mt-sm.rounded-borders(
:src='target.banner' :src='state.target.banner'
fit='cover' fit='cover'
no-spinner no-spinner
) )
@ -585,7 +585,7 @@ q-page.admin-storage
<script setup> <script setup>
import { cloneDeep, find, transform } from 'lodash-es' import { cloneDeep, find, transform } from 'lodash-es'
import gql from 'graphql-tag' import gql from 'graphql-tag'
import * as VNetworkGraph from 'v-network-graph' import * as VNG from 'v-network-graph'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { useMeta, useQuasar } from 'quasar' import { useMeta, useQuasar } from 'quasar'
@ -645,9 +645,9 @@ const state = reactive({
nodes: {} nodes: {}
}, },
deliveryPaths: [], deliveryPaths: [],
deliveryConfig: VNetworkGraph.defineConfigs({ deliveryConfig: VNG.defineConfigs({
view: { view: {
layoutHandler: new VNetworkGraph.GridLayout({ grid: 15 }), layoutHandler: new VNG.GridLayout({ grid: 15 }),
fit: true, fit: true,
mouseWheelZoomEnabled: false, mouseWheelZoomEnabled: false,
grid: { grid: {
@ -736,13 +736,13 @@ watch(() => state.targets, (newValue) => {
} }
}) })
watch(() => route.params.id, (to, from) => { watch(() => route.params.id, (to, from) => {
if (!to.params.id) { if (!to) {
return return
} }
if (state.targets.length < 1) { if (state.targets.length < 1) {
state.desiredTarget = to.params.id state.desiredTarget = to
} else { } else {
state.selectedTarget = to.params.id state.selectedTarget = to
} }
}) })
@ -1165,7 +1165,7 @@ function generateGraph () {
for (const [i, tp] of types.entries()) { for (const [i, tp] of types.entries()) {
state.deliveryNodes[tp.key] = { name: tp.label, color: '#3f51b5', icon: tp.icon, iconText: tp.iconText } state.deliveryNodes[tp.key] = { name: tp.label, color: '#3f51b5', icon: tp.icon, iconText: tp.iconText }
state.deliveryEdges[`user_${tp.key}`] = { source: 'user', target: t.key } state.deliveryEdges[`user_${tp.key}`] = { source: 'user', target: tp.key }
state.deliveryLayouts.nodes[tp.key] = { x: 0, y: (i + 1) * 15 } state.deliveryLayouts.nodes[tp.key] = { x: 0, y: (i + 1) * 15 }
// -> Find target with direct access // -> Find target with direct access
@ -1218,6 +1218,8 @@ function generateGraph () {
state.deliveryPaths.push({ edges: [`${tp.key}_db_in`], color: '#f03a4755' }) state.deliveryPaths.push({ edges: [`${tp.key}_db_in`], color: '#f03a4755' })
} }
} }
console.info(state.deliveryEdges)
} }
// MOUNTED // MOUNTED

Loading…
Cancel
Save