Explore: Deprecate exploreId in QueryEditorProps (#78692)

* Explore: Deprecate exploreId in QueryEditorProps

* remove exploreId from cloudwatch editor
This commit is contained in:
Giordano Ricci 2023-11-28 14:55:20 +00:00 committed by GitHub
parent b8bfa86815
commit 98da1fa0b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -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"]

View File

@ -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;

View File

@ -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={

View File

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