Giter VIP home page Giter VIP logo

processwire-dashboard's Introduction

ProcessWire Dashboard

GitHub tag (latest by date)  ProcessWire version  GitHub License  GitHub (Pre-)Release Date

Display a configurable dashboard in ProcessWire's admin interface. Includes a set of predefined panel types, but can be easily extended to display any content you want.

DocumentationReleasesModule directorySupport forum

Dashboard

Getting Started

Check out the documentation to get started.

Features

  • Multiple panel types available
    The module comes bundled with multiple panel types that should cover 80% of use cases.

  • Easy to extend
    Creating your own panels is easy: you can either render a template file or create your own panel types by creating a ProcessWire module.

  • Highly configurable
    You're free to customize panels in their size, position, title and layout. Panels can be grouped and nested to create whatever layout you need.

  • Configuration as Code
    All configuration is done as code. This meets two objectives: the dashboard config can be version-controlled and sensitive credentials are never stored in the database. You are free to supply the data any way you want, preferably using environment variables.

Support

Contributing

Pull requests are welcome. Please read the Contributing Guidelines.

License

Licensed under GPL-3.0

processwire-dashboard's People

Contributors

adrianbj avatar daun avatar dependabot[bot] avatar netcarver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

processwire-dashboard's Issues

Notice: Undefined variable: content in ..\Dashboard\views\panel.php on line 22 (if empty)

Hi. Not a huge problem, mostly annoyance while debug mode is on, but still:

If using the add-new panel type but the "Add pages" (Bookmarks) are empty (none addable exist or user doesn't have permission to add any pages) - it throws a notice:

Notice: Undefined variable: content in ..\Dashboard\views\panel.php on line 22

For now I just wrapped the whole output in panel.php with <?php if( isset($content) ): ?> but probably you'll do something more robust.

Was using the simplest call in the \site\templates\admin.php:

$panels->add([
    'panel' => 'add-new',
    'title' => 'Add new page',
    'data' => [
        'display' => 'list'
    ]
]);

Redirect issue after deleting pages from trash

Describe the bug
The dashboard is set to be the start page (/processwire/dashboard/) of ProcessWire (backend). When deleting files from the trash in the page listing (/processwire/page/) a redirect occurs which redirects to the dashboard and therefore doesn't stay on the page listing.

To Reproduce
PW Dashboard needs to be set as start page in the backend.
Deleting pages from the trash (which is only available in the page listing /processwire/page/) redirects to the startpage (/processwire/dashboard/).

Expected behavior
Deleting pages from the trash (/processwire/page/)
a) doesn't trigger a redirect (which might be PW specific) or
b) it stays on or redirects to the page listing (/processwire/page/)

Context

  • PHP version 7.4
  • ProcessWire 3.0.195
  • Dashboard 1.2.0

Is it critical?
No, absolutely not. Just unexpected behaviour. Only ever noticed right now after months and months of using this module.

PHP-8.1-related deprecation warning

Running dashboard under PHP 8.1, there is a deprecation warning:

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in ...\site\modules\Dashboard\DashboardPanelCollection.module on line 110

Could you please fix this? It should be simply by using the null coalescing operator:

if (strpos($label ?? '', 'fa-') === 0) {

Thank you and best regards,

Thomas.

PHP Notice: Undefined variable: trend in .../Dashboard/views/panels/number.php:1

Hello,

There is a small bug in the "Number" module, the following error is displayed in Tracy:
PHP Notice: Undefined variable: trend in .../Dashboard/views/panels/number.php:1

Fix:
Change the first line in "number.php" to:
<div class="DashboardPanelNumber__content" data-trend="<?php echo (isset($trend)) ? htmlspecialchars($trend) : ""; ?>">

Multisite problem: Dashboard: Filename "" is not in an allowed path.

Getting error Filename D:/development/cms/site/modules/Dashboard/views/dashboard.php is not in an allowed path

I'm using a multisite setup. My site modules folders reside in their respective folders /site-sitename/modules. I'm not sure, this could be a php related problem but in my case I managed to fix it by replacing the path of the views folder in Dashboard.module:132 (and DashboardPanel.class.php:89). I'd rather not alter the module for updating purposes. Any ideas?

$this->viewFolder = __DIR__.'/views/';
$this->viewFolder = $this->config->paths->siteModules.'Dashboard/views/';

And of course; awesome module!

Missing Edit-Icon in DashboardPanelCollection.module

Describe the bug
In DashboardPanelCollection.module, the Edit icon is not displayed because a FontAwesome class is specified that does not exist.

Fix
Problem is line #L458. Change from "pen-to-square" to "pencil"

Context
Version Dashboard 1.4.0

Fatal Error: Uncaught Error: Class 'NumberFormatter' not found in DashboardPanelNumber.module:43

I'm using the latest version of the module on the latest version of ProcessWire.

I created a number panel and I get this error:
Fatal Error: Uncaught Error: Class 'NumberFormatter' not found in DashboardPanelNumber.module:43

I think it's related to this:
https://stackoverflow.com/questions/30554177/fatal-error-class-numberformatter-not-found

Although I could probably fix it by enabling particular things in php.ini and so forth (I'm using php 7.2), a typical LAMP setup does not have that enabled by default which could be problematic for others.

I wonder what your thoughts are.

Conflict with TracyDebugger

Describe the bug

I have TracyDebugger switched on quite a lot of the time on my account.

If you change the main admin page process from ProcessHome to Dashbord, in Chrome dev console, if you wait a minute it throws this error:

Fatal Error: 	Uncaught Exception: Missing parameter: key in /site/modules/Dashboard/Dashboard.module:300

#0 /site/modules/Dashboard/Dashboard.module(234): Daun\Dashboard\Dashboard->renderInstanceByKey(NULL, NULL)
#1 /wire/core/Wire.php(414): Daun\Dashboard\Dashboard->___execute()
#2 /wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod('___execute', Array)
#3 /wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks(Object(Daun\Dashboard\Dashboard), 'execute', Array)
#4 /wire/core/ProcessController.php(337): ProcessWire\Wire->__call('execute', Array)
#5 /wire/core/Wire.php(414): ProcessWire\ProcessController->___execute()
#6 /wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod('___execute', Array)
#7 /var/www/htm (line 300 of /site/modules/Dashboard/Dashboard.module)  

This error message was shown because: you are logged in as a Superuser. Error has been logged.

It doesn't matter if you have Tracy "on" or minimised in the bottom-right, if Tracy is running it throws that error after a minute or two.

I wasn't sure whether to list it as an issue with this module or on the Tracy module Github page, but I think this is the first module I've seen this sort of error with before so I've posted it here for now - I hope that's alright?

I think a "simple" fix here would be for whatever background JS call is running on the dashboard to simply not run if Tracy is running? Because in theory on a live website Tracy would be switched off.

To Reproduce
Change /admin/ to use Dashboard as its process

Context
Latest ProcessWire dev branch
TracyDebugger installed

PHP 8.2 deprecations

Describe the bug
PHP Deprecated: Creation of dynamic property

To Reproduce
Load the dashboard on a site running PHP 8.2

Expected behavior
No deprecation error

Screenshots

PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$viewFolder is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:89
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$name is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:211
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$class is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:212
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$size is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:214
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$style is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:215
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$align is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:216
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$templateFile is deprecated in .../site/modules/Dashboard/DashboardPanelTemplate.module:69
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$templatePath is deprecated in .../site/modules/Dashboard/DashboardPanelTemplate.module:70
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelTemplate::$variables is deprecated in .../site/modules/Dashboard/DashboardPanelTemplate.module:71
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$viewFolder is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:89
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$name is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:211
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$class is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:212
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$size is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:214
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$style is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:215
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$align is deprecated in /site/modules/Dashboard/DashboardPanel.class.php:216
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$locale is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:41
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$detail is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:42
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$number is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:43
PHP Deprecated: Creation of dynamic property Daun\Dashboard\DashboardPanelNumber::$trend is deprecated in .../site/modules/Dashboard/DashboardPanelNumber.module:44

Context
For server-side issues, include the relevant information:

  • PHP version 8.2
  • ProcessWire version 3.0.211

Additional context
Simplest solution is probably: #[AllowDynamicProperties]
https://stackoverflow.com/questions/74991682/php-8-2-dynamic-properties-deprecated-how-to-use-them-anyway-in-a-compatible-wa

DashboardPanelShortcuts error with external links

Describe the bug
When I use the shortcuts with external links, I always get an error
PHP Notice: Trying to get property 'url' of non-object in ...\site\modules\Dashboard\DashboardPanelShortcuts.module:226

To Reproduce
Add an external Link to the DashboardPanelShortcuts

Additional context
I think the check doesn't fit that way (line 226):
if (!$page || !$page->url) {

Because if "$page" does not exist, then "$page->url" will cause an error.

https://processwire.com/talk/topic/22847-processwire-dashboard/page/7/

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.