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
This commit is contained in:
Andreas Christou
2023-03-29 19:01:18 +03:00
committed by GitHub
parent 674144c8e8
commit e27cb67776
8 changed files with 98 additions and 166 deletions
@@ -11,7 +11,6 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/infra/log"
@@ -287,11 +286,3 @@ func Test_executeQueryErrorWithDifferentLogAnalyticsCreds(t *testing.T) {
t.Error("expecting the error to inform of bad credentials")
}
}
func Test_setAdditionalFrameMeta(t *testing.T) {
t.Run("it should not error with an empty response", func(t *testing.T) {
frame := data.NewFrame("test")
err := setAdditionalFrameMeta(frame, "", "")
require.NoError(t, err)
})
}