Skip to content

Commit

Permalink
feat: Load only visible timeseries (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
flxdot authored May 8, 2024
1 parent 7046d85 commit 7aa2899
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions services/frontend/src/pages/devices/devices-detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,19 @@
:duration="timeRange"
/>
</div>
<prm-accordion>
<prm-accordion
:multiple="true"
:active-index="activeHiddenDrivers"
>
<prm-accordion-tab
v-for="driver in deviceDriver?.filter((d) => !d.isVisibleOnDashboard) || []"
v-for="(driver, index) in deviceDriver?.filter((d) => !d.isVisibleOnDashboard) || []"
:key="driver.driverIdentifier"
:header="driver.displayName"
>
<driver-timeseries
v-if="deviceSignals !== undefined && deviceSignals.get(driver.driverIdentifier) !== undefined"
v-if="deviceSignals !== undefined
&& deviceSignals.get(driver.driverIdentifier) !== undefined
&& activeHiddenDrivers.includes(index)"
:driver="driver"
:signal-list="deviceSignals.get(driver.driverIdentifier) || []"
:duration="timeRange"
Expand Down Expand Up @@ -130,6 +135,7 @@ const deviceDriver = ref<TGetDeviceDriversResponse | undefined>();
const deviceSignals = reactive<Map<string, TGetDeviceDriversSignalsResponse | undefined>>(new Map());
const timeRange = ref<Duration>(dayjs.duration(7, 'days'));
const activeHiddenDrivers = ref<number[]>([]);
function updateDevice() {
getDeviceDetail(
Expand Down

0 comments on commit 7aa2899

Please sign in to comment.