@ntlab/sipd-tu-bridge-ui 1.7.4 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/assets/ui.png +0 -0
- package/package.json +1 -1
- package/views/ui/queue.ejs +5 -1
- package/views/ui/util.ejs +14 -6
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
# SIPD Penatausahaan Bridge Web Interface
|
|
2
2
|
|
|
3
|
-
An Express app as user interface of [SIPD Penatausahaan Bridge](https://github.com/tohenk/node-sipd-tu-bridge).
|
|
3
|
+
An Express app as user interface of [SIPD Penatausahaan Bridge](https://github.com/tohenk/node-sipd-tu-bridge).
|
|
4
|
+
|
|
5
|
+

|
package/assets/ui.png
ADDED
|
Binary file
|
package/package.json
CHANGED
package/views/ui/queue.ejs
CHANGED
|
@@ -31,7 +31,11 @@ $.theQueue = $.loader($('div[data-tab="queue"] table'), {
|
|
|
31
31
|
counter.addClass('hidden');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
$('[data-status
|
|
34
|
+
$('[data-status]').each(function() {
|
|
35
|
+
if ($(this).data('status') !== 'processing') {
|
|
36
|
+
$(this).find('[data-op="delete"]').hide();
|
|
37
|
+
}
|
|
38
|
+
});
|
|
35
39
|
$('a.queue-clicker').on('click', function(e) {
|
|
36
40
|
e.preventDefault();
|
|
37
41
|
self.handle($(this));
|
package/views/ui/util.ejs
CHANGED
|
@@ -29,12 +29,20 @@ $.uiRefresh = function() {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
$.addLog = function(el, message) {
|
|
33
|
-
message
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
$.addLog = function(el, message, eol = '\\n') {
|
|
33
|
+
if (message) {
|
|
34
|
+
let lines = 0;
|
|
35
|
+
for (let msg of Array.isArray(message) ? message : message.split(eol)) {
|
|
36
|
+
msg += eol;
|
|
37
|
+
if (el.text().substr(-msg.length) !== msg) {
|
|
38
|
+
el.append(document.createTextNode(msg));
|
|
39
|
+
lines++;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (lines) {
|
|
43
|
+
el.scrollTop(el[0].scrollHeight - el.height());
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
38
46
|
}
|
|
39
47
|
return false;
|
|
40
48
|
}
|