This commit is contained in:
nguyentrungthat 2025-11-10 10:49:51 +07:00
parent b14a21088e
commit 99b2641ea2
3 changed files with 5 additions and 6 deletions

View File

@ -281,8 +281,7 @@ export default class LineConnection {
if ( if (
['show inventory', 'sh inventory', 'show inv', 'sh inv'].includes( ['show inventory', 'sh inventory', 'show inv', 'sh inv'].includes(
item.command item.command
) && )
!this.config.inventory
) { ) {
this.config.inventory = JSON.parse(item.textfsm)[0] this.config.inventory = JSON.parse(item.textfsm)[0]
} }

View File

@ -91,8 +91,8 @@ function App() {
if (response.status) { if (response.status) {
if (Array.isArray(response.data)) { if (Array.isArray(response.data)) {
setStations(response.data); setStations(response.data);
if (response.data?.length > 0) // if (response.data?.length > 0)
setActiveTab(response.data[0]?.id.toString()); // setActiveTab(response.data[0]?.id.toString());
} }
} }
} catch (error) { } catch (error) {

View File

@ -61,8 +61,8 @@ const TerminalCLI: React.FC<TerminalCLIProps> = ({
foreground: "#41ee4a", foreground: "#41ee4a",
cursor: "#ffffff", cursor: "#ffffff",
}, },
// rows: 24, rows: 24,
// cols: 80, cols: 80,
}); });
const fitAddon = new FitAddon(); const fitAddon = new FitAddon();
fitRef.current = fitAddon; fitRef.current = fitAddon;