Skip to content

Commit

Permalink
fix: Creating variables on global scope can have side effects and odd…
Browse files Browse the repository at this point in the history
… errors
  • Loading branch information
tiithansen committed Jul 6, 2024
1 parent b6d6d64 commit 2087ef3
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/pages/Workloads/tabs/StatefulSets/StatefulSets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ import { prefixRoute } from 'utils/utils.routing';
import { TableRow } from "./types";
import { TextColor } from 'common/types';

const namespaceVariable = createNamespaceVariable();

const searchVariable = new TextBoxVariable({
name: 'search',
label: 'Search',
value: '',
});

const serieMatcherPredicate = (row: TableRow) => (value: any) => value.statefulset === row.statefulset;

function asyncDataRowMapper(row: TableRow, asyncRowData: Map<string, number[]>) {
Expand Down Expand Up @@ -144,8 +136,12 @@ export const getStatefulSetsScene = () => {

const variables = new SceneVariableSet({
variables: [
namespaceVariable,
searchVariable,
createNamespaceVariable(),
new TextBoxVariable({
name: 'search',
label: 'Search',
value: '',
}),
],
});

Expand Down

0 comments on commit 2087ef3

Please sign in to comment.