Skip to content

Commit 489792e

Browse files
[9.0] [Synthetics] Sync global parameters is called in the endpoints to add, edit or delete global params (#216197) (#218290)
# Backport This will backport the following commits from `main` to `9.0`: - [[Synthetics] Sync global parameters is called in the endpoints to add, edit or delete global params (#216197)](#216197) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Francesco Fagnani","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-15T14:53:14Z","message":"[Synthetics] Sync global parameters is called in the endpoints to add, edit or delete global params (#216197)\n\nThis PR closes #215668.\n\nThe global parameters are synched in the endpoints where they are\ncreated, edited or deleted.\n\n---------\n\nCo-authored-by: Shahzad <[email protected]>","sha":"f693e7218e0edb145f1d4344b484b5b48e80998d","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1","v8.17.5"],"title":"[Synthetics] Sync global parameters is called in the endpoints to add, edit or delete global params","number":216197,"url":"https://github.com/elastic/kibana/pull/216197","mergeCommit":{"message":"[Synthetics] Sync global parameters is called in the endpoints to add, edit or delete global params (#216197)\n\nThis PR closes #215668.\n\nThe global parameters are synched in the endpoints where they are\ncreated, edited or deleted.\n\n---------\n\nCo-authored-by: Shahzad <[email protected]>","sha":"f693e7218e0edb145f1d4344b484b5b48e80998d"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216197","number":216197,"mergeCommit":{"message":"[Synthetics] Sync global parameters is called in the endpoints to add, edit or delete global params (#216197)\n\nThis PR closes #215668.\n\nThe global parameters are synched in the endpoints where they are\ncreated, edited or deleted.\n\n---------\n\nCo-authored-by: Shahzad <[email protected]>","sha":"f693e7218e0edb145f1d4344b484b5b48e80998d"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Francesco Fagnani <[email protected]> Co-authored-by: Francesco Fagnani <[email protected]>
1 parent 9893145 commit 489792e

File tree

17 files changed

+94
-87
lines changed

17 files changed

+94
-87
lines changed

x-pack/platform/plugins/private/translations/translations/fr-FR.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46835,8 +46835,6 @@
4683546835
"xpack.synthetics.settings.noSpace.error": "Les noms d'index ne doivent pas contenir d'espace",
4683646836
"xpack.synthetics.settings.saveSuccess": "Paramètres enregistrés !",
4683746837
"xpack.synthetics.settings.statusRule.inspect": "Impossible d'inspecter le type de règle de statut du moniteur.",
46838-
"xpack.synthetics.settings.syncGlobalParams": "Paramètres globaux appliqués correctement à tous les moniteurs",
46839-
"xpack.synthetics.settings.syncGlobalParams.fail": "Impossible d'appliquer les paramètres globaux à tous les moniteurs",
4684046838
"xpack.synthetics.settings.title": "Paramètres",
4684146839
"xpack.synthetics.settingsBreadcrumbText": "Paramètres",
4684246840
"xpack.synthetics.settingsRoute.allChecks": "Toutes les vérifications",

x-pack/platform/plugins/private/translations/translations/ja-JP.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46798,8 +46798,6 @@
4679846798
"xpack.synthetics.settings.noSpace.error": "インデックス名にはスペースを使用できません",
4679946799
"xpack.synthetics.settings.saveSuccess": "設定が保存されました。",
4680046800
"xpack.synthetics.settings.statusRule.inspect": "監視ステータスルールタイプを検査できませんでした。",
46801-
"xpack.synthetics.settings.syncGlobalParams": "グローバルパラメーターをすべてのモニターに正常に適用しました",
46802-
"xpack.synthetics.settings.syncGlobalParams.fail": "グローバルパラメーターをすべてのモニターに適用できませんでした",
4680346801
"xpack.synthetics.settings.title": "設定",
4680446802
"xpack.synthetics.settingsBreadcrumbText": "設定",
4680546803
"xpack.synthetics.settingsRoute.allChecks": "すべてのチェック",

x-pack/platform/plugins/private/translations/translations/zh-CN.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46872,8 +46872,6 @@
4687246872
"xpack.synthetics.settings.noSpace.error": "索引名称不得包含空格",
4687346873
"xpack.synthetics.settings.saveSuccess": "设置已保存!",
4687446874
"xpack.synthetics.settings.statusRule.inspect": "无法检查监测状态规则类型。",
46875-
"xpack.synthetics.settings.syncGlobalParams": "已成功将全局参数应用到所有监测",
46876-
"xpack.synthetics.settings.syncGlobalParams.fail": "未能将全局参数应用到所有监测",
4687746875
"xpack.synthetics.settings.title": "设置",
4687846876
"xpack.synthetics.settingsBreadcrumbText": "设置",
4687946877
"xpack.synthetics.settingsRoute.allChecks": "所有检查",

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/global_params/add_param_flyout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import { ListParamItem } from './params_list';
3535
import { SyntheticsParams } from '../../../../../../common/runtime_types';
3636
import { useFormWrapped } from '../../../../../hooks/use_form_wrapped';
3737
import { AddParamForm } from './add_param_form';
38-
import { syncGlobalParamsAction } from '../../../state/settings';
3938

4039
export const AddParamFlyout = ({
4140
items,
@@ -114,7 +113,6 @@ export const AddParamFlyout = ({
114113
if (savedData && !isSaving) {
115114
closeFlyout();
116115
dispatch(getGlobalParamAction.get());
117-
dispatch(syncGlobalParamsAction.get());
118116
}
119117
}, [savedData, isSaving, closeFlyout, dispatch]);
120118

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/global_params/delete_param.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
deleteGlobalParamsAction,
1616
selectGlobalParamState,
1717
} from '../../../state/global_params';
18-
import { syncGlobalParamsAction } from '../../../state/settings';
1918
import { NO_LABEL, YES_LABEL } from '../../monitors_page/management/monitor_list_table/labels';
2019
import { ListParamItem } from './params_list';
2120

@@ -38,7 +37,6 @@ export const DeleteParam = ({
3837
if (!isDeleting && (listOfParams ?? []).length === 0) {
3938
setIsDeleteModalVisible(false);
4039
dispatch(getGlobalParamAction.get());
41-
dispatch(syncGlobalParamsAction.get());
4240
}
4341
}, [isDeleting, setIsDeleteModalVisible, name, dispatch, listOfParams]);
4442

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/root_effect.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
fetchLocationMonitorsEffect,
2929
setDynamicSettingsEffect,
3030
} from './settings/effects';
31-
import { syncGlobalParamsEffect } from './settings';
3231
import { privateLocationsEffects } from './private_locations/effects';
3332
import { fetchNetworkEventsEffect } from './network_events/effects';
3433
import { fetchSyntheticsMonitorEffect } from './monitor_details';
@@ -63,7 +62,6 @@ export const rootEffect = function* root(): Generator {
6362
fork(fetchLocationMonitorsEffect),
6463
fork(setDynamicSettingsEffect),
6564
fork(fetchAlertConnectorsEffect),
66-
fork(syncGlobalParamsEffect),
6765
fork(enableDefaultAlertingEffect),
6866
fork(enableMonitorAlertEffect),
6967
fork(updateDefaultAlertingEffect),

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/root_reducer.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ import { overviewStatusReducer, OverviewStatusStateReducer } from './overview_st
1414
import { browserJourneyReducer } from './browser_journey';
1515
import { defaultAlertingReducer, DefaultAlertingState } from './alert_rules';
1616
import { manualTestRunsReducer, ManualTestRunsState } from './manual_test_runs';
17-
import {
18-
dynamicSettingsReducer,
19-
DynamicSettingsState,
20-
settingsReducer,
21-
SettingsState,
22-
} from './settings';
17+
import { dynamicSettingsReducer, DynamicSettingsState } from './settings';
2318
import { elasticsearchReducer, QueriesState } from './elasticsearch';
2419
import { PrivateLocationsState, privateLocationsStateReducer } from './private_locations';
2520
import { networkEventsReducer, NetworkEventsState } from './network_events';
@@ -51,7 +46,6 @@ export interface SyntheticsAppState {
5146
overviewStatus: OverviewStatusStateReducer;
5247
privateLocations: PrivateLocationsState;
5348
serviceLocations: ServiceLocationsState;
54-
settings: SettingsState;
5549
syntheticsEnablement: SyntheticsEnablementState;
5650
ui: UiState;
5751
}
@@ -74,7 +68,6 @@ export const rootReducer = combineReducers<SyntheticsAppState>({
7468
overviewStatus: overviewStatusReducer,
7569
privateLocations: privateLocationsStateReducer,
7670
serviceLocations: serviceLocationsReducer,
77-
settings: settingsReducer,
7871
syntheticsEnablement: syntheticsEnablementReducer,
7972
ui: uiReducer,
8073
});

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/settings/actions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ export const setDynamicSettingsAction = createAsyncAction<DynamicSettings, Dynam
1717
);
1818
export const getConnectorsAction = createAsyncAction<void, ActionConnector[]>('GET CONNECTORS');
1919

20-
export const syncGlobalParamsAction = createAsyncAction<void, boolean>('SYNC GLOBAL PARAMS');
21-
2220
export const getLocationMonitorsAction = createAsyncAction<void, any>('GET LOCATION MONITORS');

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/settings/api.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,3 @@ export const fetchActionTypes = async (): Promise<ActionType[]> => {
7373
feature_id: 'uptime',
7474
});
7575
};
76-
77-
export const syncGlobalParamsAPI = async (): Promise<boolean> => {
78-
return await apiService.get(SYNTHETICS_API_URLS.SYNC_GLOBAL_PARAMS);
79-
};

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/settings/effects.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,16 @@ import {
1515
getConnectorsAction,
1616
setDynamicSettingsAction,
1717
getDynamicSettingsAction,
18-
syncGlobalParamsAction,
1918
getLocationMonitorsAction,
2019
} from './actions';
2120
import { fetchEffectFactory } from '../utils/fetch_effect';
2221
import {
2322
fetchConnectors,
2423
setDynamicSettings,
25-
syncGlobalParamsAPI,
2624
getDynamicSettings,
2725
fetchLocationMonitors,
2826
} from './api';
2927

30-
export function* syncGlobalParamsEffect() {
31-
yield takeLeading(
32-
syncGlobalParamsAction.get,
33-
fetchEffectFactory(
34-
syncGlobalParamsAPI,
35-
syncGlobalParamsAction.success,
36-
syncGlobalParamsAction.fail,
37-
successMessage,
38-
failureMessage
39-
)
40-
);
41-
}
42-
4328
export function* fetchLocationMonitorsEffect() {
4429
yield takeLeading(
4530
String(getLocationMonitorsAction.get),
@@ -62,14 +47,6 @@ export function* fetchDynamicSettingsEffect() {
6247
);
6348
}
6449

65-
const successMessage = i18n.translate('xpack.synthetics.settings.syncGlobalParams', {
66-
defaultMessage: 'Successfully applied global params to all monitors',
67-
});
68-
69-
const failureMessage = i18n.translate('xpack.synthetics.settings.syncGlobalParams.fail', {
70-
defaultMessage: 'Failed to apply global params to all monitors',
71-
});
72-
7350
export function* setDynamicSettingsEffect() {
7451
const couldNotSaveSettingsText = i18n.translate('xpack.synthetics.settings.error.couldNotSave', {
7552
defaultMessage: 'Could not save settings!',

0 commit comments

Comments
 (0)