Skip to content

Commit

Permalink
scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Jan 11, 2020
1 parent 724ea13 commit 41a3e81
Show file tree
Hide file tree
Showing 42 changed files with 96 additions and 82 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ All notable changes to this project will be documented in this file.
## 1.3.0 - 2020-01-1x
### Added
- NC 18 Flow integration #10 [#10](https://github.com/rello/analytics/issues/10)
- Thresholds for all datasource types (notifications just for database)
- Enhanced dataloads with scheduling [#13](https://github.com/rello/analytics/issues/13)
- Advanced configuration page for more options than sidebar [#12](https://github.com/rello/analytics/issues/12)
- new Datasource: Regex grabber for external html [#14](https://github.com/rello/analytics/issues/14)
- new datasource: website grabber [#14](https://github.com/rello/analytics/issues/14)
- Thresholds for all datasource types (notifications just for database)
- Compatibility dark mode [#11](https://github.com/rello/analytics/issues/11)
- [Wiki](https://github.com/Rello/analytics/wiki)

### Changed
- link report in activity message
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From data to report. This on premise data warehouse solution provides modular da

## Features
- Datasources: local/remote file, API, imports, manual entry
- 3rd party*: GitHub Statistics, Regex grabber
- 3rd party*: GitHub Statistics, website grabber
- Storage: stream or database
- Advanced dataloads with scheduling
- Visualization: charts, tables
Expand Down
12 changes: 8 additions & 4 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ From data to report. This on premise data warehouse solution provides modular da
## Features:
- Datasources: local/remote file, API, imports, manual entry
- 3rd party*: GitHub Statistics, Regex grabber
- 3rd party*: GitHub Statistics, website grabber
- Storage: stream or database
- Advanced dataloads with scheduling
- Visualization: charts, tables
Expand All @@ -19,10 +19,14 @@ From data to report. This on premise data warehouse solution provides modular da
(*work in progress)
]]></description>
<version>1.2.11</version>
<licence>agpl</licence>
<author>Marcel Scherello</author>
<namespace>Analytics</namespace>
<licence>agpl</licence>
<author>Marcel Scherello</author>
<namespace>Analytics</namespace>
<documentation>
<user>https://github.com/Rello/analytics/wiki</user>
</documentation>
<category>office</category>
<category>workflow</category>
<website>https://github.com/rello/analytics</website>
<bugs>https://github.com/rello/analytics/issues</bugs>
<repository type="git">https://github.com/rello/analytics.git</repository>
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"ext-json": "*"
},
"require-dev": {
"christophwurst/nextcloud": "^17.0.1",
"symfony/symfony": "^4.2.3",
"guzzlehttp/guzzle": "^6.3.0"
}
"christophwurst/nextcloud": "^18.0.0-rc2",
"symfony/symfony": "^4.2.3",
"guzzlehttp/guzzle": "^6.3.0"
}
}
1 change: 1 addition & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/** global: OCA */
/** global: OCP */
/** global: OC */
/** global: table */
'use strict';

if (!OCA.Analytics) {
Expand Down
3 changes: 3 additions & 0 deletions js/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2020 Marcel Scherello
*/
/** global: OCA */
/** global: OCP */
/** global: OC */
'use strict';

if (!OCA.Analytics) {
Expand Down
27 changes: 14 additions & 13 deletions l10n/de.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** global: OC */
OC.L10N.register(
'analytics',
{
Expand All @@ -23,18 +24,18 @@ OC.L10N.register(
'Technical error. Please check the logs': 'Technischer Fehler. Bitte die Logs prüfen',
'Search': 'Suche',
'first': 'erster',
'previous': 'zurück',
'next': 'weiter',
'last': 'letzter',
'Show _MENU_ entries': 'Zeige _MENU_ Einträge',
'Showing 0 to 0 of 0 entries': 'Zeige 0 bis 0 von 0 Einträgen',
'Showing _START_ to _END_ of _TOTAL_ entries': 'Zeige _START_ bis _END_ von _TOTAL_ Einträgen',
'Delete Report': 'Bericht löschen',
'Are you sure?': 'Bist Du sicher?',
'All data will be deleted!': 'Alle Daten werden gelöscht!',
'Show in Analytics': 'In Analytics anzeigen',
'Column 1': 'Spalte 1',
'Column 3': 'Spalte 3',
'Thresholds': 'Schwellwerte'
'previous': 'zurück',
'next': 'weiter',
'last': 'letzter',
'Show _MENU_ entries': 'Zeige _MENU_ Einträge',
'Showing 0 to 0 of 0 entries': 'Zeige 0 bis 0 von 0 Einträgen',
'Showing _START_ to _END_ of _TOTAL_ entries': 'Zeige _START_ bis _END_ von _TOTAL_ Einträgen',
'Delete Report': 'Bericht löschen',
'Are you sure?': 'Bist Du sicher?',
'All data will be deleted!': 'Alle Daten werden gelöscht!',
'Show in Analytics': 'In Analytics anzeigen',
'Column 1': 'Spalte 1',
'Column 3': 'Spalte 3',
'Thresholds': 'Schwellwerte'
},
'');
27 changes: 14 additions & 13 deletions l10n/de_DE.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** global: OC */
OC.L10N.register(
'analytics',
{
Expand All @@ -23,19 +24,19 @@ OC.L10N.register(
'Technical error. Please check the logs': 'Technischer Fehler. Bitte die Logs prüfen',
'Search': 'Suche',
'first': 'erster',
'previous': 'zurück',
'next': 'weiter',
'last': 'letzter',
'Show _MENU_ entries': 'Zeige _MENU_ Einträge',
'Showing 0 to 0 of 0 entries': 'Zeige 0 bis 0 von 0 Einträgen',
'Showing _START_ to _END_ of _TOTAL_ entries': 'Zeige _START_ bis _END_ von _TOTAL_ Einträgen',
'Delete Report': 'Bericht löschen',
'Are you sure?': 'Bist Du sicher?',
'All data will be deleted!': 'Alle Daten werden gelöscht!',
'Show in Analytics': 'In Analytics anzeigen',
'Column 1': 'Spalte 1',
'Column 3': 'Spalte 3',
'Thresholds': 'Schwellwerte'
'previous': 'zurück',
'next': 'weiter',
'last': 'letzter',
'Show _MENU_ entries': 'Zeige _MENU_ Einträge',
'Showing 0 to 0 of 0 entries': 'Zeige 0 bis 0 von 0 Einträgen',
'Showing _START_ to _END_ of _TOTAL_ entries': 'Zeige _START_ bis _END_ von _TOTAL_ Einträgen',
'Delete Report': 'Bericht löschen',
'Are you sure?': 'Bist Du sicher?',
'All data will be deleted!': 'Alle Daten werden gelöscht!',
'Show in Analytics': 'In Analytics anzeigen',
'Column 1': 'Spalte 1',
'Column 3': 'Spalte 3',
'Thresholds': 'Schwellwerte'
},
'');

Expand Down
2 changes: 1 addition & 1 deletion lib/Activity/ActivityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Activity;
Expand Down
2 changes: 1 addition & 1 deletion lib/Activity/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Activity;
Expand Down
2 changes: 1 addition & 1 deletion lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Activity;
Expand Down
2 changes: 1 addition & 1 deletion lib/Activity/SettingDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Activity;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/Daily.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\BackgroundJob;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/Hourly.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\BackgroundJob;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/ApiDataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/DataSourceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;
Expand Down
19 changes: 11 additions & 8 deletions lib/Controller/DataloadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;

use Exception;
use OCA\Analytics\Activity\ActivityManager;
use OCA\Analytics\Db\DataloadMapper;
use OCP\AppFramework\Controller;
Expand Down Expand Up @@ -82,7 +83,8 @@ public function create(int $datasetId, int $datasourceId)
*/
public function read(int $datasetId)
{
$result['dataloads'] = $this->DataloadMapper->read($datasetId);;
$result = array();
$result['dataloads'] = $this->DataloadMapper->read($datasetId);
$result['templates'] = $this->DataSourceController->getTemplates();
return new DataResponse($result);
}
Expand Down Expand Up @@ -135,7 +137,7 @@ public function simulate(int $dataloadId)
* @NoAdminRequired
* @param $schedule
* @return void
* @throws \Exception
* @throws Exception
*/
public function executeBySchedule($schedule)
{
Expand All @@ -153,7 +155,7 @@ public function executeBySchedule($schedule)
* @NoAdminRequired
* @param int $dataloadId
* @return DataResponse
* @throws \Exception
* @throws Exception
*/
public function execute(int $dataloadId)
{
Expand Down Expand Up @@ -190,7 +192,7 @@ public function execute(int $dataloadId)
*
* @NoAdminRequired
* @param int $dataloadId
* @return array
* @return array|NotFoundResponse
* @throws NotFoundException
*/
private function getDataFromDatasource(int $dataloadId)
Expand Down Expand Up @@ -263,7 +265,7 @@ private function replaceDimension($Array, $Find, $Replace)
* @param $dimension2
* @param $dimension3
* @return DataResponse|NotFoundResponse
* @throws \Exception
* @throws Exception
*/
public function updateData(int $datasetId, $dimension1, $dimension2, $dimension3)
{
Expand Down Expand Up @@ -322,7 +324,7 @@ public function deleteData(int $datasetId, $dimension1, $dimension2)
* @param int $datasetId
* @param $import
* @return DataResponse|NotFoundResponse
* @throws \Exception
* @throws Exception
*/
public function importClipboard($datasetId, $import)
{
Expand Down Expand Up @@ -371,14 +373,15 @@ public function importClipboard($datasetId, $import)
* @param $path
* @return DataResponse|NotFoundResponse
* @throws NotFoundException
* @throws \Exception
* @throws Exception
*/
public function importFile(int $datasetId, $path)
{
$this->logger->error('DataLoadController 378:' . $datasetId . $path);
$datasetMetadata = $this->DatasetController->getOwnDataset($datasetId);
if (!empty($datasetMetadata)) {
$insert = $update = 0;
$option = array();
$option['user_id'] = $datasetMetadata['user_id'];
$option['path'] = $path;
$option['link'] = $datasetMetadata['link'];
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/DatasetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;
Expand Down
5 changes: 3 additions & 2 deletions lib/Controller/OutputController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;
Expand Down Expand Up @@ -89,7 +89,7 @@ public function read(int $datasetId, $objectDrilldown, $dateDrilldown)
* @param $datasetMetadata
* @param $objectDrilldown
* @param $dateDrilldown
* @return array
* @return array|NotFoundException
* @throws NotFoundException
*/
private function getData($datasetMetadata, $objectDrilldown, $dateDrilldown)
Expand All @@ -99,6 +99,7 @@ private function getData($datasetMetadata, $objectDrilldown, $dateDrilldown)
if ($datasource === DataSourceController::DATASET_TYPE_INTERNAL_DB) {
$result = $this->StorageController->read($datasetMetadata, $objectDrilldown, $dateDrilldown);
} else {
$option = array();
$option['user_id'] = $datasetMetadata['user_id'];
$option['link'] = $datasetMetadata['link'];
$result = $this->DataSourceController->read($datasource, $option);
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/ShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/StorageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/ThresholdController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Controller;
Expand Down
2 changes: 1 addition & 1 deletion lib/Datasource/ExternalFileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Datasource;
Expand Down
2 changes: 1 addition & 1 deletion lib/Datasource/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2019 Marcel Scherello
* @copyright 2020 Marcel Scherello
*/

namespace OCA\Analytics\Datasource;
Expand Down
Loading

0 comments on commit 41a3e81

Please sign in to comment.