-
Notifications
You must be signed in to change notification settings - Fork 14
/
sidebar.html
139 lines (128 loc) · 4.74 KB
/
sidebar.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{% load static %}
<link href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp"
rel="stylesheet">
<div class="sidebar-container">
<!-- Name & Logo -->
<a class="grafana-btn" href="{% url 'mercury:index' %}">
<div><img src="{% static 'mercury/motorsports_logo.png' %}" class="team-logo"></div>
<div>NYU Motorsports</div>
</a>
<br><br><br>
<!-- Home / Index -->
{% if request.path == "/index"%}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons-outlined">house</i>
<br>Home
</div>
{% else %}
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="{% url 'mercury:index' %}">
<i class="material-icons-outlined">house</i>
<br>Home
</a>
{% endif %}
<br><br>
<!-- Pit Crew Display -->
{% if request.path == "/pitcrew/" %}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons">insert_chart_outlined</i>
<br>Pit Crew Display
</div>
{% else %}
<a class="grafana-btn grafana-btn-green sidebar-btn" href="{% url 'mercury:pitcrew' %}">
<i class="material-icons">insert_chart_outlined</i>
<br>Pit Crew Display
</a>
{% endif %}
<br><br>
<!-- Manage Events -->
{% if request.path == "/events/" %}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons">folder_open</i>
<br>Manage Events
</div>
{% else %}
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="{% url 'mercury:events' %}">
<i class="material-icons">folder_open</i>
<br> Manage Events
</a>
{% endif %}
<br><br>
<!-- View Data Tables -->
{% if request.path == "/dashboard/" %}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons-outlined">table_chart</i>
<br>View Data Tables
</div>
{% else %}
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="{% url 'mercury:dashboard' %}"> <!-- should dashboard be name of URL??? -->
<i class="material-icons-outlined">table_chart</i>
<br>View Data Tables
</a>
{% endif %}
<br><br>
<!-- Configure Sensors -->
{% if request.path == "/sensor/" %}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons">tune</i>
<br>Add or Modify Sensors
</div>
{% else %}
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="{% url 'mercury:sensor' %}">
<i class="material-icons">tune</i>
<br>Configure Sensors
</a>
{% endif %}
<br><br>
<!-- Analyze in Grafana-->
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="https://nyu-mercury-grafana.herokuapp.com/d/BjN37GJZk/nyu-motorsports-telemetry-dashboard?orgId=1&refresh=5s" target="_blank">
<i class="material-icons-outlined">open_in_new</i>
<br>Analyze in Grafana
</a>
<br><br>
<!-- Simulator -->
{% if request.path == "/simulator/" %}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons">tune</i>
<br>Simulator
</div>
{% else %}
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="{% url 'mercury:simulator' %}">
<i class="material-icons">tune</i>
<br>Simulator
</a>
{% endif %}
<br><br>
<!-- CAN Decoder -->
{% if request.path == "/can/" %}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons">lock_open</i>
<br>CAN Decoder
</div>
{% else %}
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="{% url 'mercury:can-ui' %}">
<i class="material-icons">lock_open</i>
<br>CAN Decoder
</a>
{% endif %}
<br><br>
<!-- Stopwatch -->
{% if request.path == "/stopwatch/" %}
<div class="grafana-current-tab sidebar-btn">
<i class="material-icons">bathtub</i>
<br>Stopwatch
</div>
{% else %}
<a class="grafana-btn grafana-btn-gray sidebar-btn" href="{% url 'mercury:stopwatch' %}">
<i class="material-icons">bathtub</i>
<br>Stopwatch
</a>
{% endif %}
<br><br>
<!-- Logout -->
{% if request.session.event_code_known %}
<a class="grafana-btn grafana-btn-red sidebar-btn" href="{% url 'mercury:logout' %}" onclick="return confirm('Are you sure you want to logout?')">
<i class="material-icons">power_settings_new</i>
<br>Logout
</a>
{% endif %}
</div>