Files
thetool/public/js/pages/DeviceMonitoringCongestion/DeviceMonitoringCongestion.js
2024-11-05 19:12:19 +01:00

41 lines
2.0 KiB
JavaScript

Vue.component('device-monitoring-congestion', {
//language=Vue
template: `
<tt-card>
<!--@formatter:off-->
<div>Letzte Abfragezeit: {{ window.moment.utc(window['TT_CONFIG']['CONGESTION_DATA']['fileCreateTime']).add(1, 'hours').format('DD.MM.YYYY HH:mm:ss') }}</div>
<!--@formatter:on-->
<tt-table :data="window['TT_CONFIG']['CONGESTION_DATA']['interfacesWithCongestion']" :config="DeviceTableConfig" excel-export>
<template v-slot:actions="{ row }">
<a :href="row.zabbixUrl" target="_blank"><i class="fas fa-chart-line" title="Zabbix"></i></a>
<a :href="row.grafanaUrl" target="_blank"><i class="fas fa-chart-bar" title="Grafana"></i></a>
</template>
<template v-slot:highestvaluetime="{ row }">
{{ window.moment.unix(row.highestValueTime).format('DD.MM.YYYY HH:mm:ss') }}
</template>
</tt-table>
</tt-card>
`,
data() {
return {
window: window,
DeviceTableConfig: {
key: 'DeviceMonitoringCongestion',
tableHeader: 'Device Monitoring - Congestion',
defaultPageSize: 25,
headers: [
{text: 'Hostname', key: 'hostname', sortable: true, class: 'text-nowrap'},
{text: 'IP-Adresse', key: 'ip', filter: 'search', class: 'text-center'},
{text: 'Name', key: 'name', filter: 'search', class: 'text-center'},
{text: 'Höchster Wert', key: 'highestValue', filter: 'search', class: 'text-center'},
{text: 'Zeit', key: 'highestValueTime', filter: 'search', class: 'text-center'},
{text: 'Aktionen', key: 'actions', class: 'text-center', sortable: false, filter: false, priority: 9},
],
},
}
}
})