-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cloud UI: Add "data [last] refreshed" timestamp to project status page (
#3687) * Increase spacing * Add "data last refreshed" copy to status page * Move the Github last synced date into the Github status block * Tweak spacing * Remove hibernation message that'll never get hit * Fix prettier
- Loading branch information
1 parent
410e83e
commit 7675a4b
Showing
4 changed files
with
64 additions
and
29 deletions.
There are no files selected for viewing
44 changes: 16 additions & 28 deletions
44
web-admin/src/features/projects/ProjectDeploymentStatus.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 |
---|---|---|
@@ -1,41 +1,29 @@ | ||
<script lang="ts"> | ||
import { useDashboardsLastUpdated } from "@rilldata/web-admin/features/dashboards/listing/selectors"; | ||
import { runtime } from "@rilldata/web-common/runtime-client/runtime-store"; | ||
import { createAdminServiceGetProject } from "../../client"; | ||
import ProjectDeploymentStatusChip from "./ProjectDeploymentStatusChip.svelte"; | ||
import { useProjectDataLastRefreshed } from "./selectors"; | ||
export let organization: string; | ||
export let project: string; | ||
$: proj = createAdminServiceGetProject(organization, project); | ||
$: isProjectDeployed = $proj?.data && $proj.data.prodDeployment; | ||
$: lastUpdated = useDashboardsLastUpdated( | ||
$runtime.instanceId, | ||
organization, | ||
project | ||
); | ||
$: dataLastRefreshed = useProjectDataLastRefreshed($runtime?.instanceId); | ||
</script> | ||
|
||
<div class="flex flex-col gap-y-2"> | ||
<div class="flex flex-col gap-y-1"> | ||
<span class="uppercase text-gray-500 font-semibold text-[10px] leading-none" | ||
>Project status</span | ||
> | ||
<div> | ||
<span class="uppercase text-gray-500 font-semibold text-[10px] leading-none" | ||
>Project status</span | ||
> | ||
<div> | ||
<ProjectDeploymentStatusChip {organization} {project} /> | ||
</div> | ||
{#if $lastUpdated} | ||
<span class="text-gray-500 text-[11px] leading-4"> | ||
Synced {$lastUpdated.toLocaleString(undefined, { | ||
month: "short", | ||
day: "numeric", | ||
hour: "numeric", | ||
minute: "numeric", | ||
})} | ||
</span> | ||
{/if} | ||
<ProjectDeploymentStatusChip {organization} {project} /> | ||
</div> | ||
{#if !isProjectDeployed} | ||
<div>This project is not deployed.</div> | ||
{#if $dataLastRefreshed?.data} | ||
<span class="text-gray-500 text-[11px] leading-4"> | ||
Data refreshed {$dataLastRefreshed.data.toLocaleString(undefined, { | ||
month: "short", | ||
day: "numeric", | ||
hour: "numeric", | ||
minute: "numeric", | ||
})} | ||
</span> | ||
{/if} | ||
</div> |
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
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
7675a4b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://ui.rilldata.io as production
🚀 Deployed on https://657954ae7b0f22632cb33702--rill-ui-stage.netlify.app