Coder Social home page Coder Social logo

nc_dashboard's People

Contributors

dehnhardt avatar juliushaertl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nc_dashboard's Issues

Problems with path to css and js files

There are two problems with including js and css files in widgets:

  • Even when the files are correctly loaded there are errors in the log:
Could` not find resource file "/apps/dashboard/widgets/iframe/style.css"
Undefined offset: 0 at /var/www/html/nextcloud/lib/private/template/resourcelocator.php#119
  • When apps are in a different directory than 'apps' the files are not loaded at all.

Is this app death?

Looking at the commits the last one was like 7 months ago, is there still being worked on this app or not?

"Enable only for specific groups" versus Admin settings

Expected behavior

A restriction to specific groups on the Apps page should mask the configuration on the Admin page for all other groups.

Actual behavior

I can set up widgets for all groups, even if they can not use the app.
It is no problem with the usability but it can confuse an Admin.

Steps to reproduce the behavior

  1. Install and activate the Dashboard app.
  2. Select the option "Enable only for specific groups" and add the group admin.
  3. Configure the app/widgets on the Admin page for other groups than admin.

Possible solution

Either prevent the checkbox on the Apps page or filter the widgets config on the Admin page in dependence of the specific groups.

Server configuration

Nextcloud version:
9.0.53 (stable)

List of activated apps:

App list

  …
  - dashboard: 1.9.1 beta
  …

Dashboard app not compatible with utf8mb4_unicode_520_ci

No longer possible to remove any widgets...
Possibly more issues that I did not notice yet
Invalid database records seem to remain in the database after uninstallation of the plugin
The plugin should no longer be installed in the current development state
Thanks for creating this plugin anyway. Is it possible to fix it ?

[index] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE oc_dashboard_settings SET enabled = ? WHERE (widget_id = ?) AND (user_id = ?)' with params [false, "fortunes", "someusername"]:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column nextcloud.oc_dashboard_settings.enabled at row 1 at <>

  1. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 128
    convertException("An exception oc ... 1", Doctrine\DBAL\Dr ... ]})
  2. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1015
    driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "UPDATE `oc_dash ... )", {1: false,2: "fortunes",3: "someusername"})
  3. /var/www/html/nextcloud/lib/private/DB/Connection.php line 216
    executeUpdate("UPDATE `oc_dash ... )", [false,"fortunes","someusername"], [2,2,2])
  4. /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 208
    executeUpdate("UPDATE `oc_dash ... )", {dcValue1: false ... "}, {dcValue1: 2,dcValue2: 2,dcValue3: 2})
  5. /var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    execute()
  6. /var/www/html/nextcloud/apps/dashboard/lib/Db/SettingsRequest.php line 106
    execute()
  7. /var/www/html/nextcloud/apps/dashboard/lib/Service/WidgetsService.php line 124
    disableWidget("fortunes", "someusername")
  8. /var/www/html/nextcloud/apps/dashboard/lib/Controller/NavigationController.php line 140
    removeWidget("fortunes")
  9. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    deleteWidget("fortunes")
  10. /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OCA\Dashboard\Co ... {}, "deleteWidget")
  11. /var/www/html/nextcloud/lib/private/AppFramework/App.php line 118
    dispatch(OCA\Dashboard\Co ... {}, "deleteWidget")
  12. /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OCA\Dashboard\ ... r", "deleteWidget", OC\AppFramework\ ... {}, {_route: "dashbo ... "})
  13. <>
    __invoke({_route: "dashbo ... "})
  14. /var/www/html/nextcloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {_route: "dashbo ... "})
  15. /var/www/html/nextcloud/lib/base.php line 987
    match("/apps/dashboard/widget")
  16. /var/www/html/nextcloud/index.php line 42
    handleRequest()

DELETE /nextcloud/index.php/apps/dashboard/widget
from removedmyipaddress by someusername at 2019-04-09T20:44:28+02:00

API design questions/comments

Remove Widget knowledge / App dependency

The Dashboard should not need to know names, services or anything about the widget apps. Same goes for the other way around.
Instead there should be an event, which apps can listen to. I can post you some demo code if you need it.

Remove the joker

/* 
*optional*, default: nothing
A "Joker" for later use... maybe...
*/
$widget['special']                  = '';

Remove JS/CSS stuff

/*
*optional* default: empty
provide the pathes to aditional cascading style sheets as an array. 
*/
$widget['css']                      = array('one file');

/*
*optional* default: empty
provide the pathes to your javascript files as an array. . 
*/
$widget['js']                       = array('one file', 'another file');

Since you are in an event anyway, and the event is only called in the dashboard controller, so when visiting the dashboard, apps can immediately load their files. Nothing the dashboard should take care of

If you have questions about this, just mention me and I will help you 😃

Automatically populating $HTTP_RAW_POST_DATA is deprecated

On several occasions the following error message appears:

Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0

This should be fixed before the next nextcloud release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.