diff --git a/config.php b/config.php
index 3685592..b5917a7 100644
--- a/config.php
+++ b/config.php
@@ -1,9 +1,16 @@
array(/* 'localhost:11300' */),
/**
* Saved samples jobs are kept in this file, must be writable
*/
- 'storage' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage.json'
+ 'storage' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage.json',
+ /**
+ * Version number
+ */
+ 'version' => '1.4',
);
diff --git a/lib/include.php b/lib/include.php
index eb23569..d27c6f7 100644
--- a/lib/include.php
+++ b/lib/include.php
@@ -207,6 +207,11 @@ protected function __init() {
$this->servers[] = $server;
}
}
+ try {
+ $storage = new Storage($config['storage']);
+ } catch (Exception $ex) {
+ $this->_errors[] = $ex->getMessage();
+ }
}
public function getErrors() {
diff --git a/lib/tpl/serversList.php b/lib/tpl/serversList.php
index 4f2063d..e2e1879 100644
--- a/lib/tpl/serversList.php
+++ b/lib/tpl/serversList.php
@@ -14,39 +14,40 @@
);
}
?>
-
+
name |
- getServerStats(reset($servers)) as $key => $item):?>
- |
-
+ getServerStats(reset($servers)) as $key => $item): ?>
+ |
+
|
- getServerStats($server);
- ?>
+ getServerStats($server);
+ ?>
-
- |
-
- |
-
- $item):?>
- |
-
-
- |
-
- |
+
+ |
+
+ |
+
+ $item): ?>
+ |
+
+
+ |
+
+ |
-
+
-
+
@@ -56,15 +57,41 @@
Your servers' list is empty. You could fix it in two ways:
-
- - Click the button below to add server just for you and save it in cookies
- - Edit config.php file and add server for everybody
-
+
+ - Click the button below to add server just for you and save it in cookies
+ - Edit config.php file and add server for everybody
+
-
+
Add server
+ array(
+ 'timeout' => 2,
+ 'header' => "Accept-language: en\r\n" .
+ "Cookie: foo=bar\r\n" . // check function.stream-context-create on php.net
+ "User-Agent: " . $_SERVER['HTTP_USER_AGENT'] . "\r\n" .
+ "Accept: application/vnd.github.v3+json\r\n",
+ )
+ ));
+$json = @file_get_contents($url, false, $ctx);
+if ($json) {
+ $document = json_decode($json, true);
+ $latest = current($document);
+ $version = @$latest['name'];
+ if (version_compare($version, $config['version'])>0) {
+ ?>
+
+
+
A new version is available: Get it from Github
+
+