New: Index priority

This commit is contained in:
Dtaggart
2020-09-10 18:04:53 -04:00
committed by ta264
parent 2f8ac793ff
commit 916acdb81a
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

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

View File

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