diff --git a/src/plugins/advanced_settings/public/_index.scss b/src/plugins/advanced_settings/public/_index.scss
index f3fe78bf6a9c0..d13c37bff32d0 100644
--- a/src/plugins/advanced_settings/public/_index.scss
+++ b/src/plugins/advanced_settings/public/_index.scss
@@ -17,4 +17,4 @@
* under the License.
*/
- @import './management_app/advanced_settings';
+@import './management_app/index';
diff --git a/src/plugins/advanced_settings/public/management_app/_index.scss b/src/plugins/advanced_settings/public/management_app/_index.scss
new file mode 100644
index 0000000000000..aa1980692f7b7
--- /dev/null
+++ b/src/plugins/advanced_settings/public/management_app/_index.scss
@@ -0,0 +1,3 @@
+@import './advanced_settings';
+
+@import './components/index';
diff --git a/src/plugins/advanced_settings/public/management_app/advanced_settings.scss b/src/plugins/advanced_settings/public/management_app/advanced_settings.scss
index 79b6feccb6b7d..016edb2817da8 100644
--- a/src/plugins/advanced_settings/public/management_app/advanced_settings.scss
+++ b/src/plugins/advanced_settings/public/management_app/advanced_settings.scss
@@ -17,21 +17,27 @@
* under the License.
*/
-.mgtAdvancedSettings__field {
+ .mgtAdvancedSettings__field {
+ * {
margin-top: $euiSize;
}
- &Wrapper {
- width: 640px;
- @include internetExplorerOnly() {
- min-height: 1px;
- }
+ padding-left: $euiSizeS;
+ margin-left: -$euiSizeS;
+ &--unsaved {
+ // Simulates a left side border without shifting content
+ box-shadow: -$euiSizeXS 0px $euiColorSecondary;
}
-
- &Actions {
- padding-top: $euiSizeM;
+ &--invalid {
+ // Simulates a left side border without shifting content
+ box-shadow: -$euiSizeXS 0px $euiColorDanger;
+ }
+ @include internetExplorerOnly() {
+ min-height: 1px;
+ }
+ &Row {
+ padding-left: $euiSizeS;
}
@include internetExplorerOnly {
@@ -40,3 +46,19 @@
}
}
}
+
+.mgtAdvancedSettingsForm__unsavedCount {
+ @include euiBreakpoint('xs', 's') {
+ display: none;
+ }
+}
+
+.mgtAdvancedSettingsForm__unsavedCountMessage{
+ // Simulates a left side border without shifting content
+ box-shadow: -$euiSizeXS 0px $euiColorSecondary;
+ padding-left: $euiSizeS;
+}
+
+.mgtAdvancedSettingsForm__button {
+ width: 100%;
+}
diff --git a/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx b/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx
index 5057d072e3e41..39312c9340ff9 100644
--- a/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx
+++ b/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx
@@ -38,7 +38,7 @@ import { ComponentRegistry } from '../';
import { getAriaName, toEditableConfig, DEFAULT_CATEGORY } from './lib';
-import { FieldSetting, IQuery } from './types';
+import { FieldSetting, IQuery, SettingsChanges } from './types';
interface AdvancedSettingsProps {
enableSaving: boolean;
@@ -177,6 +177,13 @@ export class AdvancedSettingsComponent extends Component<
});
};
+ saveConfig = async (changes: SettingsChanges) => {
+ const arr = Object.entries(changes).map(([key, value]) =>
+ this.props.uiSettings.set(key, value)
+ );
+ return Promise.all(arr);
+ };
+
render() {
const { filteredSettings, query, footerQueryMatched } = this.state;
const componentRegistry = this.props.componentRegistry;
@@ -205,18 +212,19 @@ export class AdvancedSettingsComponent extends Component<
-
+ Setting is currently not saved. +
+
-
-
-
-
-
-
-
+ {unsavedChanges.error + ? unsavedChanges.error + : i18n.translate('advancedSettings.field.settingIsUnsaved', { + defaultMessage: 'Setting is currently not saved.', + })} +
+{this.renderCountOfUnsaved()}
+