New: Index priority

This commit is contained in:
Dtaggart 2020-09-10 18:04:53 -04:00 committed by Qstick
parent c913194fdf
commit 2655430c98
11 changed files with 93 additions and 4 deletions

View file

@ -42,7 +42,8 @@ function EditIndexerModalContent(props) {
enableInteractiveSearch,
supportsRss,
supportsSearch,
fields
fields,
priority
} = item;
return (
@ -131,7 +132,21 @@ function EditIndexerModalContent(props) {
);
})
}
<FormGroup
advancedSettings={advancedSettings}
isAdvanced={true}>
<FormLabel>Indexer Priority</FormLabel>
<FormInputGroup
type={inputTypes.NUMBER}
name="priority"
helpText="Indexer Priority from 1 (Highest) to 50 (Lowest). Default: 25."
min={1}
max={50}
{...priority}
onChange={onInputChange}
/>
</FormGroup>
</Form>
}
</ModalBody>

View file

@ -68,7 +68,9 @@ class Indexer extends Component {
enableAutomaticSearch,
enableInteractiveSearch,
supportsRss,
supportsSearch
supportsSearch,
priority,
showPriority
} = this.props;
return (
@ -112,7 +114,13 @@ class Indexer extends Component {
Interactive Search
</Label>
}
{
showPriority &&
<Label kind={kinds.DEFAULT}>
Priority: {priority}
</Label>
}
{
!enableRss && !enableAutomaticSearch && !enableInteractiveSearch &&
<Label

View file

@ -62,6 +62,8 @@ class Indexers extends Component {
isAddIndexerModalOpen,
isEditIndexerModalOpen
} = this.state;
const showPriority = items.some((index) => index.priority != 25);
return (
<FieldSet legend="Indexers">
@ -76,6 +78,7 @@ class Indexers extends Component {
<Indexer
key={item.id}
{...item}
showPriority={showPriority}
onCloneIndexerPress={this.onCloneIndexerPress}
onConfirmDeleteIndexer={onConfirmDeleteIndexer}
/>