mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
* Scenes: Progress on demo app * Argh * Fixing breadcrumbs * Added spacer * Conditional scene objects * Quick and dirty test for drilldown link via panel title * Changed the toggle * Add url state syncing for most links * Add url state syncing for most links * Fix instance in url params * Quick and dirty tabs on the handler page * fixing breadcrumbs * Hide footer * Updates * new table styles * Update table cell link styles * Added search box * Scene app demo: dynamic data link (#60398) * Dynamically build data links * Add field override tests * Updates * Updated * Updates * before nesting routing * Something is working * Caching and nested routes working * Simplify model * Use app components from grafana/scenes * Make the monitoring app work with section nav * Fixing * Update scenes * Remove unused route * Updates * remove file * Update scenes version and use new features * Remove semicolon * removed unused thing * Add refresh pickers --------- Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
// Libraries
|
|
import React from 'react';
|
|
import { useAsync } from 'react-use';
|
|
|
|
import { Stack } from '@grafana/experimental';
|
|
import { Card } from '@grafana/ui';
|
|
import { Page } from 'app/core/components/Page/Page';
|
|
|
|
// Types
|
|
import { getGrafanaSearcher } from '../search/service';
|
|
|
|
import { getScenes } from './scenes';
|
|
|
|
export interface Props {}
|
|
|
|
export const SceneListPage = ({}: Props) => {
|
|
const scenes = getScenes();
|
|
const results = useAsync(() => {
|
|
return getGrafanaSearcher().starred({ starred: true });
|
|
}, []);
|
|
|
|
return (
|
|
<Page navId="scenes" subTitle="Experimental new runtime and state model for dashboards">
|
|
<Page.Contents>
|
|
<Stack direction="column" gap={1}>
|
|
<h5>Apps</h5>
|
|
<Stack direction="column" gap={0}>
|
|
<Card href={`/scenes/grafana-monitoring`}>
|
|
<Card.Heading>Grafana monitoring</Card.Heading>
|
|
</Card>
|
|
</Stack>
|
|
<h5>Test scenes</h5>
|
|
<Stack direction="column" gap={0}>
|
|
{scenes.map((scene) => (
|
|
<Card key={scene.title} href={`/scenes/${scene.title}`}>
|
|
<Card.Heading>{scene.title}</Card.Heading>
|
|
</Card>
|
|
))}
|
|
</Stack>
|
|
{results.value && (
|
|
<>
|
|
<h5>Starred dashboards</h5>
|
|
<Stack direction="column" gap={0}>
|
|
{results.value!.view.map((dash) => (
|
|
<Card href={`/scenes/dashboard/${dash.uid}`} key={dash.uid}>
|
|
<Card.Heading>{dash.name}</Card.Heading>
|
|
</Card>
|
|
))}
|
|
</Stack>
|
|
</>
|
|
)}
|
|
</Stack>
|
|
</Page.Contents>
|
|
</Page>
|
|
);
|
|
};
|
|
|
|
export default SceneListPage;
|