Skip to content

Commit

Permalink
Copy subnet ID and git revision when clicking them.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFINITYManu committed Aug 3, 2024
1 parent d1a8dd4 commit 355aeca
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
10 changes: 10 additions & 0 deletions rollout-dashboard/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rollout-dashboard/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"postcss": "^8.4.39",
"svelte": "^4.2.18",
"svelte-check": "^3.8.4",
"svelte-copy": "^1.4.2",
"svelte-time": "^0.9.0",
"tailwindcss": "^3.4.6",
"tslib": "^2.6.3",
Expand Down
8 changes: 6 additions & 2 deletions rollout-dashboard/frontend/src/lib/Batch.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import Time from "svelte-time";
import { copy } from "svelte-copy";
import { type Batch, batchStateName, batchStateIcon } from "./types";
export let batch_num: String;
export let batch: Batch;
Expand All @@ -16,9 +17,12 @@
/>{subnet.comment}{/if}</span
>
</div>
<span class="subnet_id">{subnet.subnet_id.substring(0, 5)}</span
<span class="subnet_id" use:copy={subnet.subnet_id}
>{subnet.subnet_id.substring(0, 5)}</span
>
<span class="git_revision" use:copy={subnet.git_revision}
>{subnet.git_revision}</span
>
<span class="git_revision">{subnet.git_revision}</span>
</li>
</ul>
{/each}
Expand Down
4 changes: 2 additions & 2 deletions rollout-dashboard/frontend/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export function batchStateName(state: keyof typeof subnet_rollout_states): Strin
return subnet_rollout_states[state].name;
}
export type Subnet = {
subnet_id: String;
git_revision: String;
subnet_id: string;
git_revision: string;
state: keyof typeof subnet_rollout_states;
comment: String;
};
Expand Down

0 comments on commit 355aeca

Please sign in to comment.