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

AzureMonitor: Fix Log Analytics portal links #65482

Merged
merged 4 commits into from
Mar 29, 2023
Merged

Conversation

aangelisc
Copy link
Contributor

I noticed that the Log Analytics deep links no longer worked since the multiple resource picker feature was enabled. This PR fixes that issue by appropriately setting the resources field.

Additionally, I've moved the logic of adding the links to be in the backend to align with the other pseudo-datasources. This has allowed for a fair bit of code to be removed from the frontend, simplifying the Log Analytics datasource. This will also simplify some of the Traces work.

Further work will need to be done to appropriately test the backend response building as this doesn't exist yet. See #65481

- Build portal URL in backend
- Correctly set multiple resource value
- Move AddConfigLinks util function
- Add necessary types
- Remove unused functions
@aangelisc aangelisc added datasource/Azure Azure Monitor Datasource add to changelog backport v9.4.x Mark PR for automatic backport to v9.4.x labels Mar 28, 2023
@aangelisc aangelisc added this to the 9.4.x milestone Mar 28, 2023
@aangelisc aangelisc self-assigned this Mar 28, 2023
@aangelisc aangelisc requested review from a team and joshhunt as code owners March 28, 2023 18:58
@aangelisc aangelisc requested review from asimpson and bossinc and removed request for a team March 28, 2023 18:58
@aangelisc aangelisc changed the title AzureMonitor: Update Log Analytics portal links AzureMonitor: Fix Log Analytics portal links Mar 28, 2023
@grafana grafana deleted a comment from grafanabot Mar 28, 2023
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration .github/workflows/pr-codeql-analysis-javascript.yml:analyze. As part of the setup process, we have scanned this repository and found 27 existing alerts. Please check the repository Security tab to see all alerts.

@github-actions
Copy link
Contributor

Backend code coverage report for PR #65482

Plugin Main PR Difference
azuremonitor 70.6% 70.6% 0%

@github-actions
Copy link
Contributor

github-actions bot commented Mar 28, 2023

Frontend code coverage report for PR #65482

Plugin Main PR Difference
azuremonitor 82.09% 82.98% .89%

Copy link
Contributor

@asimpson asimpson left a comment

Choose a reason for hiding this comment

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

Love it anytime we can move code out of the frontend, nice find! 🏆

@aangelisc aangelisc enabled auto-merge (squash) March 29, 2023 15:59
@aangelisc aangelisc merged commit e27cb67 into main Mar 29, 2023
@aangelisc aangelisc deleted the az-mon-fix-logs-links branch March 29, 2023 16:01
@zerok zerok modified the milestones: 9.4.x, 9.4.8 Apr 12, 2023
@zerok zerok modified the milestones: 9.4.8, 9.5.0 Apr 12, 2023
@aangelisc aangelisc added backport v9.4.x Mark PR for automatic backport to v9.4.x and removed backport v9.4.x Mark PR for automatic backport to v9.4.x labels May 16, 2023
@grafanabot
Copy link
Contributor

The backport to v9.4.x failed:

could not import config from "/home/runner/work/grafana/grafana/grafana/.betterer.ts". 😔

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-65482-to-v9.4.x origin/v9.4.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x e27cb67776de4872ac00fa9fcb441a9d611b0c22
# Push it to GitHub
git push --set-upstream origin backport-65482-to-v9.4.x
git switch main
# Remove the local backport branch
git branch -D backport-65482-to-v9.4.x

Then, create a pull request where the base branch is v9.4.x and the compare/head branch is backport-65482-to-v9.4.x.

@grafanabot grafanabot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label May 16, 2023
aangelisc added a commit that referenced this pull request May 16, 2023
* Fix and update Log Analytics portal links

- Build portal URL in backend
- Correctly set multiple resource value
- Move AddConfigLinks util function
- Add necessary types
- Remove unused functions

* Fix lint issue

* Remove unused cache variable

(cherry picked from commit e27cb67)

# Conflicts:
#	.betterer.results
aangelisc added a commit that referenced this pull request May 16, 2023
AzureMonitor: Fix Log Analytics portal links (#65482)

* Fix and update Log Analytics portal links

- Build portal URL in backend
- Correctly set multiple resource value
- Move AddConfigLinks util function
- Add necessary types
- Remove unused functions

* Fix lint issue

* Remove unused cache variable

(cherry picked from commit e27cb67)

# Conflicts:
#	.betterer.results
@zerok zerok mentioned this pull request Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend area/frontend backport v9.4.x Mark PR for automatic backport to v9.4.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. datasource/Azure Azure Monitor Datasource type/bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants