@marble-sh/backstage-plugin-grafana-common 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +22 -10
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @marble-sh/backstage-plugin-grafana-common
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c9c9f23: Documentation: a full entity-annotation reference (exact matching semantics,
8
+ how the annotations combine, visibility gating, and error behavior for
9
+ unknown instance names) in the frontend and common READMEs, and a new
10
+ "Creating the Grafana service account and token" walkthrough in the backend
11
+ README — UI steps, the Grafana Cloud `glsa_` vs `glc_` token distinction,
12
+ and a per-feature permission table (Viewer covers all read paths;
13
+ `datasources:query` caveat for panel graphs under Enterprise/Cloud data
14
+ source permissions; Editor / `fixed:dashboards:writer` for the scaffolder
15
+ module).
16
+
3
17
  ## 1.2.0
4
18
 
5
19
  ### Minor Changes
package/README.md CHANGED
@@ -12,16 +12,28 @@ It provides:
12
12
 
13
13
  ## Entity annotations
14
14
 
15
- | Annotation | Helper | Meaning |
16
- | ------------------------------ | ------------------------ | ------------------------------------------------------------------ |
17
- | `grafana/instance` | `getGrafanaInstanceName` | Which configured Grafana instance the entity belongs to. |
18
- | `grafana/dashboard-selector` | `getDashboardSelector` | Comma-separated title substrings; any match selects the dashboard. |
19
- | `grafana/dashboard-uid` | `getDashboardUid` | A single dashboard uid (exact, case-sensitive match). |
20
- | `grafana/tag-selector` | `getTagSelector` | A comma-separated list of dashboard tags. |
21
- | `grafana/alert-label-selector` | `getAlertLabelSelector` | A `key=value,...` list of alert label matchers. |
22
-
23
- `isGrafanaAvailable(entity)` returns `true` when an entity carries any of the
24
- above annotations, and is used to gate the Grafana entity tabs and cards.
15
+ | Annotation | Helper | Meaning |
16
+ | ------------------------------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------- |
17
+ | `grafana/instance` | `getGrafanaInstanceName` | The `grafana.instances[].name` the entity belongs to (exact match). Absent = query all configured instances. |
18
+ | `grafana/dashboard-selector` | `getDashboardSelector` | Comma-separated, case-insensitive title substrings; **any** match selects the dashboard. |
19
+ | `grafana/dashboard-uid` | `getDashboardUid` | A single dashboard uid (exact, case-sensitive match). Written by catalog discovery on its dashboard `Resource`s. |
20
+ | `grafana/tag-selector` | `getTagSelector` | Comma-separated dashboard tags; the dashboard must carry **all** of them. |
21
+ | `grafana/alert-label-selector` | `getAlertLabelSelector` | `key=value,...` alert label matchers; the rule's labels must contain **all** pairs. |
22
+
23
+ The dashboard annotations combine with AND — a dashboard must pass every one
24
+ the entity carries. Empty annotation values are treated as absent. The full
25
+ matching semantics are documented in the
26
+ [frontend plugin README](../grafana/README.md#entity-annotations).
27
+
28
+ Three gating helpers decide whether an entity has Grafana content to show:
29
+
30
+ - `isDashboardsAvailable(entity)` — any of `grafana/instance`,
31
+ `grafana/dashboard-selector`, `grafana/dashboard-uid`, or
32
+ `grafana/tag-selector` is present.
33
+ - `isAlertsAvailable(entity)` — `grafana/instance` or
34
+ `grafana/alert-label-selector` is present.
35
+ - `isGrafanaAvailable(entity)` — either of the above; used to gate the Grafana
36
+ entity tabs and cards.
25
37
 
26
38
  ```ts
27
39
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marble-sh/backstage-plugin-grafana-common",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Common functionality for the Grafana Backstage plugins (types, annotations, and API contracts)",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.d.ts",