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

Migrate to CustomVariableSupport #304

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Migrate to CustomVariableSupport #304

merged 1 commit into from
Apr 9, 2024

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Apr 5, 2024

What this PR does / why we need it:
Migrates from the deprecated variable support to CustomVariableSupport. I created an issue to actually design a new proper variable editor for this with resource handlers for the backend and an issue to handle assetId and assetIds more consistently.

Which issue(s) this PR fixes:

Fixes #233

Special notes for your reviewer:

@@ -129,6 +131,7 @@ export class DataSource extends DataSourceWithBackend<SitewiseQuery, SitewiseOpt
propertyAlias: templateSrv.replace(query.propertyAlias, scopedVars),
region: templateSrv.replace(query.region || '', scopedVars),
propertyId: templateSrv.replace(query.propertyId || '', scopedVars),
assetId: templateSrv.replace(query.assetId || '', scopedVars),
Copy link
Contributor Author

@iwysiu iwysiu Apr 8, 2024

Choose a reason for hiding this comment

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

Without this, we can't use variables as asset ids (it doesn't fetch the properties properly)

@iwysiu iwysiu marked this pull request as ready for review April 8, 2024 20:45
@iwysiu iwysiu requested a review from a team as a code owner April 8, 2024 20:45
@iwysiu iwysiu requested review from idastambuk and kevinwcyu and removed request for a team April 8, 2024 20:45
Copy link
Contributor

@idastambuk idastambuk left a comment

Choose a reason for hiding this comment

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

Looks good, Im getting properties! Too bad the variable interpolation is a mess rn ☹️

@iwysiu iwysiu merged commit 594fe24 into main Apr 9, 2024
12 checks passed
@iwysiu iwysiu deleted the iwysiu/233 branch April 9, 2024 13:47
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.

Migrate to CustomVariableSupport
2 participants