Skip to content

Commit

Permalink
Changed main navigation UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ejden committed Dec 12, 2024
1 parent 1b730c2 commit 9841050
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 29 deletions.
5 changes: 4 additions & 1 deletion hermes-console/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import AppNotificationProvider from '@/components/app-notification/AppNotificationProvider.vue';
import ConsoleFooter from '@/components/console-footer/ConsoleFooter.vue';
import ConsoleHeader from '@/components/console-header/ConsoleHeader.vue';
import NavigationDrawer from './components/navigation-drawer/NavigationDrawer.vue';
const configStore = useAppConfigStore();
configStore.loadConfig();
Expand All @@ -14,6 +15,8 @@
<div v-if="configStore.loadedConfig">
<console-header />

<navigation-drawer />

<v-main class="main">
<app-notification-provider>
<router-view />
Expand All @@ -28,7 +31,7 @@
<style scoped lang="scss">
.main {
margin: 0 auto;
max-width: 1300px;
max-width: 1800px;
width: 100%;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<v-alert
:title="props.title ?? ''"
:text="props.text"
variant="elevated"
:type="props.type"
border="start"
variant="flat"
:icon="icon ?? `\$${type}`"
>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</script>

<template>
<v-footer app absolute>
<v-footer app absolute color="background">
<v-row justify="center" no-gutters>
<v-btn
v-for="link in links"
Expand Down
16 changes: 14 additions & 2 deletions hermes-console/src/components/console-header/ConsoleHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</script>

<template>
<v-app-bar :elevation="2" density="compact">
<v-app-bar :elevation="0" density="compact" color="background">
<div class="header">
<!-- TODO: navigate to home -->
<div class="header-left">
Expand Down Expand Up @@ -58,7 +58,18 @@
"
/>
</div>
<div>
<div class="d-flex flex-grow-1 align-center justify-center">
<v-btn
variant="outlined"
rounded
prepend-icon="mdi-magnify"
color="medium-emphasis"
min-width="400px"
class="text-capitalize"
>Press / to search
</v-btn>
</div>
<div class="d-flex align-center ga-2 pr-2">
<theme-switch />
<v-btn
v-if="configStore.loadedConfig.auth.oauth.enabled && !isLoggedIn"
Expand All @@ -76,6 +87,7 @@
>
{{ t('header.logout') }}
</v-btn>
<v-avatar color="grey" size="small"><span>G</span></v-avatar>
</div>
</div>
</v-app-bar>
Expand Down
2 changes: 1 addition & 1 deletion hermes-console/src/components/costs-card/CostsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<template>
<v-card>
<v-card border flat>
<template #title>
<div class="d-flex justify-space-between">
<p class="font-weight-bold">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</script>

<template>
<v-card>
<v-card border flat>
<template #title>
<div class="d-flex justify-space-between">
<p class="font-weight-bold">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<script setup lang="ts">
const navigationGroups = [
{
group: 'Console',
items: [
{ title: 'Home', icon: 'mdi-home', to: '/ui' },
{ title: 'Groups', icon: 'mdi-file-tree', to: '/ui/groups' },
{
title: 'Favorite Topics',
icon: 'mdi-file-table-box-outline',
to: '/ui/favorite-topics',
},
{
title: 'Favorite Subscriptions',
icon: 'mdi-account-arrow-down-outline',
to: '/ui/favorite-subscriptions',
},
],
},
{
group: 'Monitoring',
items: [
{ title: 'Statistics', icon: 'mdi-chart-box-outline', to: '/ui/stats' },
{ title: 'Runtime', icon: 'mdi-chart-multiple', to: '/ui/runtime' },
{ title: 'Costs', icon: 'mdi-finance', to: '/ui/costs' },
],
},
{
group: 'Admin',
items: [
{
title: 'Consistency',
icon: 'mdi-chart-histogram',
to: '/ui/consistency',
},
{ title: 'Constraints', icon: 'mdi-cogs', to: '/ui/constraints' },
{
title: 'Readiness',
icon: 'mdi-arrow-right-drop-circle-outline',
to: '/ui/readiness',
},
],
},
];
</script>

<template>
<v-navigation-drawer floating color="background">
<v-list density="compact" nav slim active-color="accent">
<template
v-for="(navigationGroup, navigationGroupIndex) in navigationGroups"
:key="navigationGroupIndex"
>
<v-list-subheader class="text-subtitle-2 font-weight-bold">{{
navigationGroup.group
}}</v-list-subheader>

<v-list-item
v-for="(item, itemIndex) in navigationGroup.items"
:key="itemIndex"
:to="item.to"
>
<template v-slot:prepend>
<v-icon :icon="item.icon" />
</template>

<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item>
<v-divider
v-if="navigationGroupIndex + 1 < navigationGroups.length"
class="mt-3 mb-3"
/>
</template>
</v-list>
</v-navigation-drawer>
</template>

<style scoped lang="scss"></style>
3 changes: 2 additions & 1 deletion hermes-console/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const vuetify = createVuetify({
secondary: '#144c71',
accent: '#1c65a1',
error: '#ff5252',
background: '#f5f5f5',
background: '#ffffff',
},
},
dark: {
Expand All @@ -28,6 +28,7 @@ const vuetify = createVuetify({
secondary: '#144c71',
accent: '#0a3040',
error: '#ff5252',
background: '#212121',
},
},
},
Expand Down
22 changes: 15 additions & 7 deletions hermes-console/src/views/subscription/SubscriptionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
},
{
title: subscriptionId,
active: true,
},
];
Expand Down Expand Up @@ -229,13 +230,6 @@
@retransmit="onRetransmit"
@skipAllMessages="skipAllMessages"
/>
<last-undelivered-message
v-if="
subscriptionLastUndeliveredMessage &&
isSubscriptionOwnerOrAdmin(roles)
"
:last-undelivered="subscriptionLastUndeliveredMessage"
/>
</v-col>
<v-col md="6">
<properties-card v-if="subscription" :subscription="subscription" />
Expand All @@ -253,6 +247,11 @@
v-if="!!subscription && subscription.headers.length > 0"
:headers="subscription?.headers"
/>
</v-col>
</v-row>

<v-row dense>
<v-col md="7">
<undelivered-messages-card
v-if="
subscriptionUndeliveredMessages &&
Expand All @@ -262,6 +261,15 @@
:undelivered-messages="subscriptionUndeliveredMessages"
/>
</v-col>
<v-col md="5">
<last-undelivered-message
v-if="
subscriptionLastUndeliveredMessage &&
isSubscriptionOwnerOrAdmin(roles)
"
:last-undelivered="subscriptionLastUndeliveredMessage"
/>
</v-col>
</v-row>
</template>
</v-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</script>

<template>
<v-card class="mb-2">
<v-card class="mb-2" border flat>
<template #title>
<p class="font-weight-bold">
{{ $t('subscription.filtersCard.title') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</script>

<template>
<v-card class="mb-2">
<v-card class="mb-2" border flat>
<template #title>
<p class="font-weight-bold">
{{ $t('subscription.headersCard.title') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
@action="skipMessages"
@cancel="closeSkipAllMessagesDialog"
/>
<v-card>
<v-card border flat>
<template #title>
<p class="font-weight-bold">
{{ $t('subscription.manageMessagesCard.title') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</script>

<template>
<v-card density="compact">
<v-card density="compact" border flat>
<div class="d-flex justify-end mr-4 mb-1">
<v-dialog
v-model="showSubscriptionEditForm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</script>

<template>
<v-card class="mb-2">
<v-card class="mb-2" border flat>
<template #title>
<p class="font-weight-bold">
{{ $t('subscription.undeliveredMessagesCard.title') }}
Expand All @@ -32,7 +32,6 @@
<th class="text-left">
{{ $t('subscription.undeliveredMessagesCard.timestamp') }}
</th>
<th class="text-left"></th>
</tr>
</thead>
<tbody>
Expand All @@ -45,14 +44,6 @@
<td>{{ message.status }}</td>
<td>{{ message.reason }}</td>
<td>{{ formatTimestampMillis(message.timestamp) }}</td>
<td>
<v-btn
density="compact"
icon="mdi-magnify"
size="small"
variant="flat"
/>
</td>
</tr>
</tbody>
</v-table>
Expand Down

0 comments on commit 9841050

Please sign in to comment.