Fixed queries, mutations and JSON parse (#626)

* Fixed queries ond mutations

* Fixed JSON.parse in analytics
This commit is contained in:
yuri-sakharov
2025-11-27 11:44:50 +02:00
committed by GitHub
parent f01c19f330
commit 3f623458b3
10 changed files with 124 additions and 115 deletions
@@ -131,7 +131,7 @@ export const InstallReleaseChartModal = ({
// Confirm method (install)
const setReleaseVersionMutation = useMutation(
[
{mutationKey:[
"setVersion",
namespace,
releaseName,
@@ -140,7 +140,7 @@ export const InstallReleaseChartModal = ({
selectedCluster,
chartAddress,
],
async () => {
mutationFn:async () => {
setInstallError("");
const formData = new FormData();
formData.append("preview", "false");
@@ -161,7 +161,6 @@ export const InstallReleaseChartModal = ({
);
return data;
},
{
onSuccess: async (response) => {
onClose();
setSelectedVersionData({ version: "", urls: [] }); //cleanup
@@ -113,7 +113,7 @@ export const InstallRepoChartModal = ({
// Confirm method (install)
const setReleaseVersionMutation = useMutation(
[
{mutationKey:[
"setVersion",
namespace,
releaseName,
@@ -122,7 +122,7 @@ export const InstallRepoChartModal = ({
selectedCluster,
chartAddress,
],
async () => {
mutationFn:async () => {
setInstallError("");
const formData = new FormData();
formData.append("preview", "false");
@@ -139,7 +139,7 @@ export const InstallRepoChartModal = ({
);
return data;
},
{
onSuccess: async (response) => {
onClose();
navigate(
@@ -459,15 +459,14 @@ const Uninstall = () => {
});
const uninstallMutation = useMutation(
["uninstall", namespace, chart],
() =>
{mutationKey:["uninstall", namespace, chart],
mutationFn:() =>
apiService.fetchWithDefaults(
"/api/helm/releases/" + namespace + "/" + chart,
{
method: "delete",
}
),
{
onSuccess: () => {
window.location.href = "/";
},