Commit Graph

308 Commits

Author SHA1 Message Date
DJObleezy
df1678fac7 Increase font size for datum labels in dashboard.css
Updated the font size of the `.datum-label` class from `0.85em` to `0.95em` to enhance readability.
2025-04-22 22:38:03 -07:00
DJObleezy
6d3f873d6b Refactor text styling in dashboard.css
Removed padding, vertical alignment, and adjusted letter-spacing. Increased letter-spacing to 2px for improved text appearance.
2025-04-22 22:36:39 -07:00
DJObleezy
c7e2f0f4a9 Update .datum-label color to white
Changed the color of the `.datum-label` class from orange (`#ff9d00`) to white (`#ffffff`) for improved visibility.
2025-04-22 22:33:19 -07:00
DJObleezy
65d4deba5e Update theme toggle styles for better usability
Adjusted button border-radius for mobile view and added
a space in the content string for improved visual design.
2025-04-22 22:28:28 -07:00
DJObleezy
af3ea9607e
Update README.md 2025-04-22 21:47:53 -07:00
DJObleezy
eb95e6c6b5 Add theme toggle feature and configuration updates
- Introduced `theme-toggle.css` and `theme.js` to support a new theme toggle feature.
- Updated default configuration to include timezone and network fee.
- Enhanced command line arguments for network fee, timezone, and theme selection.
- Modified `create_config` to handle new configuration values from command line.
- Updated logging to reflect new network fee and timezone settings.
- Changed theme icons in `theme-toggle.css` for desktop and mobile views.
2025-04-22 20:39:45 -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
e87993a252 Refactor theme toggle button positioning and styles
Updated the theme toggle button's positioning from `fixed` to `absolute` for consistency with `topRightLink`. Adjusted top and left positions, clarified media queries for desktop and mobile styles, and modified mobile button dimensions and padding. Reduced icon font size for better fit. These changes enhance the layout and responsiveness across different screen sizes.
2025-04-22 17:57:11 -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
2142a7d2af Enhance generate_fallback_data method in WorkerService
Updated docstring to include argument and return type.
Added handling for None value in workers_count, defaulting to 1 worker.
Modified condition to use elif for clearer logic in worker count checks.
2025-04-22 14:06:11 -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
8c1c55c83f Remove duplicated saveConfig function from boot.html 2025-04-22 07:48:47 -07:00
DJObleezy
bdb9552576 Add network fee support to dashboard configuration
Updated the `reset_chart_data` function to include a new `network_fee` parameter in the `MiningDashboardService`. Modified `config.json` to add a default `network_fee` key. Enhanced `load_config` in `config.py` to handle the new parameter. Updated the `MiningDashboardService` constructor and `fetch_metrics` method to utilize the `network_fee` in calculations. Added a new input field for `network_fee` in `boot.html` and updated related JavaScript functions to manage this input. Improved the "Use Defaults" button functionality to reset the `network_fee` to its default value.
2025-04-22 07:43:57 -07:00
DJObleezy
b8321fe3b0 Enhance pool fees percentage display logic
Updated conditional checks in `dashboard.html` to ensure
`metrics.pool_fees_percentage` is not `none` before display.
Added validation for percentage range (0.9 to 1.3) to show
star icon and "DATUM" label, improving data accuracy and
presentation.
2025-04-22 06:22:59 -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
3bb74c37e7 Remove acceptance rate tracking from mining services
This commit removes the `avg_acceptance_rate` and `acceptance_rate` fields from both the `MiningDashboardService` and `WorkerService` classes. The changes simplify the data structures and calculations related to worker data, as acceptance rates are no longer tracked or displayed in the mining dashboard. This includes the removal of default values and random generation of acceptance rates for workers.
2025-04-20 06:20:38 -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
f1eb0e22b9
Update README.md 2025-04-18 19:42:47 -07:00
DJObleezy
ee469866d7
Update README.md 2025-04-18 13:27:08 -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
96a71ec80d
Update README.md 2025-04-18 09:08:26 -07:00
DJObleezy
9a5c93036a Enhance .offline-dot style specificity
Added !important to the box-shadow property in the
.offline-dot class in common.css to ensure it takes
precedence over conflicting styles while keeping other
properties unchanged.
2025-04-17 19:43:28 -07:00
DJObleezy
eef2414ae2
Update README.md 2025-04-17 17:29:33 -07:00
DJObleezy
06f9d8a4b0
Update README.md 2025-04-17 17:19:18 -07:00
DJObleezy
c52001175b
Update README.md 2025-04-17 17:18:32 -07:00
DJObleezy
014b0acc24 Add fee indicator styling and conditional display
Implemented CSS styles for an optimal fee indicator, including a gold star and a label. Updated HTML to conditionally show the star and "DATUM" label when the pool fees percentage is between 0.9 and 1.3.
2025-04-17 15:27:30 -07:00
DJObleezy
982fe295d2 Add pool fees percentage metric to dashboard
Updated `MiningDashboardService` to calculate and display
the `pool_fees_percentage` metric, reflecting earnings lost
to pool fees. Enhanced error handling for earnings processing.
Updated styles in `dashboard.css` for the new metric and
added corresponding HTML elements in `dashboard.html` to
ensure proper display and conditional rendering.
2025-04-17 15:00:11 -07:00
DJObleezy
d98d496bd6 Limit worker data fetching to 10 pages
Updated the `get_all_worker_rows` method in the `MiningDashboardService` class to restrict the number of pages fetched to a maximum of 10. Enhanced logging to provide clearer information about the current page and maximum limit, and added a log message for when the maximum page limit is reached to improve visibility during data collection.
2025-04-17 10:05:51 -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
17446bddc1
Delete ocean_scraper.py 2025-04-17 08:43:38 -07:00
DJObleezy
1d84bb08a8
Add files via upload 2025-04-16 23:23:07 -07:00
DJObleezy
4e7aace5d8 Refactor data retrieval to use web scraping
This commit removes the `OceanAPIClient` and introduces the `OceanScraper` for data retrieval in the mining dashboard application. Key changes include:
- Updated `App.py` to import `OceanScraper`.
- Enhanced `data_service.py` to reflect the transition to web scraping, including updates to the `MiningDashboardService` class.
- Improved methods for fetching metrics and worker data with better error handling and logging.
- Preserved the original web scraping method as a fallback.
- Removed the `ocean_api_client.py` file
- Added a new `ocean_scraper.py` file with comprehensive scraping functionality.
2025-04-16 22:05:12 -07:00
DJObleezy
60376e7395 Integrate Ocean API for enhanced metrics and worker data
Added `OceanAPIClient` to facilitate API interactions in `App.py`.
Modified `update_metrics_job` to include API status checks and fetch metrics.
Introduced `/api/check-api` endpoint for Ocean API health checks.
Updated `MiningDashboardService` to initialize the API client and fetch data directly from the Ocean API, with fallbacks to web scraping.
Refactored data retrieval methods to prioritize API calls and added error handling.
Enhanced logging for API interactions and created a new module `ocean_api_client.py` for encapsulating API logic.
Implemented retry mechanisms for API requests and updated data processing to align with the new API response structure.
2025-04-16 20:37:35 -07:00
DJObleezy
0a32b492b8 Improve API connectivity and error handling
Updated `MiningDashboardService` in `data_service.py` to enhance API connectivity testing and error handling. Introduced `_api_request_with_retry` for retry logic on API requests, and modified `_test_api_connectivity` to log detailed connectivity test information. Refactored multiple API calls to utilize the new retry method, improving reliability when fetching user hashrate data, pool stats, and other metrics.
2025-04-16 17:58:06 -07:00
DJObleezy
c9a2f927ff Improve API connectivity checks in MiningDashboardService
Updated the `_test_api_connectivity` method in `data_service.py` to include additional headers and enhanced logging. The method now attempts to ping a wallet-specific endpoint first, followed by a standard ping and a statsnap endpoint if necessary. Detailed error messages and a debug URL have been added for better troubleshooting, improving the overall robustness and clarity of the connectivity checks.
2025-04-16 17:46:47 -07:00
DJObleezy
f52b947633 Integrate Ocean.xyz API into MiningDashboardService
Updated `MiningDashboardService` in `data_service.py` to incorporate a new API from Ocean.xyz. Added base URL, connectivity test method, and new data-fetching methods. Existing methods modified to use the API when available, enhancing data retrieval efficiency. Improved error handling and logging, while retaining original web scraping methods as fallbacks.
2025-04-16 17:35:20 -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
5664e44cd9 Refactor daily stats posting logic
Updated the `_should_post_daily_stats` method to clarify that it checks for posting once per day at 12 PM. Simplified the logic to focus solely on this target time, requiring it to be a different day and within the first 5 minutes of 12 PM for posting. Adjusted the first-time posting condition to specifically check for 12 PM.
2025-04-15 21:31:19 -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
1eb17aed80 Refactor header styles and update last updated info
- Decreased font size of `h1` in `common.css` and added padding for better usability.
- Introduced hover effects for the top right link.
- Removed link from `h1` in `base.html` and added a block to display the last updated time.
2025-04-12 21:01:32 -07:00
DJObleezy
93175a7b40 Remove block mining animation SVG file
The entire SVG file for the block mining animation has been deleted. This includes all graphical elements, animations, and scripts related to the background, blockchain representation, Bitcoin logo, current block details, mining animation, status display, timestamp display, and CRT flicker animation.
2025-04-12 20:49:51 -07:00