mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Add live colors to corpu sstatus
This commit is contained in:
parent
f2024be050
commit
d04f90dee8
@ -79,3 +79,8 @@ class CorpusList extends List {
|
||||
);
|
||||
}
|
||||
}
|
||||
CorpusList.STATUS_COLORS = {"unprepared": "grey",
|
||||
"preparable": "orange",
|
||||
"preparing": "yellow",
|
||||
"prepared": "green",
|
||||
"default": "red"};
|
||||
|
@ -113,7 +113,11 @@ JobList.SERVICE_COLORS = {"nlp": "blue",
|
||||
JobList.SERVICE_ICONS = {"nlp": "format_textdirection_l_to_r",
|
||||
"ocr": "find_in_page",
|
||||
"default": "help"};
|
||||
JobList.STATUS_COLORS = {"pending": "amber",
|
||||
"running": "indigo",
|
||||
"complete": "teal",
|
||||
JobList.STATUS_COLORS = {"submitted": "blue",
|
||||
"preparing": "light-blue",
|
||||
"pending": "orange",
|
||||
"running": "amber",
|
||||
"complete": "green",
|
||||
"stopping": "orange",
|
||||
"removing": "deep-orange",
|
||||
"default": "red"};
|
||||
|
@ -1,10 +1,19 @@
|
||||
{% extends "limited_width.html.j2" %}
|
||||
|
||||
{% block page_content %}
|
||||
<script>
|
||||
setStatus(status) {
|
||||
var statusElement;
|
||||
statusElement = document.getElementById("status");
|
||||
statusElement.classList.remove(...Object.values(CorpusList.STATUS_COLORS));
|
||||
statusElement.classList.add(CorpusList.STATUS_COLORS[status] || CorpusList.STATUS_COLORS['default']);
|
||||
statusElement.innerText = status;
|
||||
}
|
||||
</script>
|
||||
<div class="col s12 m4">
|
||||
<h3 id="title">{{ corpus.title }}</h3>
|
||||
<p id="description">{{ corpus.description }}</p>
|
||||
<a class="waves-effect waves-light btn">{{ corpus.status }}</a>
|
||||
<a class="waves-effect waves-light btn" id="status">{{ corpus.status }}</a>
|
||||
</div>
|
||||
|
||||
<div class="col s12 m8">
|
||||
|
Loading…
Reference in New Issue
Block a user