Skip to content

Commit

Permalink
feat: subscriptions & nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
kunish committed Mar 24, 2024
1 parent 7474610 commit de4b54a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
16 changes: 15 additions & 1 deletion components/ResourceNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as queries from '~/queries'
const apiStore = useAPIStore()
const isNodeModalOpen = ref(false)
const { data: nodes } = useAsyncData(async () =>
(await apiStore.apiClient?.query(queries.nodes, {}))?.data?.nodes.edges.map(
(node) => ({
Expand All @@ -14,5 +16,17 @@ const { data: nodes } = useAsyncData(async () =>
</script>

<template>
<UTable :rows="nodes" />
<div class="flex flex-col gap-4">
<div class="flex justify-end">
<UButton icon="i-heroicons-plus" @click="isNodeModalOpen = true" />
</div>

<UTable :rows="nodes" />

<UModal v-model="isNodeModalOpen">
<UCard>
<template #header>Import Nodes</template>
</UCard>
</UModal>
</div>
</template>
19 changes: 18 additions & 1 deletion components/ResourceSubscription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as queries from '~/queries'
const apiStore = useAPIStore()
const isSubscriptionModalOpen = ref(false)
const { data: subscriptions } = useAsyncData(async () =>
(
await apiStore.apiClient?.query(queries.subscriptions, {})
Expand All @@ -14,5 +16,20 @@ const { data: subscriptions } = useAsyncData(async () =>
</script>

<template>
<UTable :rows="subscriptions" />
<div class="flex flex-col gap-4">
<div class="flex justify-end">
<UButton
icon="i-heroicons-link"
@click="isSubscriptionModalOpen = true"
/>
</div>

<UTable :rows="subscriptions" />

<UModal v-model="isSubscriptionModalOpen">
<UCard>
<template #header>Import Subscriptions</template>
</UCard>
</UModal>
</div>
</template>

0 comments on commit de4b54a

Please sign in to comment.