Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions public/css/aurora.css
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ a{color:inherit}
/* "Collapse all" toolbar toggle */
#aurora-collapse-all{color:var(--muted)}
#aurora-collapse-all:hover{color:var(--text)}
/* Batch-select checkbox column (shown only in batch mode) */
.data-table .td-batch{width:34px; text-align:center; padding-right:0}
.data-table .batch-checkbox{width:16px; height:16px; accent-color:var(--teal); cursor:pointer; vertical-align:middle}
.data-table.batch-mode tbody tr[data-route-id]{cursor:pointer}
/* Grouped member rows — nested under their group header via indent + a left
rail, so they're clearly set off from standalone routes (which sit flush). */
.data-table tr.aurora-route-sub td.cell-name{position:relative; padding-left:34px; color:var(--muted)}
Expand Down
16 changes: 11 additions & 5 deletions public/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,13 @@

var delDomain = r.domain ? escapeHtml(r.domain) : ((r.l4_protocol === 'udp' ? 'UDP' : 'TCP') + ' :' + (r.l4_listen_port || ''));

// Batch-select checkbox (first column) — only while batch mode is active.
var batchCell = batchMode
? '<td class="td-batch"><input type="checkbox" class="batch-checkbox" data-batch-id="' + r.id + '"' + (batchSelected.has(String(r.id)) ? ' checked' : '') + '></td>'
: '';
var rowCls = opts.grouped ? ' class="aurora-route-sub"' : '';
return '<tr data-route-id="' + r.id + '"' + rowCls + '>'
+ batchCell
+ '<td class="cell-name">' + domainTxt + '</td>'
+ '<td>' + typeTag + '</td>'
+ '<td class="mono">' + escapeHtml(targetTxt) + '</td>'
Expand Down Expand Up @@ -515,7 +520,7 @@
? '<span class="tag tag-blue aurora-group-badge">' + escapeHtml(t['service_bundle.badge'] || 'SERVICE') + '</span>'
: '';
var countTxt = (t['routes.group_count'] || '{{count}} routes').replace('{{count}}', g.routes.length);
return '<tr class="aurora-group-row' + (collapsed ? ' collapsed' : '') + '" data-gtoggle="' + escapeHtml(g.key) + '" aria-expanded="' + (collapsed ? 'false' : 'true') + '"><td colspan="6">'
return '<tr class="aurora-group-row' + (collapsed ? ' collapsed' : '') + '" data-gtoggle="' + escapeHtml(g.key) + '" aria-expanded="' + (collapsed ? 'false' : 'true') + '"><td colspan="' + (batchMode ? 7 : 6) + '">'
+ AURORA_GROUP_CHEVRON
+ '<span class="group-status-dot ' + statusDotClass(g.status) + '"></span>'
+ '<span class="aurora-group-label">' + label + '</span>'
Expand All @@ -532,9 +537,9 @@
var t = GC.t;
var rows = '';
auroraGroupKeys = [];
// Aurora: group-headed table (no batch column). Multi-route groups get a
// collapsible header row + indented sub-rows; collapsed groups hide their
// members. Standalone routes render bare.
// Aurora: group-headed table. Multi-route groups get a collapsible header
// row + indented sub-rows; collapsed groups hide their members. Standalone
// routes render bare. A batch-select checkbox column is prepended in batch mode.
for (var gi = 0; gi < groups.length; gi++) {
var g = groups[gi];
var grouped = !g.single && g.routes.length > 1;
Expand All @@ -552,7 +557,8 @@
return '<div style="font-size:13px;color:var(--faint);padding:20px 0;text-align:center">'
+ escapeHtml(t['routes.no_routes'] || 'No routes configured') + '</div>';
}
return '<table class="data-table"><thead><tr>'
return '<table class="data-table' + (batchMode ? ' batch-mode' : '') + '"><thead><tr>'
+ (batchMode ? '<th class="td-batch"></th>' : '')
+ '<th>' + escapeHtml(t['routes.table_domain'] || 'Domain') + '</th>'
+ '<th>' + escapeHtml(t['routes.table_type'] || 'Type') + '</th>'
+ '<th>' + escapeHtml(t['routes.table_target'] || 'Target') + '</th>'
Expand Down
6 changes: 6 additions & 0 deletions templates/aurora/layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
'routes.group_no_domain': {{ t('routes.group_no_domain') | dump | safe }},
'routes.group_count': {{ t('routes.group_count') | dump | safe }},
'routes.no_match': {{ t('routes.no_match') | dump | safe }},
'batch.selected': {{ t('batch.selected') | dump | safe }},
'batch.none_selected': {{ t('batch.none_selected') | dump | safe }},
'batch.enable': {{ t('batch.enable') | dump | safe }},
'batch.disable': {{ t('batch.disable') | dump | safe }},
'batch.delete': {{ t('batch.delete') | dump | safe }},
'batch.confirm_delete_routes': {{ t('batch.confirm_delete_routes') | dump | safe }},
'routes.table_domain': {{ t('routes.table_domain') | dump | safe }},
'routes.table_type': {{ t('routes.table_type') | dump | safe }},
'routes.table_target': {{ t('routes.table_target') | dump | safe }},
Expand Down
4 changes: 4 additions & 0 deletions templates/aurora/pages/routes.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
{# routes-count: hidden but present for JS contract (JS writes textContent) #}
<span id="routes-count" style="display:none">0</span>
<div class="page-actions">
<button class="btn btn-ghost" id="btn-batch-routes">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="16" height="16"><polyline points="9 11 12 14 22 4"/><path d="M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"/></svg>
<span>{{ t('batch.select') }}</span>
</button>
<button class="btn btn-secondary" id="btn-add-service">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" width="14" height="14"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
<span>{{ t('service_bundle.add') }}</span>
Expand Down
Loading