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.", "22"],
[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.", "25"]
[0, 0, 0, "Unexpected any. Specify a different type.", "24"]
],
"packages/grafana-data/src/types/explore.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]

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

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

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

Loading…
Cancel
Save