Compare commits
No commits in common. "43f35da9a2b076e3ff23a0b48524f589e739e7f6" and "3e46f82c0e7bc4cf8f8fa3e55785b0cb851ad341" have entirely different histories.
43f35da9a2
...
3e46f82c0e
@ -117,7 +117,7 @@ public:
|
||||
|
||||
ServerResources(const ServerResources&) = delete;
|
||||
|
||||
explicit ServerResources(const std::string& staticFilesPath): sf(std::make_unique<http::resource::StaticFileFactory>()), api(std::make_unique<api_driver::ApiDriver>()) {
|
||||
ServerResources(const std::string& staticFilesPath): sf(std::make_unique<http::resource::StaticFileFactory>()), api(std::make_unique<api_driver::ApiDriver>()) {
|
||||
api->startDaemon();
|
||||
auth.users.emplace_back(std::make_shared<http::auth::User>("admin", "", http::auth::User::SUPERUSER));
|
||||
|
||||
|
@ -69,13 +69,13 @@ public:
|
||||
std::string managementIp, managementGateway, mode, dataIp;
|
||||
unsigned int dataMtu = 1500;
|
||||
|
||||
TerminalNetworkSettings() = default;
|
||||
TerminalNetworkSettings() { this->reset(); }
|
||||
TerminalNetworkSettings(const TerminalNetworkSettings& src) = default;
|
||||
~TerminalNetworkSettings() = default;
|
||||
|
||||
TerminalNetworkSettings& operator= (const TerminalNetworkSettings& src) = default;
|
||||
|
||||
void loadDefaults() {
|
||||
void reset() {
|
||||
managementIp = "0.0.0.0/0";
|
||||
managementGateway = "";
|
||||
mode = "l2";
|
||||
@ -185,7 +185,6 @@ private:
|
||||
if (tmp == "tun") {
|
||||
s.mode = "l3";
|
||||
CP_GetNetwork(sid, "addr_data", &s.dataIp);
|
||||
s.dataIp += "/24";
|
||||
} else {
|
||||
s.mode = "l2";
|
||||
s.dataIp = "0.0.0.0/24";
|
||||
@ -461,7 +460,7 @@ public:
|
||||
|
||||
if (readback) {
|
||||
std::string tmp;
|
||||
s.loadDefaults();
|
||||
s.reset();
|
||||
s.managementIp.clear();
|
||||
CP_GetNetwork(sid, "addr", &s.managementIp);
|
||||
CP_GetNetwork(sid, "mask", &tmp);
|
||||
|
@ -1618,8 +1618,7 @@
|
||||
|
||||
const doFetchAbout = async () => {
|
||||
try {
|
||||
const fr = await fetch("/api/get/aboutFirmware")
|
||||
const d = await fr.json()
|
||||
let d = await fetch("/api/get/aboutFirmware")
|
||||
this.about.firmwareVersion = d["fw.version"]
|
||||
this.about.modemUid = d["fw.modemId"]
|
||||
this.about.modemSn = d["fw.modemSn"]
|
||||
|
@ -29,8 +29,7 @@ body {
|
||||
--bg-color: #2d2c33;
|
||||
--bg-selected: #424248;
|
||||
--bg-element: #626268;
|
||||
--bg-action: #3a58af;
|
||||
--bg-danger: #ac1e1e;
|
||||
--bg-action: #4a70d5;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user