From 41b1edaba87a108545fe0c1e942630b96d7f7d52 Mon Sep 17 00:00:00 2001
From: Sergey Myssak
Date: Fri, 14 Jul 2023 03:07:06 +0600
Subject: [PATCH] [CCI] Add new or remove extra tags and styles in
`saved_objects_management` plugin (#4069)
* Add new or remove extra tags and styles (#3967)
Co-authored-by: Andrey Myssak
Signed-off-by: Sergey Myssak
* Remove extra Fragment tags (#3967)
Co-authored-by: Andrey Myssak
Signed-off-by: Sergey Myssak
---------
Signed-off-by: Sergey Myssak
Signed-off-by: Josh Romero
Co-authored-by: Andrey Myssak
Co-authored-by: Josh Romero
---
CHANGELOG.md | 1 +
.../__snapshots__/intro.test.tsx.snap | 4 +-
.../not_found_errors.test.tsx.snap | 30 +--
.../object_view/components/intro.tsx | 4 +-
.../components/not_found_errors.tsx | 6 +-
.../__snapshots__/flyout.test.tsx.snap | 194 +++++++++---------
.../__snapshots__/relationships.test.tsx.snap | 8 +-
.../objects_table/components/flyout.tsx | 16 +-
.../components/import_summary.scss | 4 -
.../components/relationships.tsx | 2 +-
10 files changed, 128 insertions(+), 141 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb7f3da8747e..4463e6ad914c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -88,6 +88,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Vis Colors] [Timeline] Replace `vis_type_timeline` colors with `ouiPaletteColorBlind()` ([#4366](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4366))
- [Vis Colors] Update legacy seed colors to use `ouiPaletteColorBlind()` ([#4348](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4348))
- [Vis colors] Update legacy mapped colors in charts plugin to use `ouiPaletteColorBlind()`, Update default color in legacy visualizations to use `ouiPaletteColorBlind()[0]` ([#4398](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4398))
+- [Saved Objects Management] Add new or remove extra tags and styles ([#4069](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4069))
- [Console] Migrate `/lib/mappings/` module to TypeScript ([#4008](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4008))
### 🔩 Tests
diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/intro.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/intro.test.tsx.snap
index 5a8cd06b8ecc..5c7955eb3ada 100644
--- a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/intro.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/intro.test.tsx.snap
@@ -60,7 +60,7 @@ exports[`Intro component renders correctly 1`] = `
-
+
Modifying objects is for advanced users only. Object properties are not validated and invalid objects could cause errors, data loss, or worse. Unless someone with intimate knowledge of the code told you to be in here, you probably shouldn’t be.
-
+
diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap
index f977c17df41d..7ec56732ec7c 100644
--- a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap
@@ -62,7 +62,7 @@ exports[`NotFoundErrors component renders correctly for index-pattern type 1`] =
-
+
The index pattern associated with this object no longer exists.
-
-
+
+
If you know what this error means, go ahead and fix it — otherwise click the delete button above.
-
+
@@ -151,7 +151,7 @@ exports[`NotFoundErrors component renders correctly for index-pattern-field type
-
+
A field associated with this object no longer exists in the index pattern.
-
-
+
+
If you know what this error means, go ahead and fix it — otherwise click the delete button above.
-
+
@@ -240,7 +240,7 @@ exports[`NotFoundErrors component renders correctly for search type 1`] = `
-
+
The saved search associated with this object no longer exists.
-
-
+
+
If you know what this error means, go ahead and fix it — otherwise click the delete button above.
-
+
@@ -329,8 +329,8 @@ exports[`NotFoundErrors component renders correctly for unknown type 1`] = `
-
-
+
+
If you know what this error means, go ahead and fix it — otherwise click the delete button above.
-
+
diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/intro.tsx b/src/plugins/saved_objects_management/public/management_section/object_view/components/intro.tsx
index ef16a7330410..788f2e24116f 100644
--- a/src/plugins/saved_objects_management/public/management_section/object_view/components/intro.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/intro.tsx
@@ -44,12 +44,12 @@ export const Intro = () => {
iconType="alert"
color="warning"
>
-
+
);
};
diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx
index 91f60f170717..59fb0a984606 100644
--- a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx
@@ -76,13 +76,13 @@ export const NotFoundErrors = ({ type }: NotFoundErrors) => {
iconType="alert"
color="danger"
>
- {getMessage()}
-
+
);
};
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
index f9091d06c691..c91fcbd7769e 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
@@ -21,43 +21,41 @@ exports[`Flyout conflicts should allow conflict resolution 1`] = `
-
-
-
- }
- >
-
-
-
- ,
- }
+
+
+ }
+ >
+
+
+
+ ,
}
- />
-
-
-
+ }
+ />
+
+
-
-
-
- }
- >
-
-
-
-
-
-
-
-
-
- }
- >
-
-
-
- ,
- }
+
+
+ }
+ >
+
+
+
+
+
+
+
+ }
+ >
+
+
+
+ ,
}
- />
-
-
-
+ }
+ />
+
+
}
>
- foo
+
+ foo
+
@@ -944,7 +946,9 @@ exports[`Relationships should render errors 1`] = `
/>
}
>
- foo
+
+ foo
+
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
index b0dd8c269039..ad082513b277 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
@@ -917,18 +917,10 @@ export class Flyout extends Component {
return (
- {legacyFileWarning && (
-
-
- {legacyFileWarning}
-
- )}
- {indexPatternConflictsWarning && (
-
-
- {indexPatternConflictsWarning}
-
- )}
+ {legacyFileWarning && }
+ {legacyFileWarning}
+ {indexPatternConflictsWarning && }
+ {indexPatternConflictsWarning}
);
}
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.scss b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.scss
index 4b46c1244e24..99e824f3b4f3 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.scss
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.scss
@@ -14,7 +14,3 @@
.savedObjectsManagementImportSummary__errorCount {
color: $euiColorDangerText;
}
-
-.savedObjectsManagementImportSummary__icon {
- margin-left: $euiSizeXS;
-}
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.tsx
index 68e1ffec8e3b..0115111da0ac 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/relationships.tsx
@@ -116,7 +116,7 @@ export class Relationships extends Component
- {error}
+ {error}
);
}