Skip to content

Commit bf3daff

Browse files
committed
Add: port dashboard of src to alas
1 parent 1a0487e commit bf3daff

25 files changed

Lines changed: 1388 additions & 664 deletions

assets/gui/css/alas-mobile.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,11 @@
5959
#pywebio-scope-waiting,
6060
#pywebio-scope-log {
6161
overflow-y: auto;
62+
}
63+
64+
[id^="pywebio-scope-dashboard-row-"] {
65+
display: flex;
66+
flex-grow: 1;
67+
min-width: 4rem;
68+
max-width: 50%;
6269
}

assets/gui/css/alas-pc.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
overflow-y: auto;
2727
}
2828

29+
#pywebio-scope-log-bar {
30+
display: flex;
31+
flex-direction: column;
32+
height: 11.4rem;
33+
}
34+
35+
#pywebio-scope-dashboard {
36+
flex: 1;
37+
}
38+
2939
#pywebio-scope-log-bar,
3040
#pywebio-scope-log,
3141
#pywebio-scope-daemon-overview #pywebio-scope-groups {

assets/gui/css/alas.css

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,24 +376,75 @@ pre.rich-traceback-code {
376376
#pywebio-scope-scheduler-bar,
377377
#pywebio-scope-log-bar,
378378
#pywebio-scope-log,
379+
#pywebio-scope-daemon-log-bar,
379380
#pywebio-scope-daemon-overview #pywebio-scope-groups {
380381
font-weight: 500;
381382
margin: 0.3125rem;
382383
padding: 0.625rem;
383384
}
384385

385386
#pywebio-scope-scheduler-bar,
386-
#pywebio-scope-log-bar {
387+
#pywebio-scope-log-title {
387388
display: flex;
388389
align-items: center;
389390
justify-content: space-between;
390391
}
391392

392-
#pywebio-scope-log-bar-btns {
393+
#pywebio-scope-log-title-btns {
393394
display: grid;
394395
grid-auto-flow: column;
395396
}
396397

398+
#pywebio-scope-dashboard {
399+
display: flex;
400+
align-content: space-between;
401+
justify-content: flex-start;
402+
flex-flow: row wrap;
403+
overflow: auto;
404+
margin-top: .5rem;
405+
}
406+
407+
#pywebio-scope-dashboard > i {
408+
flex-grow: 1;
409+
align-self: flex-end;
410+
width: 10rem;
411+
}
412+
413+
[id^="pywebio-scope-dashboard-row-"] {
414+
display: flex;
415+
flex-grow: 1;
416+
width: 10rem;
417+
}
418+
419+
.dashboard-icon {
420+
margin: .6rem .8rem 0 .6rem;
421+
width: .5rem;
422+
height: .5rem;
423+
border-radius: 50%;
424+
}
425+
426+
*[style*="--dashboard-value--"] {
427+
font-size: 1rem;
428+
font-weight: 500;
429+
overflow-wrap: break-word;
430+
}
431+
432+
*[style*="--dashboard-time--"] {
433+
font-size: 0.8rem;
434+
font-weight: 400;
435+
overflow-wrap: break-word;
436+
}
437+
438+
[id^="pywebio-scope-dashboard-row-"] p {
439+
margin-bottom: 0;
440+
}
441+
442+
[id^="pywebio-scope-dashboard-value-"] {
443+
display: flex;
444+
align-items: flex-end;
445+
height: 1.5rem;
446+
}
447+
397448
#pywebio-scope-log {
398449
line-height: 1.2;
399450
font-size: 0.85rem;

assets/gui/css/dark-alas.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ pre.rich-traceback-code {
139139
#pywebio-scope-running,
140140
#pywebio-scope-pending,
141141
#pywebio-scope-waiting,
142+
#pywebio-scope-daemon-log-bar,
142143
#pywebio-scope-daemon-overview #pywebio-scope-groups {
143144
background-color: #2f3136;
144145
border: 1px solid #21262d;
@@ -152,4 +153,8 @@ pre.rich-traceback-code {
152153
*[style*="--arg-help--"],
153154
[id^="pywebio-scope-group_"] > p + p {
154155
color: #adb5bd;
156+
}
157+
158+
*[style*="--dashboard-time--"] {
159+
color: #adb5bd;
155160
}

assets/gui/css/light-alas.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ pre.rich-traceback-code {
139139
#pywebio-scope-running,
140140
#pywebio-scope-pending,
141141
#pywebio-scope-waiting,
142+
#pywebio-scope-daemon-log-bar,
142143
#pywebio-scope-daemon-overview #pywebio-scope-groups {
143144
background-color: white;
144145
border: 1px solid lightgrey;
@@ -151,4 +152,8 @@ pre.rich-traceback-code {
151152
*[style*="--arg-help--"],
152153
[id^="pywebio-scope-group_"] > p + p {
153154
color: #777777;
155+
}
156+
157+
*[style*="--dashboard-time--"] {
158+
color: #777777;
154159
}

0 commit comments

Comments
 (0)