Skip to content

Commit f9aafd8

Browse files
Add ColumnHelp component
1 parent 465c65c commit f9aafd8

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<template>
2+
<tippy max-width="400px">
3+
<i class="fa fa-sm fa-info-circle text-primary ps-1" />
4+
<template #content>
5+
<slot />
6+
</template>
7+
</tippy>
8+
</template>

src/Frontend/src/components/heartbeats/EndpointInstances.vue

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import OnOffSwitch from "../OnOffSwitch.vue";
1010
import routeLinks from "@/router/routeLinks";
1111
import { useShowToast } from "@/composables/toast";
1212
import { TYPE } from "vue-toastification";
13-
import { Tippy } from "vue-tippy";
1413
import { useHeartbeatInstancesStore, ColumnNames } from "@/stores/HeartbeatInstancesStore";
1514
import { EndpointsView } from "@/resources/EndpointView";
1615
import endpointSettingsClient from "@/components/heartbeats/endpointSettingsClient";
@@ -19,6 +18,7 @@ import ConfirmDialog from "@/components/ConfirmDialog.vue";
1918
import LastHeartbeat from "@/components/heartbeats/LastHeartbeat.vue";
2019
import FilterInput from "../FilterInput.vue";
2120
import ResultsCount from "../ResultsCount.vue";
21+
import ColumnHelp from "./ColumnHelp.vue";
2222
2323
enum Operation {
2424
Mute = "mute",
@@ -167,25 +167,19 @@ async function toggleAlerts(instance: EndpointsView) {
167167
</div>
168168
<div role="columnheader" :aria-label="ColumnNames.MuteToggle" class="col-2 centre">
169169
<SortableColumn :sort-by="ColumnNames.MuteToggle" v-model="sortByInstances">Mute Alerts</SortableColumn>
170-
<tippy max-width="400px">
171-
<i :style="{ fontSize: '1.1em', marginLeft: '0.25em' }" class="fa fa-info-circle text-primary" />
172-
<template #content>
173-
<span>Mute an instance when you are planning to take the instance offline to do maintenance or some other reason. This will prevent alerts on the dashboard.</span>
174-
</template>
175-
</tippy>
170+
<ColumnHelp>
171+
<span>Mute an instance when you are planning to take the instance offline to do maintenance or some other reason. This will prevent alerts on the dashboard.</span>
172+
</ColumnHelp>
176173
</div>
177174
<div role="columnheader" aria-label="actions" class="col-1">
178175
<div>
179-
Actions
180-
<tippy max-width="400px">
181-
<i :style="{ fontSize: '1.1em', marginLeft: '0.25em' }" class="fa fa-info-circle text-primary" />
182-
<template #content>
183-
<div class="d-flex align-items-center p-1">
184-
<button type="button" class="btn btn-danger btn-ms text-nowrap me-3" @click="deleteAllInstances()"><i class="fa fa-trash text-white" /> Delete</button>
185-
<span>Delete an instance when that instance has been decommissioned.</span>
186-
</div>
187-
</template>
188-
</tippy>
176+
<span>Actions</span>
177+
<ColumnHelp>
178+
<div class="d-flex align-items-center p-1">
179+
<button type="button" class="btn btn-danger btn-ms text-nowrap me-3" @click="deleteAllInstances()"><i class="fa fa-trash text-white" /> Delete</button>
180+
<span>Delete an instance when that instance has been decommissioned.</span>
181+
</div>
182+
</ColumnHelp>
189183
</div>
190184
</div>
191185
</div>

0 commit comments

Comments
 (0)