mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-10-14 09:49:19 +00:00
Merge remote-tracking branch 'origin/feat.nestjs'
This commit is contained in:
commit
ea6e85e250
@ -1,21 +1,12 @@
|
|||||||
const scanEffect = {
|
const scanEffect = {
|
||||||
getTestDevices() {
|
getTestDevices() {
|
||||||
return [
|
return [{ ip: '192.168.43.140', mac: '00:1A:2B:3C:4D:5E', ports: [22] }];
|
||||||
{ ip: '192.168.1.1', mac: '00:1A:2B:3C:4D:5E', ports: [22, 23, 161] },
|
|
||||||
{ ip: '192.168.1.2', mac: '00:1D:7D:AA:1B:01', ports: [22, 23, 161] },
|
|
||||||
{ ip: '192.168.1.3', mac: '00:0C:29:5A:3B:11', ports: [22, 23, 161, 443] },
|
|
||||||
{ ip: '192.168.1.4', mac: '00:23:CD:FF:10:02', ports: [22, 23] },
|
|
||||||
{ ip: '192.168.1.5', mac: '00:04:4B:AA:BB:CC', ports: [22, 23, 80, 443] },
|
|
||||||
{ ip: '192.168.1.6', mac: '00:11:22:33:44:55', ports: [22, 23, 161] },
|
|
||||||
{ ip: '192.168.1.7', mac: '00:1F:45:67:89:AB', ports: [23] },
|
|
||||||
{ ip: '192.168.1.8', mac: '00:50:56:11:22:33', ports: [22, 443, 8443] },
|
|
||||||
];
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async fetchLocalInfo({ setLocalIp, subnet, setSubnet }) {
|
async fetchLocalInfo({ setLocalIp, subnet, setSubnet }) {
|
||||||
setLocalIp('192.168.1.100');
|
setLocalIp('192.168.43.0');
|
||||||
if (!subnet) {
|
if (!subnet) {
|
||||||
const ipParts = '192.168.1.0'.split('.');
|
const ipParts = '192.168.43.0'.split('.');
|
||||||
setSubnet(`${ipParts[0]}.${ipParts[1]}.${ipParts[2]}.0/24`);
|
setSubnet(`${ipParts[0]}.${ipParts[1]}.${ipParts[2]}.0/24`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -62,10 +62,6 @@ const ConfigPage = () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const performParse = async () => {
|
const performParse = async () => {
|
||||||
if (testMode) {
|
|
||||||
await Common.sleep(800 + Math.random() * 700);
|
|
||||||
return await configEffect.generateRealisticConfig(inputText, devices);
|
|
||||||
}
|
|
||||||
return await api.parseCommand(inputText);
|
return await api.parseCommand(inputText);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user