Prepare 2.2.2 release
This commit is contained in:
parent
7a5a811b23
commit
c5b61fea0b
10 changed files with 52 additions and 12 deletions
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
## UNRELEASED
|
## UNRELEASED
|
||||||
|
|
||||||
|
## 2.2.2 - 2020/03/22
|
||||||
|
* Stop auto-sorting tables
|
||||||
|
* Add bandwidth formatter
|
||||||
|
* Check PHP 7.4 compatibility
|
||||||
|
* Increase docker image base to PHP 7.4
|
||||||
|
|
||||||
## 2.2.1 - 2019/11/10
|
## 2.2.1 - 2019/11/10
|
||||||
* Use separate JavaScript file to initialize DataTables
|
* Use separate JavaScript file to initialize DataTables
|
||||||
|
|
||||||
|
|
15
README.md
15
README.md
|
@ -7,10 +7,12 @@ The minimalistic approach of this application is intentional.
|
||||||
* Sources are hosted on [https://github.com/v4rakh/ts3web](https://github.com/v4rakh/ts3web)
|
* Sources are hosted on [https://github.com/v4rakh/ts3web](https://github.com/v4rakh/ts3web)
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
Features which are currently not supported:
|
|
||||||
|
|
||||||
* upload files (only viewing and deleting)
|
TeamSpeak has a detailed interface for permissions and uploading files, therefore the following features are not
|
||||||
* modify permissions (only viewing)
|
supported:
|
||||||
|
|
||||||
|
* uploading files (only viewing and deleting, use the official client for uploading)
|
||||||
|
* editing permissions (only viewing, use the client for editing)
|
||||||
|
|
||||||
## F.A.Q
|
## F.A.Q
|
||||||
|
|
||||||
|
@ -169,7 +171,12 @@ To upgrade:
|
||||||
### Release
|
### Release
|
||||||
* Set a date in the `CHANGELOG.md` file
|
* Set a date in the `CHANGELOG.md` file
|
||||||
* Remove `SNAPSHOT` from the version in `Constants.php`
|
* Remove `SNAPSHOT` from the version in `Constants.php`
|
||||||
* Build the docker image from the project home with `docker build -t varakh/ts3web:latest -t varakh/ts3web:<releaseTag> -f docker/Dockerfile .` and publish it
|
* Build the docker image from the project
|
||||||
|
* if necessary, add GitHub access token to let composer pull dependencies within the image correctly:
|
||||||
|
add `&& composer config --global --auth github-oauth.github.com <token> \` before the `composer install` command,
|
||||||
|
where `<token>` can be retrieved from [GitHub settings](https://github.com/settings/tokens)
|
||||||
|
* execute `docker build -t varakh/ts3web:latest -t varakh/ts3web:<releaseTag> -f docker/Dockerfile .` to build
|
||||||
|
* publish it
|
||||||
* Tag the release git commit and create a new release in the VCS web interface
|
* Tag the release git commit and create a new release in the VCS web interface
|
||||||
|
|
||||||
### Prepare next development cycle
|
### Prepare next development cycle
|
||||||
|
|
|
@ -8,12 +8,12 @@ class Constants
|
||||||
/**
|
/**
|
||||||
* Years tag
|
* Years tag
|
||||||
*/
|
*/
|
||||||
const YEARS = '2019';
|
const YEARS = '2020';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Version tag
|
* Version tag
|
||||||
*/
|
*/
|
||||||
const VERSION = '2.2.2-SNAPSHOT';
|
const VERSION = '2.2.2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return constant by it's class name
|
* Return constant by it's class name
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM phpearth/php:7.3-nginx
|
FROM phpearth/php:7.4-nginx
|
||||||
|
|
||||||
# install deps
|
# install deps
|
||||||
RUN apk add --no-cache git \
|
RUN apk add --no-cache git \
|
||||||
|
@ -7,9 +7,9 @@ RUN apk add --no-cache git \
|
||||||
# adjust nginx
|
# adjust nginx
|
||||||
COPY docker/default.conf /etc/nginx/conf.d/default.conf
|
COPY docker/default.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
RUN sed -i "s|upload_max_filesize = 2M|upload_max_filesize = 1024M|g" /etc/php/7.3/php.ini \
|
RUN sed -i "s|upload_max_filesize = 2M|upload_max_filesize = 1024M|g" /etc/php/7.4/php.ini \
|
||||||
&& sed -i "s|post_max_size = 8M|post_max_size = 1024M|g" /etc/php/7.3/php.ini \
|
&& sed -i "s|post_max_size = 8M|post_max_size = 1024M|g" /etc/php/7.4/php.ini \
|
||||||
&& sed -i "s|max_execution_time = 30|max_execution_time = 86400|g" /etc/php/7.3/php.ini
|
&& sed -i "s|max_execution_time = 30|max_execution_time = 86400|g" /etc/php/7.4/php.ini
|
||||||
|
|
||||||
# copy application and set permissions
|
# copy application and set permissions
|
||||||
COPY config/ /var/www/html/application/config/
|
COPY config/ /var/www/html/application/config/
|
||||||
|
|
|
@ -159,6 +159,11 @@ $container['view'] = function ($container) use ($app) {
|
||||||
});
|
});
|
||||||
$view->getEnvironment()->addFilter($fileSizeFilter);
|
$view->getEnvironment()->addFilter($fileSizeFilter);
|
||||||
|
|
||||||
|
$bandWidthFilter = new TwigFilter('bandwidth', function($bytes, $decimals = 2) {
|
||||||
|
return FileHelper::humanBandwidth($bytes, $decimals);
|
||||||
|
});
|
||||||
|
$view->getEnvironment()->addFilter($bandWidthFilter);
|
||||||
|
|
||||||
// ts specific: time in seconds to human readable
|
// ts specific: time in seconds to human readable
|
||||||
$timeInSecondsFilter = new TwigFilter('timeInSeconds', function($seconds) use ($container) {
|
$timeInSecondsFilter = new TwigFilter('timeInSeconds', function($seconds) use ($container) {
|
||||||
return $container['ts']->getInstance()->convertSecondsToStrTime($seconds);
|
return $container['ts']->getInstance()->convertSecondsToStrTime($seconds);
|
||||||
|
|
|
@ -3,6 +3,7 @@ $(document).ready(function () {
|
||||||
"language": {
|
"language": {
|
||||||
"url": "/theme/bootstrap4/DataTables/en_dataTable.json"
|
"url": "/theme/bootstrap4/DataTables/en_dataTable.json"
|
||||||
},
|
},
|
||||||
"paging": false
|
"paging": false,
|
||||||
|
"aaSorting": []
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -49,4 +49,17 @@ class FileHelper
|
||||||
$factor = floor((strlen($bytes) - 1) / 3);
|
$factor = floor((strlen($bytes) - 1) / 3);
|
||||||
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
|
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output human readable bandwidth size
|
||||||
|
*
|
||||||
|
* @param $bytes
|
||||||
|
* @param int $decimals
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function humanBandwidth($bytes, $decimals = 2) {
|
||||||
|
$sz = 'BKMGTP';
|
||||||
|
$factor = floor((strlen($bytes) - 1) / 3);
|
||||||
|
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor] . '/s';
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -46,7 +46,7 @@ class TSInstance
|
||||||
$this->ts = $ts;
|
$this->ts = $ts;
|
||||||
$this->logger->debug(sprintf('Connected to %s:%s', $this->host, $this->queryPort));
|
$this->logger->debug(sprintf('Connected to %s:%s', $this->host, $this->queryPort));
|
||||||
} catch (TSException $e) {
|
} catch (TSException $e) {
|
||||||
$this->logger->error(sprintf('Could not connect to %s:%s', $this->host, $this->queryPort, $e->getMessage()));
|
$this->logger->error(sprintf('Could not connect to %s:%s. Reason: %s', $this->host, $this->queryPort, $e->getMessage()));
|
||||||
die($e);
|
die($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,12 @@
|
||||||
{'key': 'connection_connected_time', 'apply': 'timeInSeconds'},
|
{'key': 'connection_connected_time', 'apply': 'timeInSeconds'},
|
||||||
{'key': 'client_created', 'apply': 'timestamp'},
|
{'key': 'client_created', 'apply': 'timestamp'},
|
||||||
{'key': 'client_lastconnected', 'apply': 'timestamp'},
|
{'key': 'client_lastconnected', 'apply': 'timestamp'},
|
||||||
|
{'key': 'connection_bandwidth_received_last_minute_total', 'apply': 'bandwidth'},
|
||||||
|
{'key': 'connection_bandwidth_received_last_second_total', 'apply': 'bandwidth'},
|
||||||
|
{'key': 'connection_bandwidth_sent_last_minute_total', 'apply': 'bandwidth'},
|
||||||
|
{'key': 'connection_bandwidth_sent_last_second_total', 'apply': 'bandwidth'},
|
||||||
|
{'key': 'connection_filetransfer Bandwidth Received', 'apply': 'bandwidth'},
|
||||||
|
{'key': 'connection_filetransfer Bandwidth Sent', 'apply': 'bandwidth'},
|
||||||
{'key': 'client_month_bytes_uploaded', 'apply': 'file'},
|
{'key': 'client_month_bytes_uploaded', 'apply': 'file'},
|
||||||
{'key': 'client_month_bytes_downloaded', 'apply': 'file'},
|
{'key': 'client_month_bytes_downloaded', 'apply': 'file'},
|
||||||
{'key': 'client_total_bytes_uploaded', 'apply': 'file'},
|
{'key': 'client_total_bytes_uploaded', 'apply': 'file'},
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
{'key': 'virtualserver_month_bytes_uploaded', 'apply': 'file'},
|
{'key': 'virtualserver_month_bytes_uploaded', 'apply': 'file'},
|
||||||
{'key': 'virtualserver_total_bytes_downloaded', 'apply': 'file'},
|
{'key': 'virtualserver_total_bytes_downloaded', 'apply': 'file'},
|
||||||
{'key': 'virtualserver_total_bytes_uploaded', 'apply': 'file'},
|
{'key': 'virtualserver_total_bytes_uploaded', 'apply': 'file'},
|
||||||
|
{'key': 'connection_filetransfer_bandwidth_received', 'apply': 'bandwidth'},
|
||||||
|
{'key': 'connection_filetransfer_bandwidth_sent', 'apply': 'bandwidth'},
|
||||||
{'key': 'connection_filetransfer_bytes_sent_total', 'apply': 'file'},
|
{'key': 'connection_filetransfer_bytes_sent_total', 'apply': 'file'},
|
||||||
{'key': 'connection_filetransfer_bytes_received_total', 'apply': 'file'},
|
{'key': 'connection_filetransfer_bytes_received_total', 'apply': 'file'},
|
||||||
{'key': 'connection_bytes_sent_speech', 'apply': 'file'},
|
{'key': 'connection_bytes_sent_speech', 'apply': 'file'},
|
||||||
|
|
Reference in a new issue