Added vignettes for machine states (back part to do)
This commit is contained in:
parent
c1339a1657
commit
4e017aeb2f
|
@ -39,6 +39,10 @@
|
||||||
|
|
||||||
return $answer->get('machines');
|
return $answer->get('machines');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
$twig->addFunction(new \Twig_Function('f_getstate', function(){
|
||||||
|
return 'detached';
|
||||||
|
}));
|
||||||
|
|
||||||
$twig->addFunction(new \Twig_Function('f_clusters', function($id_machine){
|
$twig->addFunction(new \Twig_Function('f_clusters', function($id_machine){
|
||||||
$request = new Request('machineDefault/getClusters', [
|
$request = new Request('machineDefault/getClusters', [
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{% for machine in f_machines() %}
|
{% for machine in f_machines() %}
|
||||||
<article class='inline-box' id='{{ machine.id_machine }}'>
|
<article class='inline-box' id='{{ machine.id_machine }}'>
|
||||||
|
|
||||||
|
<span class='state' data-state='{{ f_getstate(machine.id_machine) }}'></span>
|
||||||
<span class='title' style='color: {{ p_theme }}'>{{ machine.name }} <span>#{{ machine.name }}</span></span>
|
<span class='title' style='color: {{ p_theme }}'>{{ machine.name }} <span>#{{ machine.name }}</span></span>
|
||||||
<span class='link_remove' data-machine='{{ machine.id_machine }}'>{{ p_icon.remove | raw }}</span>
|
<span class='link_remove' data-machine='{{ machine.id_machine }}'>{{ p_icon.remove | raw }}</span>
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,27 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (0) Etat des machines */
|
||||||
|
.state{
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
width: .7em;
|
||||||
|
height: .7em;
|
||||||
|
|
||||||
|
margin-right: .3em;
|
||||||
|
|
||||||
|
border-radius: 50% / 50%;
|
||||||
|
|
||||||
|
background-color: #ddd;
|
||||||
|
|
||||||
|
&[data-state='stop']{ background-color: #ddd; }
|
||||||
|
&[data-state='start']{ background-color: #22E07B; }
|
||||||
|
&[data-state='signaled']{ background-color: #3897D6; }
|
||||||
|
&[data-state='locked']{ background-color: #EA460A; }
|
||||||
|
&[data-state='detached']{ background-color: #AB1EE2; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* (1) Titre de l'element */
|
/* (1) Titre de l'element */
|
||||||
.title{
|
.title{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue