|
84 | 84 | .controls button { width: 22px; height: 22px; border: 0; background-color: #FFF; line-height: 22px; padding: 0 5px; border-radius: var(--radius); margin-left: 2px; } |
85 | 85 | .controls button:first-child { margin-left: 0; } |
86 | 86 | .controls button:hover { background-color: #F0F0F0; } |
| 87 | + .ui-dark .controls button { background-color: transparent; } |
| 88 | + .ui-dark .controls button:hover { background-color: #303030; } |
87 | 89 |
|
88 | 90 | .colorize { animation: colorize 1.3s infinite alternate; } |
89 | 91 | .fdesigner { background: #F8F8F8; } |
|
156 | 158 | .flowsearchwindow .singleton { color: #5C1DC4; } |
157 | 159 | .flowsearchwindow .controls span { margin-left: 7px; cursor: pointer; } |
158 | 160 |
|
| 161 | + .ui-dark .flowsearchwindow { background-color: #222; } |
| 162 | + .ui-dark .flowsearchwindow .item { border-bottom-color: #404040; } |
| 163 | + .ui-dark .flowsearchwindow .item:hover { background-color: rgba(0,0,0,.03); } |
| 164 | + .ui-dark .flowsearchwindow .monospace { color: #777; background-color: rgba(0,0,0,.08); } |
| 165 | + .ui-dark .flowsearchwindow .name code { color: #999; } |
| 166 | + .ui-dark .flowsearchwindow .ishidden { color: #E73323; } |
| 167 | + .ui-dark .flowsearchwindow .singleton { color: #5C1DC4; } |
| 168 | + .ui-dark .flowsearchwindow .ishidden { color: #E73323; } |
| 169 | + .ui-dark .flowsearchwindow .ui-searchinput { border-bottom-color: #303030; } |
| 170 | + |
159 | 171 | .fsettings { background-color: #FFF; } |
160 | 172 | .fsettings > nav { padding: 0 15px 0; border-top: 1px solid #E0E0E0; background-color: #FFF; border-radius: 0 0 3px 3px; line-height: 65px; height: 65px; display: block; float: none; width: 100%; } |
161 | 173 | .fsettings > nav button { border: 0; margin: 15px 0 0; background-color: #F0F0F0; height: 34px; padding: 0 20px; color: #000; cursor: pointer; font-family: Arial; line-height: 34px; vertical-align: middle; outline: 0; font-size: 14px; text-decoration: none; transition: all 0.3s; float: left; width: 50%; } |
|
194 | 206 | .ui-dark .selection { border-color: #303030; background-color: #222; color: #FFF; } |
195 | 207 |
|
196 | 208 | .factivity { font-size: 10px; border-top: 1px solid #E0E0E0; padding: 4px 8px 6px; color: #999; } |
197 | | - .factivity .hellip > i:first-child { color: #B9261A; margin-right: 3px; } |
| 209 | + .factivity .hellip > i:first-child, .factivity_component i { color: #B9261A; margin-right: 3px; } |
198 | 210 | .factivity_bar { background-color: #F0F0F0; border-radius: var(--radius); margin-top: 1px; } |
199 | 211 | .factivity_bar > div { background-color: var(--color); border-radius: var(--radius); text-align: right; height: 4px; } |
| 212 | + .factivity_component { font-weight: bold; color: #666; } |
| 213 | + .ui-dark .factivity_component { color: #C0C0C0; } |
| 214 | + |
| 215 | + .factivities-label { padding: 8px 10px; font-weight: bold; border-bottom: 1px solid #E0E0E0; } |
| 216 | + .ui-dark .factivities-label { border-bottom-color: #404040; } |
| 217 | + .factivities-items { width: 380px; max-height: 250px; display: block; } |
| 218 | + .factivities-items .factivity { font-size: 12px; padding: 8px 10px; } |
| 219 | + .factivities-items .factivity:first-child { border-top: 0; } |
| 220 | + .factivities-items .factivity:hover { background-color: #F8F8F8; } |
| 221 | + .ui-dark .factivities-items .factivity:hover { background-color: #353535; } |
200 | 222 |
|
201 | 223 | .ui-dark .factivity { border-top-color: #404040; color: #999; } |
202 | 224 | .ui-dark .factivity .hellip > i:first-child { color: #ff5953; } |
203 | | - .ui-dark .factivity_bar { background-color: #303030; } |
| 225 | + .ui-dark .factivity_bar { background-color: #272727; } |
204 | 226 |
|
205 | 227 | @keyframes colorize { |
206 | 228 | 0% { color: #d7cd17; } |
|
231 | 253 | <ui-component name="LAZY filereader"></ui-component> |
232 | 254 | <ui-component name="LAZY filesaver"></ui-component> |
233 | 255 | <ui-component name="LAZY fileuploader"></ui-component> |
234 | | - <ui-component name="LAZY floatingbox"></ui-component> |
| 256 | + <ui-component name="LAZY floatingbox" config="zindex:150"></ui-component> |
| 257 | + <ui-component name="LAZY floatingpanel"></ui-component> |
235 | 258 | <ui-component name="LAZY icons" config="list:/icons-db.html"></ui-component> |
236 | 259 | <ui-component name="LAZY menu" config="style:2"></ui-component> |
237 | 260 | <ui-component name="LAZY message" config="button:@(OK)"></ui-component> |
|
259 | 282 | <ui-component name="title" path="?.head.name" config="plus:0;empty:---"></ui-component> |
260 | 283 | <ui-component name="console2" path="?.console" config="name:@(Console);datasource:?.logs;clear:?/resetlogs;autoshow:0;autoclose:0"></ui-component> |
261 | 284 |
|
| 285 | + <div class="floatingbox" data-id="activity" data-config="zindex:100"> |
| 286 | + <div class="factivities-label">@(Activities)</div> |
| 287 | + <ui-bind path="?.activities2" class="noscrollbar factivities-items" config="template:.factivity -> data-key;show:value && value.length"> |
| 288 | + <script type="text/html"> |
| 289 | + {{ foreach m in value }} |
| 290 | + <div class="factivity exec" data-exec="flow/find" data-id="{{ m.instance.id }}" data-key="{{ m.instance.id }}_{{ m.key }}_{{ m.value }}"> |
| 291 | + <div class="factivity_component"><i class="ti ti-circle-notch ti-spin"></i>{{ m.instance.Component.name }}</div> |
| 292 | + <div class="hellip">{{ m.name | raw }} ({{ m.value }}%)</div> |
| 293 | + <div class="factivity_bar"><div style="width:{{ m.value2 }}%"></div></div> |
| 294 | + </div> |
| 295 | + {{ end }} |
| 296 | + </script> |
| 297 | + </ui-bind> |
| 298 | + <ui-bind path="?.activities2" class="factivities-items center padding hidden help" config="hide:value && value.length"><i class="ti ti-exchange mr5"></i>@(No activities)</ui-bind> |
| 299 | + </div> |
| 300 | + |
262 | 301 | <ui-bind path="?.head.id" config="visible" class="invisible"> |
263 | 302 |
|
264 | 303 | <header class="fheader"> |
|
488 | 527 | .CLASS .installed section .readme { color: #FFF; } |
489 | 528 | .CLASS .search { height: 30px; } |
490 | 529 | .CLASS .search .ui-searchinput { border: 0; border-bottom: 1px solid #E0E0E0; padding-left: 12px; } |
| 530 | + .ui-dark .CLASS .ui-searchinput { border-color: #404040; } |
| 531 | + .ui-dark .CLASS section { border-color: #404040; background-color: #303030; } |
| 532 | + .ui-dark .CLASS .installed section { border-color: var(--color); background-color: #202020; } |
| 533 | + .ui-dark .CLASS .author { color: #777; } |
| 534 | + .ui-dark .CLASS .version { color: #777; } |
491 | 535 | </style> |
492 | 536 | <ui-component name="box" path="*form" config="if:CLASS;icon:ti ti-database;title:@(Download components);autofocus:true;reload:?/reload;scrollbar:0;width:1200" class="hidden CLASS" plugin="CLASS"> |
493 | 537 | <div> |
|
531 | 575 |
|
532 | 576 | <ui-component name="importer" path="*form" config="if:flowendpointform"> |
533 | 577 | <script type="text/plain"> |
| 578 | + <style> |
| 579 | + .CLASS .border { border: 1px solid #E0E0E0; } |
| 580 | + .ui-dark .CLASS .border { border-color: #404040; } |
| 581 | + </style> |
534 | 582 | <ui-component name="box" path="*form" config="if:CLASS;title:@(Link endpoint);icon:ti ti-network;autofocus:true;scrollbar:1;submit:?/submit;width:700" class="hidden CLASS" plugin="CLASS"> |
535 | 583 | <div class="padding"> |
536 | 584 |
|
|
570 | 618 | <hr /> |
571 | 619 |
|
572 | 620 | <div class="b fs12" style="margin-bottom:5px">@(Read me):</div> |
573 | | - <div style="height:200px;border:1px solid #E0E0E0"> |
| 621 | + <div style="height:200px" class="m border"> |
574 | 622 | <ui-component name="code" path="?.readme" config="parent:auto;monospace:1;type:markdown;linenumbers:0"></ui-component> |
575 | 623 | <div class="help">@(Markdown format)</div> |
576 | 624 | </div> |
|
596 | 644 | .CLASS .item .code { float: right; width: 120px; color: #E73323; } |
597 | 645 | .CLASS .item .name { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; padding: 0 10px 0 20px; } |
598 | 646 | .CLASS .item .name i { margin-right: 5px; } |
| 647 | + .ui-dark .CLASS .item:hover { background: #303030; } |
| 648 | + .ui-dark .CLASS .ui-searchinput { border-color: #404040; } |
| 649 | + .ui-dark .CLASS .item { border-bottom-color: #404040; } |
599 | 650 | </style> |
600 | 651 | <ui-component name="box" path="*form" config="if:CLASS;title:@(TMS sources);icon:ti ti-code-branch;autofocus:true;reload:?/reload;scrollbar:0;submit:?/submit;width:800" class="hidden CLASS" plugin="CLASS"> |
601 | 652 | <nav> |
|
1016 | 1067 | flow.toolbar.push({ id: '?/variables', icon: 'ti ti-variables', title: '@(Variables)' }); |
1017 | 1068 |
|
1018 | 1069 | flow.toolbar.push({ id: '?/logs', icon: 'ti ti-script', title: '@(Console)', class: 'errors' }); |
| 1070 | + flow.toolbar.push({ id: '?/activity', icon: 'ti ti-circle-notch', title: '@(Activities)', class: 'activities' }); |
1019 | 1071 | flow.toolbar.push({ id: '?/search', icon: 'ti ti-file-search', title: '@(Search in nodes)' }); |
1020 | 1072 | flow.toolbar.push({ id: '?/zoom', icon: 'ti ti-search-minus', title: '@(Zoom)' }); |
1021 | 1073 |
|
|
1043 | 1095 | flow.components = []; |
1044 | 1096 | flow.callbacks = {}; |
1045 | 1097 | flow.activities = {}; |
| 1098 | + flow.activities2 = []; |
1046 | 1099 |
|
1047 | 1100 | var Tactivity = Tangular.compile(`<div class="factivity" data-id="{{ key }}_{{ value }}"> |
1048 | 1101 | <div class="hellip"><i class="ti ti-circle-notch ti-spin"></i>{{ name | raw }} {{ if value != null }}({{ value }}%){{ fi }}</div> |
|
1137 | 1190 | // msg.value |
1138 | 1191 | if (!model.activities[msg.id]) |
1139 | 1192 | model.activities[msg.id] = {}; |
1140 | | - if (msg.name) |
1141 | | - model.activities[msg.id][msg.key] = Tactivity({ id: msg.id, key: msg.key, name: msg.name, value: msg.value, value2: msg.value == null ? null : Math.ceil(msg.value) }); |
1142 | | - else |
| 1193 | + if (msg.name) { |
| 1194 | + if (msg.value != null) |
| 1195 | + msg.value = Number(msg.value).round(1); |
| 1196 | + let obj = { id: msg.id, key: msg.key, name: msg.name, value: msg.value, value2: msg.value == null ? null : Math.ceil(msg.value) }; |
| 1197 | + obj.instance = model.data[msg.id]; |
| 1198 | + if (obj.instance) { |
| 1199 | + obj.html = Tactivity(obj); |
| 1200 | + model.activities[msg.id][msg.key] = obj; |
| 1201 | + } else |
| 1202 | + delete model.activities[msg.id]; |
| 1203 | + } else |
1143 | 1204 | delete model.activities[msg.id][msg.key]; |
1144 | 1205 | exports.refresh_activity(msg.id); |
| 1206 | + exports.refresh_activities(); |
1145 | 1207 | break; |
1146 | 1208 |
|
1147 | 1209 | case 'flow/activities': |
|
1152 | 1214 | let tmp = msg.data[key]; |
1153 | 1215 | for (let key2 in tmp) { |
1154 | 1216 | let obj = tmp[key2]; |
1155 | | - if (obj.name) |
1156 | | - model.activities[key][key2] = Tactivity({ id: key, key: key2, name: obj.name, value: obj.value, value2: obj.value == null ? null : Math.ceil(obj.value) }); |
1157 | | - else |
| 1217 | + if (obj.name) { |
| 1218 | + if (obj.value != null) |
| 1219 | + obj.value = Number(obj.value).round(1); |
| 1220 | + obj = { id: key, key: key2, name: obj.name, value: obj.value, value2: obj.value == null ? null : Math.ceil(obj.value) }; |
| 1221 | + obj.instance = model.data[key]; |
| 1222 | + if (obj.instance) { |
| 1223 | + obj.html = Tactivity(obj); |
| 1224 | + model.activities[key][key2] = obj; |
| 1225 | + } else |
| 1226 | + delete model.activities[key]; |
| 1227 | + } else |
1158 | 1228 | delete model.activities[key][key2]; |
1159 | 1229 | } |
1160 | 1230 |
|
1161 | 1231 | exports.refresh_activity(key); |
1162 | 1232 | } |
| 1233 | + exports.refresh_activities(); |
1163 | 1234 | break; |
1164 | 1235 |
|
1165 | 1236 | case 'flow/variables': |
|
1393 | 1464 | let container = $('#factivities_' + id); |
1394 | 1465 | let builder = []; |
1395 | 1466 | for (let key in flow.activities[id]) |
1396 | | - builder.push(flow.activities[id][key]); |
1397 | | - DIFFDOM(container, '.factivity', builder.join('\n'), 'data-id'); |
| 1467 | + builder.push(flow.activities[id][key].html); |
| 1468 | + try { |
| 1469 | + DIFFDOM(container, '.factivity', builder.join('\n'), 'data-id'); |
| 1470 | + } catch {} |
| 1471 | + }; |
| 1472 | + |
| 1473 | + exports.refresh_activities = function() { |
| 1474 | + let builder = []; |
| 1475 | + for (let key in flow.activities) { |
| 1476 | + for (let key2 in flow.activities[key]) { |
| 1477 | + let obj = flow.activities[key][key2]; |
| 1478 | + if (obj.value != null) |
| 1479 | + builder.push(obj); |
| 1480 | + } |
| 1481 | + } |
| 1482 | + let is = builder.length > 0; |
| 1483 | + $('.activities i').tclass('ti-spin', is); |
| 1484 | + exports.set('activities2', builder); |
1398 | 1485 | }; |
1399 | 1486 |
|
1400 | 1487 | exports.log = function(type, body) { |
|
2447 | 2534 | location.href = '?logout=1'; |
2448 | 2535 | }; |
2449 | 2536 |
|
| 2537 | + exports.activity = function(el) { |
| 2538 | + let opt = {}; |
| 2539 | + opt.element = el; |
| 2540 | + opt.id = 'activity'; |
| 2541 | + opt.offsetX = 5; |
| 2542 | + opt.offsetY = 30; |
| 2543 | + SETTER('floatingbox/show', opt); |
| 2544 | + }; |
| 2545 | + |
2450 | 2546 | exports.logs = function() { |
2451 | 2547 | exports.toggle('console'); |
2452 | 2548 | }; |
|
3566 | 3662 | }; |
3567 | 3663 |
|
3568 | 3664 | Thelpers.translate = function(text) { |
3569 | | - return TRANSLATE(text); |
| 3665 | + return text ? TRANSLATE(text) : text; |
3570 | 3666 | }; |
3571 | 3667 |
|
3572 | 3668 | FUNC.trigger = function(el, data) { |
|
0 commit comments