feat: persistent Zabbix-style sidebar on all pages, rename Dashboard to Обзор
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
<template>
|
||||
<div class="dashboard-layout">
|
||||
<aside class="dashboard-sidebar">
|
||||
<div class="dashboard-sidebar-title">{{ appTitle }}</div>
|
||||
<RouterLink to="/dashboard">Dashboard</RouterLink>
|
||||
<RouterLink to="/events">События</RouterLink>
|
||||
<RouterLink to="/reports">Отчёты</RouterLink>
|
||||
<RouterLink to="/problems">Проблемы</RouterLink>
|
||||
<RouterLink to="/hosts">Хосты</RouterLink>
|
||||
<button type="button" class="secondary" @click="logout">Выход</button>
|
||||
</aside>
|
||||
<section class="dashboard-content">
|
||||
<h1>Dashboard</h1>
|
||||
<div class="overview-page">
|
||||
<h1>Обзор</h1>
|
||||
|
||||
<p v-if="error" class="error">{{ error }}</p>
|
||||
|
||||
@@ -293,7 +283,6 @@
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -302,10 +291,8 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import { onMounted, onUnmounted, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
import { apiFetch, clearToken, getToken, type DashboardSummary, type EventSummary } from "../api";
|
||||
import { APP_VERSION_LABEL } from "../version";
|
||||
import { apiFetch, getToken, type DashboardSummary, type EventSummary } from "../api";
|
||||
|
||||
|
||||
|
||||
@@ -322,15 +309,6 @@ const lastKnownEventDbId = ref<number | null>(null);
|
||||
let eventSource: EventSource | null = null;
|
||||
|
||||
let refreshingRecent = false;
|
||||
const router = useRouter();
|
||||
const appTitle = APP_VERSION_LABEL;
|
||||
|
||||
function logout() {
|
||||
clearToken();
|
||||
router.push("/login");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function formatDt(iso: string) {
|
||||
|
||||
@@ -570,56 +548,6 @@ onUnmounted(() => {
|
||||
|
||||
<style scoped>
|
||||
|
||||
.dashboard-layout {
|
||||
|
||||
display: grid;
|
||||
|
||||
grid-template-columns: max-content minmax(0, 1fr);
|
||||
|
||||
gap: 1rem;
|
||||
|
||||
}
|
||||
|
||||
.dashboard-sidebar {
|
||||
|
||||
display: flex;
|
||||
|
||||
flex-direction: column;
|
||||
|
||||
gap: 0.5rem;
|
||||
|
||||
background: #1a2332;
|
||||
|
||||
border: 1px solid #2a3441;
|
||||
|
||||
border-radius: 8px;
|
||||
|
||||
padding: 0.9rem;
|
||||
|
||||
align-self: start;
|
||||
|
||||
width: max-content;
|
||||
|
||||
}
|
||||
|
||||
.dashboard-sidebar-title {
|
||||
|
||||
font-weight: 700;
|
||||
|
||||
color: #fff;
|
||||
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.dashboard-content {
|
||||
|
||||
min-width: 0;
|
||||
|
||||
}
|
||||
|
||||
.dash-table-scroll {
|
||||
|
||||
max-height: 21rem;
|
||||
|
||||
Reference in New Issue
Block a user