|
@@ -16,7 +16,6 @@ class RebuildIndexControls extends React.Component {
|
|
|
this.state = {
|
|
this.state = {
|
|
|
total: 0,
|
|
total: 0,
|
|
|
current: 0,
|
|
current: 0,
|
|
|
- skip: 0,
|
|
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -32,7 +31,6 @@ class RebuildIndexControls extends React.Component {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
total: data.totalCount,
|
|
total: data.totalCount,
|
|
|
current: data.count,
|
|
current: data.count,
|
|
|
- skip: data.skipped,
|
|
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -40,7 +38,6 @@ class RebuildIndexControls extends React.Component {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
total: data.totalCount,
|
|
total: data.totalCount,
|
|
|
current: data.count,
|
|
current: data.count,
|
|
|
- skip: data.skipped,
|
|
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -51,7 +48,7 @@ class RebuildIndexControls extends React.Component {
|
|
|
isRebuildingProcessing, isRebuildingCompleted,
|
|
isRebuildingProcessing, isRebuildingCompleted,
|
|
|
} = this.props;
|
|
} = this.props;
|
|
|
const {
|
|
const {
|
|
|
- total, current, skip,
|
|
|
|
|
|
|
+ total, current,
|
|
|
} = this.state;
|
|
} = this.state;
|
|
|
const showProgressBar = isRebuildingProcessing || isRebuildingCompleted;
|
|
const showProgressBar = isRebuildingProcessing || isRebuildingCompleted;
|
|
|
|
|
|
|
@@ -59,23 +56,13 @@ class RebuildIndexControls extends React.Component {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function getCompletedLabel() {
|
|
|
|
|
- const completedLabel = skip === 0 ? 'Completed' : `Done (${skip} skips)`;
|
|
|
|
|
- return completedLabel;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function getSkipLabel() {
|
|
|
|
|
- return `Processing.. (${skip} skips)`;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- const header = isRebuildingCompleted ? getCompletedLabel() : getSkipLabel();
|
|
|
|
|
|
|
+ const header = isRebuildingCompleted ? 'Completed' : 'Processing..';
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<div className="mb-3">
|
|
<div className="mb-3">
|
|
|
<LabeledProgressBar
|
|
<LabeledProgressBar
|
|
|
header={header}
|
|
header={header}
|
|
|
currentCount={current}
|
|
currentCount={current}
|
|
|
- errorsCount={skip}
|
|
|
|
|
totalCount={total}
|
|
totalCount={total}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|