mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 17:15:17 +00:00
Fork button disabled on View Query page for non-admin users (#4927)
This commit is contained in:
parent
d1044c1963
commit
d550427485
@ -9,7 +9,6 @@ import routeWithUserSession from "@/components/ApplicationArea/routeWithUserSess
|
||||
import EditInPlace from "@/components/EditInPlace";
|
||||
import Parameters from "@/components/Parameters";
|
||||
|
||||
import DataSource from "@/services/data-source";
|
||||
import { ExecutionStatus } from "@/services/query-result";
|
||||
import useQueryResultData from "@/lib/useQueryResultData";
|
||||
|
||||
@ -23,6 +22,7 @@ import QueryExecutionMetadata from "./components/QueryExecutionMetadata";
|
||||
|
||||
import useVisualizationTabHandler from "./hooks/useVisualizationTabHandler";
|
||||
import useQueryExecute from "./hooks/useQueryExecute";
|
||||
import useQueryDataSources from "./hooks/useQueryDataSources";
|
||||
import useUpdateQueryDescription from "./hooks/useUpdateQueryDescription";
|
||||
import useQueryFlags from "./hooks/useQueryFlags";
|
||||
import useQueryParameters from "./hooks/useQueryParameters";
|
||||
@ -35,7 +35,7 @@ import "./QueryView.less";
|
||||
|
||||
function QueryView(props) {
|
||||
const [query, setQuery] = useState(props.query);
|
||||
const [dataSource, setDataSource] = useState();
|
||||
const { dataSource } = useQueryDataSources(query);
|
||||
const queryFlags = useQueryFlags(query, dataSource);
|
||||
const [parameters, areParametersDirty, updateParametersDirtyFlag] = useQueryParameters(query);
|
||||
const [selectedVisualization, setSelectedVisualization] = useVisualizationTabHandler(query.visualizations);
|
||||
@ -81,10 +81,6 @@ function QueryView(props) {
|
||||
document.title = query.name;
|
||||
}, [query.name]);
|
||||
|
||||
useEffect(() => {
|
||||
DataSource.get({ id: query.data_source_id }).then(setDataSource);
|
||||
}, [query.data_source_id]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cx("query-page-wrapper", {
|
||||
|
Loading…
Reference in New Issue
Block a user