Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions viewer/src/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ export function AppLayout() {
)}

<Outlet context={{ events, exclusions } satisfies LayoutContext} />

<footer style={{ marginTop: "2rem", color: "#999", fontSize: "0.75rem" }}>
rev: {__GIT_REVISION__}
</footer>
</div>
);
}
2 changes: 2 additions & 0 deletions viewer/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/// <reference types="vite/client" />

declare const __GIT_REVISION__: string;
12 changes: 12 additions & 0 deletions viewer/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import { execSync } from "node:child_process";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

const gitRevision = (() => {
try {
return execSync("git rev-parse --short HEAD").toString().trim();
} catch {
return "unknown";
}
})();

export default defineConfig({
plugins: [react()],
base: "/eventstats/",
define: {
__GIT_REVISION__: JSON.stringify(gitRevision),
},
});