* AzureMonitor: add NewDimension component using experimental UI
This new component is exercised by the same unit test file as the current Dimension component.
Also cleans up a few unneeded `await` keywords in the Dimensions test file.
* AzureMonitor: make tweaks based on PR comments.
- I was importing the wrong Field component
- We can use a typeguard to avoid the strange `if`.
This PR adds endpoints for saving and retrieving a public dashboard configuration and and api endpoint to retrieve the public dashboard.
All of this is highly experimental and APIs will change. Notably, we will be removing isPublic from the dashboard model and moving it over to the public dashboard table in the next release.
Further context can be found here: https://github.com/grafana/grafana/pull/49131#issuecomment-1145456952
* add isPublic to dashboard
* refactor routes to use route group and add placeholder method for sharing apii
* add sharing pane and utils for public dashboard config to sharing modal
* Sharing modal now persists data through the api
* moves ShareDashboard endpoint to new file and starts adding tests
* generates mocks. Adds tests for public dashboard feature flag
* Adds ability to pass in array of features to enable for the test
* test to update public flag on dashboard WIP
* Adds mock for SaveDashboardSharingConfig
* Fixes tests. Had to use FakeDashboardService
* Adds React tests for public dashboards toggle
* removes semicolons
* refactors SharePublic component to use hooks
* rename from `share publicly` to `public dashboard config`
* checkpoint. debugging tests. need to verify name changes
* checkpoint. test bugs fixed. need to finish returning proper response codes
* finish renaming. fix test
* Update pkg/api/api.go
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* update backend url
* rename internal objects and commands. fix configuration modal labels
* add endpoint for retrieving public dashboard configuration and populate the frontend state from it
* add test for dashboardCanBePublic
* adds backend routes
* copy DashboardPage component into component for public dashboards. WIP
* adds react routes, and doesnt render main nav bar when viewing a public route
* removes extra react route from testing
* updates component name
* Wrap the original dashboard component so we can pass props relevant to public dashboards, turn kiosk mode on/off, etc
* Wraps DashboardPage in PublicDashboardPage component. DashboardPage gets rendered in kiosk mode when public prop is passed.
* removes commented out code from exploratory work
* Makes public dashboard routes require no auth
* extracts helper to own util file to check if were viewing a public page
* Hides panel dropdown when its being viewed publicly
* formatting
* use function from utils file for determining if publicly viewed. If public, hides app notifications, searchwrapper, and commandpalette.
* adds unit tests for util function used to see if page is being viewed publicly
* cant added annotations to panel when being publicly viewed
* removes useless comment
* hides backend and frontend pubdash routes behind feature flag
* consider feature flag when checking url path to see if on public dashboard
* renames function
* still render app notifications when in public view
* Extract pubdash route logic into own file
* fixes failing tests
* Determines path using location locationUtils. This covers the case when grafana is being hosted on a subpath. Updates tests.
* renames pubdash web route to be more understandable
* rename route
* fixes failing test
* fixes failing test. Needed to update pubdash urls
* sets flag on grafana boot config for if viewing public dashboard. Removes hacky check that looks at the url
* fixes failing tests. Uses config to determine if viewing public dashboard
* renders the blue panel timeInfo on public dashboard panel
* Extracts conditional logic for rendering components out into their own functions
* removes publicDashboardView check, and uses dashboard meta instead
* the timeInfo is always displayed on the panel
* After fetch of public dashboard dto, the meta isPublic flag gets set and used to determine if viewing public dashboard for child components. Fixes tests for PanelHeader.
* Fixes failing test. Needed to add isPublic flag to dashboard meta.
Co-authored-by: Jeff Levin <jeff@levinology.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* builds out refactored setup topics
* Automatically fix some relrefs with mv-manager
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use refs for tutorials content which is outside of this repository
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Manually fix complicated relrefs
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* consolidates team sync and db encryption topics
* Fix relrefs
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* updates setup index file
* Convert TOML to YAML
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add current alias for new alerting content
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add current aliases to new setup-grafana and configure-security pages
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* moves saml docs, updates order in TOC
* Manually fix relrefs
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* added usage insights topics, adjusted weights
* corrected relrefs
* Fix relrefs broken in rebase
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* add inputs for corresponding schema
* change input to default value
* reformat inline fields and keep local state
* add comment on state
* show input on default
* Split GetDashboarVersions method
* Add sqlstore dialect and tests
* Fix signature of PAtchPreference
* Add GetDialect to sqlstore and remove GetDashboardVersions
* Add GetDialect to db interface
* Implement List
* add deleted test function
* Remove GetDialect from sqlstore interface
* Remove deleted method from mock
* Refactor test
* API: Migrate CSRF to service and support additional options
* minor
* public Csrf service to use in tests
* WIP
* remove fmt
* comment
* WIP
* remove fmt prints
* todo add prefix slash
* remove fmt prints
* linting fix
* remove trimPrefix
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
This change adds documentation about how the configuration of Grafana
Alerting affects the performance of the Grafana backend, and how to
control the load that Grafana Alerting generates.
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* update action names
* correctly retrieve teams for signed in user
* remove test
* undo swagger changes
* undo swagger changes pt2
* add migration from old action names to the new ones
* rename from list to read
* linting
* also update alertign actions
* fix migration
* added regex check of labelKeys
- labelKeys should not contain any special characters
- added encoding of labelKeys in the URL
- don't offer autocomplete if label with special characters is detected
* removed additional regex check for labels
The image file upload code as it is now simply doesn't work - it's
missing several important steps in the file upload process. There is
more information in the fixed issue as to the steps required.
After this change, screenshots will still be attached to slack messages
when external image storage is used with Grafana (an S3 bucket, for
example).
Fixes#50056
* add completeable interface
* add basic labels language
* render monaco editor for label field
* align styling in math expression field
* add unit tests
* fix broken test
* remove unused import
* use theme
* remove comment
* pr feedback
* fix broken imports
* improve test
* make it possible to override code editor styles
* use input styles and align border styles