Skip to content

Commit 39f3608

Browse files
authored
Add link to new AB testing Grafana dashboard (#15354)
1 parent 4b67790 commit 39f3608

3 files changed

Lines changed: 27 additions & 8 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script lang="ts">
2+
interface Props {
3+
testName: string;
4+
}
5+
6+
const { testName }: Props = $props();
7+
</script>
8+
9+
<a
10+
href={`https://metrics.gutools.co.uk/d/bfd4abner943ke/page-views?folderUid=efd48ip6ch3i8f&orgId=1&from=now-7d&to=now&var-test_name=${testName}`}
11+
target="_blank"
12+
>
13+
Grafana
14+
</a>

ab-testing/frontend/src/lib/components/OphanLink.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
href={`https://dashboard.ophan.co.uk/graph/breakdown?day=today&ab=${testName}`}
1111
target="_blank"
1212
>
13-
graph
13+
Ophan
1414
</a>

ab-testing/frontend/src/lib/components/TableFixed.svelte

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<script lang="ts">
2-
import type { ABTest } from '../../../../types.js';
3-
import OphanLink from '$lib/components/OphanLink.svelte';
4-
import TestVariants from '$lib/components/TestVariants.svelte';
2+
import type { ABTest } from "../../../../types.js";
3+
import OphanLink from "$lib/components/OphanLink.svelte";
4+
import TestVariants from "$lib/components/TestVariants.svelte";
5+
import GrafanaLink from "./GrafanaLink.svelte";
56
67
interface Props {
78
tests: ABTest[];
@@ -39,7 +40,7 @@
3940
<th scope="col">Test Groups</th>
4041
<th scope="col">Expires In</th>
4142
<th scope="col">Audience</th>
42-
<th scope="col">Ophan</th>
43+
<th scope="col">Page Views</th>
4344
</tr>
4445
</thead>
4546
<tbody>
@@ -49,7 +50,7 @@
4950
>
5051
<td
5152
class="status"
52-
class:off={test.status === 'OFF'}
53+
class:off={test.status === "OFF"}
5354
class:expired
5455
>
5556
{#if expired}
@@ -69,7 +70,11 @@
6970
>{daysToExpiry(test.expirationDate)} days</td
7071
>
7172
<td>{test.audienceSize * 100}%</td>
72-
<td><OphanLink testName={test.name} /></td>
73+
<td>
74+
<GrafanaLink testName={test.name} /> | <OphanLink
75+
testName={test.name}
76+
/>
77+
</td>
7378
</tr>
7479
<tr>
7580
<th scope="row">Description</th>
@@ -106,7 +111,7 @@
106111
padding: 8px;
107112
}
108113
109-
th[scope='col'] {
114+
th[scope="col"] {
110115
background-color: var(--light-grey);
111116
}
112117

0 commit comments

Comments
 (0)