Explore: Deprecate exploreId in QueryEditorProps (#78692)

* Explore: Deprecate exploreId in QueryEditorProps

* remove exploreId from cloudwatch editor
pull/78750/head
Giordano Ricci 2 years ago committed by GitHub
parent b8bfa86815
commit 98da1fa0b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .betterer.results
  2. 5
      packages/grafana-data/src/types/datasource.ts
  3. 3
      public/app/plugins/datasource/cloudwatch/components/QueryEditor/LogsQueryEditor/LogsQueryEditor.tsx
  4. 1
      public/app/plugins/datasource/cloudwatch/components/QueryEditor/LogsQueryEditor/LogsQueryFieldOld.tsx

@ -330,8 +330,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "21"], [0, 0, 0, "Unexpected any. Specify a different type.", "21"],
[0, 0, 0, "Unexpected any. Specify a different type.", "22"], [0, 0, 0, "Unexpected any. Specify a different type.", "22"],
[0, 0, 0, "Unexpected any. Specify a different type.", "23"], [0, 0, 0, "Unexpected any. Specify a different type.", "23"],
[0, 0, 0, "Unexpected any. Specify a different type.", "24"], [0, 0, 0, "Unexpected any. Specify a different type.", "24"]
[0, 0, 0, "Unexpected any. Specify a different type.", "25"]
], ],
"packages/grafana-data/src/types/explore.ts:5381": [ "packages/grafana-data/src/types/explore.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"] [0, 0, 0, "Unexpected any. Specify a different type.", "0"]

@ -428,7 +428,10 @@ export interface QueryEditorProps<
*/ */
data?: PanelData; data?: PanelData;
range?: TimeRange; range?: TimeRange;
exploreId?: any; /**
* @deprecated This is not used anymore and will be removed in a future release.
*/
exploreId?: string;
history?: Array<HistoryItem<TQuery>>; history?: Array<HistoryItem<TQuery>>;
queries?: DataQuery[]; queries?: DataQuery[];
app?: CoreApp; app?: CoreApp;

@ -22,7 +22,7 @@ const labelClass = css`
`; `;
export const CloudWatchLogsQueryEditor = memo(function CloudWatchLogsQueryEditor(props: Props) { export const CloudWatchLogsQueryEditor = memo(function CloudWatchLogsQueryEditor(props: Props) {
const { query, data, datasource, exploreId } = props; const { query, data, datasource } = props;
let absolute: AbsoluteTimeRange; let absolute: AbsoluteTimeRange;
if (data?.request?.range?.from) { if (data?.request?.range?.from) {
@ -50,7 +50,6 @@ export const CloudWatchLogsQueryEditor = memo(function CloudWatchLogsQueryEditor
) : ( ) : (
<CloudWatchLogsQueryField <CloudWatchLogsQueryField
{...props} {...props}
exploreId={exploreId}
history={[]} history={[]}
absoluteRange={absolute} absoluteRange={absolute}
ExtraFieldElement={ ExtraFieldElement={

@ -28,7 +28,6 @@ export interface CloudWatchLogsQueryFieldProps
absoluteRange: AbsoluteTimeRange; absoluteRange: AbsoluteTimeRange;
onLabelsRefresh?: () => void; onLabelsRefresh?: () => void;
ExtraFieldElement?: ReactNode; ExtraFieldElement?: ReactNode;
exploreId: string;
query: CloudWatchLogsQuery; query: CloudWatchLogsQuery;
} }
const plugins: Array<Plugin<Editor>> = [ const plugins: Array<Plugin<Editor>> = [

Loading…
Cancel
Save