Skip to content

Commit

Permalink
Chagned name to dataSourceMDSId
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Tackett <[email protected]>
  • Loading branch information
Adam Tackett committed Jul 17, 2024
1 parent 6f77d47 commit 4240806
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const renderApp = (
dataSourceEnabled={!!dataSource}
dataSourceManagement={dataSourceManagement}
setActionMenu={setHeaderActionMenu}
dataSourceId={dataSourceId}
dataSourceMDSId={dataSourceId}
/>,
element
);
Expand Down
26 changes: 13 additions & 13 deletions public/components/Main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ interface MainProps {
notifications: NotificationsStart;
dataSourceEnabled: boolean;
dataSourceManagement: DataSourceManagementPluginSetup;
dataSourceId: string;
dataSourceMDSId: string;
setActionMenu: (menuMount: MountPoint | undefined) => void;
}

Expand Down Expand Up @@ -287,7 +287,7 @@ export class Main extends React.Component<MainProps, MainState> {
isCallOutVisible: false,
cluster: 'Indexes',
dataSourceOptions: [],
selectedMDSDataConnectionId: this.props.dataSourceId,
selectedMDSDataConnectionId: this.props.dataSourceMDSId,
mdsClusterName: '',
flintDataConnections: false,
};
Expand All @@ -304,7 +304,7 @@ export class Main extends React.Component<MainProps, MainState> {
fetchFlintDataSources = () => {
fetchDataSources(
this.httpClient,
this.props.dataSourceId,
this.props.dataSourceMDSId,
this.props.urlDataSource,
(dataOptions) => {
if (dataOptions.length > 0) {
Expand Down Expand Up @@ -426,7 +426,7 @@ export class Main extends React.Component<MainProps, MainState> {
const endpoint = '/api/sql_console/' + (_.isEqual(language, 'SQL') ? 'sqlquery' : 'pplquery');
let query = {};
if (this.props.dataSourceEnabled) {
query = { dataSourceMDSId: this.props.dataSourceId };
query = { dataSourceMDSId: this.props.dataSourceMDSId };
}
const responsePromise = Promise.all(
queries.map((eachQuery: string) =>
Expand Down Expand Up @@ -561,7 +561,7 @@ export class Main extends React.Component<MainProps, MainState> {
});
}
},
this.props.dataSourceId,
this.props.dataSourceMDSId,
(errorDetails: string) => {
this.setState({
asyncLoading: false,
Expand Down Expand Up @@ -590,7 +590,7 @@ export class Main extends React.Component<MainProps, MainState> {
if (queries.length > 0) {
let query = {};
if (this.props.dataSourceEnabled) {
query = { dataSourceMDSId: this.props.dataSourceId };
query = { dataSourceMDSId: this.props.dataSourceMDSId };
}
const endpoint =
'/api/sql_console/' + (_.isEqual(language, 'SQL') ? 'translatesql' : 'translateppl');
Expand Down Expand Up @@ -642,7 +642,7 @@ export class Main extends React.Component<MainProps, MainState> {
if (queries.length > 0) {
let query = {};
if (this.props.dataSourceEnabled) {
query = { dataSourceMDSId: this.props.dataSourceId };
query = { dataSourceMDSId: this.props.dataSourceMDSId };
}
Promise.all(
queries.map((eachQuery: string) =>
Expand Down Expand Up @@ -679,7 +679,7 @@ export class Main extends React.Component<MainProps, MainState> {
if (queries.length > 0) {
let query = {};
if (this.props.dataSourceEnabled) {
query = { dataSourceMDSId: this.props.dataSourceId };
query = { dataSourceMDSId: this.props.dataSourceMDSId };
}
const endpoint = '/api/sql_console/' + (_.isEqual(language, 'SQL') ? 'sqlquery' : 'pplquery');
Promise.all(
Expand Down Expand Up @@ -717,7 +717,7 @@ export class Main extends React.Component<MainProps, MainState> {
if (queries.length > 0) {
let query = {};
if (this.props.dataSourceEnabled) {
query = { dataSourceMDSId: this.props.dataSourceId };
query = { dataSourceMDSId: this.props.dataSourceMDSId };
}
const endpoint = '/api/sql_console/' + (_.isEqual(language, 'SQL') ? 'sqlcsv' : 'pplcsv');
Promise.all(
Expand Down Expand Up @@ -755,7 +755,7 @@ export class Main extends React.Component<MainProps, MainState> {
if (queries.length > 0) {
let query = {};
if (this.props.dataSourceEnabled) {
query = { dataSourceMDSId: this.props.dataSourceId };
query = { dataSourceMDSId: this.props.dataSourceMDSId };
}
const endpoint = '/api/sql_console/' + (_.isEqual(language, 'SQL') ? 'sqltext' : 'ppltext');
Promise.all(
Expand Down Expand Up @@ -927,7 +927,7 @@ export class Main extends React.Component<MainProps, MainState> {
openAccelerationFlyout={
this.props.isAccelerationFlyoutOpen && !this.state.isAccelerationFlyoutOpened
}
dataSourceMDSId={this.props.dataSourceId}
dataSourceMDSId={this.props.dataSourceMDSId}
setIsAccelerationFlyoutOpened={this.setIsAccelerationFlyoutOpened}
/>
);
Expand Down Expand Up @@ -1065,7 +1065,7 @@ export class Main extends React.Component<MainProps, MainState> {
onSelect={this.handleDataSelect}
urlDataSource={this.props.urlDataSource}
asyncLoading={this.state.asyncLoading}
dataSourceMDSId={this.props.dataSourceId}
dataSourceMDSId={this.props.dataSourceMDSId}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand All @@ -1084,7 +1084,7 @@ export class Main extends React.Component<MainProps, MainState> {
updateSQLQueries={this.updateSQLQueries}
refreshTree={this.state.refreshTree}
dataSourceEnabled={this.props.dataSourceEnabled}
dataSourceMDSId={this.props.dataSourceId}
dataSourceMDSId={this.props.dataSourceMDSId}
clusterTab={this.state.cluster}
language={this.state.language}
updatePPLQueries={this.updatePPLQueries}
Expand Down
10 changes: 5 additions & 5 deletions public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface WorkbenchAppDeps {
savedObjects: CoreStart['savedObjects'];
dataSourceEnabled: boolean;
dataSourceManagement: DataSourceManagementPluginSetup;
dataSourceId: string;
dataSourceMDSId: string;
setActionMenu: (menuMount: MountPoint | undefined) => void;
}

Expand All @@ -37,7 +37,7 @@ export const WorkbenchApp = ({
savedObjects,
dataSourceEnabled,
dataSourceManagement,
dataSourceId,
dataSourceMDSId: dataSourceId,
setActionMenu,
}: WorkbenchAppDeps) => {
return (
Expand All @@ -61,7 +61,7 @@ export const WorkbenchApp = ({
savedObjects={savedObjects}
dataSourceEnabled={dataSourceEnabled}
dataSourceManagement={dataSourceManagement}
dataSourceId={dataSourceId}
dataSourceMDSId={dataSourceId}
setActionMenu={setActionMenu}
/>
)}
Expand All @@ -80,7 +80,7 @@ export const WorkbenchApp = ({
savedObjects={savedObjects}
dataSourceEnabled={dataSourceEnabled}
dataSourceManagement={dataSourceManagement}
dataSourceId={dataSourceId}
dataSourceMDSId={dataSourceId}
setActionMenu={setActionMenu}
/>
)}
Expand All @@ -99,7 +99,7 @@ export const WorkbenchApp = ({
savedObjects={savedObjects}
dataSourceEnabled={dataSourceEnabled}
dataSourceManagement={dataSourceManagement}
dataSourceId={dataSourceId}
dataSourceMDSId={dataSourceId}
setActionMenu={setActionMenu}
/>
)}
Expand Down

0 comments on commit 4240806

Please sign in to comment.