Compare commits

..

23 Commits

Author SHA1 Message Date
Alejandro Fraenkel
e4265fe39c fix(alerting): remove obsolete notification templates tab checks from ContactPoints tests
- Remove test code checking for Notification Templates tab (lines 282-288 and 494-497)
- Templates are now a separate page in sidebar navigation, not a tab within Contact Points
- Tests should only verify contact points permissions, not templates
2026-01-13 17:09:16 +01:00
Alejandro Fraenkel
2635a67630 fix: resolve CI failures from navigation refactoring
TypeScript fixes:
- Add 'as const' to icon type in useAlertRulesNav.test.tsx for proper type narrowing
- Remove unused imports in NotificationPoliciesPage.test.tsx and ContactPoints.test.tsx
- Remove unused import in triage/Triage.tsx
- Restore missing useURLSearchParams import in ContactPoints.tsx
- Restore ActiveTab enum export (used by template pages for URL generation)

Go lint fixes:
- Move nolint:staticcheck comment to line directly before flagged usage in navtree.go

i18n:
- Run yarn i18n-extract to update translation files

All tests passing:
- Backend navtree tests: 
- TypeScript compilation: 
2026-01-13 13:12:24 +01:00
Alejandro Fraenkel
30bacc4ef1 refactor(alerting): format navtree child items for consistency
- Convert child NavLink definitions to multi-line format
- Remove redundant inline comments
- All navtree tests passing (backend and frontend)
2026-01-13 01:39:37 +01:00
Alejandro Fraenkel
143c256a93 fix: remove unused imports in Home.tsx 2026-01-13 01:01:02 +01:00
Alejandro Fraenkel
cc556f3792 Merge branch 'main' into alerting/menu-v2-only
Resolved conflicts:
- pkg/services/navtree/navtreeimpl/navtree.go: Kept V2 navigation structure with proper parent-child hierarchy for alert-activity
- public/app/features/alerting/unified/rule-list/RuleList.v2.tsx: Merged both import statements (useAlertRulesNav and getRulesDataSources)
2026-01-12 21:20:08 +01:00
Alejandro Fraenkel
661cd58bae feat(alerting): remove alertingNavigationV2 feature flag
Remove the alertingNavigationV2 feature toggle and make V2 navigation the only option.

Changes:
- Remove feature flag from registry.go and regenerate toggle files
- Remove shouldUseAlertingNavigationV2() function from featureToggles.ts
- Clean up all navigation hooks (useNotificationConfigNav, useInsightsNav, useAlertRulesNav, useAlertActivityNav)
- Remove legacy navigation logic from page components (TimeIntervalsPage, Templates)
- Update MegaMenu to always use flattened alerting sidebar navigation
- Simplify all test files by removing feature flag mocking and legacy test cases

Net result: ~500 lines of code removed, simpler codebase with single navigation implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 21:12:32 +01:00
Alejandro Fraenkel
b3625b95e3 Remove feature flag and legacy navigation code
This commit removes the alertingNavigationV2 feature flag and all
legacy navigation code, making the V2 navigation the only option.

This simplifies the codebase by removing:
- Feature flag checks in backend and frontend
- buildAlertNavLinksLegacy function (114 lines)
- Legacy tab code in ContactPoints and NotificationPoliciesPage
- Related test code for legacy navigation

Backend changes:
- navtree.go: Remove feature flag check, delete legacy function
- navtree_alerting_test.go: Remove legacy tests, update V2 tests

Frontend changes:
- Home.tsx: Remove feature flag, Insights tab always hidden
- ContactPoints.tsx: Remove tabs, show only contact points
- NotificationPoliciesPage.tsx: Remove tabs, show only policies

This branch is designed for a one-time change to reduce change
surface compared to maintaining both legacy and V2 navigation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 19:19:59 +01:00
Alejandro Fraenkel
774551589b Fix spacing in Notification Templates tab (legacy mode)
Add proper top margin to TabContent in legacy mode to match the
spacing pattern used in Notification Policies page.

Changes:
- Import css from @emotion/css and useStyles2
- Import GrafanaTheme2 for theme typing
- Create getStyles function with tabContent margin
- Apply className to TabContent in legacy mode rendering
- Matches the pattern used in NotificationPoliciesPage.tsx

This fixes the visual issue where the "Create notification templates"
text was directly touching the tabs above with no spacing in legacy
navigation mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 15:32:06 +01:00
Alejandro Fraenkel
dee9bc8fb9 Fix spacing issues in Contact Points and Templates tabs
Add proper top spacing to Contact Points and Notification Templates
tabs to match the spacing pattern used in Notification Policies.

Changes:
- Wrap ContactPointsTab content in Stack with gap={1}
- Wrap NotificationTemplatesTab content in Stack with gap={1}
- This adds consistent spacing between the tabs and the search/filter
  sections, matching the UX pattern in Notification Policies

Fixes visual regression where search boxes were directly touching
the tab bar with no spacing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 15:29:05 +01:00
Alejandro Fraenkel
6395a753d8 Hide Insights tab on Home page when V2 navigation is enabled
When alertingNavigationV2 feature flag is enabled, remove the Insights
tab from the Home page since Insights is now available as a dedicated
section in the sidebar navigation.

Changes:
- Add check for alertingNavigationV2 feature flag in Home.tsx
- When V2 is enabled, insightsEnabled is false (no tab on Home)
- When V2 is disabled (legacy), keep current behavior (show tab if available)
- Insights content remains accessible via sidebar Insights menu in V2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 15:24:18 +01:00
Alejandro Fraenkel
5b228fd7fa Revert "Remove Insights from navigation sidebar"
This reverts commit 307cce059c.
2026-01-12 15:08:43 +01:00
Alejandro Fraenkel
307cce059c Remove Insights from navigation sidebar
Remove Insights from sidebar navigation to match main branch behavior.
Insights should remain as a tab on the Home page, not a separate
navigation item.

Changes:
- Remove Insights parent and tabs from backend navigation (navtree.go)
- Remove /alerting/insights route from routes.tsx
- Delete InsightsPage.tsx component
- Delete useInsightsNav hook and test files
- Update backend tests to remove Insights references

All navigation tests pass successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 14:50:48 +01:00
Alejandro Fraenkel
a5d240751d refactor(alerting): rename V2 nav function to main name for easier future cleanup
Make the V2 navigation implementation the main buildAlertNavLinks() function,
and keep buildAlertNavLinksLegacy() with its descriptive name.

This makes future cleanup trivial:
- To remove legacy support: just delete buildAlertNavLinksLegacy() and the
  feature flag check
- No need to rename functions later
- Main function already has the desired implementation

Changes:
- Inline V2 implementation into buildAlertNavLinks()
- Delete buildAlertNavLinksV2() function (now redundant)
- Update tests to call buildAlertNavLinks() directly
- Inverted feature flag check (!enabled instead of enabled)

All tests pass with identical coverage.
2026-01-12 14:14:30 +01:00
Alejandro Fraenkel
d93867479f refactor(alerting): optimize navtree alerting tests for better maintainability
Reduce test file from 393 to 233 lines (-41%) while maintaining full coverage:

- Extract common test fixtures (setupTestContext, setupTestService, fullPermissions)
- Add reusable helper functions (findNavLink, hasChildWithId)
- Convert repetitive tab tests to table-driven approach
- Improve code readability and maintainability

All 8 test scenarios still verify:
- Feature flag toggle (legacy vs V2)
- Navigation structure and permissions for both modes
- V2 parent/tab structure
- Permission enforcement
- Future-proofing

Benefits:
- 41% code reduction (160 lines removed)
- Same test coverage and assertions
- More idiomatic Go testing patterns
- Easier to extend with new test cases
2026-01-12 14:01:09 +01:00
Alejandro Fraenkel
9f53141368 fix(alerting): restore 'Alert activity' text in V1 navigation
Keep the original 'Alert activity' text in the legacy navigation instead
of changing it to 'Alerts'. This maintains consistency with the existing
V1 navigation experience.
2026-01-12 13:56:15 +01:00
Alejandro Fraenkel
0413b76461 chore: remove conf/defaults.ini dev changes from PR
Keep feature flags disabled by default in config.
Local dev environments can enable flags as needed.
2026-01-12 13:29:55 +01:00
Alejandro Fraenkel
417d3d914a fix(alerting): fix failing navigation and TimeIntervalsPage tests
- Fix navigation hooks tests by manually creating Redux store with configureStore
  - getWrapper doesn't use preloadedState, so we need to pass store directly
  - Updated useNotificationConfigNav, useAlertActivityNav, useAlertRulesNav, and useInsightsNav tests
- Fix TimeIntervalsPage test by:
  - Setting up navIndex in Redux store for V2 navigation
  - Mocking time intervals API with setTimeIntervalsListEmpty()
  - Using findAllByText instead of findByText for multiple matches
- Update time intervals tab detection test to use V2 path instead of query params
- All 21 previously failing tests now pass
- All 1,792 alerting tests pass successfully
2026-01-12 13:09:48 +01:00
Alejandro Fraenkel
2a7f698c4c Flatten Alerting V2 navigation sidebar while keeping tabs in page content
- Modified MegaMenu to filter out nested children for Alerting V2 navigation items
- Sidebar now shows only top-level items: Alert Activity, Alert Rules, Notification Configuration, Insights, Settings
- Tabs are still available in page content (handled by frontend navigation hooks)
- Breadcrumbs still work correctly (children available in navIndex)
- Only applies when alertingNavigationV2 feature flag is enabled
2026-01-09 11:53:36 +01:00
Alejandro Fraenkel
212bdb4400 fix(alerting): fix AlertmanagerContext error in TimeIntervalsPage
- Move useAlertmanager hook call inside AlertmanagerPageWrapper context
- Create TimeIntervalsPageContent component that uses the context
- Fixes 'useAlertmanager must be used within a AlertmanagerContext' error
- Revert incorrect changes to Templates.tsx (error was in TimeIntervalsPage)
2026-01-08 15:56:36 +01:00
Alejandro Fraenkel
2432756be8 fix(alerting): fix breadcrumb for Alert Activity page
- Use conditional navId based on feature flag (alert-activity for V2, alert-alerts for legacy)
- Remove pageNav.text to avoid extra breadcrumb level
- Use renderTitle instead to set page title without affecting breadcrumb
- Fixes breadcrumb showing 'Page not found > Alerts' to 'Alerting > Alert Activity'
2026-01-08 12:43:24 +01:00
Alejandro Fraenkel
a59df66e21 fix(alerting): resolve TypeScript and linting errors in navigation hooks
- Fix icon type errors by moving type assertions to children assignment
- Add ESLint disable comments for necessary type assertions
- Fix unused imports in navigation hooks and test files
- Fix missing currentAlertmanager prop in TimeIntervalsPage
- Fix incorrect permission name in TimeIntervalsPage test
- Apply same pattern to useInsightsNav to fix type errors
2026-01-08 12:40:32 +01:00
Alejandro Fraenkel
5bec0f1af7 feat(alerting): separate notification policies and time intervals, contact points and templates
- Separate Notification policies and Time intervals into distinct tabs in V2 navigation
- Separate Contact points and Notification templates into distinct tabs in V2 navigation
- Add backward compatibility for legacy navigation
- Add TimeIntervalsPage component
- Update navigation hooks and tests
- Enable feature toggles in defaults.ini
- Fix linting errors (duplicate imports, conditional hooks)
2026-01-08 11:57:11 +01:00
Alejandro Fraenkel
954156d5b3 feat(alerting): implement grouped navigation structure with feature flag
- Add alertingNavigationV2 feature flag
- Refactor backend navigation to support legacy and V2 structures
- Create frontend navigation hooks (useAlertRulesNav, useNotificationConfigNav, useInsightsNav)
- Extract Insights component and create InsightsPage
- Update all page components to use new navigation hooks
- Add comprehensive backend and frontend tests
- Support grouped navigation with parent items and tabs
2026-01-08 00:34:41 +01:00
775 changed files with 8712 additions and 25797 deletions

4
.github/CODEOWNERS vendored
View File

@@ -440,7 +440,6 @@ i18next.config.ts @grafana/grafana-frontend-platform
/e2e-playwright/dashboards/TestDashboard.json @grafana/dashboards-squad @grafana/grafana-search-navigate-organise
/e2e-playwright/dashboards/TestV2Dashboard.json @grafana/dashboards-squad
/e2e-playwright/dashboards/V2DashWithRepeats.json @grafana/dashboards-squad
/e2e-playwright/dashboards/V2DashWithRowRepeats.json @grafana/dashboards-squad
/e2e-playwright/dashboards/V2DashWithTabRepeats.json @grafana/dashboards-squad
/e2e-playwright/dashboards-suite/adhoc-filter-from-panel.spec.ts @grafana/datapro
/e2e-playwright/dashboards-suite/dashboard-browse-nested.spec.ts @grafana/grafana-search-navigate-organise
@@ -543,7 +542,6 @@ i18next.config.ts @grafana/grafana-frontend-platform
/packages/grafana-data/tsconfig.json @grafana/grafana-frontend-platform
/packages/grafana-data/test/ @grafana/grafana-frontend-platform
/packages/grafana-data/typings/ @grafana/grafana-frontend-platform
/packages/grafana-data/scripts/ @grafana/grafana-frontend-platform
/packages/grafana-data/src/**/*logs* @grafana/observability-logs
/packages/grafana-data/src/context/plugins/ @grafana/plugins-platform-frontend
@@ -659,7 +657,6 @@ i18next.config.ts @grafana/grafana-frontend-platform
/packages/grafana-runtime/src/services/LocationService.tsx @grafana/grafana-search-navigate-organise
/packages/grafana-runtime/src/services/LocationSrv.ts @grafana/grafana-search-navigate-organise
/packages/grafana-runtime/src/services/live.ts @grafana/dashboards-squad
/packages/grafana-runtime/src/services/pluginMeta @grafana/plugins-platform-frontend
/packages/grafana-runtime/src/utils/chromeHeaderHeight.ts @grafana/grafana-search-navigate-organise
/packages/grafana-runtime/src/utils/DataSourceWithBackend* @grafana/grafana-datasources-core-services
/packages/grafana-runtime/src/utils/licensing.ts @grafana/grafana-operator-experience-squad
@@ -1278,7 +1275,6 @@ embed.go @grafana/grafana-as-code
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
/.github/workflows/i18n-crowdin-create-tasks.yml @grafana/grafana-frontend-platform
/.github/workflows/i18n-verify.yml @grafana/grafana-frontend-platform
/.github/workflows/deploy-storybook.yml @grafana/grafana-frontend-platform
/.github/workflows/deploy-storybook-preview.yml @grafana/grafana-frontend-platform
/.github/workflows/scripts/crowdin/create-tasks.ts @grafana/grafana-frontend-platform
/.github/workflows/scripts/publish-frontend-metrics.mts @grafana/grafana-frontend-platform

View File

@@ -1,79 +0,0 @@
name: Deploy Storybook
on:
workflow_dispatch:
# push:
# branches:
# - main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
detect-changes:
# Only run in grafana/grafana
if: github.repository == 'grafana/grafana'
name: Detect whether code changed
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
changed-frontend-packages: ${{ steps.detect-changes.outputs.frontend-packages }}
steps:
- uses: actions/checkout@v5
with:
persist-credentials: true # required to get more history in the changed-files action
fetch-depth: 2
- name: Detect changes
id: detect-changes
uses: ./.github/actions/change-detection
with:
self: .github/workflows/deploy-storybook.yml
deploy-storybook:
name: Deploy Storybook
runs-on: ubuntu-latest
needs: detect-changes
# Only run in grafana/grafana
if: github.repository == 'grafana/grafana' && needs.detect-changes.outputs.changed-frontend-packages == 'true'
permissions:
contents: read
id-token: write
env:
BUCKET_NAME: grafana-storybook
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
run: yarn install --immutable
- name: Build storybook
run: yarn storybook:build
# Create the GCS folder name
# Right now, this just returns "canary"
# But we'll expand this to work for "latest" as well in the future
- name: Create deploy name
id: create-deploy-name
run: |
echo "deploy-name=canary" >> "$GITHUB_OUTPUT"
- name: Upload Storybook
uses: grafana/shared-workflows/actions/push-to-gcs@main
with:
environment: prod
bucket: ${{ env.BUCKET_NAME }}
bucket_path: ${{ steps.create-deploy-name.outputs.deploy-name }}
path: packages/grafana-ui/dist/storybook
service_account: github-gf-storybook-deploy@grafanalabs-workload-identity.iam.gserviceaccount.com
parent: false

View File

@@ -121,8 +121,6 @@ linters:
- '**/pkg/tsdb/zipkin/**/*'
- '**/pkg/tsdb/jaeger/*'
- '**/pkg/tsdb/jaeger/**/*'
- '**/pkg/tsdb/elasticsearch/*'
- '**/pkg/tsdb/elasticsearch/**/*'
deny:
- pkg: github.com/grafana/grafana/pkg/api
desc: Core plugins are not allowed to depend on Grafana core packages

View File

@@ -135,7 +135,7 @@ i18n-extract-enterprise:
@echo "Skipping i18n extract for Enterprise: not enabled"
else
i18n-extract-enterprise:
@echo "Extracting i18n strings for Enterprise"
@echo "Extracting i18n strings for Enterprise"
cd public/locales/enterprise && yarn run i18next-cli extract --sync-primary
endif
@@ -227,10 +227,6 @@ fix-cue:
gen-jsonnet:
go generate ./devenv/jsonnet
.PHONY: gen-themes
gen-themes:
go generate ./pkg/services/preference
.PHONY: update-workspace
update-workspace: gen-go
@echo "updating workspace"
@@ -248,7 +244,6 @@ build-go-fast: ## Build all Go binaries without updating workspace.
.PHONY: build-backend
build-backend: ## Build Grafana backend.
@echo "build backend"
$(MAKE) gen-themes
$(GO) run build.go $(GO_BUILD_FLAGS) build-backend
.PHONY: build-air

View File

@@ -28,7 +28,7 @@ type check struct {
PluginStore pluginstore.Store
PluginContextProvider PluginContextProvider
PluginClient plugins.Client
PluginRepo checks.PluginInfoGetter
PluginRepo repo.Service
GrafanaVersion string
pluginCanBeInstalledCache map[string]bool
pluginExistsCacheMu sync.RWMutex
@@ -39,7 +39,7 @@ func New(
pluginStore pluginstore.Store,
pluginContextProvider PluginContextProvider,
pluginClient plugins.Client,
pluginRepo checks.PluginInfoGetter,
pluginRepo repo.Service,
grafanaVersion string,
) checks.Check {
return &check{

View File

@@ -15,7 +15,7 @@ import (
type missingPluginStep struct {
PluginStore pluginstore.Store
PluginRepo checks.PluginInfoGetter
PluginRepo repo.Service
GrafanaVersion string
}

View File

@@ -5,7 +5,6 @@ import (
"github.com/grafana/grafana-app-sdk/logging"
advisorv0alpha1 "github.com/grafana/grafana/apps/advisor/pkg/apis/advisor/v0alpha1"
"github.com/grafana/grafana/pkg/plugins/repo"
)
// Check returns metadata about the check being executed and the list of Steps
@@ -38,10 +37,3 @@ type Step interface {
// Run executes the step for an item and returns a report
Run(ctx context.Context, log logging.Logger, obj *advisorv0alpha1.CheckSpec, item any) ([]advisorv0alpha1.CheckReportFailure, error)
}
// PluginInfoGetter is a minimal interface for retrieving plugin information from a repository.
// It contains only the GetPluginsInfo method used by plugincheck and datasourcecheck.
type PluginInfoGetter interface {
// GetPluginsInfo will return a list of plugins from grafana.com/api/plugins.
GetPluginsInfo(ctx context.Context, options repo.GetPluginsInfoOptions, compatOpts repo.CompatOpts) ([]repo.PluginInfo, error)
}

View File

@@ -17,7 +17,7 @@ const (
func New(
pluginStore pluginstore.Store,
pluginRepo checks.PluginInfoGetter,
pluginRepo repo.Service,
updateChecker pluginchecker.PluginUpdateChecker,
pluginErrorResolver plugins.ErrorResolver,
grafanaVersion string,
@@ -33,7 +33,7 @@ func New(
type check struct {
PluginStore pluginstore.Store
PluginRepo checks.PluginInfoGetter
PluginRepo repo.Service
updateChecker pluginchecker.PluginUpdateChecker
pluginErrorResolver plugins.ErrorResolver
GrafanaVersion string

View File

@@ -4,7 +4,7 @@ go 1.25.5
require (
github.com/go-kit/log v0.2.1
github.com/grafana/alerting v0.0.0-20260112172717-98a49ed9557f
github.com/grafana/alerting v0.0.0-20251231150637-b7821017d69f
github.com/grafana/dskit v0.0.0-20250908063411-6b6da59b5cc4
github.com/grafana/grafana-app-sdk v0.48.7
github.com/grafana/grafana-app-sdk/logging v0.48.7

View File

@@ -243,8 +243,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/grafana/alerting v0.0.0-20260112172717-98a49ed9557f h1:3bXOyht68qkfvD6Y8z8XoenFbytSSOIkr/s+AqRzj0o=
github.com/grafana/alerting v0.0.0-20260112172717-98a49ed9557f/go.mod h1:Ji0SfJChcwjgq8ljy6Y5CcYfHfAYKXjKYeysOoDS/6s=
github.com/grafana/alerting v0.0.0-20251231150637-b7821017d69f h1:Br4SaUL3dnVopKKNhDavCLgehw60jdtl/sIxdfzmVts=
github.com/grafana/alerting v0.0.0-20251231150637-b7821017d69f/go.mod h1:l7v67cgP7x72ajB9UPZlumdrHqNztpKoqQ52cU8T3LU=
github.com/grafana/dskit v0.0.0-20250908063411-6b6da59b5cc4 h1:jSojuc7njleS3UOz223WDlXOinmuLAIPI0z2vtq8EgI=
github.com/grafana/dskit v0.0.0-20250908063411-6b6da59b5cc4/go.mod h1:VahT+GtfQIM+o8ht2StR6J9g+Ef+C2Vokh5uuSmOD/4=
github.com/grafana/grafana-app-sdk v0.48.7 h1:9mF7nqkqP0QUYYDlznoOt+GIyjzj45wGfUHB32u2ZMo=

View File

@@ -254,18 +254,8 @@ FieldConfig: {
// custom is specified by the FieldConfig field
// in panel plugin schemas.
custom?: {...}
// Calculate min max per field
fieldMinMax?: bool
// How null values should be handled when calculating field stats
// "null" - Include null values, "connected" - Ignore nulls, "null as zero" - Treat nulls as zero
nullValueMode?: NullValueMode
}
// How null values should be handled
NullValueMode: "null" | "connected" | "null as zero"
DynamicConfigValue: {
id: string | *""
value?: _

View File

@@ -250,18 +250,8 @@ FieldConfig: {
// custom is specified by the FieldConfig field
// in panel plugin schemas.
custom?: {...}
// Calculate min max per field
fieldMinMax?: bool
// How null values should be handled when calculating field stats
// "null" - Include null values, "connected" - Ignore nulls, "null as zero" - Treat nulls as zero
nullValueMode?: NullValueMode
}
// How null values should be handled
NullValueMode: "null" | "connected" | "null as zero"
DynamicConfigValue: {
id: string | *""
value?: _

View File

@@ -258,18 +258,8 @@ FieldConfig: {
// custom is specified by the FieldConfig field
// in panel plugin schemas.
custom?: {...}
// Calculate min max per field
fieldMinMax?: bool
// How null values should be handled when calculating field stats
// "null" - Include null values, "connected" - Ignore nulls, "null as zero" - Treat nulls as zero
nullValueMode?: NullValueMode
}
// How null values should be handled
NullValueMode: "null" | "connected" | "null as zero"
DynamicConfigValue: {
id: string | *""
value?: _

View File

@@ -419,11 +419,6 @@ type DashboardFieldConfig struct {
// custom is specified by the FieldConfig field
// in panel plugin schemas.
Custom map[string]interface{} `json:"custom,omitempty"`
// Calculate min max per field
FieldMinMax *bool `json:"fieldMinMax,omitempty"`
// How null values should be handled when calculating field stats
// "null" - Include null values, "connected" - Ignore nulls, "null as zero" - Treat nulls as zero
NullValueMode *DashboardNullValueMode `json:"nullValueMode,omitempty"`
}
// NewDashboardFieldConfig creates a new DashboardFieldConfig object.
@@ -750,16 +745,6 @@ func NewDashboardActionVariable() *DashboardActionVariable {
// +k8s:openapi-gen=true
const DashboardActionVariableType = "string"
// How null values should be handled
// +k8s:openapi-gen=true
type DashboardNullValueMode string
const (
DashboardNullValueModeNull DashboardNullValueMode = "null"
DashboardNullValueModeConnected DashboardNullValueMode = "connected"
DashboardNullValueModeNullAsZero DashboardNullValueMode = "null as zero"
)
// +k8s:openapi-gen=true
type DashboardDynamicConfigValue struct {
Id string `json:"id"`

View File

@@ -2277,20 +2277,6 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardFieldConfig(ref common.Referenc
},
},
},
"fieldMinMax": {
SchemaProps: spec.SchemaProps{
Description: "Calculate min max per field",
Type: []string{"boolean"},
Format: "",
},
},
"nullValueMode": {
SchemaProps: spec.SchemaProps{
Description: "How null values should be handled when calculating field stats \"null\" - Include null values, \"connected\" - Ignore nulls, \"null as zero\" - Treat nulls as zero",
Type: []string{"string"},
Format: "",
},
},
},
},
},

View File

@@ -254,18 +254,8 @@ FieldConfig: {
// custom is specified by the FieldConfig field
// in panel plugin schemas.
custom?: {...}
// Calculate min max per field
fieldMinMax?: bool
// How null values should be handled when calculating field stats
// "null" - Include null values, "connected" - Ignore nulls, "null as zero" - Treat nulls as zero
nullValueMode?: NullValueMode
}
// How null values should be handled
NullValueMode: "null" | "connected" | "null as zero"
DynamicConfigValue: {
id: string | *""
value?: _

View File

@@ -423,11 +423,6 @@ type DashboardFieldConfig struct {
// custom is specified by the FieldConfig field
// in panel plugin schemas.
Custom map[string]interface{} `json:"custom,omitempty"`
// Calculate min max per field
FieldMinMax *bool `json:"fieldMinMax,omitempty"`
// How null values should be handled when calculating field stats
// "null" - Include null values, "connected" - Ignore nulls, "null as zero" - Treat nulls as zero
NullValueMode *DashboardNullValueMode `json:"nullValueMode,omitempty"`
}
// NewDashboardFieldConfig creates a new DashboardFieldConfig object.
@@ -754,16 +749,6 @@ func NewDashboardActionVariable() *DashboardActionVariable {
// +k8s:openapi-gen=true
const DashboardActionVariableType = "string"
// How null values should be handled
// +k8s:openapi-gen=true
type DashboardNullValueMode string
const (
DashboardNullValueModeNull DashboardNullValueMode = "null"
DashboardNullValueModeConnected DashboardNullValueMode = "connected"
DashboardNullValueModeNullAsZero DashboardNullValueMode = "null as zero"
)
// +k8s:openapi-gen=true
type DashboardDynamicConfigValue struct {
Id string `json:"id"`

View File

@@ -2284,20 +2284,6 @@ func schema_pkg_apis_dashboard_v2beta1_DashboardFieldConfig(ref common.Reference
},
},
},
"fieldMinMax": {
SchemaProps: spec.SchemaProps{
Description: "Calculate min max per field",
Type: []string{"boolean"},
Format: "",
},
},
"nullValueMode": {
SchemaProps: spec.SchemaProps{
Description: "How null values should be handled when calculating field stats \"null\" - Include null values, \"connected\" - Ignore nulls, \"null as zero\" - Treat nulls as zero",
Type: []string{"string"},
Format: "",
},
},
},
},
},

File diff suppressed because one or more lines are too long

View File

@@ -1,427 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashboard"
},
{
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
},
{
"datasource": {
"type": "grafana-testdata-datasource"
},
"enable": true,
"filter": {
"exclude": false,
"ids": [
1
]
},
"iconColor": "red",
"name": "Red, only panel 1",
"target": {
"lines": 4,
"refId": "Anno",
"scenarioId": "annotations"
}
},
{
"datasource": {
"type": "grafana-testdata-datasource"
},
"enable": true,
"filter": {
"exclude": true,
"ids": [
1
]
},
"iconColor": "yellow",
"name": "Yellow - all except 1",
"target": {
"lines": 5,
"refId": "Anno",
"scenarioId": "annotations"
}
},
{
"datasource": {
"type": "grafana-testdata-datasource"
},
"enable": true,
"filter": {
"exclude": false,
"ids": [
3,
4
]
},
"iconColor": "dark-purple",
"name": "Purple only panel 3+4",
"target": {
"lines": 6,
"refId": "Anno",
"scenarioId": "annotations"
}
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 119,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "grafana-testdata-datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"title": "Panel one",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-testdata-datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"title": "Panel two",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-testdata-datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"title": "Panel three",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-testdata-datasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"title": "Panel four",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 42,
"tags": [
"gdev",
"annotations"
],
"templating": {
"list": []
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Annotation filtering",
"uid": "ed155665",
"weekStart": ""
}

View File

@@ -219,7 +219,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},
@@ -311,7 +312,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},
@@ -490,7 +492,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},
@@ -581,7 +584,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},
@@ -672,7 +676,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},
@@ -786,7 +791,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},
@@ -900,7 +906,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},
@@ -1015,7 +1022,8 @@
"value": 80
}
]
}
},
"unitScale": true
},
"overrides": []
},

View File

@@ -65,14 +65,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -133,14 +136,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -201,14 +207,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -262,6 +271,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [],
"max": 100,
"min": 0,
@@ -269,14 +279,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -329,6 +342,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [],
"max": 100,
"min": 0,
@@ -336,14 +350,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -397,6 +414,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [],
"max": 100,
"min": 0,
@@ -404,14 +422,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -464,6 +485,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [],
"max": 100,
"min": 0,
@@ -471,14 +493,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -643,6 +668,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [
{
"options": {
@@ -659,14 +685,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -721,6 +750,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [
{
"options": {
@@ -738,14 +768,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -800,6 +833,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [
{
"options": {
@@ -818,14 +852,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -880,6 +917,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": "",
"mappings": [
{
"options": {
@@ -908,14 +946,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]
@@ -997,7 +1038,7 @@
"mode": "thresholds"
},
"custom": {},
"decimals": 2,
"decimals": "2",
"mappings": [],
"max": 100,
"min": 0,
@@ -1005,14 +1046,17 @@
"mode": "absolute",
"steps": [
{
"color": "#7EB26D"
"color": "#7EB26D",
"index": 0
},
{
"color": "#ef843c",
"index": 1,
"value": 75
},
{
"color": "#e24d42",
"index": 2,
"value": 90
}
]

Some files were not shown because too many files have changed in this diff Show More