GCP APIs: Custom Date & Request Total icon

GCP APIs: Custom Date & Request Total

v1.0 Updated Mar 17, 2026 264KiB
CWS
9
Users
β˜… 0.00
0 reviews
#30165
of 57.2K
tools
#7875 of 14.2K
βœ…Recently updated

Description

Choose a custom date range on the GCP APIs & Services dashboard and see the total of all API requests for that period. πŸ“ŠπŸ—“οΈ GCP APIs: Custom Date & Request Total πŸ” A Chrome extension for the Google Cloud **APIs & Services** dashboard that lets you choose a **custom date range** (and console presets) and see the **total of all API requests** for that periodβ€”without leaving the page. πŸš€ Features ✨ - **Custom date range** – Pick any start/end date and apply it to the GCP APIs dashboard in one click (the main feature not available in the console by default). βœ… - **Console presets** – Same ranges as the console: 1h, 6h, 12h, 1d, 2d, 4d, 7d, 14d, 30d, plus **Custom** (highlighted in the UI). πŸ“… - **Total requests** – Reads the Requests column from the dashboard table, sums all APIs, and shows: - **In the popup** – "Total requests (this period)" with a Refresh button. πŸ”„ - **On the page** – A blue badge in the top-right with the same total. 🏷️ - **Heartbeat** – While the popup is open on the dashboard, the extension polls every 5 seconds and stops when the total is stable (last 3 fetches match). A **green pulsing dot** means "updating"; a **red dot** means "idle". πŸ’“ - **Account & project preserved** – Applying a date range keeps your current `authuser` and `project` in the URL. πŸ”’ - **Sync with console** – If you change the range in the console (e.g. 14 days), the extension reflects it when you open the popup. πŸ”„ - **Overlay off-dashboard** – When you open the extension on a non-GCP URL, an overlay explains that you need to be on the APIs dashboard and provides a link to open it. πŸ“± Quick start ⚑ From Chrome Web Store πŸ›’ 1. Open the [Chrome Web Store](https://chrome.google.com/webstore) and search for **GCP APIs** or **Custom Date Request Total**. 2. Click **Add to Chrome** and confirm permissions. Manual installation (developers) πŸ’» 1. **Clone the repo** ```bash git clone https://github.com/vikashsparxit/gcp-api-date-picker.git cd gcp-api-date-picker ``` 2. **Load in Chrome** - Go to `chrome://extensions/` - Turn on **Developer mode** (top right) - Click **Load unpacked** and select the extension folder 3. **Use it** - Open [Google Cloud Console β†’ APIs & Services](https://console.cloud.google.com/apis/dashboard) - Click the extension icon - Choose a preset (e.g. 30d) or **Custom** and set start/end dates - Click **Apply Date Range** - See **Total requests (this period)** in the popup and on the page (blue badge) πŸŽ‰ Project structure πŸ“ ``` gcp-api-date-picker/ β”œβ”€β”€ manifest.json # Extension config (MV3), permissions, content scripts β”œβ”€β”€ popup.html # Popup UI (presets, date inputs, total requests, overlay) β”œβ”€β”€ popup.js # Popup logic, URL building, heartbeat, storage β”œβ”€β”€ content.js # Injects "Custom Date Range" button + total-requests badge on dashboard β”œβ”€β”€ getTotalRequests.js # Sums Requests column from visible tables/grids on the page β”œβ”€β”€ style.css # Styles for injected dashboard UI β”œβ”€β”€ icons/ # Extension icons (16, 48, 128) β”œβ”€β”€ README.md └── LICENSE # MIT ``` How it works βš™οΈ - **Date range** – The GCP console encodes the range in the `pageState` query parameter (e.g. `groupValue` for presets like `P30D`, or `customValue` with `start`/`end`). The extension builds this URL, keeps `authuser` and `project`, and navigates the tab so the dashboard reloads with the new range. - **Total requests** – A content script runs on the APIs dashboard, finds tables/grids with a "Requests" column, sums the values (preferring the table with the most data rows), and optionally uses a higher "Total requests: N" from the page when present. The result is shown in the on-page badge and sent to the popup on request; the popup also runs a heartbeat (poll every 5s, stop when stable) and shows a green/red status dot. Permissions πŸ” - **`storage`** – Store last-used dates and preferences. - **`tabs`** – Detect the active tab and update its URL when applying a date range. - **`host_permissions`: `https://console.cloud.google.com/*`** – Run only on the Cloud Console. No external servers; everything runs in your browser. 🌐 Troubleshooting πŸ› οΈ | Issue | What to try | |-------|-------------| | Extension doesn't do anything | Make sure the current tab is `console.cloud.google.com/apis/dashboard`. | | Total requests wrong or stale | Click **Refresh** in the popup, or wait for the heartbeat (green dot) to settle. | | Wrong account/project after Apply | This build keeps `authuser` and `project` from the current URL; if it still switches, open the dashboard in the correct account first, then use the extension. | | No blue badge on page | Reload the APIs dashboard and open the extension again; the badge is injected by the content script. | Contributing 🀝 1. Fork the repo. 2. Create a branch: `git checkout -b feature/your-feature`. 3. Commit: `git commit -am 'Add feature'`. 4. Push: `git push origin feature/your-feature`. 5. Open a Pull Request. Ideas: more date presets, dark theme, i18n, or improving total-requests detection for future console UI changes. πŸ’‘ License πŸ“„ MIT – see [LICENSE](LICENSE). Author πŸ‘¨β€πŸ’» **Vikash Sparxit** GitHub: [@vikashsparxit](https://github.com/vikashsparxit) For bugs or feature requests, open an issue on [GitHub Issues](https://github.com/vikashsparxit/gcp-api-date-picker/issues). πŸ›
GCP APIs: Custom Date & Request Total screenshot 1

Reviews

Loading reviews...

Permissions (2)

Permissions

storageβ„Ή Can store data locally in your browser tabsβ„Ή Can see your open tabs and their URLs

Details

Version 1.0
Updated Mar 17, 2026
Size 264KiB
First Seen Mar 24, 2026