aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/src/components/Search/Detail/SearchDetail.js4
-rw-r--r--src/web/src/components/Search/Detail/SearchDetailHeader.js4
-rw-r--r--src/web/src/components/Search/Response.js2
-rw-r--r--src/web/src/components/Search/Searches.js3
4 files changed, 8 insertions, 5 deletions
diff --git a/src/web/src/components/Search/Detail/SearchDetail.js b/src/web/src/components/Search/Detail/SearchDetail.js
index 880d5cd0..9c66d4e0 100644
--- a/src/web/src/components/Search/Detail/SearchDetail.js
+++ b/src/web/src/components/Search/Detail/SearchDetail.js
@@ -21,7 +21,7 @@ const sortDropdownOptions = [
{ key: 'queueLength', text: 'Queue Depth (Least to Most)', value: 'queueLength' }
];
-const SearchDetail = ({ search, creating, stopping, removing, onCreate, onStop, onRemove }) => {
+const SearchDetail = ({ search, creating, stopping, removing, disabled, onCreate, onStop, onRemove }) => {
const { id, state, isComplete, fileCount, lockedFileCount, responseCount } = search;
const [loading, setLoading] = useState(false);
@@ -132,6 +132,7 @@ const SearchDetail = ({ search, creating, stopping, removing, onCreate, onStop,
removing={removing}
stopping={stopping}
creating={creating}
+ disabled={disabled}
search={search}
onCreate={create}
onStop={onStop}
@@ -195,6 +196,7 @@ const SearchDetail = ({ search, creating, stopping, removing, onCreate, onStop,
<Response
key={i}
response={r}
+ disabled={disabled}
onHide={() => setHiddenResults([...hiddenResults, r.username])}
isInitiallyFolded={foldResults}
/>
diff --git a/src/web/src/components/Search/Detail/SearchDetailHeader.js b/src/web/src/components/Search/Detail/SearchDetailHeader.js
index d31f8a49..8eaf111c 100644
--- a/src/web/src/components/Search/Detail/SearchDetailHeader.js
+++ b/src/web/src/components/Search/Detail/SearchDetailHeader.js
@@ -9,7 +9,7 @@ import {
} from 'semantic-ui-react';
import SearchStatusIcon from '../SearchStatusIcon';
-const SearchDetailHeader = ({ search, loading, loaded, creating, removing, stopping, onCreate, onStop, onRemove }) => {
+const SearchDetailHeader = ({ search, loading, loaded, creating, removing, stopping, disabled, onCreate, onStop, onRemove }) => {
const isSmallScreen = useMediaQuery({ query: '(max-width: 899px)' });
const isTinyScreen = useMediaQuery({ query: '(max-width: 684px)'});
@@ -26,7 +26,7 @@ const SearchDetailHeader = ({ search, loading, loaded, creating, removing, stopp
const RefreshButton = () => loaded &&
<Button
- disabled={working}
+ disabled={disabled || working}
icon={isSmallScreen && !isTinyScreen}
onClick={() => onCreate({ search: searchText, navigate: true })}
loading={creating}
diff --git a/src/web/src/components/Search/Response.js b/src/web/src/components/Search/Response.js
index 7ffb70d4..4e389288 100644
--- a/src/web/src/components/Search/Response.js
+++ b/src/web/src/components/Search/Response.js
@@ -121,7 +121,7 @@ class Response extends Component {
}}
labelPosition='right'
onClick={() => this.download(response.username, selectedFiles)}
- disabled={downloadRequest === 'inProgress'}
+ disabled={this.props.disabled || downloadRequest === 'inProgress'}
/>
{downloadRequest === 'inProgress' && <Icon loading name='circle notch' size='large'/>}
{downloadRequest === 'complete' && <Icon name='checkmark' color='green' size='large'/>}
diff --git a/src/web/src/components/Search/Searches.js b/src/web/src/components/Search/Searches.js
index 9b0c3dd4..9cc717ad 100644
--- a/src/web/src/components/Search/Searches.js
+++ b/src/web/src/components/Search/Searches.js
@@ -170,6 +170,7 @@ const Searches = ({ server }) => {
creating={creating}
stopping={stopping}
removing={removing}
+ disabled={!server.isConnected}
onCreate={create}
onStop={stop}
onRemove={remove}
@@ -186,7 +187,7 @@ const Searches = ({ server }) => {
<>
<Segment className='search-segment' raised>
<Input
- input={<input placeholder="Search phrase" type="search" data-lpignore="true"></input>}
+ input={<input placeholder={server.isConnected ? 'Search phrase' : 'Connect to server to perform a search'} type="search" data-lpignore="true"></input>}
size='big'
ref={inputRef}
loading={creating}