[perf] Fix the populating of `window.perf` on some pages.
Two problems were present:
1. Some instances had the wrong template brackets, e.g. {{ instead of {%.
2. Some script tags were missing nonce's, stopping them from executing.
Also changed `this.perf` to `window.perf` to make the intent
clearer.
Change-Id: I1f8dfd73f40d9b013160b554b56c505577d6b46a
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/744525
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/perf/pages/alerts.html b/perf/pages/alerts.html
index a428960..0d010a7 100644
--- a/perf/pages/alerts.html
+++ b/perf/pages/alerts.html
@@ -3,7 +3,7 @@
<head>
<title>Skia Performance Monitoring - Alerts</title>
<script type="text/javascript" charset="utf-8" nonce="{% .Nonce %}">
- this.perf = {%.context %};
+ window.perf = {%.context %};
</script>
<meta charset="utf-8" />
<meta name="theme-color" content="#1f78b4" />
diff --git a/perf/pages/clusters2.html b/perf/pages/clusters2.html
index a47d4b8..b3254e3 100644
--- a/perf/pages/clusters2.html
+++ b/perf/pages/clusters2.html
@@ -3,7 +3,7 @@
<head>
<title>Skia Performance Monitoring</title>
<script type="text/javascript" charset="utf-8" nonce="{% .Nonce %}">
- this.perf = {%.context %};
+ window.perf = {%.context %};
</script>
<meta charset="utf-8" />
<meta name="theme-color" content="#1f78b4" />
diff --git a/perf/pages/dryrunalert.html b/perf/pages/dryrunalert.html
index 0772d6b..5a64d23 100644
--- a/perf/pages/dryrunalert.html
+++ b/perf/pages/dryrunalert.html
@@ -3,7 +3,7 @@
<head>
<title>Skia Performance Monitoring</title>
<script type="text/javascript" charset="utf-8" nonce="{% .Nonce %}">
- this.perf = {%.context %};
+ window.perf = {%.context %};
</script>
<meta charset="utf-8" />
<meta name="theme-color" content="#1f78b4" />
diff --git a/perf/pages/newindex.html b/perf/pages/newindex.html
index 18aa7bb..754403c 100644
--- a/perf/pages/newindex.html
+++ b/perf/pages/newindex.html
@@ -3,7 +3,7 @@
<head>
<title>Skia Performance Monitoring</title>
<script type="text/javascript" charset="utf-8" nonce="{% .Nonce %}">
- this.perf = {% .context %};
+ window.perf = {% .context %};
</script>
<meta charset="utf-8" />
<meta name="theme-color" content="#1f78b4" />
diff --git a/perf/pages/triage.html b/perf/pages/triage.html
index 06a5409..afd0760 100644
--- a/perf/pages/triage.html
+++ b/perf/pages/triage.html
@@ -2,8 +2,8 @@
<html>
<head>
<title>Skia Performance Monitoring</title>
- <script type="text/javascript" charset="utf-8">
- this.perf = {{.context }};
+ <script type="text/javascript" charset="utf-8" nonce="{% .Nonce %}">
+ window.perf = {% .context %};
</script>
<meta charset="utf-8" />
<meta name="theme-color" content="#1f78b4" />
diff --git a/perf/pages/trybot.html b/perf/pages/trybot.html
index 6aa9bf7..8a988d4 100644
--- a/perf/pages/trybot.html
+++ b/perf/pages/trybot.html
@@ -2,8 +2,8 @@
<html>
<head>
<title>Skia Performance Monitoring</title>
- <script type="text/javascript" charset="utf-8">
- this.perf = {{.context }};
+ <script type="text/javascript" charset="utf-8" nonce="{% .Nonce %}">
+ window.perf = {% .context %};
</script>
<meta charset="utf-8" />
<meta name="theme-color" content="#1f78b4" />