Skip to content
Merged
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
53 changes: 48 additions & 5 deletions src/pages/MetricDetail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
let selectedPingVariant;
let pingData = {};

function lookerNormalizePlatformName(appName) {
console.log(appName);
switch (appName) {
case "fenix":
return "Fenix";
case "firefox_desktop":
return "Firefox";
default:
return null;
}
}

function getSQLResource(
metricType,
table,
Expand Down Expand Up @@ -451,11 +463,18 @@
<col />
<tr>
<td>
GLAM
<HelpHoverable
content={"View this metric in the Glean Aggregated Metrics (GLAM) dashboard"}
link={"https://docs.telemetry.mozilla.org/cookbooks/glam.html"}
/>
{#if (pingData.glam_unsupported_reason || "").includes("use-counters")}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Svelte doesn't support the ? operator, apparently

Dashboards
<HelpHoverable
content={"View this metric in the Mozilla Use Counter dashboards"}
/>
{:else}
GLAM
<HelpHoverable
content={"View this metric in the Glean Aggregated Metrics (GLAM) dashboard"}
link={"https://docs.telemetry.mozilla.org/cookbooks/glam.html"}
/>
{/if}
</td>
<td>
{#if pingData.glam_url}
Expand All @@ -466,6 +485,30 @@
>
{params.metric}
</a>
{:else if (pingData.glam_unsupported_reason || "").includes("use-counters")}
<a
href={`https://mozilla.github.io/use-counters/?counter=${metric.name}`}
>
Public Dashboard
</a>
<HelpHoverable
content={"Some Use Counter metrics are not visible in the public dashboard"}
/>
<br />
<AuthenticatedLink
href={`https://mozilla.cloud.looker.com/dashboards/1922?Platform=${lookerNormalizePlatformName(
params.app
)}&Version+Major=&Metric=%22${
metric.name
}%22&Submission+Date=30+day&Country=United+States%2CCanada%2CGermany`}
label="Internal Dashboard"
type="MetricDetail.Access.Looker.UseCounter.BaseURL"
>
Looker Dashboard
</AuthenticatedLink>
<HelpHoverable
content={"Some Use Counter metrics are not visible in the Looker dashboard"}
/>
{:else}
<Markdown text={pingData.glam_unsupported_reason} inline={true} />
{/if}
Expand Down