Skip to content

Commit

Permalink
Type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpeihl committed Nov 4, 2024
1 parent e800c7d commit 3fef67b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
14 changes: 7 additions & 7 deletions test/functional/apps/dashboard/group3/dashboard_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
panels: (appState.panels ?? []).map((panel) => {
return {
...panel,
embeddableConfig: {
...(panel.embeddableConfig ?? {}),
panelConfig: {
...(panel.panelConfig ?? {}),
vis: {
...((panel.embeddableConfig?.vis as object) ?? {}),
...((panel.panelConfig?.vis as object) ?? {}),
colors: {
...((panel.embeddableConfig?.vis as { colors: object })?.colors ?? {}),
...((panel.panelConfig?.vis as { colors: object })?.colors ?? {}),
['80000']: 'FFFFFF',
},
},
Expand Down Expand Up @@ -353,10 +353,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
panels: (appState.panels ?? []).map((panel) => {
return {
...panel,
embeddableConfig: {
...(panel.embeddableConfig ?? {}),
panelConfig: {
...(panel.panelConfig ?? {}),
vis: {
...((panel.embeddableConfig?.vis as object) ?? {}),
...((panel.panelConfig?.vis as object) ?? {}),
colors: {},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
EuiButtonEmpty,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { DashboardItem } from '@kbn/dashboard-plugin/common/content_management';
import { callApmApi } from '../../../../services/rest/create_call_apm_api';
import { useDashboardFetcher } from '../../../../hooks/use_dashboards_fetcher';
import { FETCH_STATUS } from '../../../../hooks/use_fetcher';
Expand Down Expand Up @@ -76,7 +75,7 @@ export function SaveDashboardModal({

const isEditMode = !!currentDashboard?.id;

const options = allAvailableDashboards?.map((dashboardItem: DashboardItem) => ({
const options = allAvailableDashboards?.map((dashboardItem) => ({
label: dashboardItem.attributes.title,
value: dashboardItem.id,
disabled:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
useEuiTheme,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { DashboardItem } from '@kbn/dashboard-plugin/common/content_management';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { FETCH_STATUS } from '../../../../../hooks/use_fetcher';
import type {
Expand Down Expand Up @@ -76,7 +75,7 @@ export function SaveDashboardModal({

const options = useMemo(
() =>
allAvailableDashboards?.map((dashboardItem: DashboardItem) => ({
allAvailableDashboards?.map((dashboardItem) => ({
label: dashboardItem.attributes.title,
value: dashboardItem.id,
disabled:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import type { Logger } from '@kbn/core/server';
import { i18n } from '@kbn/i18n';

import type { DashboardAttributes } from '@kbn/dashboard-plugin/common';
import type { DashboardSavedObjectAttributes } from '@kbn/dashboard-plugin/server';
import { transformError } from '@kbn/securitysolution-es-utils';
import { INTERNAL_DASHBOARDS_URL } from '../../../../common/constants';
import type { SecuritySolutionPluginRouter } from '../../../types';
Expand Down Expand Up @@ -36,7 +36,7 @@ export const getDashboardsByTagsRoute = (router: SecuritySolutionPluginRouter, l
const { tagIds } = request.body;

try {
const dashboardsResponse = await savedObjectsClient.find<DashboardAttributes>({
const dashboardsResponse = await savedObjectsClient.find<DashboardSavedObjectAttributes>({
type: 'dashboard',
hasReference: tagIds.map((id) => ({ id, type: 'tag' })),
});
Expand Down

0 comments on commit 3fef67b

Please sign in to comment.