Commit Graph

95 Commits

Author SHA1 Message Date
DJObleezy
034aec6d12 Enhance animations and refactor filtering logic
- Updated `dashboard.css` with new animations for DATUM text, including a rainbow glitch effect and pulse glow.
- Added margin-top to `.stats-grid` in `earnings.css` for better layout.
- Modified `.search-box` focus styles in `workers.css` to use primary color variable.
- Refactored filtering functionality in `workers.js` to simplify logic and improve search capabilities.
- Reintroduced user settings info section in `earnings.html`.
- Removed 'asic' and 'bitaxe' filter buttons in `workers.html` for a cleaner interface.
2025-04-28 20:00:00 -07:00
DJObleezy
5a6331d032 Enhance earnings features and improve data handling
- Updated `App.py` to add a datetime formatting filter and enhance the earnings route with better error handling and currency conversion.
- Revised `README.md` to document new features, including earnings breakdown and API endpoints.
- Added default currency setting in `config.json` and a function to retrieve it in `config.py`.
- Improved `data_service.py` with a new method for fetching payment history and enhanced error handling.
- Updated `setup.py` to include new CSS and JS files for the earnings page.
- Enhanced styling in `common.css`, `dashboard.css`, and `earnings.css` for better responsiveness.
- Optimized `workers.js` for improved performance with a progressive loading approach.
- Updated multiple HTML files to reflect new dashboard structure and features.
- Enhanced `worker_service.py` for consistent hashrate values and improved logging.
2025-04-28 09:20:56 -07:00
DJObleezy
a50bd552f7 Add currency support and config management enhancements
This commit introduces significant updates to the application, focusing on currency support and improved configuration management. Key changes include:

- Added a `config_reset` flag in `update_metrics_job` in `App.py` to manage configuration resets.
- Modified `update_config` to handle currency changes and update notifications accordingly.
- Updated `MiningDashboardService` to fetch and include exchange rates and configured currency in metrics.
- Introduced utility functions for currency formatting and symbol retrieval in `notification_service.py`.
- Enhanced UI components in `main.js` and `boot.html` to support currency selection and display.
- Adjusted Docker Compose file to remove hardcoded wallet and power settings for better flexibility.

These changes enhance usability by allowing users to view financial data in their preferred currency and manage configurations more effectively.
2025-04-27 14:43:45 -07:00
DJObleezy
2f1cbd3143 Enhance hashrate detection and UI updates
Updated `NotificationService` to distinguish between low and normal hashrate modes, utilizing 3-hour and 10-minute averages for detection. Improved `updateChartWithNormalizedData` in `main.js` to support localStorage persistence for hashrate state and refined mode-switching logic. Introduced `showHashrateNormalizeNotice` for user notifications regarding hashrate normalization. Updated HTML files for UI consistency, including version number and structured display of pool fees and unpaid earnings. Ensured proper chart updates and annotations for 24-hour averages.
2025-04-27 11:18:42 -07:00
DJObleezy
744ed27279 Add Alt+W shortcut to reset wallet address and chart
Implemented a keyboard event listener for Alt+W to reset the wallet address, clear chart data, and redirect to the configuration page with a confirmation dialog. Added a fallback function for wallet reset if chart data clearing fails. Updated the chart's Y-axis label to 'HASHRATE (TH/S)' and commented out the theme toggle button in the HTML for cleaner implementation.
2025-04-26 20:44:36 -07:00
DJObleezy
b4465e5a5c Revert "Update UI and functionality for wallet and fees"
This reverts commit 9ef1260347.
2025-04-26 20:39:05 -07:00
DJObleezy
9ef1260347 Update UI and functionality for wallet and fees
- Adjust footer CSS and increase padding in dashboard.
- Update chart title for clarity on hashrate units.
- Implement Alt+W keyboard shortcut to reset wallet address with confirmation and error handling.
- Add version number to footer in base.html.
- Change "Network Fee (%)" label to "Firmware Fee (%)" with updated tooltip in boot.html.
2025-04-26 20:35:27 -07:00
DJObleezy
57d8a9ab45 Refactor pool fee calculation to use last block earnings
Updated `calculatePoolFeeInSats` to accept `lastBlockEarnings` instead of `estimatedEarningsPerDay`. Added debugging logs for pool fee percentage and last block earnings. Modified `updateUI` to check for `last_block_earnings` and parse its value accordingly.
2025-04-26 17:36:51 -07:00
DJObleezy
0ab96cb7c1 Enhance pool fee display in SATS
- Added CSS rule to style pool fees in SATS as red and bold.
- Implemented `calculatePoolFeeInSats` function to compute fees based on percentage and earnings.
- Updated `updateUI` to display calculated pool fees, ensuring proper formatting and element creation.
2025-04-26 16:03:56 -07:00
DJObleezy
06f5c646e2 Enhance chart y-axis for low hashrate visibility
Updated `updateChartWithNormalizedData` to ensure the 24-hour average line is visible in low hashrate mode. Adjusted y-axis range calculations for both multi-point and single-point scenarios. Added console log statements for better debugging and feedback.
2025-04-26 15:31:31 -07:00
DJObleezy
367ba3788f Improve theme handling in BitcoinProgressBar.js
- Introduced fallback colors and utilized CSS variables for styling.
- Replaced hardcoded color values with dynamic CSS variable values.
- Enhanced theme change listener to respond to storage changes and class mutations for real-time UI updates.
2025-04-26 15:23:25 -07:00
DJObleezy
574d5637bc Refactor hashrate handling in main.js
Enhanced `updateChartWithNormalizedData` to manage low and high hashrate modes with a new state management system. Implemented debounce for mode switching and added hysteresis to prevent rapid transitions. Improved tracking of hashrate spikes for better handling of fluctuations.
2025-04-26 08:30:48 -07:00
DJObleezy
e9825c9006 Refactor hashrate normalization and improve error handling
- Refactored `normalizeHashrate` function to use a lookup table for unit conversion, enhancing error handling and logging for unrecognized units.
- Updated `ArrowIndicator` class to utilize the new global `normalizeHashrate` function for consistency.
- Enhanced `updateChartWithNormalizedData` with better error handling for 24-hour averages and current hashrate data, including checks for unreasonable values.
- Improved historical data handling with validation and anomaly detection.
- Encapsulated single data point display logic in `useSingleDataPoint` for better error management.
- Refined low hashrate indicator display logic to show only when necessary and updated its appearance based on the current theme.
- Overall improvements enhance robustness, maintainability, and user experience.
2025-04-26 06:39:55 -07:00
DJObleezy
24c46f058b Add last block earnings display to UI
Updated `updateUI()` in `main.js` to show last block earnings with a "+" prefix and "SATS" suffix. Modified `dashboard.html` to include a new span element that conditionally displays the earnings or defaults to "+0 SATS".
2025-04-26 06:13:58 -07:00
DJObleezy
e0c5f085cc Enhance data handling and UI responsiveness
- Updated `save_graph_state` in `state_manager.py` to include unit preservation for `arrow_history` and `metrics_log`, with improved data size logging and exception handling.
- Modified `notifications.css` for better mobile responsiveness, including a grid layout for `.filter-buttons` and adjusted button sizes.
- Changed value display in `initializeChart` to use 'PH' for petahashes, aligning with new unit standards.
- Ensured consistent unit formatting in `updateChartWithNormalizedData` for the 24-hour average line.
- Enhanced precision in `updateUI` for unpaid earnings display.
- Simplified y-axis label in chart configuration and updated value formatting to reflect new unit standards.
2025-04-25 22:13:01 -07:00
DJObleezy
6ba7545278 Remove text-shadow for cleaner UI across stylesheets
This commit removes `text-shadow` properties from various CSS classes in `blocks.css`, `boot.css`, `common.css`, `dashboard.css`, `error.css`, `retro-refresh.css`, and `workers.css`, enhancing readability and reducing visual clutter.

In `main.js`, the inline styles for profit value elements are updated to eliminate `text-shadow`, simplifying styling logic.

Additionally, `theme.js` sees the removal of `text-shadow` from headers and interface elements, with adjustments made to box-shadow values for improved visual depth.

These changes reflect a design decision to create a more modern and streamlined interface.
2025-04-23 23:00:06 -07:00
DJObleezy
54957babc3 Enhance services and improve code structure
- Added health check for Redis in `docker-compose.yml`.
- Introduced new environment variables for the dashboard service.
- Updated Redis dependency condition for the dashboard service.
- Modified Dockerfile to use Python 3.9.18 and streamlined directory creation.
- Enhanced `minify.py` with logging and improved error handling.
- Added methods in `OceanData` and `WorkerData` for better data handling.
- Improved error handling and logging in `NotificationService`.
- Refactored `BitcoinProgressBar.js` for better organization and theme support.
- Updated `blocks.js` with new helper functions for block data management.
- Enhanced `dashboard.html` for improved display of network stats.
2025-04-23 21:56:25 -07:00
DJObleezy
00d3bbdee9 Update deployment instructions and chart indicator style
- Changed repository cloning instructions to use `DeepSea-Dashboard`.
- Adjusted the position of the `lowHashrateIndicator` in `main.js` from bottom to top right.
- Added a background color to the indicator for improved visibility.
2025-04-23 18:47:50 -07:00
DJObleezy
a71a6ce03a Add theme change listener and first startup handling
- Implement `setupThemeChangeListener` in `main.js` to detect theme changes across tabs, save font configurations, and recreate the chart with appropriate styles for mobile and desktop.
- Introduce new functions in `theme.js` to manage theme preferences on first startup, including setting the DeepSea theme as default and checking for previous app launches.
2025-04-23 13:55:19 -07:00
DJObleezy
f617342c23 Add theme loading styles and improve theme management
Updated `theme-toggle.css` with new styles for DeepSea and Bitcoin themes, including a loading screen. Introduced `isApplyingTheme` flag in `main.js` to manage theme application state. Modified `applyDeepSeaTheme` and `toggleTheme` functions in `theme.js` to enhance theme switching experience with dynamic loading messages. Enhanced `base.html` to preload styles and prevent flickering during theme transitions.
2025-04-23 13:26:07 -07:00
DJObleezy
a802880011 Enhance theme styling and mobile responsiveness
Updated `theme-toggle.css` for improved mobile styling of the theme toggle button, increasing padding and width. Reorganized CSS variables in `theme.js` for the DeepSea theme to enhance structure and readability. Adjusted color selectors for consistency across elements, including pool hashrate and navigation links, and modified button hover effects to utilize new primary color variables for a cohesive theme.
2025-04-23 06:58:56 -07:00
DJObleezy
f5e93f436b Implement DeepSea theme with CSS enhancements
Replaced the `applyDeepSeaTheme` function in `main.js` to apply a cohesive DeepSea theme, including extensive CSS variable definitions for UI elements.

In `theme.js`, updated styles to ensure visibility of pool hashrate text, enhanced button hover effects, and added direct DOM manipulation for consistent styling.

These changes improve the overall visual consistency and user experience of the application.
2025-04-22 20:10:10 -07:00
DJObleezy
0d0a707019 Add responsive theme toggle and dynamic styling
Introduces a responsive theme toggle button with styles for desktop and mobile views in `theme-toggle.css`. Updates `BitcoinProgressBar.js` to support dynamic theme changes and adds a new `updateTheme` method. Enhances `main.js` for theme management based on user preferences in `localStorage`. Modifies `base.html` and other HTML files to include the theme toggle button and necessary scripts. Introduces `theme.js` for managing theme constants and applying the DeepSea theme.
2025-04-22 17:43:46 -07:00
DJObleezy
231a56b18a Remove pool_luck metric and UI indicator
Updated the ArrowIndicator class to exclude the "pool_luck" metric while keeping "estimated_rewards_in_window_sats" and "workers_hashing". Removed the corresponding UI elements in the updateUI function, as the visual representation for "pool_luck" is no longer necessary.
2025-04-22 08:30:03 -07:00
DJObleezy
ce3b186dc5 Cleaned up Earning Efficiency, Time To Block, and Block Odds in the Pool Hashrates card. Also fixed a display error on the Last Block line in the Payout Info card. 2025-04-21 22:54:45 -07:00
DJObleezy
eab3e89a11 Update spacing for block odds in UI
Increased margin-left for the `probSpan` element in the
`updateUI` function from 10px to 17px for better spacing.
Removed the inline margin-left style from the `block_odds_3hr`
span in `dashboard.html`, promoting a more consistent style
management through JavaScript.
2025-04-21 10:17:33 -07:00
DJObleezy
7267244e94 Enhance block finding metrics and UI display
Updated CSS for improved styling, added functions to calculate block finding probability and time, and modified UI to display these metrics based on the 24-hour hashrate. New HTML elements added to the dashboard for better user visibility of block odds.
2025-04-21 10:04:54 -07:00
DJObleezy
9a9f9ae178 Remove acceptance rate display from worker stats
Eliminated the acceptance rate section from the `createWorkerCard` function in `workers.js`, including its corresponding HTML in `workers.html`. Updated the `updateSummaryStats` function to remove references to the average acceptance rate.
2025-04-19 16:57:05 -07:00
DJObleezy
4f52697185 Update mempool URL comment and dashboard metrics
Clarified the use of "mempool.guide" in `blocks.js` to align with Ocean.xyz ethos.

In `dashboard.html`, replaced the "Pool Fees" section with "Blocks Found," including logic to display the number of blocks found, defaulting to "0" if not defined. Removed associated pool fees logic and updated indicators accordingly.
2025-04-19 09:35:38 -07:00
DJObleezy
f6b3fdb094 Update data source from mempool.space to mempool.guide
This commit updates all references from "mempool.space" to "mempool.guide" in multiple files, including README.md, project_structure.md, blocks.js, and blocks.html.
2025-04-19 06:26:02 -07:00
DJObleezy
6d07060b7e Add API for resetting chart data and update frontend
Implemented a new API endpoint `/api/reset-chart-data` in `App.py` to clear chart data history and save state to Redis. Updated the `resetDashboardChart` function in `main.js` to make an AJAX call to this endpoint, providing immediate user feedback. Removed previous logic for handling latest metrics to streamline the reset process.
2025-04-18 12:27:20 -07:00
DJObleezy
f166126525 Add timezone support to last updated timestamp formatting
Updated the `updateLastUpdated()` function in `workers.js` to include timezone configuration for formatting the last updated timestamp. Introduced a `configuredTimezone` variable with a default value of 'America/Los_Angeles'. The timestamp is now formatted using this timezone, and a console log statement indicates the timezone used. Added a fallback to the current date and time in case of formatting errors.
2025-04-18 11:28:18 -07:00
DJObleezy
97fe19d61d Add configurable timezone support throughout the app
Updated the application to use a configurable timezone instead of hardcoding "America/Los_Angeles". This change impacts the dashboard, API endpoints, and worker services. Timezone is now fetched from a configuration file or environment variable, enhancing flexibility in time display. New API endpoints for available timezones and the current configured timezone have been added. The frontend now allows users to select their timezone from a dropdown menu, which is stored in local storage for future use. Timestamps in the UI have been updated to reflect the selected timezone.
2025-04-18 11:08:35 -07:00
DJObleezy
0bb90b1aca 2025-04-17 08:45:03 -07:00
DJObleezy
4a3e0c96da Revert "Enhance pool info display in latest block stats"
This reverts commit 1554b0b0c5.
2025-04-17 08:45:03 -07:00
DJObleezy
1554b0b0c5 Enhance pool info display in latest block stats
Updated the `updateLatestBlockStats` function to improve the presentation of pool information. Added color coding for pool names, highlighting "Ocean" pools with a star icon and special styling. The function now checks for pool name availability and adjusts the stats card styling accordingly, resetting to default for non-Ocean pools. Default display is set to "Unknown" if no pool information is available.
2025-04-15 21:53:11 -07:00
DJObleezy
d8f3972e03 Remove createBlockCard function from blocks.js
The `createBlockCard` function, which was responsible for generating block card elements displaying details such as timestamp, size, transaction count, miner/pool information, and average fee rate, has been completely removed. This change eliminates the functionality to display block cards in the codebase.
2025-04-15 21:49:44 -07:00
DJObleezy
9d5184e5c7 Add pool color mapping and enhance UI styling
Introduced a new `getPoolColor(poolName)` function to map mining pool names to specific colors, improving visual representation in the UI. Updated `createBlockCard(block)` and `showBlockDetails(block)` functions to utilize this new function, applying distinct styles for Ocean pools. These changes enhance user experience by providing clear, color-coded cues for different mining pools.
2025-04-15 21:44:45 -07:00
DJObleezy
1dec2ba35b Add explorer link to block details modal
This update introduces a new feature in `blocks.js` that adds an "Explorer Link" to view block details on the mempool.space website. The link is styled for visibility and includes an external link indicator. Additional comments were added for clarity, and minor adjustments were made to the existing code structure, ensuring the overall functionality of the block details modal remains intact.
2025-04-15 21:24:21 -07:00
DJObleezy
a4178d0a9b Removed Console 2025-04-12 19:59:57 -07:00
DJObleezy
695e4cfb95 Change unpaid earnings display to BTC format
Updated the `logCurrentStats` function to convert unpaid earnings from SATS to BTC. The new implementation divides the unpaid earnings by 100,000,000 and formats the result to 8 decimal places, improving clarity by using a more recognized cryptocurrency unit.
2025-04-12 17:37:20 -07:00
DJObleezy
13294b6d72 Improve log message formatting in logCurrentStats
Updated the `logCurrentStats` function to enhance the display of daily profit and unpaid earnings. Daily profit now defaults to '0.00' instead of 'CALCULATING...', and unpaid earnings are parsed as integers. Additionally, power consumption now shows '0 WATTS' instead of 'N/A W' when not available.
2025-04-12 17:29:37 -07:00
DJObleezy
6c7e986a80 Refactor logging mechanism for periodic stats
Updated `processLogQueue` to log periodic stats when the queue is empty. Replaced the switch-case structure in `logCurrentStats` with an array of log messages, which are randomized and queued for display. Added `shuffleArray` helper function and removed specific logging for unpaid balances to streamline the process.
2025-04-12 16:04:44 -07:00
DJObleezy
7646149bb9 Refactor metric update system to log update system
Renamed `metricUpdateQueue` to `logUpdateQueue` and updated related functions to reflect this change. Introduced `logInterval` for processing updates every 2 seconds. Modified efficiency calculation in `logCurrentStats` to use `metrics.hashrate_60sec` for accuracy.
2025-04-12 15:57:57 -07:00
DJObleezy
3a9213d52d Update Bitcoin Mining Console for real-time metrics
- Clarified comments to emphasize real-time data display.
- Modified `consoleSettings` to include `refreshInterval`.
- Changed initialization message for the console.
- Enhanced `setupEventSource` with connection logging and error handling.
- Updated `fetchMetrics` to log connection and error messages.
- Introduced `processMetricChanges` to handle significant metric updates.
- Added `logCurrentStats` for periodic logging of mining statistics.
- Implemented `queueMetricUpdate` to manage console message display.
- Retained and adjusted `adjustConsoleLayout` for proper layout on load.
- Updated HTML title and copyright information for branding.
2025-04-12 15:50:24 -07:00
DJObleezy
60d716f429 Adjust console layout for improved responsiveness
Modified `console.css` to change body and container heights for better spacing. Added maximum height and margins to `.console-container`. Updated `.console-wrapper` to have a calculated height based on available space.

Introduced `adjustConsoleLayout` function in `console.js` to dynamically adjust wrapper height based on viewport size, ensuring consistent layout on load and resize.
2025-04-12 13:58:59 -07:00
DJObleezy
a60d21521d Improve console layout and responsiveness
Updated `console.css` to enhance the layout and responsiveness of the console interface. Adjusted the console container to utilize the full viewport height while maintaining a controlled height for the console wrapper. Changed console output positioning to relative for better spacing and positioned the stats bar at the bottom for consistency. Added a new JavaScript function `adjustConsoleLayout` to dynamically calculate and set the height of the console wrapper based on viewport size, improving user experience across different screen sizes.
2025-04-12 13:53:27 -07:00
DJObleezy
898652b754 Refactor console.js for enhanced metrics reporting
Updated consoleSettings to reduce hashRateFluctuation from 10% to 1%. Improved generateLog function comments and significantly enhanced generateSystemMessage to include real-time metrics on power consumption, system health, processing capacity, and revenue projections. Added random messages for variety and introduced alerts for offline workers and negative profitability, improving the logging system's functionality and responsiveness.
2025-04-12 13:34:15 -07:00
DJObleezy
886e595ef4 Add Bitcoin mining console page and related assets
This commit introduces a new route in `App.py` for a retro-styled console log page that displays real-time Bitcoin mining metrics. It includes a new CSS file, `console.css`, for styling with effects like CRT and text glitch animations. The `console.js` file is added to handle log generation, metrics fetching, and real-time updates. Additionally, a new `console.html` file is created to structure the console page, integrating the necessary styles and scripts.
2025-04-12 13:02:51 -07:00
DJObleezy
c3de5544ef Enhance negative profit styling with text shadow
Added a `text-shadow` property to the styling of
`dailyProfitElement` and `monthlyProfitElement`
to improve visibility when profit values are negative.
Existing styles for color and font-weight remain unchanged.
2025-04-11 22:56:49 -07:00