@@ -4,13 +4,12 @@ import { storeToRefs } from "pinia";
4
4
import { useRoute , useRouter } from " vue-router" ;
5
5
import { computed , onMounted , ref } from " vue" ;
6
6
import { EndpointStatus } from " @/resources/Heartbeat" ;
7
- import SortableColumn from " @/components/SortableColumn .vue" ;
7
+ import ColumnHeader from " @/components/ColumnHeader .vue" ;
8
8
import DataView from " @/components/DataView.vue" ;
9
9
import OnOffSwitch from " ../OnOffSwitch.vue" ;
10
10
import routeLinks from " @/router/routeLinks" ;
11
11
import { useShowToast } from " @/composables/toast" ;
12
12
import { TYPE } from " vue-toastification" ;
13
- import { Tippy } from " vue-tippy" ;
14
13
import { useHeartbeatInstancesStore , ColumnNames } from " @/stores/HeartbeatInstancesStore" ;
15
14
import { EndpointsView } from " @/resources/EndpointView" ;
16
15
import endpointSettingsClient from " @/components/heartbeats/endpointSettingsClient" ;
@@ -159,41 +158,19 @@ async function toggleAlerts(instance: EndpointsView) {
159
158
<section role =" table" aria-label =" endpoint-instances" >
160
159
<!-- Table headings-->
161
160
<div role =" row" aria-label =" column-headers" class =" row table-head-row" :style =" { borderTop: 0 }" >
162
- <div role =" columnheader" :aria-label =" ColumnNames.InstanceName" class =" col-6" >
163
- <SortableColumn :sort-by =" ColumnNames.InstanceName" v-model =" sortByInstances" :default-ascending =" true" >Host Name</SortableColumn >
164
- </div >
165
- <div role =" columnheader" :aria-label =" ColumnNames.LastHeartbeat" class =" col-2" >
166
- <SortableColumn :sort-by =" ColumnNames.LastHeartbeat" v-model =" sortByInstances" >Last Heartbeat</SortableColumn >
167
- </div >
168
- <div role =" columnheader" :aria-label =" ColumnNames.MuteToggle" class =" col-2 centre" >
169
- <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 >
176
- </div >
177
- <div role =" columnheader" aria-label =" actions" class =" col-1" >
178
- <div >
179
- Actions
180
- <tippy max-width =" 400px" >
181
- <i :style =" { fontSize: '1.1em' }" class =" fa fa-info-circle text-primary" />
182
- <template #content >
183
- <table >
184
- <tbody >
185
- <tr >
186
- <td style =" padding : 3px ; width : 6em ; text-align : end ; align-content : center " >
187
- <button type =" button" class =" btn btn-danger btn-sm" ><i class =" fa fa-trash text-white" /> Delete</button >
188
- </td >
189
- <td style =" padding : 3px " >Delete an instance when that instance has been decommissioned.</td >
190
- </tr >
191
- </tbody >
192
- </table >
193
- </template >
194
- </tippy >
195
- </div >
196
- </div >
161
+ <ColumnHeader :name =" ColumnNames.InstanceName" label =" Host Name" class =" col-6" v-model =" sortByInstances" sortable default-ascending />
162
+ <ColumnHeader :name =" ColumnNames.LastHeartbeat" label =" Last Heartbeat" class =" col-2" v-model =" sortByInstances" sortable />
163
+ <ColumnHeader :name =" ColumnNames.MuteToggle" label =" Mute Alerts" class =" col-2 centre" >
164
+ <template #help >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.</template >
165
+ </ColumnHeader >
166
+ <ColumnHeader name =" actions" label =" Actions" class =" col-1" interactive-help >
167
+ <template #help >
168
+ <div class =" d-flex align-items-center p-1" >
169
+ <button type =" button" class =" btn btn-danger btn-ms text-nowrap me-3" @click =" deleteAllInstances()" ><i class =" fa fa-trash text-white" /> Delete</button >
170
+ <span >Delete an instance when that instance has been decommissioned.</span >
171
+ </div >
172
+ </template >
173
+ </ColumnHeader >
197
174
</div >
198
175
<no-data v-if =" filteredValidInstances.length === 0" message =" No endpoint instances found. For untracked endpoints, disconnected instances are automatically pruned." >
199
176
<div v-if =" totalValidInstances.length === 0" class =" delete-all" >
0 commit comments