diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile index 8aad984..1bee389 100644 --- a/dashboard/Dockerfile +++ b/dashboard/Dockerfile @@ -51,7 +51,7 @@ RUN chown 1000:1000 /app/dcrpulse USER 1000 # Expose port -EXPOSE 8080 +EXPOSE 8735 # Run the application CMD ["./dcrpulse"] diff --git a/dashboard/web/package.json b/dashboard/web/package.json index 607c293..f24fbdb 100644 --- a/dashboard/web/package.json +++ b/dashboard/web/package.json @@ -1,7 +1,7 @@ { "name": "dcrpulse-web", "private": true, - "version": "1.0.0", + "version": "1.0.2", "type": "module", "scripts": { "dev": "vite", diff --git a/dashboard/web/src/App.tsx b/dashboard/web/src/App.tsx index 8dc0113..52f79a8 100644 --- a/dashboard/web/src/App.tsx +++ b/dashboard/web/src/App.tsx @@ -2,9 +2,10 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -import { BrowserRouter, Routes, Route } from 'react-router-dom'; +import { BrowserRouter, Routes, Route, useLocation } from 'react-router-dom'; import { useEffect, useState } from 'react'; import { Header } from './components/Header'; +import { Footer } from './components/Footer'; import { NodeDashboard } from './pages/NodeDashboard'; import { WalletDashboard } from './pages/WalletDashboard'; import { ExplorerLanding } from './pages/ExplorerLanding'; @@ -13,41 +14,64 @@ import { TransactionDetail } from './pages/TransactionDetail'; import { AddressView } from './pages/AddressView'; import { MempoolView } from './pages/MempoolView'; import { GovernanceDashboard } from './pages/GovernanceDashboard'; -import { getDashboardData } from './services/api'; +import { getDashboardData, getWalletStatus } from './services/api'; -function App() { +function AppContent() { + const location = useLocation(); const [nodeVersion, setNodeVersion] = useState(''); + const [walletVersion, setWalletVersion] = useState(''); + const [lastUpdate, setLastUpdate] = useState(''); - // Fetch node version for header + // Fetch versions for header and footer useEffect(() => { - const fetchVersion = async () => { + const fetchVersions = async () => { try { - const data = await getDashboardData(); - setNodeVersion(data.nodeStatus?.version || ''); + // Fetch node version and last update + const dashboardData = await getDashboardData(); + setNodeVersion(dashboardData.nodeStatus?.version || ''); + if (dashboardData.lastUpdate) { + setLastUpdate(new Date(dashboardData.lastUpdate).toLocaleString()); + } + + // Fetch wallet version + try { + const walletStatus = await getWalletStatus(); + setWalletVersion(walletStatus.version || ''); + } catch (walletErr) { + // Wallet might not be available, that's ok + console.debug('Wallet version not available:', walletErr); + } } catch (err) { - console.error('Error fetching node version:', err); + console.error('Error fetching versions:', err); } }; - fetchVersion(); - }, []); + fetchVersions(); + }, [location.pathname]); return ( - -
-
-
- - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - -
+
+
+
+ + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + +
+
+ ); +} + +function App() { + return ( + + ); } diff --git a/dashboard/web/src/components/Footer.tsx b/dashboard/web/src/components/Footer.tsx new file mode 100644 index 0000000..22deb84 --- /dev/null +++ b/dashboard/web/src/components/Footer.tsx @@ -0,0 +1,63 @@ +// Copyright (c) 2015-2025 The Decred developers +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. + +import packageJson from '../../package.json'; + +interface FooterProps { + dcrdVersion?: string; + dcrwalletVersion?: string; + lastUpdate?: string; +} + +export const Footer = ({ dcrdVersion, dcrwalletVersion, lastUpdate }: FooterProps) => { + const dashboardVersion = packageJson.version; + + return ( + + ); +}; + diff --git a/dashboard/web/src/pages/NodeDashboard.tsx b/dashboard/web/src/pages/NodeDashboard.tsx index d6d0e2d..e181da2 100644 --- a/dashboard/web/src/pages/NodeDashboard.tsx +++ b/dashboard/web/src/pages/NodeDashboard.tsx @@ -144,13 +144,6 @@ export const NodeDashboard = () => {
- - {/* Last Update */} - {data && ( -
- Last updated: {new Date(data.lastUpdate).toLocaleString()} -
- )} ); }; diff --git a/dashboard/web/src/pages/WalletDashboard.tsx b/dashboard/web/src/pages/WalletDashboard.tsx index bd78b41..553c6ab 100644 --- a/dashboard/web/src/pages/WalletDashboard.tsx +++ b/dashboard/web/src/pages/WalletDashboard.tsx @@ -392,13 +392,6 @@ export const WalletDashboard = () => { )} - - {/* Last Update */} - {data && ( -
- Last updated: {new Date(data.lastUpdate).toLocaleString()} -
- )} )} diff --git a/dcrd/Dockerfile b/dcrd/Dockerfile index 5d4f060..938a47a 100644 --- a/dcrd/Dockerfile +++ b/dcrd/Dockerfile @@ -11,7 +11,7 @@ RUN apk add --no-cache git openssl WORKDIR /go/src/github.com/decred # Clone the dcrd repository -ARG DCRD_VERSION=release-v2.1.0 +ARG DCRD_VERSION=release-v2.1.2 RUN git clone --depth 1 --branch ${DCRD_VERSION} https://github.com/decred/dcrd.git # Build dcrd diff --git a/dcrpulse-umbrel/docker-compose.yml b/dcrpulse-umbrel/docker-compose.yml index 81ccec7..7255107 100644 --- a/dcrpulse-umbrel/docker-compose.yml +++ b/dcrpulse-umbrel/docker-compose.yml @@ -2,10 +2,10 @@ services: app_proxy: environment: APP_HOST: dcrpulse_dashboard_1 - APP_PORT: 8080 + APP_PORT: 8735 dcrd: - image: ghcr.io/karamble/dcrpulse-dcrd:2.1.0@sha256:63dde66bb5c06107192e12bc7431ef7f8f25be49c8be29b070aba92e691d4e24 + image: ghcr.io/karamble/dcrpulse-dcrd:2.1.2@sha256:63dde66bb5c06107192e12bc7431ef7f8f25be49c8be29b070aba92e691d4e24 user: "1000:1000" restart: on-failure stop_grace_period: 5m @@ -26,9 +26,6 @@ services: --rpclisten=0.0.0.0:9109 --rpccert=/app-data/dcrd/rpc.cert --rpckey=/app-data/dcrd/rpc.key - networks: - - default - - dcrpulse_internal healthcheck: test: ["CMD", "sh", "-c", "curl -k -u ${APP_SEED}:${APP_SEED} -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"1.0\",\"method\":\"getinfo\",\"params\":[],\"id\":1}' https://127.0.0.1:9109 || exit 1"] interval: 30s @@ -37,7 +34,7 @@ services: start_period: 120s dcrwallet: - image: ghcr.io/karamble/dcrpulse-dcrwallet:2.1.0@sha256:32a2336a07f72627e1ba82177f72cca20671c808606c08325b0cdda5c585a386 + image: ghcr.io/karamble/dcrpulse-dcrwallet:2.1.2@sha256:32a2336a07f72627e1ba82177f72cca20671c808606c08325b0cdda5c585a386 user: "1000:1000" restart: on-failure stop_grace_period: 1m @@ -57,9 +54,6 @@ services: depends_on: dcrd: condition: service_healthy - networks: - - default - - dcrpulse_internal healthcheck: test: ["CMD", "sh", "-c", "nc -z 127.0.0.1 9110 && nc -z 127.0.0.1 9111 || exit 1"] interval: 10s @@ -68,13 +62,13 @@ services: start_period: 10s dashboard: - image: ghcr.io/karamble/dcrpulse-dashboard:1.0.0@sha256:c7b0bd714e2dac2a3a5ae73cd6c27b2f8c595370e3377672cb6ee802a8fc5981 + image: ghcr.io/karamble/dcrpulse-dashboard:1.0.2@sha256:c7b0bd714e2dac2a3a5ae73cd6c27b2f8c595370e3377672cb6ee802a8fc5981 user: "1000:1000" restart: on-failure volumes: - ${APP_DATA_DIR}/data:/app-data:ro environment: - PORT: 8080 + PORT: 8735 DCRD_RPC_HOST: dcrd DCRD_RPC_PORT: 9109 DCRD_RPC_USER: ${APP_SEED} @@ -91,10 +85,3 @@ services: condition: service_healthy dcrwallet: condition: service_healthy - networks: - - default - - dcrpulse_internal - -networks: - dcrpulse_internal: - internal: true diff --git a/dcrpulse-umbrel/umbrel-app.yml b/dcrpulse-umbrel/umbrel-app.yml index 66f1dce..f756543 100644 --- a/dcrpulse-umbrel/umbrel-app.yml +++ b/dcrpulse-umbrel/umbrel-app.yml @@ -2,39 +2,27 @@ manifestVersion: 1 id: dcrpulse name: Decred Pulse tagline: Full Decred node with watch-only wallet and database-free block explorer -category: finance -version: "1.0.0" -port: 8080 +category: crypto +version: "1.0.2" +port: 8735 icon: "" -description: >- +description: |- Decred Pulse is a comprehensive dashboard for running a full Decred node. - It includes: - - Full dcrd blockchain node with transaction indexing - - dcrwallet with watch-only wallet support - - Block explorer with mempool and tspends monitoring - - Watch-Only Wallet management with xpub import support - Perfect for Decred node and wallet monitoring, exploring the blockchain, or monitoring Decred network activity. Features: - - - Full Decred node (dcrd v2.1.0) - - - Wallet support (dcrwallet v2.1.0) - + - Full Decred node (dcrd v2.1.2) + - Wallet support (dcrwallet v2.1.2) - Modern block explorer - - Mempool monitoring - - Watch-only wallet with xpub import - developer: Decred website: https://decred.org @@ -47,5 +35,5 @@ releaseNotes: "" path: "" defaultUsername: "" defaultPassword: "" -submission: https://github.com/getumbrel/umbrel-apps/pull/TBD +submission: https://github.com/getumbrel/umbrel-apps/pull/4121 diff --git a/dcrwallet/Dockerfile b/dcrwallet/Dockerfile index a1dbd60..15411d6 100644 --- a/dcrwallet/Dockerfile +++ b/dcrwallet/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --no-cache git openssl WORKDIR /go/src/github.com/decred # Clone the dcrwallet repository -ARG DCRWALLET_VERSION=release-v2.1.0 +ARG DCRWALLET_VERSION=release-v2.1.2 RUN git clone --depth 1 --branch ${DCRWALLET_VERSION} https://github.com/decred/dcrwallet.git # Build dcrwallet diff --git a/docker-compose.yml b/docker-compose.yml index b330620..867441a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: build: context: ./dcrd args: - DCRD_VERSION: ${DCRD_VERSION:-release-v2.1.0} + DCRD_VERSION: ${DCRD_VERSION:-release-v2.1.2} container_name: dcrpulse-dcrd ports: - "9108:9108" @@ -41,7 +41,7 @@ services: build: context: ./dcrwallet args: - DCRWALLET_VERSION: ${DCRWALLET_VERSION:-release-v2.1.0} + DCRWALLET_VERSION: ${DCRWALLET_VERSION:-release-v2.1.2} container_name: dcrpulse-dcrwallet ports: - "9110:9110"