ClusterCockpit / cc-backend

Web frontend and API backend server for ClusterCockpit Monitoring Framework
https://www.clustercockpit.org
MIT License
16 stars 14 forks source link

The Reload functionality of job list does not work anymore #221

Closed moebiusband73 closed 1 year ago

moebiusband73 commented 1 year ago

To set a reload frequency has no effect. Tested in Chromium and firefox

spacehamster87 commented 1 year ago

This seems to be an issue related to updates in the @urql/svelte package, namely, the documented way of manually refreshing the queryStore does not work anymore, see: their example and our function

The code in the example is identical with exception of the variables we add as an argument.

The on:click button trigger and reload event work as intended, as do the timed reloads when choosing an interval.

The data is refreshed only when the reactivity is triggered, e.g. paging, sorting or filter are changed. Tested via adding page += 1 to the refresh() function.

Workarounds trying to trigger reactivity (while maintaning all variables) as well as changing the exchanges in the client-setup in utils.js do not change this behavior.

spacehamster87 commented 1 year ago

Fix: queryStore() required variable set on call to retrigger api query. Mismatched to official docs, but works as intended: Sorting, Paging and Filter are maintained, Job Metadata gets refreshed, nested metric data refreshed on load via cache-first policy.