grafana/public/app/features
AJ Tomko 5285d34cc0
Dashboard: Alerts user to incorrect tag format for JSON import (#54657)
* Dashboard: Alerts user to incorrect tag format for JSON import

Fixes #54285: Malformed tags cause hidden title and settings page crash

* Update public/app/features/manage-dashboards/utils/validation.ts

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>

* Included Suggestions

- Removed Comments
- Updated Code Block accordingly
- Updated Tests to camelCase over snake_case

* Updates per comments

- Re-wrapped function in try{}, catch{} as I appear to have overlooked including it in the initial refactor
- Re-worded errors to align with initial error
- Added a test case for invalid json

* Update validation.ts

Updated errors to read correctly to the root cause.
Updated dashboard variable as const.

* Update actions.test.ts

Fix tests according to error output rewording

* Update validation.ts

- Included test for an empty string of non-array

* Update actions.test.ts

-- Commented incorrect commit for validation.ts, update:
- Refactored code to better align and separate from generic JSON package tests followed by our manual checks of (1) Is array, and (2) if array, is of strings

- Test cases now include a check for non-array empty string in the tag property

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
2022-10-19 08:59:24 -04:00
..
admin any/type assertion fixes (#57009) 2022-10-17 10:10:10 +01:00
alerting Alerting: use virtualized list of namespaces / groups for cloud rules (#56415) 2022-10-18 13:38:59 +02:00
annotations Publicdasboards: Add annotations support (#56413) 2022-10-18 19:48:20 -06:00
api-keys Navigation: Add descriptions to NavModelItems (#55669) 2022-09-23 16:08:08 +01:00
canvas Canvas: Text input cursor jumping (#57133) 2022-10-17 18:36:18 -04:00
commandPalette Explore: Remove camel case from tracking labels (#56809) 2022-10-13 12:12:50 +02:00
comments Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00
connections refactor: rename Data Connections to Connections (#56353) 2022-10-05 09:56:58 +02:00
correlations Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
dashboard Publicdasboards: Add annotations support (#56413) 2022-10-18 19:48:20 -06:00
datasources refactor: rename Data Connections to Connections (#56353) 2022-10-05 09:56:58 +02:00
dimensions React18: Update useCallback arg types where needed (#57084) 2022-10-17 14:52:12 +01:00
explore logs: handle mixed datasources in filters (#56560) 2022-10-18 09:27:17 +02:00
expressions Alerting: Expressions pipeline redesign (#54601) 2022-10-05 14:35:15 +02:00
folders TopNav: Fix pages import dashboard and create new folder (#56182) 2022-10-03 17:30:53 +02:00
geo Geomap: Spatial operations location options transform e2e test (#54162) 2022-08-25 17:34:24 -04:00
inspector Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
invites IconName: Move to grafana/data and use type on NavModelItem (#55013) 2022-09-12 20:09:33 +02:00
library-panels Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
live Live: Fix live streaming with live-service-web-worker feature flag enabled (#55528) 2022-09-21 13:09:16 +02:00
logs disable double stringify (#57243) 2022-10-19 11:58:16 +02:00
manage-dashboards Dashboard: Alerts user to incorrect tag format for JSON import (#54657) 2022-10-19 08:59:24 -04:00
notifications Page: Update profile page components to use new navId (#51664) 2022-07-11 14:35:30 +02:00
org Navigation: Use navid and pagenav for new org page (#55203) 2022-09-16 08:56:50 +02:00
panel Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
playlist Playlist: Split PlaylistItem into standalone TS type (#56343) 2022-10-04 16:08:26 -04:00
plugins Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
profile Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
query Publicdasboards: Add annotations support (#56413) 2022-10-18 19:48:20 -06:00
runtime Runtime: remove updateLocation from window context (#42857) 2021-12-07 20:01:35 -08:00
sandbox Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
scenes enable rule role-has-required-aria-props (#55841) 2022-09-27 11:17:26 -04:00
search Search: Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000 (#57078) 2022-10-18 14:10:53 +08:00
serviceaccounts Admin: Create/Edit Team/ServiceAccount UI changes (#53889) 2022-08-25 13:30:11 +02:00
storage A11y: enable rule jsx-a11y/alt-text (#55832) 2022-10-03 09:27:04 +01:00
teams Navigation: show breadcrumbs correctly when on the home page (#55759) 2022-10-03 15:05:19 +01:00
templating ElasticSearch: Fix lucene formatted variables being wrongly escaped (#54981) 2022-09-15 17:18:57 +02:00
transformers React18: Update useCallback arg types where needed (#57084) 2022-10-17 14:52:12 +01:00
users RBAC: Remove builtin role code (#53767) 2022-08-18 12:25:37 +02:00
variables VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
all.ts Chore: Remove empty and leftover files (#55757) 2022-09-26 11:33:07 -04:00