mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-12-19 05:36:17 +01:00
link to public dashboard in admin options, add return button do public dashboard
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
Properties:
|
||||
- `ncontent String`: The homepage notice content
|
||||
- `clusters [String]`: The available clusternames
|
||||
-->
|
||||
|
||||
<script>
|
||||
@@ -17,7 +18,8 @@
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
ncontent
|
||||
ncontent,
|
||||
clusters
|
||||
} = $props();
|
||||
|
||||
/* Const Init*/
|
||||
@@ -66,6 +68,6 @@
|
||||
<Col>
|
||||
<EditProject reloadUser={() => getUserList()} />
|
||||
</Col>
|
||||
<Options config={ccconfig}/>
|
||||
<Options config={ccconfig} {clusters}/>
|
||||
<NoticeEdit {ncontent}/>
|
||||
</Row>
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
<!--
|
||||
@component Admin option select card
|
||||
|
||||
Properties:
|
||||
- `clusters [String]`: The available clusternames
|
||||
-->
|
||||
|
||||
<script>
|
||||
import { getContext, onMount } from "svelte";
|
||||
import { Col, Card, CardBody, CardTitle } from "@sveltestrap/sveltestrap";
|
||||
import { Row, Col, Card, CardBody, CardTitle, Button, Icon } from "@sveltestrap/sveltestrap";
|
||||
|
||||
/* Svelte 5 Props */
|
||||
let {
|
||||
clusters,
|
||||
} = $props();
|
||||
|
||||
/*Const Init */
|
||||
const resampleConfig = getContext("resampling");
|
||||
|
||||
|
||||
/* State Init */
|
||||
let scrambled = $state(false);
|
||||
|
||||
@@ -44,6 +52,26 @@
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
{#if clusters?.length > 0}
|
||||
<Col>
|
||||
<Card class="h-100">
|
||||
<CardBody>
|
||||
<CardTitle class="mb-3">Public Dashboard Links</CardTitle>
|
||||
<Row>
|
||||
{#each clusters as cluster}
|
||||
<Col>
|
||||
<Button color="info" class="mb-2 mb-xl-0" href={`/monitoring/dashboard/${cluster}`} target="_blank">
|
||||
<Icon name="clipboard-pulse" class="mr-2"/>
|
||||
{cluster.charAt(0).toUpperCase() + cluster.slice(1)} Public Dashboard
|
||||
</Button>
|
||||
</Col>
|
||||
{/each}
|
||||
</Row>
|
||||
</CardBody>
|
||||
</Card>
|
||||
</Col>
|
||||
{/if}
|
||||
|
||||
{#if resampleConfig}
|
||||
<Col>
|
||||
<Card class="h-100">
|
||||
|
||||
Reference in New Issue
Block a user