aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2024-10-10 11:01:10 +0200
committersonartech <sonartech@sonarsource.com>2024-10-10 20:02:44 +0000
commitb0c02956aa84f3e3f752aa42054e8a4601168b6b (patch)
treec4a6a6b5d9b698840f325f57fd49b18a80333f69 /server
parent91643f3413beef16ac5a91f41ae59757dfcc225b (diff)
downloadsonarqube-b0c02956aa84f3e3f752aa42054e8a4601168b6b.tar.gz
sonarqube-b0c02956aa84f3e3f752aa42054e8a4601168b6b.zip
SONAR-23137 Remove success status from new code definition days input
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx1
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx1
-rw-r--r--server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx3
-rw-r--r--server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx3
5 files changed, 0 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx
index 31360afa2ad..301ede63c7f 100644
--- a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx
+++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx
@@ -185,7 +185,6 @@ export default class BranchNewCodeDefinitionSettingModal extends React.PureCompo
/>
<NewCodeDefinitionDaysOption
days={days}
- isChanged={isChanged}
isValid={isValid}
onChangeDays={this.handleSelectDays}
onSelect={this.handleSelectSetting}
diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx
index 23d3d156c94..6e6d6252f41 100644
--- a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx
+++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx
@@ -139,7 +139,6 @@ export default function ProjectNewCodeDefinitionSelector(
}
days={days}
disabled={!overrideGlobalNewCodeDefinition}
- isChanged={isChanged}
isValid={isValid}
onChangeDays={props.onSelectDays}
onSelect={props.onSelectSetting}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx b/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx
index 6810c2a1263..ddd07fb4086 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/NewCodeDefinition.tsx
@@ -138,7 +138,6 @@ export default function NewCodeDefinition() {
previousNonCompliantValue={newCodeDefinition?.previousNonCompliantValue}
projectKey={newCodeDefinition?.projectKey}
updatedAt={newCodeDefinition?.updatedAt}
- isChanged={isFormTouched}
isValid={isValid}
onChangeDays={setNumberOfDays}
onSelect={setSelectedNewCodeDefinitionType}
diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx
index f49479708df..4a4629cc763 100644
--- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx
+++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx
@@ -46,7 +46,6 @@ export interface Props {
currentDaysValue?: string;
days: string;
disabled?: boolean;
- isChanged: boolean;
isValid: boolean;
onChangeDays: (value: string) => void;
onSelect: (selection: NewCodeDefinitionType) => void;
@@ -66,7 +65,6 @@ export default function NewCodeDefinitionDaysOption(props: Props) {
projectKey,
updatedAt,
disabled,
- isChanged,
isValid,
onChangeDays,
onSelect,
@@ -133,7 +131,6 @@ export default function NewCodeDefinitionDaysOption(props: Props) {
<InputField
id="baseline_number_of_days"
isInvalid={!isValid}
- isValid={isChanged && isValid}
max={NUMBER_OF_DAYS_MAX_VALUE}
min={NUMBER_OF_DAYS_MIN_VALUE}
onChange={(e) => onChangeDays(e.currentTarget.value)}
diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx
index 535803665c5..bf09cda52eb 100644
--- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx
+++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx
@@ -54,7 +54,6 @@ export default function NewCodeDefinitionSelector(props: Props) {
const [globalNcd, setGlobalNcd] = React.useState<NewCodeDefinition | null>(null);
const [selectedNcdType, setSelectedNcdType] = React.useState<NewCodeDefinitionType | null>(null);
const [days, setDays] = React.useState<string>('');
- const [isChanged, setIsChanged] = React.useState<boolean>(false);
React.useEffect(() => {
const numberOfDays = getNumberOfDaysDefaultValue(globalNcd);
@@ -75,7 +74,6 @@ export default function NewCodeDefinitionSelector(props: Props) {
(newNcdType: NewCodeDefinitionType) => {
if (newNcdType && newNcdType !== selectedNcdType) {
setSelectedNcdType(newNcdType);
- setIsChanged(true);
}
},
[selectedNcdType],
@@ -157,7 +155,6 @@ export default function NewCodeDefinitionSelector(props: Props) {
disabled={Boolean(
!selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited,
)}
- isChanged={isChanged}
isValid={isCompliant}
onChangeDays={setDays}
onSelect={handleNcdChanged}