mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 19:00:46 +08:00
Add explicit Huawei hop system-view option and startup column safety-net.
Some hops only accept stelnet in system-view; make it a saved yes/no setting (default off) instead of auto-retry, and always ALTER the new column on API boot when Alembic skips legacy DDL. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
0a550abcb0
commit
b36174bfa4
20 changed files with 242 additions and 10 deletions
|
|
@ -22,6 +22,7 @@ export type HopProxyFieldsState = {
|
|||
hop_command_template: string;
|
||||
hop_vrf: string;
|
||||
hop_target_auth_mode: HopTargetAuthMode;
|
||||
hop_enter_system_view: boolean;
|
||||
};
|
||||
|
||||
export const emptyHopProxyFields = (): HopProxyFieldsState => ({
|
||||
|
|
@ -34,6 +35,7 @@ export const emptyHopProxyFields = (): HopProxyFieldsState => ({
|
|||
hop_command_template: defaultHopTemplate("zte", "ssh", ""),
|
||||
hop_vrf: "",
|
||||
hop_target_auth_mode: "bastion_managed",
|
||||
hop_enter_system_view: false,
|
||||
});
|
||||
|
||||
function FormLabel({ children, required }: { children: ReactNode; required?: boolean }) {
|
||||
|
|
@ -224,6 +226,19 @@ export function HopProxyFields({
|
|||
}}
|
||||
/>
|
||||
</label>
|
||||
{huawei ? (
|
||||
<label className="form-grid__full">
|
||||
<FormLabel>{t("managedNe.hop.enterSystemView")}</FormLabel>
|
||||
<select
|
||||
value={value.hop_enter_system_view ? "yes" : "no"}
|
||||
onChange={(e) => set({ hop_enter_system_view: e.target.value === "yes" })}
|
||||
>
|
||||
<option value="no">{t("managedNe.hop.enterSystemViewNo")}</option>
|
||||
<option value="yes">{t("managedNe.hop.enterSystemViewYes")}</option>
|
||||
</select>
|
||||
<span className="form-field-hint">{t("managedNe.hop.enterSystemViewHint")}</span>
|
||||
</label>
|
||||
) : null}
|
||||
<label className="form-grid__full">
|
||||
<FormLabel>{t("managedNe.hop.commandTemplate")}</FormLabel>
|
||||
<input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue