Minor tweaks to troubleshooting page
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<h1 class="my-4">Troubleshooting</h1>
|
<h1 class="my-4">Troubleshooting</h1>
|
||||||
<!--Force Close App-->
|
<!--Force Close App-->
|
||||||
<div class="card p-2 my-4">
|
<div class="card p-2 my-4">
|
||||||
<div>
|
<div class="card-body">
|
||||||
<h2>Force Close</h2>
|
<h2>Force Close</h2>
|
||||||
<br />
|
<br />
|
||||||
<p>
|
<p>
|
||||||
@@ -15,20 +15,20 @@
|
|||||||
<div class="alert alert-danger" v-if="closeAppStatus === false">
|
<div class="alert alert-danger" v-if="closeAppStatus === false">
|
||||||
Error while closing Appplication
|
Error while closing Appplication
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
<button
|
||||||
<button
|
class="btn btn-warning"
|
||||||
class="btn btn-warning"
|
:disabled="closeAppPressed"
|
||||||
:disabled="closeAppPressed"
|
@click="closeApp"
|
||||||
@click="closeApp"
|
>
|
||||||
>
|
Force Close
|
||||||
Force Close
|
</button>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--Unpair all Clients-->
|
<!--Unpair all Clients-->
|
||||||
<div class="card p-2 my-4">
|
<div class="card p-2 my-4">
|
||||||
<div>
|
<div class="card-body">
|
||||||
<h2>Unpair All Clients</h2>
|
<h2>Unpair All Clients</h2>
|
||||||
<br />
|
<br />
|
||||||
<p>Remove all your paired devices</p>
|
<p>Remove all your paired devices</p>
|
||||||
@@ -38,15 +38,15 @@
|
|||||||
<div class="alert alert-danger" v-if="unpairAllStatus === false">
|
<div class="alert alert-danger" v-if="unpairAllStatus === false">
|
||||||
Error while unpairing
|
Error while unpairing
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
<button
|
||||||
<button
|
class="btn btn-danger"
|
||||||
class="btn btn-danger"
|
:disabled="unpairAllPressed"
|
||||||
:disabled="unpairAllPressed"
|
@click="unpairAll"
|
||||||
@click="unpairAll"
|
>
|
||||||
>
|
Unpair All
|
||||||
Unpair All
|
</button>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+4
-21
@@ -524,17 +524,8 @@ void unpairAll(resp_https_t response, req_https_t request){
|
|||||||
pt::write_json(data, outputTree);
|
pt::write_json(data, outputTree);
|
||||||
response->write(data.str());
|
response->write(data.str());
|
||||||
});
|
});
|
||||||
|
nvhttp::erase_all_clients();
|
||||||
try {
|
outputTree.put("status", true);
|
||||||
nvhttp::erase_all_clients();
|
|
||||||
outputTree.put("status", true);
|
|
||||||
}
|
|
||||||
catch(std::exception &e) {
|
|
||||||
BOOST_LOG(warning) << "unpairAll: "sv << e.what();
|
|
||||||
outputTree.put("status", false);
|
|
||||||
outputTree.put("error", e.what());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void closeApp(resp_https_t response, req_https_t request){
|
void closeApp(resp_https_t response, req_https_t request){
|
||||||
@@ -550,16 +541,8 @@ void closeApp(resp_https_t response, req_https_t request){
|
|||||||
response->write(data.str());
|
response->write(data.str());
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
proc::proc.terminate();
|
||||||
proc::proc.terminate();
|
outputTree.put("status", true);
|
||||||
outputTree.put("status", true);
|
|
||||||
}
|
|
||||||
catch(std::exception &e) {
|
|
||||||
BOOST_LOG(warning) << "CloseApp: "sv << e.what();
|
|
||||||
outputTree.put("status", false);
|
|
||||||
outputTree.put("error", e.what());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void start() {
|
void start() {
|
||||||
|
|||||||
Reference in New Issue
Block a user