Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Support for Store filtering #3166

Merged
merged 37 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c435466
fetched lsit of stores in PanelList and passed into its content
aribalam Sep 14, 2020
cab4ad4
added store matches to panel options
aribalam Sep 14, 2020
4630a6f
added stores as props in panels
aribalam Sep 14, 2020
85024a6
display panel list only when stores are fetched
aribalam Sep 14, 2020
4b067f3
added UI for selecting stores
aribalam Sep 14, 2020
94d1ab2
created handler for store selection checkbozes
aribalam Sep 14, 2020
782efe8
added handlers to store checkboxes
aribalam Sep 14, 2020
dccb006
add storeMatches to URLParams for query
aribalam Sep 14, 2020
d8a4caa
fix filter bug
aribalam Sep 14, 2020
fde8af4
removed console logs
aribalam Sep 14, 2020
7b756d8
added label for store filter
aribalam Sep 14, 2020
bc9b4af
minor changes in code
aribalam Sep 16, 2020
7b7556b
added alert in case of error fetching stores list
aribalam Sep 16, 2020
0c18949
load panel list with status indicator till store list are fetched
aribalam Sep 16, 2020
d741a7d
removed lint errors
aribalam Sep 16, 2020
3658e84
added key prop for checkboxes
aribalam Sep 16, 2020
1d4c9c3
added react-select to yarn
aribalam Sep 17, 2020
8cbdd85
added react-select to package.json
aribalam Sep 17, 2020
20a4b5d
preprocess stores response data before passing as props to panels
aribalam Sep 17, 2020
08121ef
added dropdown ui for store selection
aribalam Sep 17, 2020
0d89425
removed redundant code
aribalam Sep 17, 2020
df62297
added style for label and wrapper
aribalam Sep 17, 2020
471db93
added support to encode and decode storeMatch from URI params
aribalam Sep 18, 2020
e4e9894
removed linting errors
aribalam Sep 18, 2020
063eff8
removed linting errors
aribalam Sep 18, 2020
9fa8532
select component takes initial values
aribalam Sep 18, 2020
5853968
updated bindata.go
aribalam Sep 18, 2020
62a5931
added store props and options in panels
aribalam Sep 20, 2020
126bac5
removed lint errors
aribalam Sep 20, 2020
f5125c8
added PR to changelog
aribalam Sep 21, 2020
bbf2969
handle null case for selected stores
aribalam Sep 21, 2020
1d12439
added checkbox for debug mode
aribalam Sep 23, 2020
9e92d7e
clear selected store on debug mode off
aribalam Sep 23, 2020
ba86337
changed checkbox name and corrected comment styles
aribalam Sep 24, 2020
06bfef5
removed ternary checking
aribalam Sep 24, 2020
3adef70
removed lint errors
aribalam Sep 24, 2020
02534b9
make assets
aribalam Sep 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed console logs
Signed-off-by: aribalam <[email protected]>
  • Loading branch information
aribalam committed Sep 24, 2020
commit fde8af45b963cdb86fa9b6a488b4c52a5750d22d
4 changes: 0 additions & 4 deletions pkg/ui/react-app/src/pages/graph/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ class Panel extends Component<PanelProps & PathPrefixProps, PanelState> {
}

componentDidMount() {
console.log("Panel: ");
console.log(this.props.stores);
this.executeQuery();
}

Expand Down Expand Up @@ -281,8 +279,6 @@ class Panel extends Component<PanelProps & PathPrefixProps, PanelState> {
if (event.target.checked)
storeMatchList.push(event.target.name);

console.log(storeMatchList);

this.setOptions({ storeMatches: storeMatchList });
};

Expand Down
10 changes: 0 additions & 10 deletions pkg/ui/react-app/src/pages/graph/PanelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,11 @@ export const PanelListContent: FC<PanelListProps> = ({
setPanels(panels);
}
};
// console.log("[PanelListContent]: ");
// console.log(metrics);
// console.log("[PanelListContent]: ");
// console.log(stores);
// We want useEffect to act only as componentDidMount, but react still complains about the empty dependencies list.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const handleExecuteQuery = (query: string) => {
// console.log("Handle: ");
// console.log(stores);
const isSimpleMetric = metrics.indexOf(query) !== -1;
if (isSimpleMetric || !query.length) {
return;
Expand Down Expand Up @@ -134,10 +128,6 @@ const PanelList: FC<RouteComponentProps & PathPrefixProps> = ({ pathPrefix = ''
const serverTime = timeRes.data.result[0];
setDelta(Math.abs(browserTime - serverTime));
}
// console.log("Metrics...");
// console.log(metricsRes.data);
// console.log("Stores...");
// console.log(storesRes.data);
/**
* React wants to include browserTime to useEffect dependencies list which will cause a delta change on every re-render
* Basically it's not recommended to disable this rule, but this is the only way to take control over the useEffect
Expand Down