Skip to content

Commit 8ba351a

Browse files
committed
chore(dashboard): added tooltips for different buttons in dashboard
1 parent 5b101a7 commit 8ba351a

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

nebula/frontend/templates/dashboard.html

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ <h3>Scenarios in the database</h3>
145145
class="label btn btn-dark">Monitor</a>
146146
<a href="{{ url_for('nebula_dashboard_statistics', scenario_name=name) }}"
147147
class="label btn btn-dark">Real-time metrics</a>
148-
<a id="note-btn-{{ name }}" data-scenario-name="{{ name }}" class="label btn btn-dark"><i
148+
<a id="note-btn-{{ name }}" title="Save Note" data-scenario-name="{{ name }}" class="label btn btn-dark"><i
149149
class="fa fa-sticky-note" style="color: white;"></i></a>
150-
<a id="config-btn-{{ name }}" data-scenario-name="{{ name }}" class="label btn btn-dark"><i
150+
<a id="config-btn-{{ name }}" title="Scenario Config" data-scenario-name="{{ name }}" class="label btn btn-dark"><i
151151
class="fa fa-sliders" style="color: white;"></i></a>
152152
{% if status == "running" %}
153153
<a href="{{ url_for('nebula_stop_scenario', scenario_name=name, stop_all=False) }}"
@@ -158,9 +158,9 @@ <h3>Scenarios in the database</h3>
158158
<a href="{{ url_for('nebula_stop_scenario', scenario_name='all', stop_all=True) }}"
159159
class="label btn btn-danger">Stop scenario queue</a>
160160
{% else %}
161-
<a id="relaunch-btn" data-scenario-name="{{ name }}" data-scenario-title="{{ title }}" class="label btn btn-dark"><i
161+
<a id="relaunch-btn" title="Relaunch Scenario" data-scenario-name="{{ name }}" data-scenario-title="{{ title }}" class="label btn btn-dark"><i
162162
class="fa fa-rotate-right" style="color: white;"></i></a>
163-
<a id="remove-btn" data-scenario-name="{{ name }}" class="label btn btn-danger"><i
163+
<a id="remove-btn" title="Delete Scenario" data-scenario-name="{{ name }}" class="label btn btn-danger"><i
164164
class="fa fa-trash"></i></a>
165165
{% endif %}
166166
</td>
@@ -187,6 +187,37 @@ <h3>Scenarios in the database</h3>
187187
</section>
188188
{% endif %}
189189

190+
<style>
191+
/* Tooltips */
192+
a[title] {
193+
position: relative;
194+
}
195+
196+
a[title]:hover::after {
197+
content: attr(title);
198+
position: absolute;
199+
top: -35px;
200+
left: 50%;
201+
transform: translateX(-50%);
202+
background-color: rgba(0, 0, 0, 0.8);
203+
color: white;
204+
padding: 8px 12px;
205+
border-radius: 6px;
206+
font-size: 14px;
207+
white-space: nowrap;
208+
z-index: 1000;
209+
opacity: 0;
210+
pointer-events: none;
211+
transition: opacity 0.3s ease, top 0.3s ease;
212+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
213+
}
214+
215+
a[title]:hover::after {
216+
opacity: 1;
217+
top: -50px;
218+
}
219+
</style>
220+
190221

191222
{% if not user_logged_in %}
192223
<script>

0 commit comments

Comments
 (0)