Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update with 7.4 breaking changes #26

Merged
merged 6 commits into from
Feb 5, 2021
Merged

Conversation

vickyyyyyyy
Copy link
Member

@vickyyyyyyy vickyyyyyyy commented Jan 22, 2021

Update with breaking changes from v7.4 of grafana packages.

as unknown as DataSourceSelectItem

Fixes error:

Conversion of type '{ name: any; value: any; meta: { id: any; info: { logos: { small: any; }; }; }; sort: string; }' to type 'DataSourceSelectItem' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Types of property 'meta' are incompatible.
    Type '{ id: any; info: { logos: { small: any; }; }; }' is missing the following properties from type 'DataSourcePluginMeta<{}>': name, type, module, baseUrl

DataSourceSrv Interface Changes

getDataSourceSettingsByUid -> getInstanceSettings

getAll -> getList

Datasource API Interface Changes

Type is now a property whereas it wasn't before

NOTE: The build will fail on the unit tests because of a bug in the latest package release of @grafana/ui (v7.4.0-beta1) where the bug fix has been merged in but has not been released yet v7.4.0 has now been released.

Updated with next so we get v7.4.0 and added the following:

Datasource API Interface Changes

Uid is now a property whereas it wasn't before

@vickyyyyyyy vickyyyyyyy requested a review from a team January 22, 2021 11:40
@vickyyyyyyy vickyyyyyyy self-assigned this Jan 22, 2021
Copy link
Contributor

@scottlepp scottlepp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - would remove the console logging

console.log("We got an item", item, item.value);
const dsSettings = this.dataSourceSrv.getDataSourceSettingsByUid(item.value!);
console.log("ds settings is", dsSettings);
console.log('We got an item', item, item.value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should remove console.logging

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, didn't notice these were in here!

@vickyyyyyyy vickyyyyyyy merged commit c56f6b2 into master Feb 5, 2021
@vickyyyyyyy vickyyyyyyy deleted the 7.4-breaking-changes branch February 5, 2021 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants