diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile index bd8388bee..03414717c 100644 --- a/net/vnstat/Makefile +++ b/net/vnstat/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= vnstat -PLUGIN_VERSION= 1.2 +PLUGIN_VERSION= 1.3 PLUGIN_REVISION= 1 PLUGIN_COMMENT= vnStat is a console-based network traffic monitor PLUGIN_DEPENDS= vnstat diff --git a/net/vnstat/pkg-descr b/net/vnstat/pkg-descr index f4eea85ce..942ef7533 100644 --- a/net/vnstat/pkg-descr +++ b/net/vnstat/pkg-descr @@ -9,6 +9,11 @@ ensures light use of system resources. Plugin Changelog ================ +1.3 + +* Added Yearly statistics. +* Fixed typo leftover from removing weekly statistics. + 1.2 * Remove Weekly statistics, unsupported since vnStat v2 diff --git a/net/vnstat/src/opnsense/mvc/app/controllers/OPNsense/Vnstat/Api/ServiceController.php b/net/vnstat/src/opnsense/mvc/app/controllers/OPNsense/Vnstat/Api/ServiceController.php index c72a5d421..a8fbebb7c 100644 --- a/net/vnstat/src/opnsense/mvc/app/controllers/OPNsense/Vnstat/Api/ServiceController.php +++ b/net/vnstat/src/opnsense/mvc/app/controllers/OPNsense/Vnstat/Api/ServiceController.php @@ -78,6 +78,17 @@ class ServiceController extends ApiMutableServiceControllerBase return array("response" => $response); } + /** + * list yearly statistics + * @return array + */ + public function yearlyAction() + { + $backend = new Backend(); + $response = $backend->configdRun("vnstat yearly"); + return array("response" => $response); + } + /** * remove database folder * @return array diff --git a/net/vnstat/src/opnsense/mvc/app/views/OPNsense/Vnstat/general.volt b/net/vnstat/src/opnsense/mvc/app/views/OPNsense/Vnstat/general.volt index add9b5564..469b8ba84 100644 --- a/net/vnstat/src/opnsense/mvc/app/views/OPNsense/Vnstat/general.volt +++ b/net/vnstat/src/opnsense/mvc/app/views/OPNsense/Vnstat/general.volt @@ -31,6 +31,7 @@
  • {{ lang._('Hourly Statistics') }}
  • {{ lang._('Daily Statistics') }}
  • {{ lang._('Monthly Statistics') }}
  • +
  • {{ lang._('Yearly Statistics') }}
  • @@ -53,6 +54,9 @@
    
         
    +
    +
    
    +