Skip to content

Commit

Permalink
Last Updated Timestamp for visbuilder savedobject is getting Generated
Browse files Browse the repository at this point in the history
Signed-off-by: AbhishekReddy1127 <[email protected]>
  • Loading branch information
AbhishekReddy1127 committed Oct 21, 2022
1 parent 8d5e504 commit edaff9d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [MD] Add data source param to low-level search call in Discover ([#2431](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2431))
* [Multi DataSource] Skip data source view in index pattern step when pick default ([#2574](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2574))
* [Multi DataSource] Address UX comments on Edit Data source page ([#2629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2629))
* [Vis Builder] Last Updated Timestamp for visbuilder savedobject is getting Generated ([#2628](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2628))

### 🚞 Infrastructure

Expand Down
1 change: 1 addition & 0 deletions src/plugins/saved_objects/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export interface SavedObjectConfig {
path?: string;
searchSource?: ISearchSource | boolean;
type?: string;
updated_at?: string;
}

export type OpenSearchResponse = Record<string, any>;
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface WizardSavedObjectAttributes extends SavedObjectAttributes {
title: string;
description?: string;
visualizationState?: string;
updated_at?: string;
styleState?: string;
version: number;
searchSourceFields?: {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/vis_builder/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {
import { createSavedWizardLoader } from './saved_visualizations';
import { registerDefaultTypes } from './visualizations';
import { ConfigSchema } from '../config';

export class WizardPlugin
implements
Plugin<WizardSetup, WizardStart, WizardPluginSetupDependencies, WizardPluginStartDependencies> {
Expand Down Expand Up @@ -120,7 +119,7 @@ export class WizardPlugin
appExtensions: {
visualizations: {
docTypes: [PLUGIN_ID],
toListItem: ({ id, attributes }) => ({
toListItem: ({ id, attributes, updated_at: updatedAt }) => ({
description: attributes?.description,
editApp: PLUGIN_ID,
editUrl: `${EDIT_PATH}/${encodeURIComponent(id)}`,
Expand All @@ -130,6 +129,7 @@ export class WizardPlugin
stage: 'experimental',
title: attributes?.title,
typeTitle: PLUGIN_NAME,
updated_at: updatedAt,
}),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface VisualizationsAppExtension {
id: string;
type: string;
attributes: SavedObjectAttributes;
updated_at?: string;
}) => VisualizationListItem;
}

Expand Down

0 comments on commit edaff9d

Please sign in to comment.