Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-26 Thread via GitHub


JiaLiangC merged PR #4049:
URL: https://github.com/apache/ambari/pull/4049


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-25 Thread via GitHub


zRains commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2297560662


##
ambari-web/latest/src/api/config/axiosConfig.ts:
##
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from "axios";
+import { toast } from "react-hot-toast";
+import { get } from "lodash";
+
+const config = {
+  development: {
+VITE_API_PROXY_TARGET: "",
+//VITE_TOKEN: "",
+  },
+  production: {
+VITE_API_PROXY_TARGET: "",
+  },
+};
+
+let currentEnv = "development"; // however you determine the current 
environment
+
+if (process.env.NODE_ENV) {
+  currentEnv = process.env.NODE_ENV;
+}
+
+const createAxiosInstance = (baseURL: string, headers = {}) => {
+  if (currentEnv != undefined) {
+if (currentEnv == "development") {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+} else {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+}
+  } else {
+console.error(`No configuration found for target: ${currentEnv}`);
+  }
+
+  const instance = axios.create({
+baseURL,
+withCredentials: true,
+headers: headers,
+  });
+
+  instance.interceptors.response.use(undefined, (error) => {
+const responseMessage = get(error, "response.data.message", undefined);
+// Check for 403 Forbidden status
+if (error.response && error.response.status === 403) {
+  // Redirect to login page
+  window.location.href = "/#/login";

Review Comment:
   All right. This is just a suggestion—feel free to adjust based on the 
situation. I'll decide whether to ignore this writing style in future PRs based 
on the final merge result.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-25 Thread via GitHub


vanshuhassija commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2297473842


##
ambari-web/latest/src/api/config/axiosConfig.ts:
##
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from "axios";
+import { toast } from "react-hot-toast";
+import { get } from "lodash";
+
+const config = {
+  development: {
+VITE_API_PROXY_TARGET: "",
+//VITE_TOKEN: "",
+  },
+  production: {
+VITE_API_PROXY_TARGET: "",
+  },
+};
+
+let currentEnv = "development"; // however you determine the current 
environment
+
+if (process.env.NODE_ENV) {
+  currentEnv = process.env.NODE_ENV;
+}
+
+const createAxiosInstance = (baseURL: string, headers = {}) => {
+  if (currentEnv != undefined) {
+if (currentEnv == "development") {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+} else {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+}
+  } else {
+console.error(`No configuration found for target: ${currentEnv}`);
+  }
+
+  const instance = axios.create({
+baseURL,
+withCredentials: true,
+headers: headers,
+  });
+
+  instance.interceptors.response.use(undefined, (error) => {
+const responseMessage = get(error, "response.data.message", undefined);
+// Check for 403 Forbidden status
+if (error.response && error.response.status === 403) {
+  // Redirect to login page
+  window.location.href = "/#/login";

Review Comment:
   Not currently, but just considering the scenario



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-25 Thread via GitHub


zRains commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2297400669


##
ambari-web/latest/src/api/config/axiosConfig.ts:
##
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from "axios";
+import { toast } from "react-hot-toast";
+import { get } from "lodash";
+
+const config = {
+  development: {
+VITE_API_PROXY_TARGET: "",
+//VITE_TOKEN: "",
+  },
+  production: {
+VITE_API_PROXY_TARGET: "",
+  },
+};
+
+let currentEnv = "development"; // however you determine the current 
environment
+
+if (process.env.NODE_ENV) {
+  currentEnv = process.env.NODE_ENV;
+}
+
+const createAxiosInstance = (baseURL: string, headers = {}) => {
+  if (currentEnv != undefined) {
+if (currentEnv == "development") {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+} else {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+}
+  } else {
+console.error(`No configuration found for target: ${currentEnv}`);
+  }
+
+  const instance = axios.create({
+baseURL,
+withCredentials: true,
+headers: headers,
+  });
+
+  instance.interceptors.response.use(undefined, (error) => {
+const responseMessage = get(error, "response.data.message", undefined);
+// Check for 403 Forbidden status
+if (error.response && error.response.status === 403) {
+  // Redirect to login page
+  window.location.href = "/#/login";

Review Comment:
   For points 1 and 2, the above method should work, as it internally uses 
something like location.href. If you call it directly, you'll be responsible 
for any issues with navigate(-1) behaving abnormally. For point 3, are there 
plans to replace the library in the future?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-25 Thread via GitHub


vanshuhassija commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2297367787


##
ambari-web/latest/src/api/config/axiosConfig.ts:
##
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from "axios";
+import { toast } from "react-hot-toast";
+import { get } from "lodash";
+
+const config = {
+  development: {
+VITE_API_PROXY_TARGET: "",
+//VITE_TOKEN: "",
+  },
+  production: {
+VITE_API_PROXY_TARGET: "",
+  },
+};
+
+let currentEnv = "development"; // however you determine the current 
environment
+
+if (process.env.NODE_ENV) {
+  currentEnv = process.env.NODE_ENV;
+}
+
+const createAxiosInstance = (baseURL: string, headers = {}) => {
+  if (currentEnv != undefined) {
+if (currentEnv == "development") {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+} else {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+}
+  } else {
+console.error(`No configuration found for target: ${currentEnv}`);
+  }
+
+  const instance = axios.create({
+baseURL,
+withCredentials: true,
+headers: headers,
+  });
+
+  instance.interceptors.response.use(undefined, (error) => {
+const responseMessage = get(error, "response.data.message", undefined);
+// Check for 403 Forbidden status
+if (error.response && error.response.status === 403) {
+  // Redirect to login page
+  window.location.href = "/#/login";

Review Comment:
   So the scenario here is
   1. axios middleware for all the requests going to server and monitor the 
response
   2. If there is an error in response which is related to missing cookies we 
need to redirct to login anyways
   3. This middleware in future can be used in any kind of JS framework without 
depending on used library/ framework



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-25 Thread via GitHub


zRains commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2297357821


##
ambari-web/latest/src/api/config/axiosConfig.ts:
##
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from "axios";
+import { toast } from "react-hot-toast";
+import { get } from "lodash";
+
+const config = {
+  development: {
+VITE_API_PROXY_TARGET: "",
+//VITE_TOKEN: "",
+  },
+  production: {
+VITE_API_PROXY_TARGET: "",
+  },
+};
+
+let currentEnv = "development"; // however you determine the current 
environment
+
+if (process.env.NODE_ENV) {
+  currentEnv = process.env.NODE_ENV;
+}
+
+const createAxiosInstance = (baseURL: string, headers = {}) => {
+  if (currentEnv != undefined) {
+if (currentEnv == "development") {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+} else {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+}
+  } else {
+console.error(`No configuration found for target: ${currentEnv}`);
+  }
+
+  const instance = axios.create({
+baseURL,
+withCredentials: true,
+headers: headers,
+  });
+
+  instance.interceptors.response.use(undefined, (error) => {
+const responseMessage = get(error, "response.data.message", undefined);
+// Check for 403 Forbidden status
+if (error.response && error.response.status === 403) {
+  // Redirect to login page
+  window.location.href = "/#/login";

Review Comment:
   @vanshuhassija There are several ways to tackle this: Mount useNavigate() to 
a global variable or state management and update it on route changes. Or set up 
a hook with an Axios interceptor inside.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-25 Thread via GitHub


vanshuhassija commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2297344605


##
ambari-web/latest/src/api/config/axiosConfig.ts:
##
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from "axios";
+import { toast } from "react-hot-toast";
+import { get } from "lodash";
+
+const config = {
+  development: {
+VITE_API_PROXY_TARGET: "",
+//VITE_TOKEN: "",
+  },
+  production: {
+VITE_API_PROXY_TARGET: "",
+  },
+};
+
+let currentEnv = "development"; // however you determine the current 
environment
+
+if (process.env.NODE_ENV) {
+  currentEnv = process.env.NODE_ENV;
+}
+
+const createAxiosInstance = (baseURL: string, headers = {}) => {
+  if (currentEnv != undefined) {
+if (currentEnv == "development") {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+} else {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+}
+  } else {
+console.error(`No configuration found for target: ${currentEnv}`);
+  }
+
+  const instance = axios.create({
+baseURL,
+withCredentials: true,
+headers: headers,
+  });
+
+  instance.interceptors.response.use(undefined, (error) => {
+const responseMessage = get(error, "response.data.message", undefined);
+// Check for 403 Forbidden status
+if (error.response && error.response.status === 403) {
+  // Redirect to login page
+  window.location.href = "/#/login";

Review Comment:
   @zRains This condition is handled in axiosConfig which has no access to 
react router dom. Hence, fallaback to browser location. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-25 Thread via GitHub


vanshuhassija commented on PR #4049:
URL: https://github.com/apache/ambari/pull/4049#issuecomment-3219158350

   @JiaLiangC  Can you please merge this one?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-24 Thread via GitHub


zRains commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2296923104


##
ambari-web/latest/src/api/config/axiosConfig.ts:
##
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import axios from "axios";
+import { toast } from "react-hot-toast";
+import { get } from "lodash";
+
+const config = {
+  development: {
+VITE_API_PROXY_TARGET: "",
+//VITE_TOKEN: "",
+  },
+  production: {
+VITE_API_PROXY_TARGET: "",
+  },
+};
+
+let currentEnv = "development"; // however you determine the current 
environment
+
+if (process.env.NODE_ENV) {
+  currentEnv = process.env.NODE_ENV;
+}
+
+const createAxiosInstance = (baseURL: string, headers = {}) => {
+  if (currentEnv != undefined) {
+if (currentEnv == "development") {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+} else {
+  headers = {
+"Content-Type": "application/json",
+// Authorization: `Basic 
${btoa(localStorage.getItem("proxy_token")||"")}`,
+...headers,
+  };
+}
+  } else {
+console.error(`No configuration found for target: ${currentEnv}`);
+  }
+
+  const instance = axios.create({
+baseURL,
+withCredentials: true,
+headers: headers,
+  });
+
+  instance.interceptors.response.use(undefined, (error) => {
+const responseMessage = get(error, "response.data.message", undefined);
+// Check for 403 Forbidden status
+if (error.response && error.response.status === 403) {
+  // Redirect to login page
+  window.location.href = "/#/login";

Review Comment:
   Try using `react-router` for navigation; directly modifying `location.href` 
can cause unexpected internal routing issues.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-17 Thread via GitHub


sandeep318kumar commented on PR #4049:
URL: https://github.com/apache/ambari/pull/4049#issuecomment-3194443602

   +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-15 Thread via GitHub


arshadmohammad commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2279517014


##
ambari-web/latest/src/api/configsApi.ts:
##
@@ -0,0 +1,270 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { AxiosResponse } from "axios";
+import { ambariApi } from "./config/axiosConfig";
+
+const ConfigsApi = {
+  getServiceConfigurations: async function (
+stack: string,
+verison: string,
+services: string
+  ) {
+const url = 
`stacks/${stack}/versions/${verison}/services?StackServices/service_name.in(${services})&fields=configurations/*,configurations/dependencies/*,StackServices/config_types/*`;
+const response = await ambariApi.request({
+  url: url,
+  method: "GET",
+});
+return response.data;
+  },
+  getConfigProperties: async function (
+stack: string,
+verison: string,
+services: string
+  ) {
+const url = 
`stacks/${stack}/versions/${verison}/services?StackServices/service_name.in(${services})&fields=configurations/*,configurations/dependencies/*,StackServices/display_name,StackServices/config_types/*&_=1728974996201`;

Review Comment:
   ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-14 Thread via GitHub


vanshuhassija commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2276990537


##
ambari-web/latest/src/api/configsApi.ts:
##
@@ -0,0 +1,270 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { AxiosResponse } from "axios";
+import { ambariApi } from "./config/axiosConfig";
+
+const ConfigsApi = {
+  getServiceConfigurations: async function (
+stack: string,
+verison: string,
+services: string
+  ) {
+const url = 
`stacks/${stack}/versions/${verison}/services?StackServices/service_name.in(${services})&fields=configurations/*,configurations/dependencies/*,StackServices/config_types/*`;
+const response = await ambariApi.request({
+  url: url,
+  method: "GET",
+});
+return response.data;
+  },
+  getConfigProperties: async function (
+stack: string,
+verison: string,
+services: string
+  ) {
+const url = 
`stacks/${stack}/versions/${verison}/services?StackServices/service_name.in(${services})&fields=configurations/*,configurations/dependencies/*,StackServices/display_name,StackServices/config_types/*&_=1728974996201`;

Review Comment:
   @arshadmohammad In the upcoming PRs this will be replaced with the 
timestamps. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-14 Thread via GitHub


arshadmohammad commented on code in PR #4049:
URL: https://github.com/apache/ambari/pull/4049#discussion_r2276139268


##
ambari-web/latest/src/api/configsApi.ts:
##
@@ -0,0 +1,270 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { AxiosResponse } from "axios";
+import { ambariApi } from "./config/axiosConfig";
+
+const ConfigsApi = {
+  getServiceConfigurations: async function (
+stack: string,
+verison: string,
+services: string
+  ) {
+const url = 
`stacks/${stack}/versions/${verison}/services?StackServices/service_name.in(${services})&fields=configurations/*,configurations/dependencies/*,StackServices/config_types/*`;
+const response = await ambariApi.request({
+  url: url,
+  method: "GET",
+});
+return response.data;
+  },
+  getConfigProperties: async function (
+stack: string,
+verison: string,
+services: string
+  ) {
+const url = 
`stacks/${stack}/versions/${verison}/services?StackServices/service_name.in(${services})&fields=configurations/*,configurations/dependencies/*,StackServices/display_name,StackServices/config_types/*&_=1728974996201`;

Review Comment:
   what is the use of this static _=1728974996201 parameter



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-14 Thread via GitHub


vanshuhassija commented on PR #4049:
URL: https://github.com/apache/ambari/pull/4049#issuecomment-3187714714

   @JiaLiangC  resolved the merge conflicts. Can you please merge this one?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] AMBARI-26395 Step Wizard and Operation Progress components [ambari]

2025-08-13 Thread via GitHub


himanshumaurya09876 commented on PR #4049:
URL: https://github.com/apache/ambari/pull/4049#issuecomment-3186984471

   +1
   Looks good to me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]