chore: clean up repo structure

- Add node_modules/, test-results/, e2e-report/, .omp/ to .gitignore
- Remove throwaway debug scripts (debug-pw*.js, debug-login-dom.js)
- Remove empty mock-server/ directory
- Untrack harness artifact (.omp/plans/)
- Add missing project files to git (e2e tests, Dockerfiles, tooling configs)
This commit is contained in:
2026-07-12 23:42:54 +05:30
parent eb04a2597d
commit c6c5a04aca
25 changed files with 1400 additions and 1458 deletions

View File

@@ -1,4 +1,3 @@
'use strict';
/* luci-app-zt-gateway - ZeroTier Exit Gateway switching UI
*
* Provides a Services -> ZeroTier Gateway page that lists all gateways from
@@ -8,12 +7,12 @@
* /usr/share/rpcd/ucode/zt-gateway.uc, which in turn invokes
* /usr/sbin/zt-gateway-switch for the actual system changes.
*/
import { view } from 'luci.view';
import { rpc } from 'luci.rpc';
import { ui } from 'luci.ui';
import { dom } from 'luci.dom';
import { Poll } from 'luci.poll';
'use strict';
'require view';
'require rpc';
'require ui';
'require dom';
'require poll';
const UBUS_NAMESPACE = 'zt-gateway';
@@ -65,7 +64,7 @@ return view.extend({
renderHealthDot(reachable, latencyMs) {
const cls = reachable ? 'zt-health-up' : 'zt-health-down';
const tip = reachable
? (latencyMs != null ? _('UP (%sms').format(latencyMs) : _('UP'))
? (latencyMs != null ? _('UP (%sms)').format(latencyMs) : _('UP'))
: _('DOWN');
return E('span', { class: 'zt-health ' + cls, title: tip }, '●');
},
@@ -79,7 +78,7 @@ return view.extend({
value: gw.region,
change: ev => this.onSelectRegion(ev.target.value),
checked: isSelected || null,
disabled: isActive
disabled: isActive || null
})),
E('td', { class: 'zt-region-cell' }, [
this.renderHealthDot(false, null),
@@ -207,7 +206,7 @@ return view.extend({
node.classList.toggle('zt-health-up', !!h.reachable);
node.classList.toggle('zt-health-down', !h.reachable);
node.title = h.reachable && h.latency_ms != null
? _('UP (%sms').format(h.latency_ms)
? _('UP (%sms)').format(h.latency_ms)
: (h.reachable ? _('UP') : _('DOWN'));
}
}
@@ -292,10 +291,9 @@ return view.extend({
const root = E('div', { id: 'zt-gateway-root' }, this.renderBody(data));
const self = this;
const poll = Poll.create('zt-gateway-drain', function() {
Poll.add(function() {
return self.refreshState();
}, 5);
poll.start();
return root;
},