Skip to content

Commit 54cf151

Browse files
fix(QueryExplain): do not request ast when missing
1 parent 967f102 commit 54cf151

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/containers/Tenant/QueryEditor/QueryExplain/QueryExplain.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ function QueryExplain(props) {
102102
};
103103
}, []);
104104

105-
useEffect(() => {
106-
if (!props.ast && activeOption === ExplainOptionIds.ast) {
107-
props.astQuery();
108-
}
109-
}, [activeOption, props.ast]);
110-
111105
const onSelectOption = (tabId) => {
112106
setActiveOption(tabId);
113107
};
@@ -121,7 +115,9 @@ function QueryExplain(props) {
121115
};
122116

123117
const renderStub = () => {
124-
return <div className={b('text-message')}>There is no explanation for the request</div>;
118+
return (
119+
<div className={b('text-message')}>{`There is no ${activeOption} for the request`}</div>
120+
);
125121
};
126122

127123
const hasContent = () => {

0 commit comments

Comments
 (0)