Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Apr 16, 2023
1 parent 10830bf commit 6469d33
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions src/plugins/data_views/common/content_management/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
* Side Public License, v 1.
*/

/**
* Data view saved object version.
*/
export const LATEST_VERSION = 1;

export const DataViewSOType = 'index-pattern';

export type DataViewContentType = typeof DataViewSOType;
2 changes: 0 additions & 2 deletions src/plugins/data_views/common/data_views/data_views.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ describe('IndexPatterns', () => {
test('savedObjectCache pre-fetches title, type, typeMeta', async () => {
expect(await indexPatterns.getIds()).toEqual(['id']);
expect(savedObjectsClient.find).toHaveBeenCalledWith({
type: 'index-pattern',
fields: ['title', 'type', 'typeMeta', 'name'],
perPage: 10000,
});
Expand Down Expand Up @@ -374,7 +373,6 @@ describe('IndexPatterns', () => {
await indexPatterns.find('kibana*', size);

expect(savedObjectsClient.find).lastCalledWith({
type: 'index-pattern',
fields: ['title'],
search,
searchFields: ['title'],
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/data_views/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export {
DATA_VIEW_SAVED_OBJECT_TYPE,
} from './constants';

export { LATEST_VERSION } from './content_management';

export type { ToSpecConfig } from './fields';
export type { IIndexPatternFieldList } from './fields';
export {
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/data_views/public/saved_objects_client_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ export class SavedObjectsClientPublicToCommon implements SavedObjectsClientCommo
return response.saved_object;
}

// SO update method took a `version` value via the options object.
// This was used to make sure the update was based on the most recent version of the object.
async update(id: string, attributes: DataViewAttributes, options: DataViewUpdateOptions) {
const response = await this.contentManagementClient.update<DataViewUpdateIn, DataViewUpdateOut>(
{
Expand Down

0 comments on commit 6469d33

Please sign in to comment.