-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
682a933
commit 433141c
Showing
9 changed files
with
130 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
web-admin/src/features/dashboards/listing/NoDashboardsCTA.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
web-admin/src/routes/[organization]/[project]/-/dashboards/+page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { redirect } from "@sveltejs/kit"; | ||
import type { PageLoad } from "./$types"; | ||
|
||
export const load: PageLoad = ({ params }) => { | ||
throw redirect(307, `/${params.organization}/${params.project}`); | ||
}; |
23 changes: 23 additions & 0 deletions
23
web-admin/src/routes/[organization]/[project]/-/dashboards/[dashboard]/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import { page } from "$app/stores"; | ||
import CustomDashboard from "@rilldata/web-common/features/custom-dashboards/CustomDashboard.svelte"; | ||
import { useCustomDashboard } from "@rilldata/web-common/features/custom-dashboards/selectors"; | ||
import type { V1DashboardComponent } from "@rilldata/web-common/runtime-client"; | ||
import { runtime } from "@rilldata/web-common/runtime-client/runtime-store"; | ||
$: customDashboardName = $page.params.dashboard; | ||
$: query = useCustomDashboard($runtime.instanceId, customDashboardName); | ||
$: dashboard = $query.data?.dashboard?.spec; | ||
$: columns = dashboard?.grid?.columns ?? 10; | ||
$: gap = dashboard?.grid?.gap ?? 1; | ||
$: charts = dashboard?.components ?? ([] as V1DashboardComponent[]); | ||
</script> | ||
|
||
<CustomDashboard | ||
snap={false} | ||
{gap} | ||
{charts} | ||
{columns} | ||
showGrid={false} | ||
selectedChartName="" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
web-common/src/components/icons/CustomDashboardIcon.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<script lang="ts"> | ||
export let size = "1em"; | ||
export let color = "currentColor"; | ||
export let className = ""; | ||
</script> | ||
|
||
<svg | ||
height={size} | ||
viewBox="0 0 16 16" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
class={className} | ||
> | ||
<g clip-path="url(#clip0_10949_303000)"> | ||
<rect | ||
width="16" | ||
height="16" | ||
transform="translate(0 0.000976562)" | ||
fill={"white"} | ||
fill-opacity="0.01" | ||
/> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M2.00016 1.33398C1.63197 1.33398 1.3335 1.63246 1.3335 2.00065V8.00065C1.3335 8.36884 1.63197 8.66732 2.00016 8.66732H6.66683C7.03502 8.66732 7.3335 8.36884 7.3335 8.00065V2.00065C7.3335 1.63246 7.03502 1.33398 6.66683 1.33398H2.00016ZM2.66683 7.33398V2.66732H6.00016V7.33398H2.66683Z" | ||
fill={color} | ||
/> | ||
<path | ||
d="M9.3335 1.33398C8.96531 1.33398 8.66683 1.63246 8.66683 2.00065V5.33398C8.66683 5.70217 8.96531 6.00065 9.3335 6.00065H14.0002C14.3684 6.00065 14.6668 5.70217 14.6668 5.33398V2.00065C14.6668 1.63246 14.3684 1.33398 14.0002 1.33398H9.3335Z" | ||
fill={color} | ||
/> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M8.66683 8.00065C8.66683 7.63246 8.96531 7.33398 9.3335 7.33398H14.0002C14.3684 7.33398 14.6668 7.63246 14.6668 8.00065V14.0007C14.6668 14.3688 14.3684 14.6673 14.0002 14.6673H9.3335C8.96531 14.6673 8.66683 14.3688 8.66683 14.0007V8.00065ZM10.0002 8.66732V13.334H13.3335V8.66732H10.0002Z" | ||
fill={color} | ||
/> | ||
<path | ||
d="M2.00016 10.0007C1.63197 10.0007 1.3335 10.2991 1.3335 10.6673V14.0007C1.3335 14.3688 1.63197 14.6673 2.00016 14.6673H6.66683C7.03502 14.6673 7.3335 14.3688 7.3335 14.0007V10.6673C7.3335 10.2991 7.03502 10.0007 6.66683 10.0007H2.00016Z" | ||
fill={color} | ||
/> | ||
</g> | ||
<defs> | ||
<clipPath id="clip0_10949_303000"> | ||
<rect | ||
width="16" | ||
height="16" | ||
fill="white" | ||
transform="translate(0 0.000976562)" | ||
/> | ||
</clipPath> | ||
</defs> | ||
</svg> |
File renamed without changes.