TWSD-1483 - HA Configuration in webUI is not in sync with HA CLI configuration

Review Request #1269 — Created Dec. 29, 2025 and submitted — Latest diff uploaded

shuinvy
AVX2
rel_avx_2_7_5
TWSD-1483
austin, lucille, stevenku

Fix HA status not recover after enable is failed

The Jira link:
https://arraynetworks.atlassian.net/browse/TWSD-1483

Because in CLI, the HA can be enable only when you configure VCID and Keepalive IP,
I changed Python code for API that you need to update VCID or Keepalive IP first, then call CLI update ha status.
That is,
I merge the update function to one instead of by its fields.
The original update function for individual fields will cause issue that even you update VCID,
the CLI run ha update first, so frontend will get "VCID is not set" warning.

Besides, for frontend changes,
even you change HA status failed, it will still in "Enable", so I fix it by the code:
if (tableData.data[0]) { // Update successfully }else{ if (post_data.hasOwnProperty("ha")) { tabViewModel.showHaConfiguration.ha = false; } else { form.$dirty = true; } }
That is,
when user is updating HA status, it will turn HA status to "Disable" if the operation is failed.

By the way, the information of HA is too slow.
That is,
the API:
/api/avx/ha/HAConfiguration/_fields
will take 3 seconds.
because it only need three fields to return,
I changed it to
/api/avx/ha/HAConfiguration/_fields?fields=["ha", "keepalive_ip", "vc_id"]
after changing, it only take 1 seconds.

I also remove useless code.

    Loading...