/
report_dashboard_template.html
114 lines (94 loc) · 4.63 KB
/
report_dashboard_template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{% macro navlink(display, tab_id, style='') %}
<a href="#"
class="tablink {{ style }}"
onclick="openTab('{{ tab_id }}')"
>{{ display }}</a>
{% endmacro %}
{% macro cdn_jslib(local_filename, cdn_url, libobj, integrity=None) %}
<script src="{{ cdn_url }}" crossorigin="anonymous"
{% if integrity is not none %}
integrity="{{ integrity }}"
{% endif %}
></script>
<script>jsFallbackFromCDN('{{ libobj }}', '{{ local_filename }}');</script>
{% endmacro %}
{% macro embed_jslib(local_filename) %}
<!-- INSERTED {{ local_filename }} -->
<script type="text/javascript">{{ offline_file(local_filename) }}</script>
{% endmacro %}
{% macro cdn_stylesheet(local_filename, cdn_url) %}
<link rel="stylesheet" href="{{ cdn_url }}">
<link rel="stylesheet" href="{{ static_ref(local_filename) }}">
{% endmacro %}
{% macro embed_stylesheet(local_filename) %}
<!-- INSERTED {{ local_filename }} -->
<style>{{ offline_file(local_filename) }}</style>
{% endmacro %}
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
<meta charset="utf-8">
<link rel="icon" type="image/png" sizes="16x16" href="{{ static_ref('images/favicon-16x16.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ static_ref('images/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ static_ref('images/favicon-96x96.png') }}">
<script>
function jsFallbackFromCDN(libname_to_check, localFilename) {
var parts = libname_to_check.split('.')
if (((parts.length == 1) && (typeof window[parts[0]] == "undefined")) ||
((parts.length == 2) && (typeof window[parts[0]][parts[1]] == "undefined"))) {
console.log(`***Failed to load ${localFilename} from CDN. Falling back to local offline version.***`);
document.write(unescape(`%3Cscript src="./offline/${localFilename}" type="text/javascript"%3E%3C/script%3E`));
}
}
</script>
{{ cdn_jslib("jquery-3.6.4.min.js", "https://code.jquery.com/jquery-3.6.4.min.js", "jQuery",
integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=") }}
{{ cdn_jslib("jquery-ui.min.js", "https://code.jquery.com/ui/1.12.1/jquery-ui.min.js", "jQuery.ui",
integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=") }}
{{ cdn_jslib("plotly-latest.min.js", "https://cdn.plot.ly/plotly-latest.min.js", "Plotly") }}
{{ cdn_jslib("katex.min.js", "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js", "katex") }}
{{ cdn_jslib("auto-render.min.js", "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/contrib/auto-render.min.js", "renderMathInElement") }}
{{ embed_jslib("pygsti_plotly_ex.js") }}
{{ embed_jslib("pygsti_dashboard.js") }}
{{ cdn_stylesheet("smoothness-jquery-ui.css", "https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css") }}
{{ cdn_stylesheet("katex.css", "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css") }}
{{ embed_stylesheet("pygsti_dataviz.css") }}
{{ embed_stylesheet("pygsti_dashboard.css") }}
{{ embed_stylesheet("pygsti_fonts.css") }}
</head>
<body>
<div id="content-wrapper">
<div id="theSidenav" class="sidenav loadable notloaded">
<a href="javascript:void(0)" id="tackbtn" title="Toggle navigation bar auto-hide" onclick="tackNav()">⊛</a>
<div class="linkgroup">
{{ navlink('Custom', 'Custom', style='linkgroupheading active') }}
</div>
</div>
<div id="main-wrapper">
<header class="header" role="banner">
<H1 class="title">{{ title }}</h1>
<h2 class="author">generated by pyGSTi on {{ date }}</h2>
</header>
<div id="main">
<div id="Custom" class="tabcontent">
<h1>Custom Report</h1>
<figure id="targetGatesBoxTable" class='tbl'>
<figcaption><span class="captiontitle">Test figure.</span> <span class="captiondetail">This is how you could put a figure in a custom report.</span></figcaption>
{{ targetGatesBoxTable|render }}
</figure>
</div> <!-- end tab content -->
<div id="status">
No message
</div>
</div>
</div>
</body>
<script>
$(document).ready(function() {
initNav(); // so sidebar is loaded and can hide/show
initBanner(); // so banner can hide/show
openTab('Custom'); // the active tab (see 'active' class above)
});
</script>
</html>