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: Adds support for multiple subscriptions per datasource #16922

Merged
merged 7 commits into from May 7, 2019

Conversation

@daniellee
Copy link
Member

daniellee commented May 7, 2019

Fixes #16721

Will follow up with documentation in a separate PR.

@daniellee daniellee added this to the 6.2-beta1 milestone May 7, 2019
daniellee added 7 commits Apr 26, 2019
Removes some types and using @grafana/ui types instead.
Adds some typing for the AzureMonitor query.

Also adds a getSubscriptions function that will used in the query
editor.
This must have been broken for a month or more. Now possible to
edit annotation queries again.
Adds a new dropdown for subscriptions in the query editor.

Defaults to the subscription id in jsonData for queries
that have no subscription id.
The subscription id is needed for fetching the list of
workspaces. Adds support to the Log Analytics datasource
and to the annotations for Log Analytics to be able to
choose between multiple subscriptions.
Adds support for multiple subscriptions for the different
variations of configuring Azure Monitor and Azure Logs.

To be able to show a list of subscriptions, the config
has to be saved first - the plugin route fetches the
tenant id, client id and client secret from the database
so a call to get subscriptions requires that those
fields are saved first. If the page has not saved then
the use can manually paste in a subscription id.
Adds an optional subscription parameter to the template
variable macros. Also adds a Subscriptions macro.
@daniellee daniellee force-pushed the 16721-multi-subscriptions branch from 45fb995 to 4bc8cf5 May 7, 2019
@@ -2,7 +2,7 @@

echo -e "Collecting code stats (typescript errors & more)"

ERROR_COUNT_LIMIT=5617
ERROR_COUNT_LIMIT=5564

This comment has been minimized.

Copy link
@bergquist

bergquist May 7, 2019

Contributor

image

@marefr
marefr approved these changes May 7, 2019
Copy link
Member

marefr left a comment

LGTM

@daniellee daniellee merged commit befa40e into master May 7, 2019
2 checks passed
2 checks passed
build-branches-and-prs Workflow: build-branches-and-prs
Details
license/cla Contributor License Agreement is signed.
Details
@marefr marefr changed the title AzureMonitor: adds support for multiple subscriptions per datasource AzureMonitor: Adds support for multiple subscriptions per datasource May 7, 2019
@marefr marefr deleted the 16721-multi-subscriptions branch May 7, 2019
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 8, 2019
…MetricPanelCtrl

* grafana/master: (30 commits)
  Plugins: update beta notice style (grafana#16928)
  Chore: update version number for 6.3 (grafana#16927)
  Plugins: Support templated urls in routes (grafana#16599)
  changelog: add 5.4.4 release
  docs: add download link to what's new in v6.2
  update changelog
  Update changelog for 6.2.0-beta1
  AzureMonitor: adds support for multiple subscriptions per datasource (grafana#16922)
  docs: what's new in v6.2 (grafana#16909)
  Chore: ban importing from @grafana/ui in grafana ui files (grafana#16920)
  BarGauge: New multi series enabled gauge like panel with horizontal and vertical layouts and 3 display modes (grafana#16918)
  alerting: no notification when going from nodata -> pending (grafana#16905)
  rpm: start grafana after mysqld process (grafana#16917)
  Build: fix failing grafana/ui build (grafana#16913)
  BarGauge: Updated test dashboards and threshold fix (grafana#16911)
  PanelModel: Clear queryRunner on destroy (grafana#16906)
  Panels: No title will no longer make panel header take up space (grafana#16884)
  Elasticsearch: Fix pre-v7.0 and alerting error (grafana#16904)
  Gauge: Better handling of gauge repeat title (grafana#16886)
  Refactor: move datemath to grafana/ui (grafana#16890)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 8, 2019
* grafana/master: (171 commits)
  Plugins: update beta notice style (grafana#16928)
  Chore: update version number for 6.3 (grafana#16927)
  Plugins: Support templated urls in routes (grafana#16599)
  changelog: add 5.4.4 release
  docs: add download link to what's new in v6.2
  update changelog
  Update changelog for 6.2.0-beta1
  AzureMonitor: adds support for multiple subscriptions per datasource (grafana#16922)
  docs: what's new in v6.2 (grafana#16909)
  Chore: ban importing from @grafana/ui in grafana ui files (grafana#16920)
  BarGauge: New multi series enabled gauge like panel with horizontal and vertical layouts and 3 display modes (grafana#16918)
  alerting: no notification when going from nodata -> pending (grafana#16905)
  rpm: start grafana after mysqld process (grafana#16917)
  Build: fix failing grafana/ui build (grafana#16913)
  BarGauge: Updated test dashboards and threshold fix (grafana#16911)
  PanelModel: Clear queryRunner on destroy (grafana#16906)
  Panels: No title will no longer make panel header take up space (grafana#16884)
  Elasticsearch: Fix pre-v7.0 and alerting error (grafana#16904)
  Gauge: Better handling of gauge repeat title (grafana#16886)
  Refactor: move datemath to grafana/ui (grafana#16890)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 8, 2019
* grafana/master: (54 commits)
  Plugins: update beta notice style (grafana#16928)
  Chore: update version number for 6.3 (grafana#16927)
  Plugins: Support templated urls in routes (grafana#16599)
  changelog: add 5.4.4 release
  docs: add download link to what's new in v6.2
  update changelog
  Update changelog for 6.2.0-beta1
  AzureMonitor: adds support for multiple subscriptions per datasource (grafana#16922)
  docs: what's new in v6.2 (grafana#16909)
  Chore: ban importing from @grafana/ui in grafana ui files (grafana#16920)
  BarGauge: New multi series enabled gauge like panel with horizontal and vertical layouts and 3 display modes (grafana#16918)
  alerting: no notification when going from nodata -> pending (grafana#16905)
  rpm: start grafana after mysqld process (grafana#16917)
  Build: fix failing grafana/ui build (grafana#16913)
  BarGauge: Updated test dashboards and threshold fix (grafana#16911)
  PanelModel: Clear queryRunner on destroy (grafana#16906)
  Panels: No title will no longer make panel header take up space (grafana#16884)
  Elasticsearch: Fix pre-v7.0 and alerting error (grafana#16904)
  Gauge: Better handling of gauge repeat title (grafana#16886)
  Refactor: move datemath to grafana/ui (grafana#16890)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 8, 2019
* grafana/master:
  Plugins: update beta notice style (grafana#16928)
  Chore: update version number for 6.3 (grafana#16927)
  Plugins: Support templated urls in routes (grafana#16599)
  changelog: add 5.4.4 release
  docs: add download link to what's new in v6.2
  update changelog
  Update changelog for 6.2.0-beta1
  AzureMonitor: adds support for multiple subscriptions per datasource (grafana#16922)
  docs: what's new in v6.2 (grafana#16909)
  Chore: ban importing from @grafana/ui in grafana ui files (grafana#16920)
  BarGauge: New multi series enabled gauge like panel with horizontal and vertical layouts and 3 display modes (grafana#16918)
  alerting: no notification when going from nodata -> pending (grafana#16905)
  rpm: start grafana after mysqld process (grafana#16917)
  Build: fix failing grafana/ui build (grafana#16913)
  BarGauge: Updated test dashboards and threshold fix (grafana#16911)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 8, 2019
* grafana/master: (74 commits)
  Plugins: update beta notice style (grafana#16928)
  Chore: update version number for 6.3 (grafana#16927)
  Plugins: Support templated urls in routes (grafana#16599)
  changelog: add 5.4.4 release
  docs: add download link to what's new in v6.2
  update changelog
  Update changelog for 6.2.0-beta1
  AzureMonitor: adds support for multiple subscriptions per datasource (grafana#16922)
  docs: what's new in v6.2 (grafana#16909)
  Chore: ban importing from @grafana/ui in grafana ui files (grafana#16920)
  BarGauge: New multi series enabled gauge like panel with horizontal and vertical layouts and 3 display modes (grafana#16918)
  alerting: no notification when going from nodata -> pending (grafana#16905)
  rpm: start grafana after mysqld process (grafana#16917)
  Build: fix failing grafana/ui build (grafana#16913)
  BarGauge: Updated test dashboards and threshold fix (grafana#16911)
  PanelModel: Clear queryRunner on destroy (grafana#16906)
  Panels: No title will no longer make panel header take up space (grafana#16884)
  Elasticsearch: Fix pre-v7.0 and alerting error (grafana#16904)
  Gauge: Better handling of gauge repeat title (grafana#16886)
  Refactor: move datemath to grafana/ui (grafana#16890)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.