diff --git a/dicoogle/src/main/resources/webapp/js/components/indexer/IndexStatusView.js b/dicoogle/src/main/resources/webapp/js/components/indexer/IndexStatusView.js
index 1063576d7..0e210dc22 100644
--- a/dicoogle/src/main/resources/webapp/js/components/indexer/IndexStatusView.js
+++ b/dicoogle/src/main/resources/webapp/js/components/indexer/IndexStatusView.js
@@ -11,6 +11,8 @@ import Autosuggest from "react-autosuggest";
import Select from "react-select";
import PluginStore from "../../stores/pluginStore";
+const DEFAULT_MAX_TASKS_VISIBLE = 200;
+
var refreshIntervalId;
const IndexStatusView = createReactClass({
getInitialState: function() {
@@ -78,13 +80,27 @@ const IndexStatusView = createReactClass({
}
let items;
+ let saturated = false;
if (this.state.data.tasks.length === 0) {
items =
No tasks
;
} else {
items = this.state.data.tasks.sort((item1, item2) => {
// Sorts tasks from latest to first
- return new Date(item2.taskTimeCreated).getTime() - new Date(item1.taskTimeCreated).getTime();
- }).map(item => (
+ let c = new Date(item2.taskTimeCreated).getTime() - new Date(item1.taskTimeCreated).getTime();
+ if (c !== 0) {
+ return c;
+ }
+ // use task uid as second criterion
+ return item2.taskUid.localeCompare(item1.taskUid);
+ })
+
+ // restrain number of tasks visible to prevent memory saturation
+ if (items.length > DEFAULT_MAX_TASKS_VISIBLE) {
+ items = items.slice(0, DEFAULT_MAX_TASKS_VISIBLE);
+ saturated = true;
+ }
+
+ items = items.map(item => (
(showing {DEFAULT_MAX_TASKS_VISIBLE} of {this.state.data.tasks.length} tasks)
+ } else {
+ taskCountNote = (showing {this.state.data.tasks.length} tasks)
+ }
+
let providersList = this.state.providers.map(item => ({
value: item,
label: item
@@ -165,6 +188,7 @@ const IndexStatusView = createReactClass({
? "No tasks currently running"
: "Indexing Status (" + this.state.data.count + " running)"}
+ {taskCountNote}
{items}
diff --git a/dicoogle/src/main/resources/webapp/js/components/indexer/TaskStatus.jsx b/dicoogle/src/main/resources/webapp/js/components/indexer/TaskStatus.jsx
index 691ed1b90..119e716f6 100644
--- a/dicoogle/src/main/resources/webapp/js/components/indexer/TaskStatus.jsx
+++ b/dicoogle/src/main/resources/webapp/js/components/indexer/TaskStatus.jsx
@@ -56,7 +56,7 @@ class TaskStatus extends React.Component {
}
return (
-
+
@@ -77,34 +77,34 @@ class TaskStatus extends React.Component {
-
-
+
+ -
Uid: {item.taskUid}
-
-
+
+ -
Name: {item.taskName}
-
-
+
+ -
Time created: {dateTimeToHumanReadable(timeCreated)}
-
-
+
+
-
{typeof item.elapsedTime === "number" && (
-
+
Elapsed Time: {toHumanReadable(item.elapsedTime)}
-
+
)}
{typeof item.nIndexed === "number" && (
-
- Indexed: {item.nIndexed}{" "}
-
+
+ Indexed: {item.nIndexed}
+
)}
{typeof item.nErrors === "number" && (
-
- Errors: {item.nErrors}{" "}
-
+
+ Errors: {item.nErrors}
+
)}
-
-
+
+
);
}
diff --git a/dicoogle/src/main/resources/webapp/sass/modules/_management.scss b/dicoogle/src/main/resources/webapp/sass/modules/_management.scss
index 76229b981..2bec8944d 100644
--- a/dicoogle/src/main/resources/webapp/sass/modules/_management.scss
+++ b/dicoogle/src/main/resources/webapp/sass/modules/_management.scss
@@ -40,6 +40,20 @@
background: $main_color;
}
+.task-status {
+ ul,li {
+ list-style-type: none;
+ padding-left: 0;
+ margin-bottom: 0.4em;
+ }
+}
+
+.task-status-complete {
+ display: flex;
+ flex-direction: row;
+ gap: 3em;
+}
+
.list-group-item-management {
border-color: $hover_color;
border-right-color: white;