cleanup routes, cleanup root components

This commit is contained in:
Christoph Kluge
2025-12-15 15:10:10 +01:00
parent c5aff1a2ca
commit d56b0e93db
6 changed files with 21 additions and 43 deletions

View File

@@ -6,9 +6,9 @@
-->
<script>
import {
getContext
} from "svelte"
// import {
// getContext
// } from "svelte"
import {
queryStore,
gql,
@@ -45,7 +45,7 @@
/*Const Init */
const { query: initq } = init();
const client = getContextClient();
const useCbColors = getContext("cc-config")?.plotConfiguration_colorblindMode || false
// const useCbColors = getContext("cc-config")?.plotConfiguration_colorblindMode || false
/* States */
let from = $state(new Date(Date.now() - (5 * 60 * 1000)));

View File

@@ -3,6 +3,7 @@
Properties:
- `presetCluster String`: The cluster to show status information for
- `displayType String`: The type of status component to render
-->
<script>
@@ -10,6 +11,7 @@
Row,
Col,
Card,
CardBody
} from "@sveltestrap/sveltestrap";
import DashDetails from "./status/DashDetails.svelte";
@@ -20,29 +22,20 @@
presetCluster,
displayType
} = $props();
/*Const Init */
const displayStatusDetail = (displayType === 'DETAILS');
</script>
<!-- <Row cols={1} class="mb-2">
<Col>
<h3 class="mb-0">Current Status of Cluster "{presetCluster.charAt(0).toUpperCase() + presetCluster.slice(1)}"</h3>
</Col>
</Row> -->
{#if displayType !== "DASHBOARD" && displayType !== "DETAILS"}
{#if displayType === 'DETAILS'}
<DashDetails {presetCluster}/>
{:else if displayType === 'DASHBOARD'}
<DashInternal {presetCluster}/>
{:else}
<Row>
<Col>
<Card body color="danger">Unknown displayList type! </Card>
<Card color="danger">
<CardBody>
Unknown DisplayType for Status View!
</CardBody>
</Card>
</Col>
</Row>
{:else}
{#if displayStatusDetail}
<!-- ROW2-1: Node Overview (Grid Included)-->
<DashDetails {presetCluster}/>
{:else}
<!-- ROW2-2: Node List (Grid Included)-->
<DashInternal {presetCluster}/>
{/if}
{/if}

View File

@@ -5,7 +5,7 @@ import DashPublic from './DashPublic.root.svelte'
mount(DashPublic, {
target: document.getElementById('svelte-app'),
props: {
presetCluster: infos.cluster,
presetCluster: presetCluster,
},
context: new Map([
['cc-config', clusterCockpitConfig]