add notification to warn of model training closes #79

This commit is contained in:
Andre Henriques 2024-04-16 14:49:08 +01:00
parent 3ad07e6ce5
commit 026932cfab
2 changed files with 98 additions and 67 deletions

View File

@ -128,6 +128,12 @@
<KeepPageSize /> <KeepPageSize />
<main> <main>
{#if [4, 7].includes(_model?.status ?? 0)}
<div class="big-msg warning">The Model is currently training</div>
{/if}
{#if [-4, -7].includes(_model?.status ?? 0)}
<div class="big-msg danger">The Model is failed to train</div>
{/if}
<Tabs active="model" let:isActive nobox> <Tabs active="model" let:isActive nobox>
<div slot="buttons" let:setActive let:isActive> <div slot="buttons" let:setActive let:isActive>
<button <button

View File

@ -1,148 +1,173 @@
*{box-sizing: border-box;font-family: 'Roboto', sans-serif;} * {
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
:root { :root {
--nav-bar-size: 54px; --nav-bar-size: 54px;
--white: #ffffff; --white: #ffffff;
--grey: #dbdcde; --grey: #dbdcde;
--light-grey: #fafafa; --light-grey: #fafafa;
--main: #fca311; --main: #fca311;
--sec: #14213d;
--black: #000000; --warning: #fca311;
--red: 212, 38, 38; --warning-transparent: #fca31144;
--green: 92, 199, 30;
--danger: #ff8282;
--danger-transparent: #ff828244;
--sec: #14213d;
--black: #000000;
--red: 212, 38, 38;
--green: 92, 199, 30;
} }
body { body {
margin: 0px; margin: 0px;
} }
.button, .button,
button { button {
border-radius: 10px; border-radius: 10px;
text-align: center; text-align: center;
padding: 3px 6px; padding: 3px 6px;
border: none; border: none;
box-shadow: 0 2px 8px 1px #66666655; box-shadow: 0 2px 8px 1px #66666655;
background: var(--main); background: var(--main);
color: var(--black); color: var(--black);
&.padded { &.padded {
padding: 10px; padding: 10px;
} }
&.danger { &.danger {
background: rgb(var(--red)); background: rgb(var(--red));
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
} }
button.expander { button.expander {
background: none; background: none;
width: 100%; width: 100%;
box-shadow: none; box-shadow: none;
border-bottom: 1px #ccc; border-bottom: 1px #ccc;
text-align: left; text-align: left;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }
button.expander::after { button.expander::after {
content: '▼' content: '▼';
} }
a.button { a.button {
text-decoration: none; text-decoration: none;
} }
.flex { .flex {
display: flex; display: flex;
} }
.justify-center { .justify-center {
justify-content: center; justify-content: center;
} }
.justify-start { .justify-start {
justify-content: start; justify-content: start;
} }
.justify-end { .justify-end {
justify-content: end; justify-content: end;
} }
.align-center { .align-center {
align-items: center; align-items: center;
} }
.grow-1 { .grow-1 {
flex-grow: 1; flex-grow: 1;
} }
.w100 { .w100 {
width: 100%; width: 100%;
display: block; display: block;
} }
.text-center { .text-center {
text-align: center; text-align: center;
} }
.simple-link { .simple-link {
color: var(--sec); color: var(--sec);
text-decoration: none; text-decoration: none;
} }
.bold { .bold {
font-weight: bold; font-weight: bold;
} }
.bigger { .bigger {
font-size: 1.1rem; font-size: 1.1rem;
} }
.danger { .danger {
color: red; color: red;
} }
.card { .card {
box-shadow: 0 2px 5px 1px #66666655; box-shadow: 0 2px 5px 1px #66666655;
padding: 20px; padding: 20px;
border-radius: 10px; border-radius: 10px;
margin: 20px 0; margin: 20px 0;
} }
.card h3 { .card h3 {
margin-top: 0; margin-top: 0;
} }
.table { .table {
width: 100%; width: 100%;
box-shadow: 0 2px 8px 1px #66666622; box-shadow: 0 2px 8px 1px #66666622;
border-radius: 10px; border-radius: 10px;
border-collapse: collapse; border-collapse: collapse;
overflow: hidden; overflow: hidden;
} }
.table thead { .table thead {
background: #60606022; background: #60606022;
} }
.table tr td, .table tr td,
.table tr th { .table tr th {
border-left: 1px solid #22222244; border-left: 1px solid #22222244;
padding: 15px; padding: 15px;
} }
.table tr td:first-child, .table tr td:first-child,
.table tr th:first-child { .table tr th:first-child {
border-left: none; border-left: none;
} }
.table tr td button, .table tr td button,
.table tr td .button { .table tr td .button {
padding: 5px 10px; padding: 5px 10px;
box-shadow: 0 2px 5px 1px #66666655; box-shadow: 0 2px 5px 1px #66666655;
}
.big-msg {
padding: 10px;
margin: 10px 0;
border-radius: 10px;
border: 1px solid black;
}
.big-msg.warning {
background-color: var(--warning-transparent);
border: 1px solid var(--warning);
}
.big-msg.danger {
background-color: var(--danger-transparent);
border: 1px solid var(--danger);
} }