Skip to content

Enrich Missing APIs and Disk Info#133

Open
imans777 wants to merge 14 commits into
linkedin:masterfrom
imans777:enrich-missing-apis-and-disk-info
Open

Enrich Missing APIs and Disk Info#133
imans777 wants to merge 14 commits into
linkedin:masterfrom
imans777:enrich-missing-apis-and-disk-info

Conversation

@imans777

@imans777 imans777 commented May 22, 2026

Copy link
Copy Markdown

TL;DR:
This PR is built on top of #132, so it contains lots of features and upgrades existing there, and also has #121 and #129 in it. (that PR should be merged before this one for cleaner approach)

It resolves #128 and also resolves #130, so it fixes existing bugs and also enriches all APis and disk-supports, so that anyone using UI now have access to everything they need and lacked before.

I extremely encourage new users to take this branch and put it into use because it might take plenty of time for these to be merged, and its features are what anyone would need, especially for JBOD deploys which now there are support for individual disk information and manipulations.

Feedbacks are welcomed.


Changes of this PR, considering what's newer than #132 (My purpose of making this PR on top of another is that we wanted to use this in our org and features in that PR were also needed. I'll rebase once that's merged, but for now this is the complete and usable version):

Features:

  • Add support for making following API calls in administration tab: "/remove_disk", "/topic_configuration", "/fix_offline_replicas", and "/admin"
  • Add support to select disks in administration tab, and use it in "/demote_broker" and "/remove_disk" APIs.
  • Improve administration response and use "verbose", so all data is received and parsed into corresponding tables and visually navigable, including Summary, LoadDiffTable, InterBrokerMovementTable, and Goals (No more nasty JSON response).
  • Add ability to show load per disk in "/load" tab, and now supports showing loads by percentage.
  • Add ability to have "/proposals" working for "intra-broker" rebalances and shows per-disk changes.
  • Separate LoadDiffTable into its own component, so it can be reused both in proposals and admin responses.
  • Improve DiffCell: it now supports different types, proper unit formatting, and can support APIs with no "LoadBeforeOptimization" property.
  • Improve AnomalyDetector to show all available fields from API, and also show "Recent Disk Failures"
  • Improve InterBrokerMovementTable so one can filter by topic and also extract reassignment.json file for further customizing the results when needed.
  • Also replicas in removed brokers are now red and added brokers are green so one have a better visualization at what's going on.
  • Add ability to list topics in PartitionLoad component, and also improve their values.
  • Add remaining fields in "/cluster_state" API, like leader/replicas per broker stats and total online/offline log dirs.
  • Add more fields in admin APIs like "replication_throttle" and "destination_broker_ids" where supported.

Minors:

  • Improve summary table to contain also balancedness score (before -> after)
  • Add ability to select/deselect all brokers in admin tab.
  • Add "Replication LogDir Throttle" field in admin requests, but saying that it's not yet implemented yet on CC backend and is for future.
  • Add ability to sort tables both ascending and descending in Cluster Load tab, and also improve sorting in several other tables.
  • Add missing file-loader dependency
  • Increase async retry delay so one can read the async message before it disappears
  • improve filters regarding disk units, network units, and time
  • Update demote_broker to use json param
  • Improve cursor and sortings on user-tasks
  • Fix "InterBroker" fields in executor panel: fields don't have this word in them and are removed.
  • Add several hints, tooltips, and descriptions where needed.

Some Images:

New APIs in admin page and more fields for each request:
Screenshot 1405-03-03 at 15 17 22

Select a disk to call "/remove_disk":
Screenshot 1405-03-03 at 15 18 48

Result of a "/remove_disk" call in details, showing load after optimization and goal violation states:
Screenshot 1405-03-03 at 15 19 14

Result of a "/add_broker" API call, showing before/after load difference, proposed movements, and red/green for old/new replicas, and ability to filter topics and create "reassignment.json" file for manual execution:
Screenshot 1405-03-03 at 15 19 53

Cluster Load tab showing load of replica/leader/disk-usage per disk:
Screenshot 1405-03-03 at 15 20 12

Cluster Load tab showing percentage based usage:
Screenshot 1405-03-03 at 15 20 19

dattagiri and others added 13 commits April 27, 2026 16:34
…ole.log

- Fix Axios POST calls passing config as request body instead of 3rd arg
  across Executor, Monitor, AdminBroker, AnomalyDetector, PeerReview,
  and AdminSampling components
- Add missing vm.loading = false in empty-response and async branches
  in Monitor, Analyzer, and Proposals
- Fix Analyzer auto-refresh UI flicker by not resetting loaded in getState()
- Add showAsyncRefreshButton to AdminBroker data() for Vue reactivity
- Parse response before assigning to errorData in AdminBroker
- Fix typo errStopProsalExecution -> errStopProposalExecution
- Remove all console.log statements from production source
- Fix potential double-slash in dev-server.js static path
- Replace deprecated substr with toLocaleString in UserTasks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…data fields

- Add descriptive labels (Data Movement, Partition Movements) to inter-broker
  and intra-broker progress bars in Executor view
- Remove stale User-Task-ID header from POST requests in AdminBroker to prevent
  "Unexpected header" errors
- Fix proposal summary field fallbacks and loading states in Proposals view

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… bugs

- Add shared fetchCC helper to centralize duplicated fetch+parse logic across 14 components
- Extract magic numbers (30000, 5000, 20, 500) into src/constants.js
- Extract repeated movement tables in Executor.vue into InterBrokerMovementTable
  and IntraBrokerMovementTable reusable components
- Fix wrong method refs: getProposals() → getKafkaState/getLoad/getPartitionLoad
  in AdminBroker, Load, and PartitionLoad async refresh buttons
- Fix ReplicaLoad.vue arrow function watchers that broke `this` binding
- Fix missing showAsyncRefreshButton in data() for Load and PartitionLoad
- Remove undeclared this.newurl assignments across 6 components
- Remove side-effectful loadingSeconds computed property in Proposals.vue
- Remove dead stopProposalExecution method from AnomalyDetector.vue
- Remove orphaned taskId computed from AdminBroker.vue
- Remove unused moment.js dependency from package.json
- Fix Proposals.vue v-if → v-else-if guards between loading states

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace build-url with native URLSearchParams, replace shelljs with
a simple child_process which helper, and bump rimraf from v5 to v6
to eliminate deprecated transitive glob/inflight dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix credentials:'omit' → 'include' in fetchCC and all window.fetch calls
  (was causing 401 Unauthorized on auth-enabled Cruise Control)
- Consolidate 3 raw window.fetch calls into shared fetchCC helper
- Set global Axios.defaults.withCredentials = true as safety net
- Fix missing loading=false in empty/async branches (UserTasks, ReplicaLoad,
  SummaryRow, AdminSampling, PeerReview — spinner was stuck forever)
- Fix ResourceDistribution double fetch on mount (beforeMount + mounted race)
- Fix AdminSampling untracked 3s setTimeout (fires on destroyed instance)
- Add missing :key to v-for (KafkaBrokerState, ReplicaLoad, Summary)
- Remove dead computed properties (DiffCell changesign/pctclass)
- Add null guard on Goal.clusterModelStats, fix Page.vue magic strings
- Fix AppNav notselected always true, connect reloadForever to created()
- Fix Proposals allKeys.push(numKeys) → spread operator
- Add nginx.conf with try_files for Vue Router history mode
- Expand .dockerignore, add HEALTHCHECK and explicit CMD to Dockerfile
- Remove redundant DefinePlugin (mode: already sets NODE_ENV)
- Fix fragile pre-stringified env values with JSON.stringify()
- Remove dead deps (eventsource-polyfill, file-loader)
- Enable plugin:vue/essential in eslint, remove deprecated babel targets
- Set assetsPublicPath to './' (build) and '/' (dev), disable source maps
- Fix dev-server browser open URL from 0.0.0.0 to localhost

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e dead deps

- Remove orphaned setInterval from created() in Analyzer, Executor, Monitor
  (argsChanged() already starts the interval, so created() was leaking one)
- Proposals.vue: call argsChanged() in created() instead of getProposals()
  to ensure proper URL resolution before fetching
- Remove .babelrc and .eslintrc.js from .dockerignore (needed by builder stage)
- Add missing :key on PartitionLoad.vue td v-for
- Remove unused devDependencies: style-loader, @babel/register

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix fetchCC async misclassification: check !resp.ok before text/plain
  async detection to prevent 4xx/5xx errors entering infinite retry loop
- Track argsChanged retry timers in all 14 components: add argsRetryTimer
  data property, store setTimeout handle, clear in beforeDestroy
- KafkaClusterState: use ARGS_RETRY_MAX/ARGS_RETRY_DELAY constants
  instead of hardcoded 5/500ms
- AdminBroker: reset loaded=false on fetch error to hide stale data;
  fix v-for+v-if on same element (3 occurrences) using template wrapper
- Remove duplicate .postcssrc.js (postcss.config.js takes precedence)
- Remove redundant cssnano from devDependencies
- Remove dead reload subscriber from dev-client.js
- AppNav: replace try/catch with null check in beforeDestroy
- nginx.conf: add X-Content-Type-Options, X-Frame-Options, Referrer-Policy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d UI correctness

- Fix fetchCC async detection and error ordering
- Fix all 23 eslint violations (template keys, unused vars, parsing errors)
- Add defensive default merging for Analyzer, Monitor, AnomalyDetector state
- Fix Proposals host/broker null guard for missing after-optimization data
- Fix ResourceDistribution Map→Array for Vue 2 reactivity compatibility
- Fix PeerReview reconstructURL preserving original query params
- Fix Monitor bootstrapMetrics to use POST method
- Fix AdminBroker posted/clearPostResponse ordering and summary parsing
- Fix ReplicaLoad swapped NetIn/NetOut columns and snapshots length guard
- Fix KafkaClusterState and SummaryRow division-by-zero with N/A fallback
- Fix PartitionLoad null guard on toFixed/parseInt
- Fix Page.vue sentinel check for /a/b placeholder route
- Fix Load.vue guarding getLoad when rawdata prop supplied
- Add zero-safe nullish fallbacks in Proposals and AdminBroker
- Remove unused imports (store, BooleanEL, State component registrations)
- Enable ESLint failOnError in webpack build
- Add nginx gzip and security headers
- Add vue-eslint-parser dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d async retry safety

- Delete JSESSIONID cookie before each fetch to prevent CC's UserTaskManager
  from returning stale cached responses for the same browser session
- Add cache: no-store and no-cache meta tags to prevent browser caching
- Fix dev-server proxy to preserve full request path using pathFilter
- Add executor initializing state support (INITIALIZING_PROPOSAL_EXECUTION,
  GENERATING_PROPOSALS_FOR_EXECUTION)
- Gate async auto-retries on task ID presence to avoid triggering expensive
  CC computations when User-Task-ID header is not available
- Clear cached task ID on successful response across all pages
- Add full User-Task-ID lifecycle to ReplicaLoad.vue
- Route Load.vue created() through argsChanged() to fix 404 on hard refresh
- Clear stale chart data in ResourceDistribution before re-fetching
- Bump npm engine requirement to >= 10.0.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… context configs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mohammadazarani

Copy link
Copy Markdown

That's great — that was exactly what we needed.

@arash99s

Copy link
Copy Markdown

I think this is a major and vital change in the direction of cruise-control-ui development. thanks @imans777

@karimiehsan90

Copy link
Copy Markdown

Wooow! exactly what I wanted!

Features:
- Add support for making following API calls in administration tab: "/remove_disk", "/topic_configuration", "/fix_offline_replicas", and "/admin"
- Add support to select disks in administration tab, and use it in "/demote_broker" and "/remove_disk" APIs.
- Improve administration response and use "verbose", so all data is received and parsed into corresponding tables and visually navigable, including Summary, LoadDiffTable, InterBrokerMovementTable, and Goals (No more nasty JSON response).
- Add ability to show load per disk in "/load" tab, and now supports showing loads by percentage.
- Add ability to have "/proposals" working for "intra-broker" rebalances and shows per-disk changes.
- Separate LoadDiffTable into its own component, so it can be reused both in proposals and admin responses.
- Improve DiffCell: it now supports different types, proper unit formatting, and can support APIs with no "LoadBeforeOptimization" property.
- Improve AnomalyDetector to show all available fields from API, show "Recent Disk Failures" and "Recent Topic Anomaly", and sort by detectionMs.
- Improve InterBrokerMovementTable so one can filter by topic and also extract reassignment.json file for further customizing the results when needed.
- Also replicas in removed brokers are now red and added brokers are green so one have a better visualization at what's going on.
- Add ability to list topics in PartitionLoad component, and also improve their values.
- Add remaining fields in "/cluster_state" API, like leader/replicas per broker stats and total online/offline log dirs.
- Add more fields in admin APIs like "replication_throttle" and "destination_broker_ids" where supported.

Minors:
- Improve summary table to contain also balancedness score (before -> after)
- Add ability to select/deselect all brokers in admin tab.
- Add "Replication LogDir Throttle" field in admin requests, but saying that it's not yet implemented yet on CC backend and is for future.
- Add ability to sort tables both ascending and descending in Cluster Load tab, and also improve sorting in several other tables.
- Add missing file-loader dependency
- Increase async retry delay so one can read the async message before it disappears
- improve filters
- Update demote_broker to use json param
- Improve cursor and sortings on user-tasks
- Fix "InterBroker" fields in executor panel: fields don't have this word in them and are removed.
- Add several hints, tooltips, and descriptions where needed.
@imans777 imans777 force-pushed the enrich-missing-apis-and-disk-info branch from 9fbc890 to de27be9 Compare June 6, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CC missing APIs and fields Executor tab doesn't show any information when a rebalancing is running

5 participants