This is an automated email from the ASF dual-hosted git repository.
arshad pushed a commit to branch frontend-refactor
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/frontend-refactor by this push:
new dd817fe3d2 AMBARI:-26579: Ambari Web React: Component actions for
masters/slaves - Refresh configs (#4103)
dd817fe3d2 is described below
commit dd817fe3d256349150f42b422c0bf42f4f69a8ff
Author: Sandeep Kumar <[email protected]>
AuthorDate: Mon Feb 2 20:33:16 2026 +0530
AMBARI:-26579: Ambari Web React: Component actions for masters/slaves -
Refresh configs (#4103)
---
.../latest/src/screens/Hosts/HostSummary.tsx | 9 ++++++++-
ambari-web/latest/src/screens/Hosts/actions.tsx | 23 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/ambari-web/latest/src/screens/Hosts/HostSummary.tsx
b/ambari-web/latest/src/screens/Hosts/HostSummary.tsx
index a99ef44d57..a0a684078f 100644
--- a/ambari-web/latest/src/screens/Hosts/HostSummary.tsx
+++ b/ambari-web/latest/src/screens/Hosts/HostSummary.tsx
@@ -88,6 +88,7 @@ import {
executeCustomCommand,
installClients,
installComponent,
+ refreshComponentConfigs
} from "./actions";
import { AppContext } from "../../store/context";
import IHost from "../../models/host";
@@ -841,7 +842,13 @@ export default function HostsSummary({
<div
key="refresh-component-configs"
onClick={() => {
- //TODO: Will be implemented in future PR
+ setSelectedActionData(
+ component,
+ "refresh",
+ false,
+ refreshComponentConfigs
+ );
+ setShowConfirmationModal(true);
}}
>
Refresh configs
diff --git a/ambari-web/latest/src/screens/Hosts/actions.tsx
b/ambari-web/latest/src/screens/Hosts/actions.tsx
index 9781b7f3ed..d61260d650 100644
--- a/ambari-web/latest/src/screens/Hosts/actions.tsx
+++ b/ambari-web/latest/src/screens/Hosts/actions.tsx
@@ -663,4 +663,27 @@ export const installComponent = async (
const requestId = get(response, "Requests.id", -1);
defaultSuccessCallbackWithoutReload(requestId);
});
+};
+export const refreshComponentConfigs = async (component: IHostComponent) => {
+ const clusterName = get(component, "clusterName", "");
+ const context = t("requestInfo.refreshComponentConfigs").replace(
+ "{0}",
+ getComponentDisplayName(component)
+ );
+ const resource_filters = [
+ {
+ service_name: get(component, "serviceName"),
+ component_name: getComponentName(component),
+ hosts: get(component, "hostName"),
+ },
+ ];
+ const data = JSON.stringify({
+ RequestInfo: {
+ command: "CONFIGURE",
+ context: context,
+ },
+ "Requests/resource_filters": resource_filters,
+ });
+
+ await HostsApi.clusterRequests(clusterName, data);
};
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]