|
|
@@ -11,7 +11,7 @@ import {
|
|
|
ChartTypeWithExtendedConfig,
|
|
|
FullActionConfigType,
|
|
|
} from "shared/types";
|
|
|
-import styled, { keyframes } from "styled-components";
|
|
|
+import styled from "styled-components";
|
|
|
import yaml from "js-yaml";
|
|
|
import { AxiosError } from "axios";
|
|
|
import BranchList from "components/repo-selector/BranchList";
|
|
|
@@ -22,9 +22,14 @@ import BuildpackConfigSection from "./_BuildpackConfigSection";
|
|
|
type Props = {
|
|
|
chart: ChartTypeWithExtendedConfig;
|
|
|
isPreviousVersion: boolean;
|
|
|
+ onSave: () => void;
|
|
|
};
|
|
|
|
|
|
-const BuildSettingsTab: React.FC<Props> = ({ chart, isPreviousVersion }) => {
|
|
|
+const BuildSettingsTab: React.FC<Props> = ({
|
|
|
+ chart,
|
|
|
+ isPreviousVersion,
|
|
|
+ onSave,
|
|
|
+}) => {
|
|
|
const { currentCluster, currentProject, setCurrentError } = useContext(
|
|
|
Context
|
|
|
);
|
|
|
@@ -65,7 +70,7 @@ const BuildSettingsTab: React.FC<Props> = ({ chart, isPreviousVersion }) => {
|
|
|
};
|
|
|
|
|
|
try {
|
|
|
- api.updateGitActionConfig(
|
|
|
+ await api.updateGitActionConfig(
|
|
|
"<token>",
|
|
|
{
|
|
|
git_action_config: newGitActionConfig,
|
|
|
@@ -241,6 +246,7 @@ const BuildSettingsTab: React.FC<Props> = ({ chart, isPreviousVersion }) => {
|
|
|
setCurrentError(error);
|
|
|
} finally {
|
|
|
clearButtonStatus();
|
|
|
+ onSave();
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -266,6 +272,7 @@ const BuildSettingsTab: React.FC<Props> = ({ chart, isPreviousVersion }) => {
|
|
|
setCurrentError(error);
|
|
|
} finally {
|
|
|
clearButtonStatus();
|
|
|
+ onSave();
|
|
|
}
|
|
|
};
|
|
|
|