|
@@ -70,6 +70,7 @@ export const ExpandedJobChartFC: React.FC<{
|
|
|
() => localStorage.getItem("devOpsMode") === "true"
|
|
() => localStorage.getItem("devOpsMode") === "true"
|
|
|
);
|
|
);
|
|
|
const [showConnectionModal, setShowConnectionModal] = useState(false);
|
|
const [showConnectionModal, setShowConnectionModal] = useState(false);
|
|
|
|
|
+ const [disableForm, setDisableForm] = useState(false);
|
|
|
|
|
|
|
|
let rightTabOptions = [] as any[];
|
|
let rightTabOptions = [] as any[];
|
|
|
|
|
|
|
@@ -227,6 +228,7 @@ export const ExpandedJobChartFC: React.FC<{
|
|
|
refreshChart={refreshChart}
|
|
refreshChart={refreshChart}
|
|
|
upgradeChart={upgradeChart}
|
|
upgradeChart={upgradeChart}
|
|
|
loadChartWithSpecificRevision={loadChartWithSpecificRevision}
|
|
loadChartWithSpecificRevision={loadChartWithSpecificRevision}
|
|
|
|
|
+ setDisableForm={setDisableForm}
|
|
|
/>
|
|
/>
|
|
|
<LineBreak />
|
|
<LineBreak />
|
|
|
<Placeholder>
|
|
<Placeholder>
|
|
@@ -268,6 +270,7 @@ export const ExpandedJobChartFC: React.FC<{
|
|
|
refreshChart={refreshChart}
|
|
refreshChart={refreshChart}
|
|
|
upgradeChart={upgradeChart}
|
|
upgradeChart={upgradeChart}
|
|
|
loadChartWithSpecificRevision={loadChartWithSpecificRevision}
|
|
loadChartWithSpecificRevision={loadChartWithSpecificRevision}
|
|
|
|
|
+ setDisableForm={setDisableForm}
|
|
|
/>
|
|
/>
|
|
|
<BodyWrapper>
|
|
<BodyWrapper>
|
|
|
{(leftTabOptions?.length > 0 ||
|
|
{(leftTabOptions?.length > 0 ||
|
|
@@ -282,7 +285,8 @@ export const ExpandedJobChartFC: React.FC<{
|
|
|
renderTabContents={renderTabContents}
|
|
renderTabContents={renderTabContents}
|
|
|
isReadOnly={
|
|
isReadOnly={
|
|
|
hasPorterImageTemplate ||
|
|
hasPorterImageTemplate ||
|
|
|
- !isAuthorized("job", "", ["get", "update"])
|
|
|
|
|
|
|
+ !isAuthorized("job", "", ["get", "update"]) ||
|
|
|
|
|
+ disableForm
|
|
|
}
|
|
}
|
|
|
onSubmit={(formValues) =>
|
|
onSubmit={(formValues) =>
|
|
|
updateChart(processValuesToUpdateChart(formValues))
|
|
updateChart(processValuesToUpdateChart(formValues))
|
|
@@ -320,6 +324,7 @@ const ExpandedJobHeader: React.FC<{
|
|
|
refreshChart: () => Promise<void>;
|
|
refreshChart: () => Promise<void>;
|
|
|
upgradeChart: () => Promise<void>;
|
|
upgradeChart: () => Promise<void>;
|
|
|
loadChartWithSpecificRevision: (revision: number) => void;
|
|
loadChartWithSpecificRevision: (revision: number) => void;
|
|
|
|
|
+ setDisableForm: (disable: boolean) => void;
|
|
|
}> = ({
|
|
}> = ({
|
|
|
chart,
|
|
chart,
|
|
|
closeChart,
|
|
closeChart,
|
|
@@ -327,6 +332,7 @@ const ExpandedJobHeader: React.FC<{
|
|
|
refreshChart,
|
|
refreshChart,
|
|
|
upgradeChart,
|
|
upgradeChart,
|
|
|
loadChartWithSpecificRevision,
|
|
loadChartWithSpecificRevision,
|
|
|
|
|
+ setDisableForm,
|
|
|
}) => (
|
|
}) => (
|
|
|
<HeaderWrapper>
|
|
<HeaderWrapper>
|
|
|
<BackButton onClick={closeChart}>
|
|
<BackButton onClick={closeChart}>
|
|
@@ -349,8 +355,9 @@ const ExpandedJobHeader: React.FC<{
|
|
|
<RevisionSection
|
|
<RevisionSection
|
|
|
chart={chart}
|
|
chart={chart}
|
|
|
refreshChart={() => refreshChart()}
|
|
refreshChart={() => refreshChart()}
|
|
|
- setRevision={(chart) => {
|
|
|
|
|
|
|
+ setRevision={(chart, isCurrent) => {
|
|
|
loadChartWithSpecificRevision(chart?.version);
|
|
loadChartWithSpecificRevision(chart?.version);
|
|
|
|
|
+ setDisableForm(!isCurrent);
|
|
|
}}
|
|
}}
|
|
|
forceRefreshRevisions={false}
|
|
forceRefreshRevisions={false}
|
|
|
refreshRevisionsOff={() => {}}
|
|
refreshRevisionsOff={() => {}}
|