From 4240806465f90513e492fe757e18ca1720c60e4b Mon Sep 17 00:00:00 2001 From: Adam Tackett Date: Wed, 17 Jul 2024 10:30:46 -0700 Subject: [PATCH] Chagned name to dataSourceMDSId Signed-off-by: Adam Tackett --- public/application.tsx | 2 +- public/components/Main/main.tsx | 26 +++++++++++++------------- public/components/app.tsx | 10 +++++----- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/public/application.tsx b/public/application.tsx index 4c6d278..5b51168 100644 --- a/public/application.tsx +++ b/public/application.tsx @@ -29,7 +29,7 @@ export const renderApp = ( dataSourceEnabled={!!dataSource} dataSourceManagement={dataSourceManagement} setActionMenu={setHeaderActionMenu} - dataSourceId={dataSourceId} + dataSourceMDSId={dataSourceId} />, element ); diff --git a/public/components/Main/main.tsx b/public/components/Main/main.tsx index fb392b8..a363b05 100644 --- a/public/components/Main/main.tsx +++ b/public/components/Main/main.tsx @@ -110,7 +110,7 @@ interface MainProps { notifications: NotificationsStart; dataSourceEnabled: boolean; dataSourceManagement: DataSourceManagementPluginSetup; - dataSourceId: string; + dataSourceMDSId: string; setActionMenu: (menuMount: MountPoint | undefined) => void; } @@ -287,7 +287,7 @@ export class Main extends React.Component { isCallOutVisible: false, cluster: 'Indexes', dataSourceOptions: [], - selectedMDSDataConnectionId: this.props.dataSourceId, + selectedMDSDataConnectionId: this.props.dataSourceMDSId, mdsClusterName: '', flintDataConnections: false, }; @@ -304,7 +304,7 @@ export class Main extends React.Component { fetchFlintDataSources = () => { fetchDataSources( this.httpClient, - this.props.dataSourceId, + this.props.dataSourceMDSId, this.props.urlDataSource, (dataOptions) => { if (dataOptions.length > 0) { @@ -426,7 +426,7 @@ export class Main extends React.Component { 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) => @@ -561,7 +561,7 @@ export class Main extends React.Component { }); } }, - this.props.dataSourceId, + this.props.dataSourceMDSId, (errorDetails: string) => { this.setState({ asyncLoading: false, @@ -590,7 +590,7 @@ export class Main extends React.Component { 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'); @@ -642,7 +642,7 @@ export class Main extends React.Component { 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) => @@ -679,7 +679,7 @@ export class Main extends React.Component { 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( @@ -717,7 +717,7 @@ export class Main extends React.Component { 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( @@ -755,7 +755,7 @@ export class Main extends React.Component { 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( @@ -927,7 +927,7 @@ export class Main extends React.Component { openAccelerationFlyout={ this.props.isAccelerationFlyoutOpen && !this.state.isAccelerationFlyoutOpened } - dataSourceMDSId={this.props.dataSourceId} + dataSourceMDSId={this.props.dataSourceMDSId} setIsAccelerationFlyoutOpened={this.setIsAccelerationFlyoutOpened} /> ); @@ -1065,7 +1065,7 @@ export class Main extends React.Component { onSelect={this.handleDataSelect} urlDataSource={this.props.urlDataSource} asyncLoading={this.state.asyncLoading} - dataSourceMDSId={this.props.dataSourceId} + dataSourceMDSId={this.props.dataSourceMDSId} /> @@ -1084,7 +1084,7 @@ export class Main extends React.Component { 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} diff --git a/public/components/app.tsx b/public/components/app.tsx index 61dafb4..3f650ff 100644 --- a/public/components/app.tsx +++ b/public/components/app.tsx @@ -24,7 +24,7 @@ interface WorkbenchAppDeps { savedObjects: CoreStart['savedObjects']; dataSourceEnabled: boolean; dataSourceManagement: DataSourceManagementPluginSetup; - dataSourceId: string; + dataSourceMDSId: string; setActionMenu: (menuMount: MountPoint | undefined) => void; } @@ -37,7 +37,7 @@ export const WorkbenchApp = ({ savedObjects, dataSourceEnabled, dataSourceManagement, - dataSourceId, + dataSourceMDSId: dataSourceId, setActionMenu, }: WorkbenchAppDeps) => { return ( @@ -61,7 +61,7 @@ export const WorkbenchApp = ({ savedObjects={savedObjects} dataSourceEnabled={dataSourceEnabled} dataSourceManagement={dataSourceManagement} - dataSourceId={dataSourceId} + dataSourceMDSId={dataSourceId} setActionMenu={setActionMenu} /> )} @@ -80,7 +80,7 @@ export const WorkbenchApp = ({ savedObjects={savedObjects} dataSourceEnabled={dataSourceEnabled} dataSourceManagement={dataSourceManagement} - dataSourceId={dataSourceId} + dataSourceMDSId={dataSourceId} setActionMenu={setActionMenu} /> )} @@ -99,7 +99,7 @@ export const WorkbenchApp = ({ savedObjects={savedObjects} dataSourceEnabled={dataSourceEnabled} dataSourceManagement={dataSourceManagement} - dataSourceId={dataSourceId} + dataSourceMDSId={dataSourceId} setActionMenu={setActionMenu} /> )}