File tree Expand file tree Collapse file tree 5 files changed +10
-0
lines changed
public/query/query_string/dataset_service Expand file tree Collapse file tree 5 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1+ infra :
2+ - Supply data source version to Datasets ([#10798](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/10798))
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export class DataView extends IndexPattern implements IDataView {
7777 this . dataSourceRef = {
7878 id : this . dataSourceRef . id ,
7979 type : attributes . dataSourceEngineType || this . dataSourceRef . type ,
80+ version : attributes . dataSourceVersion || this . dataSourceRef . version ,
8081 name : attributes . title || this . dataSourceRef . name || this . dataSourceRef . id ,
8182 } ;
8283 } catch ( error ) {
@@ -115,6 +116,7 @@ export class DataView extends IndexPattern implements IDataView {
115116 id : dataSourceReference . id ,
116117 title : attributes . title || dataSourceReference . id ,
117118 type : attributes . dataSourceEngineType || 'OpenSearch' ,
119+ version : attributes . dataSourceVersion || '' ,
118120 } ;
119121 } catch ( error ) {
120122 // If we can't fetch the data source, create a minimal version
@@ -125,6 +127,7 @@ export class DataView extends IndexPattern implements IDataView {
125127 ? dataSourceReference . name
126128 : dataSourceReference . id ,
127129 type : 'OpenSearch' ,
130+ version : '' ,
128131 } ;
129132 }
130133 }
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export interface DataSource {
1616 title : string ;
1717 /** The engine type of the data source */
1818 type : string ;
19+ /** Version of the data source */
20+ version : string ;
1921 /** Optional metadata for the data source */
2022 meta ?: DataSourceMeta ;
2123}
Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ export interface SavedObjectReference {
213213 name ?: string ;
214214 id : string ;
215215 type : string ;
216+ version : string ;
216217}
217218export interface IndexPatternSpec {
218219 id ?: string ;
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ export class DatasetService {
120120 id : dataset . dataSource . id ! ,
121121 name : dataset . dataSource . title ,
122122 type : dataset . dataSource . type ,
123+ version : dataset . dataSource . version ,
123124 }
124125 : undefined ,
125126 } as IndexPatternSpec ;
@@ -201,6 +202,7 @@ export class DatasetService {
201202 id : dataset . dataSource . id ! ,
202203 name : dataset . dataSource . title ,
203204 type : dataset . dataSource . type ,
205+ version : dataset . dataSource . version ,
204206 }
205207 : undefined ,
206208 } as IndexPatternSpec ;
You can’t perform that action at this time.
0 commit comments