Skip to content

Commit edaff9d

Browse files
Last Updated Timestamp for visbuilder savedobject is getting Generated
Signed-off-by: AbhishekReddy1127 <nallamsa@amazon.com>
1 parent 8d5e504 commit edaff9d

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3535
* [MD] Add data source param to low-level search call in Discover ([#2431](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2431))
3636
* [Multi DataSource] Skip data source view in index pattern step when pick default ([#2574](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2574))
3737
* [Multi DataSource] Address UX comments on Edit Data source page ([#2629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2629))
38+
* [Vis Builder] Last Updated Timestamp for visbuilder savedobject is getting Generated ([#2628](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2628))
3839

3940
### 🚞 Infrastructure
4041

src/plugins/saved_objects/public/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export interface SavedObjectConfig {
110110
path?: string;
111111
searchSource?: ISearchSource | boolean;
112112
type?: string;
113+
updated_at?: string;
113114
}
114115

115116
export type OpenSearchResponse = Record<string, any>;

src/plugins/vis_builder/common/vis_builder_saved_object_attributes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface WizardSavedObjectAttributes extends SavedObjectAttributes {
1111
title: string;
1212
description?: string;
1313
visualizationState?: string;
14+
updated_at?: string;
1415
styleState?: string;
1516
version: number;
1617
searchSourceFields?: {

src/plugins/vis_builder/public/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import {
3939
import { createSavedWizardLoader } from './saved_visualizations';
4040
import { registerDefaultTypes } from './visualizations';
4141
import { ConfigSchema } from '../config';
42-
4342
export class WizardPlugin
4443
implements
4544
Plugin<WizardSetup, WizardStart, WizardPluginSetupDependencies, WizardPluginStartDependencies> {
@@ -120,7 +119,7 @@ export class WizardPlugin
120119
appExtensions: {
121120
visualizations: {
122121
docTypes: [PLUGIN_ID],
123-
toListItem: ({ id, attributes }) => ({
122+
toListItem: ({ id, attributes, updated_at: updatedAt }) => ({
124123
description: attributes?.description,
125124
editApp: PLUGIN_ID,
126125
editUrl: `${EDIT_PATH}/${encodeURIComponent(id)}`,
@@ -130,6 +129,7 @@ export class WizardPlugin
130129
stage: 'experimental',
131130
title: attributes?.title,
132131
typeTitle: PLUGIN_NAME,
132+
updated_at: updatedAt,
133133
}),
134134
},
135135
},

src/plugins/visualizations/public/vis_types/vis_type_alias_registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export interface VisualizationsAppExtension {
5353
id: string;
5454
type: string;
5555
attributes: SavedObjectAttributes;
56+
updated_at?: string;
5657
}) => VisualizationListItem;
5758
}
5859

0 commit comments

Comments
 (0)