mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-23 03:33:53 +00:00
fix: properly implement Node column in list view
addresses #370 - added Node column that only appears in flat/list view mode, positioned between VMID and Uptime columns. This allows users to see which node each guest belongs to when viewing the flat list, while keeping the cleaner view when in grouped mode.
This commit is contained in:
@@ -63,10 +63,6 @@ export function Dashboard(props: DashboardProps) {
|
||||
(storedGroupingMode === 'grouped' || storedGroupingMode === 'flat') ? storedGroupingMode : 'grouped'
|
||||
);
|
||||
|
||||
// Debug logging
|
||||
createEffect(() => {
|
||||
console.log('[Dashboard] Grouping mode:', groupingMode());
|
||||
});
|
||||
|
||||
const [showFilters, setShowFilters] = createSignal(
|
||||
localStorage.getItem('dashboardShowFilters') !== null
|
||||
@@ -699,6 +695,14 @@ export function Dashboard(props: DashboardProps) {
|
||||
>
|
||||
VMID {sortKey() === 'vmid' && (sortDirection() === 'asc' ? '▲' : '▼')}
|
||||
</th>
|
||||
<Show when={groupingMode() === 'flat'}>
|
||||
<th
|
||||
class="px-2 py-1.5 text-left text-[11px] sm:text-xs font-medium uppercase tracking-wider w-[80px] cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600"
|
||||
onClick={() => handleSort('node')}
|
||||
>
|
||||
Node {sortKey() === 'node' && (sortDirection() === 'asc' ? '▲' : '▼')}
|
||||
</th>
|
||||
</Show>
|
||||
<th
|
||||
class="px-2 py-1.5 text-left text-[11px] sm:text-xs font-medium uppercase tracking-wider w-[100px] cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600"
|
||||
onClick={() => handleSort('uptime')}
|
||||
@@ -777,7 +781,7 @@ export function Dashboard(props: DashboardProps) {
|
||||
return (
|
||||
<GuestRow
|
||||
guest={guest}
|
||||
showNode={false}
|
||||
showNode={groupingMode() === 'flat'}
|
||||
alertStyles={getAlertStyles(guestId, activeAlerts)}
|
||||
onTagClick={handleTagClick}
|
||||
activeSearch={search()}
|
||||
|
||||
@@ -33,11 +33,6 @@ interface GuestRowProps {
|
||||
export function GuestRow(props: GuestRowProps) {
|
||||
const [customUrl, setCustomUrl] = createSignal<string | undefined>(props.customUrl);
|
||||
|
||||
// Debug logging
|
||||
createEffect(() => {
|
||||
console.log('[GuestRow] showNode:', props.showNode, 'node:', props.guest.node, 'name:', props.guest.name);
|
||||
});
|
||||
|
||||
// Create guest ID for metadata
|
||||
const guestId = createMemo(() => {
|
||||
return props.guest.id || `${props.guest.node}-${props.guest.vmid}`;
|
||||
@@ -160,6 +155,12 @@ export function GuestRow(props: GuestRowProps) {
|
||||
{props.guest.vmid}
|
||||
</td>
|
||||
|
||||
{/* Node (only in list view) */}
|
||||
<Show when={props.showNode}>
|
||||
<td class="p-1 px-2 whitespace-nowrap text-sm text-gray-600 dark:text-gray-400">
|
||||
{props.guest.node}
|
||||
</td>
|
||||
</Show>
|
||||
|
||||
{/* Uptime */}
|
||||
<td class={`p-1 px-2 text-sm whitespace-nowrap ${
|
||||
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Rebuild script for Pulse development
|
||||
|
||||
echo "Building frontend..."
|
||||
cd /opt/pulse/frontend-modern && npm run build
|
||||
|
||||
echo "Building Go binary..."
|
||||
cd /opt/pulse && go build -o pulse ./cmd/pulse
|
||||
|
||||
echo "Restarting service..."
|
||||
sudo systemctl restart pulse-backend
|
||||
|
||||
echo "Done!"
|
||||
Reference in New Issue
Block a user