mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
added ability to clear history
This commit is contained in:
@@ -14,6 +14,9 @@ class InternetSpeedTest extends Module
|
||||
public function route()
|
||||
{
|
||||
switch ($this->request->action) {
|
||||
case 'clearTests':
|
||||
$this->clearTests();
|
||||
break;
|
||||
case 'clearLogFile':
|
||||
$this->clearLogFile();
|
||||
break;
|
||||
@@ -73,6 +76,17 @@ class InternetSpeedTest extends Module
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// clearTests
|
||||
// this function will wipe all of the tests and test file inside the IST directory
|
||||
//
|
||||
private function clearTests()
|
||||
{
|
||||
exec("rm {$this->ALL_TESTS_FILE}");
|
||||
exec("rm -rf {$this->SPEED_TEST_DIR}");
|
||||
$this->makeSpeedTestsDir();
|
||||
}
|
||||
|
||||
//
|
||||
// runSpeedTest
|
||||
// this function will execute a wget command and download 50 MB worth of data
|
||||
|
||||
Reference in New Issue
Block a user