mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-11-03 00:55:06 +01:00
adapt frontend for new uiConfig keys, add nodeOverview mutation
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
/* Const Init */
|
||||
const client = getContextClient();
|
||||
const usePaging = ccconfig?.node_list_usePaging || false;
|
||||
const usePaging = ccconfig?.nodeList_usePaging || false;
|
||||
const nodeListQuery = gql`
|
||||
query ($cluster: String!, $subCluster: String!, $nodeFilter: String!, $metrics: [String!], $scopes: [MetricScope!]!, $from: Time!, $to: Time!, $paging: PageRequest!, $selectedResolution: Int) {
|
||||
nodeMetricsList(
|
||||
@@ -88,7 +88,7 @@
|
||||
/* State Init */
|
||||
let nodes = $state([]);
|
||||
let page = $state(1);
|
||||
let itemsPerPage = $state(usePaging ? (ccconfig?.plot_list_nodesPerPage || 10) : 10);
|
||||
let itemsPerPage = $state(usePaging ? (ccconfig?.nodeList_nodesPerPage || 10) : 10);
|
||||
let headerPaddingTop = $state(0);
|
||||
let matchedNodes = $state(0);
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
// Decouple from Job List Paging Params?
|
||||
function updateConfiguration(newItems, newPage) {
|
||||
updateConfigurationMutation({
|
||||
name: "plot_list_nodesPerPage",
|
||||
name: "nodeList_nodesPerPage",
|
||||
value: newItems.toString(),
|
||||
}).subscribe((res) => {
|
||||
if (res.fetching === false && !res.error) {
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
</Row>
|
||||
{:else if filteredData?.length > 0}
|
||||
<!-- PlotGrid flattened into this component -->
|
||||
<Row cols={{ xs: 1, sm: 2, md: 3, lg: ccconfig.plot_view_plotsPerRow}}>
|
||||
<Row cols={{ xs: 1, sm: 2, md: 3, lg: ccconfig.plotConfiguration_plotsPerRow}}>
|
||||
{#key selectedMetric}
|
||||
{#each filteredData as item (item.host)}
|
||||
<Col class="px-1">
|
||||
|
||||
Reference in New Issue
Block a user