Review main Merged

63328[FEATURE] Add bar- and doughnut-graph widgets to dashboard

Richard Haeser CR +2 V +2 Hard +617 −6 updated 02/22/20, 16:50

Commit message

You can now create widgets for the dashboard showing a bar- or
doughnut-graphs. As an example two new widgets are introduced
showing information about the number of errors in the sys_log
and about the number of normal backend users vs admin users.

Review

  • Code review CR +2 Done
    • Susi Moog +2
    • Daniel Goerz +1
  • Verified V +2 Done
    • Susi Moog +2
    • Daniel Goerz +1
    • Daniel Siepmann +1
    • TYPO3com +1 CI

Issues 1

Files 18

Review log 2530

Show 45 earlier messages
  1. Richard Haeser uploaded patch set 1 02/19/20, 23:21

  2. TYPO3com voted on patch set 1 V -1 02/19/20, 23:39 Completed build in 18m 07s on Wed, 19 Feb, 11:39 PM Test Summary: 71464 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-333

  3. Stephan Großberndt commented on patch set 1 02/20/20, 05:31

    SysLogErrorsWidget.php:46 Unresolved

    Please use count(*) instead of selecting all rows and using rowcount.

    TypeOfUsersWidget.php:40

    Please use count(*) instead of selecting all rows and using rowcount.
  4. Stephan Großberndt voted on patch set 1 CR -1 02/20/20, 05:31

  5. Daniel Siepmann commented on patch set 1 02/20/20, 06:53

    ChartInitializer.ts:14

    As far as I know we wanna get rid of jQuery? So we should prefer native JavaScript, not sure on that. Maybe ask Andreas Fernandez.

    ChartInitializer.ts:33

    I'm a big fan of early returns. Not sure how this is handled within TYPO3. Everything following is inside this if condition, so inverting and adding early return would make code more readable, at least to me.

    AbstractChartWidget.php:16

    The first thing I've missed as a user when adding the concrete widgets was a link to the source of the data. E.g. to the sys log module or backend user module. Would it make sense to always add a button "Go to source" or something like that?

    AbstractChartWidget.php:18

    Maybe we should add some PHPDoc to the properties? Some are intended to be filled by concrete widgets and foreign developers. Providing at least a url to some docs regarding structure would be cool. E.g. how to provide `chartData`? Which array structure is expected?

    AbstractChartWidget.php:58

    Could be shortened to `GeneralUtility::getFileAbsFileName('EXT:dashboard/Resources/Public/')` I guess? Not sure which one to prefer. But would make code shorter and easier to read.

    TypeOfUsersWidget.php:40 Reply

    Just do give more context, the reason is missing support across supported DBMS, see: https://forge.typo3.org/issues/78129 E.g. widgets would not work work with sqlite.

    ChartWidget.html:7

    I guess this will result in same `id` used multiple times, when multiple chart widgets are added? Should we use an class or nothing at all, just select by tag name?
  1. Stephan Großberndt commented on patch set 1 02/20/20, 07:10

    ChartInitializer.ts:14 Reply

    Ack

    ChartInitializer.ts:33 Reply

    Ack

    AbstractChartWidget.php:16 Reply

    Ack

    AbstractChartWidget.php:18 Reply

    Ack

    AbstractChartWidget.php:58 Reply

    Am I missing sth? The variable is unused and should be removed

    TypeOfUsersWidget.php:40 Reply

    It's also a performance issue on most DBMS. You are requesting lots of data to be processed you are not using at all.

    ChartWidget.html:7 Reply

    Ack
  2. Daniel Siepmann voted on patch set 1 V +1 02/20/20, 07:14

  3. Richard Haeser commented on patch set 1 02/20/20, 07:30

    ChartInitializer.ts:33 Reply Unresolved

    Ack

    AbstractChartWidget.php:16 Reply Unresolved

    We can add the possibility to add a button to this type of button as it can make sense indeed. Although I think that not every widget does need such a button and sometimes there are no overviews yet of data. Will add a button possibility so it can be defined in the implementation.

    AbstractChartWidget.php:18 Reply Unresolved

    Will add some PHPDoc

    AbstractChartWidget.php:58 Reply Unresolved

    Refactoring your code just before you push is never a good idea... :( Will remove the variable.

    TypeOfUsersWidget.php:40 Reply Unresolved

    Will change to count(*) indeed

    ChartWidget.html:7 Reply

    You are totally right! Will fix this
  4. Richard Haeser commented on patch set 1 02/20/20, 08:24

    ChartInitializer.ts:14 Reply

    As discussed with Andreas on Slack. For now this is ok. Event delegation (what is used in this script) is a broader topic and we should check to get a reusable solution. After that we can do a small refactor of this code.
  5. Richard Haeser uploaded patch set 2 02/20/20, 20:28

  6. TYPO3com voted on patch set 2 V -1 02/20/20, 21:14 Completed build in 27m 46s on Thu, 20 Feb, 09:14 PM Test Summary: 1 of 71920 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-363

  7. Susi Moog uploaded patch set 3 02/21/20, 12:49

  8. Susi Moog uploaded patch set 4 02/21/20, 13:02

  9. TYPO3com voted on patch set 4 V +1 02/21/20, 13:48 Completed build in 39m 24s on Fri, 21 Feb, 01:48 PM Test Summary: 71464 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-399

  10. TYPO3com voted on patch set 3 V +1 02/21/20, 13:58 Completed build in 49m 30s on Fri, 21 Feb, 01:58 PM Test Summary: 71464 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-398

  11. Koen Wouters voted on patch set 4 V +1 02/21/20, 15:31

  12. Daniel Siepmann voted on patch set 4 V +1 02/21/20, 15:39

  13. Richard Haeser uploaded patch set 5 02/22/20, 14:01

  14. Benjamin Kott commented on patch set 5 CR -1 02/22/20, 14:10

    AbstractBarChartWidget.php:26 Unresolved

    content-widget-chart-bar

    AbstractDoughnutChartWidget.php:26 Unresolved

    content-widget-chart-pie

    dashboard-chart-bar.svg:1 Unresolved

    unused

    dashboard-chart-doughnut.svg:1 Unresolved

    unused
  15. Benjamin Kott commented on patch set 5 02/22/20, 14:11

    AbstractChartWidget.php:120 Unresolved

    content-widget-chart
  16. Daniel Goerz uploaded patch set 6 02/22/20, 14:19

  17. Daniel Goerz commented on patch set 6 CR -1 02/22/20, 14:20

    Reapply the -1 from Benji, because I did not tackle hie comments in the last PS
  18. Richard Haeser uploaded patch set 7 02/22/20, 14:49

  19. Daniel Siepmann voted on patch set 7 V +1 02/22/20, 14:52

  20. Susi Moog voted on patch set 7 CR +1 02/22/20, 14:54

  21. Susi Moog voted on patch set 7 V +1 02/22/20, 14:57

  22. Daniel Goerz voted on patch set 7 V +1 CR +1 02/22/20, 14:59

  23. TYPO3com voted on patch set 7 V +1 02/22/20, 15:54 Completed build in 59m 38s on Sat, 22 Feb, 03:54 PM Test Summary: 71518 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-479

  24. Susi Moog voted on patch set 7 V +2 CR +2 02/22/20, 16:49

  25. Susi Moog merged patch set 8 02/22/20, 16:50