-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
884a575
commit 7ee2301
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
ontrack-web-core/components/framework/properties/stale.StalePropertyType/Form.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import {Form, Input, InputNumber, Select, Switch} from "antd"; | ||
import {prefixedFormName} from "@components/form/formUtils"; | ||
|
||
export default function PropertyForm({prefix}) { | ||
|
||
return ( | ||
<> | ||
<Form.Item | ||
label="Disabling after" | ||
extra="Number of days of inactivity after which the branch is disabled" | ||
name={prefixedFormName(prefix, 'disablingDuration')} | ||
> | ||
<InputNumber min={0}/> | ||
</Form.Item> | ||
<Form.Item | ||
label="Deleting after" | ||
extra="Number of days of inactivity after a branch has been disabled after which the branch is deleted. If 0, the branches are never deleted." | ||
name={prefixedFormName(prefix, 'deletingDuration')} | ||
> | ||
<InputNumber min={0}/> | ||
</Form.Item> | ||
<Form.Item | ||
label="Promotions to keep" | ||
extra="List of promotions to always keep. If a branch has at least one build having one of these promotions, the branch will never be disabled not deleted." | ||
name={prefixedFormName(prefix, 'promotionsToKeep')} | ||
> | ||
<Select mode="tags"/> | ||
</Form.Item> | ||
<Form.Item | ||
label="Includes" | ||
extra="Regular expression to identify branches which will never be disabled not deleted" | ||
name={prefixedFormName(prefix, 'includes')} | ||
> | ||
<Input/> | ||
</Form.Item> | ||
<Form.Item | ||
label="Excludes" | ||
extra="Can define a regular expression for exceptions to the includes rule" | ||
name={prefixedFormName(prefix, 'excludes')} | ||
> | ||
<Input/> | ||
</Form.Item> | ||
</> | ||
) | ||
} |