Skip to content

Commit

Permalink
feat: add alert & report shortcuts (#4467)
Browse files Browse the repository at this point in the history
  • Loading branch information
mindspank authored Mar 29, 2024
1 parent 7070abc commit 3ccf87a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions web-admin/src/features/authentication/AvatarButton.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { page } from "$app/stores";
import { goto } from "$app/navigation";
import * as DropdownMenu from "@rilldata/web-common/components/dropdown-menu";
import { createAdminServiceGetCurrentUser } from "../../client";
import { ADMIN_URL } from "../../client/http-client";
Expand Down Expand Up @@ -27,6 +28,14 @@
window.location.href = `${ADMIN_URL}/auth/logout?redirect=${loginWithRedirect}`;
}
function handleAlerts() {
goto(`/${$page.params.organization}/${$page.params.project}/-/alerts`);
}
function handleReports() {
goto(`/${$page.params.organization}/${$page.params.project}/-/reports`);
}
const isDev = process.env.NODE_ENV === "development";
let subMenuOpen = false;
Expand Down Expand Up @@ -66,6 +75,8 @@
</DropdownMenu.Sub>
</svelte:fragment>
</ProjectAccessControls>
<DropdownMenu.Item on:click={handleAlerts}>Alerts</DropdownMenu.Item>
<DropdownMenu.Item on:click={handleReports}>Reports</DropdownMenu.Item>
{/if}
<DropdownMenu.Item on:click={handleDocumentation}>
Documentation
Expand Down

1 comment on commit 3ccf87a

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.