GithubHelp home page GithubHelp logo

unclecheese / silverstripe-dashboard Goto Github PK

View Code? Open in Web Editor NEW
46.0 14.0 35.0 445 KB

Dashboard module for SilverStripe 3

License: GNU General Public License v2.0

PHP 47.67% CSS 13.14% JavaScript 29.12% Scheme 10.07%

silverstripe-dashboard's Issues

Rename composer vendor prefix

Hello! First of all, thanks for getting on board with Composer with us, and registering your module on Packagist! We rely on early adopters like you to push adoption, and are thrilled to see such an enthusiastic uptake of Composer :)

We've noticed that you're using the "silverstripe" vendor prefix, which should only be used for modules maintained by the SilverStripe Ltd. organization (details). We'd like to ask you to change your vendor prefix accordingly by changing the name key in your composer.json. Usually using your github name is a good idea. The fact that this repo is a SilverStripe module is already contained in the "type": "silverstripe-module" metadata.

In order to ensure existing links to the module continue to work, please add a "replace" key to your composer.json:

"replace": {"<old-name>": "*"}

If you have created branches and releases containing a composer.json file,
it is recommended that you push the change there as well (and create new releases).
Once the name change is committed, force update the module on Packagist.

Note that the name change is only for Composer, you can call your github repository
however you like.

Thanks
Ingo Schommer, SilverStripe Core Developer

ERR_CONNECTION_RESET on chrome after applying new dashboard

Hi all,

I thought I would leave this here in case it is of any use to any of you. I want to say firstly however how awesome this module is from what I've seen working of it so far 👍.

I've just installed the dashboard module on a SilverStripe 3.1.0-beta3 installation without any real problems. Did a /dev/build/?flush=all and was able to add a Model Editor panel a long with a File Overview panel.

The one panel that didn't work for me was the Google Analytics one and after checking my console in Google Chrome, I found these error messages.

I hope that they can be of use to you.

developer tools - httplocalhostlucsheltonportfolioadmindashboard

Lastly, after committing the changes to the dashboard, I go to refresh my browser to come back to the page and I am greeted with this error message from Chrome. I was wondering if you knew anything about it?

httplocalhostlucsheltonportfolioadmindashboard is not available - google chrome

I'm currently making use of WAMP 2.2 at the moment.

Regards,
Luc.

Composer deps need updating for 3.2

Is there a requirements for CMS at all with this module or does it just rely on framework/admin?

SiteConfig is a dependency and should be listed.

Lost connection with Google Analytics

Hi,

Since some weeks there is no connection with Google Analytics anymore:

The account information you have entered for Google Analytics appears to be invalid. Please check the email and password combination and try again.

This happens with all our SilverStripe websites where it was always worked well, but also on new installations.
Checked everything in the Google account, like the security level for apps...

Any idea?

Implement Weather-API call based on city-code

Non-US cities, sometimes can not be found in the location-database, but have a city-code which can be used.
If this is the case, the user should be able to enter the City Code (In my case, NLXX0023 for Enschede, Netherlands).
The query for Yahoo's API would then become:
select * from weather.forecast where location=\"{$this->Location}\" and u=\"{$this->Units}\"

Google analyitcs panel and entwine problem

I have several sites running the awesome dashboard module. But suddenly all them have not been able to produce the graph for GA. They do show the total pages views, etc in numbers, but the graph wont show. Its across three sites at least I have made changes.

Here is some stuff from the the debugger about entwine:

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
Uncaught exception
TypeError
in onmatch on

​…​

Stack Trace:
TypeError: undefined is not a function
at $.entwine.onmatch (eval at (http://www.berzerk.co.nz/framework/thirdparty/jquery/jquery.js?m=1356318983:614:22), :6:16)
at Array.proxy as onmatchproxy
at HTMLDocument. (http://www.berzerk.co.nz/framework/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js?m=1356318983:2055:16)
at HTMLDocument.jQuery.event.dispatch (http://www.berzerk.co.nz/framework/thirdparty/jquery/jquery.js?m=1356318983:3332:9)
at HTMLDocument.elemData.handle.eventHandle (http://www.berzerk.co.nz/framework/thirdparty/jquery/jquery.js?m=1356318983:2941:28)
at Object.jQuery.event.trigger (http://www.berzerk.co.nz/framework/thirdparty/jquery/jquery.js?m=1356318983:3210:12)
at jQuery.fn.extend.triggerHandler (http://www.berzerk.co.nz/framework/thirdparty/jquery/jquery.js?m=1356318983:3874:24)
at Base.extend.triggerEvent (http://www.berzerk.co.nz/framework/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js?m=1356318983:1358:16)
at http://www.berzerk.co.nz/framework/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js?m=1356318983:1364:68

dashboard config

Hey Aaron, just wondering if its possible to configure a dashboard in _config or an YML file instead of all the steps required in the dashboard itself... probably most clients wont be able to make their own dashboards, so it could be a good idea to have a config file that creates the default dashboard...
said that, most of the clients dont need options like move things around or add new panels, since we already provided all the ones he can need programatically in the config file...

what do you think?

Updating Configuration updates wrong chart

I have a dashboard with three custom panels each with charts. They load fine, but if I change the configuration of the second or third charts on the screen, it'll update the display of the first chart leaving the other chart blank.

The page then needs refreshing in order to display the charts correctly again.

It must be related to the ajax that's used to update the panels without a refresh, its losing track of which chart to update. The data stored is all correct as the refresh fixes it.

Create New buttons not working in 3.1 (Not Found Error on Save)

The Create New buttons on the Grid Field Editor widget are no longer working properly. Reproduced on SS 3.1.0 & 3.1.1:

  1. Open the CMS to be taken to the Dashboard
  2. Click on a Create New button on a Grid Field Editor widget.
  3. Fill in a field if required.
  4. Click Save.

A Not Found error is displayed, and the object doesn't save:

The URL it gets a 404 from appears to be: /admin/pages/edit/EditForm/field/DATAOBJECT/item/new/ItemEditForm

If you navigate to the page with the GridField on, and then go back to the Dashboard and try again it seems to work fine. So it's something to do with it not being able to find the parent GridField I think.

[Won't fix] Not all panels work in a Windows Environment

Some panels bug out on a Windows/Apache/MySQL/PHP environment. If you encounter an error-500, purge the dashboards and you're again good to go.

No fixing needed as there should not be any live server running on WAMP anyway. But a heads-up.

multi dashboard

is possible generate multi dashboard each one with his panels?

Not found errors

I often get "Not found" errors, while after the error, the wished folders content appears.

DashboardGridFieldPanel::getHierarchy() is very slow

I have a site with over 1000 pages. Dashboard was taking over 30 seconds to load.

Narrowed it down to DashboardGridFieldPanel::getHierarchy() which seems to take 10 seconds for each DashboardGridFieldPanel. This function simply populates the Page dropdown in the panel's settings.

So could do with optimising, or at least stopping it running on each DashboardGridFieldPanel load, as it is only required when entering settings for a single DashboardGridFieldPanel.

Testing Error: Table '*.DashboardPanel' doesn't exist

After installing the dashboard module, I tried to run my tests that was working before, and found out an Error. DashboardPane table does not exist.

I went further and run a framework test, and get the same error.

It seems to be trying to fetch the panels from the DB, before its loaded.

This error happens to me with mysql and sqlite too.

The cause of the problems seems to start at: logInWithPermission() method.
doing $member->write() on line: 892, is calling DashboardMember::onAfterWrite().

The sql query that fires the error, is the same generated at the line 41:
$this->owner->DashboardPanels()

I would like to know if someone else had the same problem or can reproduce it.

Here is the error description.

ArrayDataTest::testViewabledataItemsInsideArraydataArePreserved
Couldn't run query: 
SELECT DISTINCT count(DISTINCT "DashboardPanel"."ID") AS "0"
FROM "DashboardPanel"
WHERE ("MemberID" = '1') AND ("SubsiteID" = '0') 

Table 'ss_tmpdb5810635.DashboardPanel' doesn't exist

/var/www/connect/framework/model/MySQLDatabase.php:598
/var/www/connect/framework/model/MySQLDatabase.php:150
/var/www/connect/framework/model/DB.php:212
/var/www/connect/framework/model/SQLQuery.php:947
/var/www/connect/framework/model/SQLQuery.php:1057
/var/www/connect/framework/model/DataQuery.php:343
/var/www/connect/framework/model/DataList.php:712
/var/www/connect/framework/model/DataList.php:784
/var/www/connect/dashboard/code/DashboardMember.php:41
/var/www/connect/framework/core/Object.php:1002
/var/www/connect/framework/model/DataObject.php:1050
/var/www/connect/framework/security/Member.php:895
/var/www/connect/framework/model/DataObject.php:1294
/var/www/connect/framework/dev/SapphireTest.php:892
/var/www/connect/framework/dev/SapphireTest.php:271
/usr/share/php/PHPUnit/TextUI/Command.php:176
/usr/share/php/PHPUnit/TextUI/Command.php:129
/usr/bin/phpunit:46

Request: Tag a stable release for use via Packagist

So I was wondering if there's any chance that this module could get tagged with a version (say 1.0.0?) for use with Packagist?

I realise it might not be the most pressing issue. But I've been using this module for a while now and think that it's awesome! And it would be really useful to be able to reference a tagged release for stability on client projects.

If there are any major issues that need resolving before the module can be tagged then I'm happy to help, just let me know.

DashboardSectionEditorPanel loads the whole page tree by default: Doesn't scale

The DashboardSectionEditorPanel recursively traverses the whole hierarchy by default, since its ParentID setting is 0. This effectively means that CMS editors have the ability to (accidentally) bring down the CMS, due to PHP timeouts and memory exhaustion. Given this is the starting page after login, for them it simply means "the CMS is broken".

Why can't we use TreeDropdownField in this case? If there's a good reason, we should at least limit the number of items in the traversed hierarchy, and show a warning if it gets larger than ~250 items.

Catch connection errors with YWeather

On the few occasions Yahoo weather doesn't respond, the entire dashboard is down.
Adding a try{}catch(){} to the file_get_contents() statement should solve this.

Use summary fields for the ModelAdmin Panel

Correct me if I'm wrong but it seems the ModelAdminPanel displays either the Title (if one exists) or the ID of each object. It would be cool if it used the defined summary fields instead (even just the first one rather than all of them).

Blog post link in ReadMe is broken.

Would like to see what this looks like but the blog post link is broken. I would move it to GitHub, so you don't have to worry about broken links.

Dashboard default admin location

After adding Dashboard when I go to site/admin I'm redirected to site/admin/dashboard, moreover, when I click on Pages from the left-hand menu, it keeps the dashboard displayed. Other options on the menu work as expected.

i installed the dash board with SS 3.4 and it made the CMS inoperable.... 30 seconds timeout

I put in a random die statement to see where it would crash after 100,000 loops ....

SQLSelect.php

    private static $_count_count = 0;

    /**
     * Returns the current order by as array if not already. To handle legacy
     * statements which are stored as strings. Without clauses and directions,
     * convert the orderby clause to something readable.
     *
     * @return array
     */
    public function getOrderBy() {
        self::$_count_count++;
        if(self::$_count_count > 10000) {
            user_error('ddddd');
        }

SQLSelect->getOrderBy()
DataQuery.php:301
DataQuery->ensureSelectContainsOrderbyColumns(SELECT DISTINCT "SiteTree"."ClassName", "SiteTree"."LastEdited", "SiteTree"."Created", "SiteTree"."URLSegment", "SiteTree"."Title", "SiteTree"."MenuTitle", "SiteTree"."Content", "SiteTree"."MetaDescription", "SiteTree"."ExtraMeta", "SiteTree"."ShowInMenus", "SiteTree"."ShowInSearch", "SiteTree"."Sort", "SiteTree"."HasBrokenFile", "SiteTree"."HasBrokenLink", "SiteTree"."ReportClass", "SiteTree"."CanViewType", "SiteTree"."CanEditType", "SiteTree"."Priority", "SiteTree"."ShareIcons", "SiteTree"."HasSocialNetworkingLinks", "SiteTree"."AutomateMetatags", "SiteTree"."ShowMap", "SiteTree"."StaticMap", "SiteTree"."Address", "SiteTree"."ZoomLevel", "SiteTree"."InfoWindowContent", "SiteTree"."Version", "SiteTree"."ShareOnFacebookImageID", "SiteTree"."ParentID", "SiteTree"."ID", CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree" WHERE ("SiteTree"."ParentID" = ?) ORDER BY "Sort" ASC <array ( 0 => 4879, )>)
DataQuery.php:286
DataQuery->getFinalisedQuery()
DataQuery.php:385
DataQuery->count()
DataList.php:757
DataList->count()
DataList.php:829
DataList->exists()
DashboardGridFieldPanel.php:158
DashboardGridFieldPanel->getHierarchy(4879,5)
DashboardGridFieldPanel.php:164
DashboardGridFieldPanel->getHierarchy(4756,4)
DashboardGridFieldPanel.php:164
DashboardGridFieldPanel->getHierarchy(4549,3)
DashboardGridFieldPanel.php:164
DashboardGridFieldPanel->getHierarchy(13,2)
DashboardGridFieldPanel.php:164
DashboardGridFieldPanel->getHierarchy(12,1)
DashboardGridFieldPanel.php:164
DashboardGridFieldPanel->getHierarchy(0)
DashboardGridFieldPanel.php:129
DashboardGridFieldPanel->getConfiguration()
Dashboard.php:409
Dashboard_PanelRequest->ConfigureForm()
DashboardPanel.php:321
DashboardPanel->Form()
ViewableData.php:446
ViewableData->obj(Form,,1,,)
SSViewer.php:99
SSViewer_Scope->getObj(Form,,1,,)
SSViewer.php:625
SSViewer_DataPresenter->getObj(Form,,1,,)
SSViewer.php:119
SSViewer_Scope->obj(Form,,1,,)
SSViewer.php:619
SSViewer_DataPresenter->obj(Form,,1)
.cache.dashboardmods.templates.DashboardPanel.ss:122
include(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.DashboardPanel.ss)
SSViewer.php:1164
SSViewer->includeGeneratedTemplate(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.DashboardPanel.ss,DashboardGridFieldPanel,,Array,)
SSViewer.php:1226
SSViewer->process(DashboardGridFieldPanel,)
ViewableData.php:385
ViewableData->renderWith(DashboardPanel)
DashboardPanel.php:299
DashboardPanel->PanelHolder()
DashboardGridFieldPanel.php:320
DashboardGridFieldPanel->PanelHolder()
ViewableData.php:446
ViewableData->obj(PanelHolder,,,1)
ViewableData.php:519
ViewableData->XML_val(PanelHolder,,1)
call_user_func_array(Array,Array)
SSViewer.php:187
SSViewer_Scope->__call(XML_val,Array)
SSViewer.php:650
SSViewer_DataPresenter->__call(XML_val,Array)
.cache.dashboardmods.templates.Dashboard_Content.ss:71
SSViewer_DataPresenter->XML_val(PanelHolder,,1)
.cache.dashboardmods.templates.Dashboard_Content.ss:71
include(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.Dashboard_Content.ss)
SSViewer.php:1164
SSViewer->includeGeneratedTemplate(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.Dashboard_Content.ss,Dashboard,,Array,)
SSViewer.php:1226
SSViewer->process(Dashboard,)
ViewableData.php:385
ViewableData->renderWith(Array)
LeftAndMain.php:730
LeftAndMain->Content()
ViewableData.php:446
ViewableData->obj(Content,,,1)
ViewableData.php:519
ViewableData->XML_val(Content,,1)
call_user_func_array(Array,Array)
SSViewer.php:187
SSViewer_Scope->__call(XML_val,Array)
SSViewer.php:650
SSViewer_DataPresenter->__call(XML_val,Array)
.cache.framework.admin.templates.LeftAndMain.ss:41
SSViewer_DataPresenter->XML_val(Content,,1)
.cache.framework.admin.templates.LeftAndMain.ss:41
include(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.framework.admin.templates.LeftAndMain.ss)
SSViewer.php:1164
SSViewer->includeGeneratedTemplate(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.framework.admin.templates.LeftAndMain.ss,Dashboard,,Array,)
SSViewer.php:1226
SSViewer->process(Dashboard,)
ViewableData.php:385
ViewableData->renderWith(SSViewer)
LeftAndMain.php:607
LeftAndMain->{closure}()
call_user_func(Closure)
PjaxResponseNegotiator.php:82
PjaxResponseNegotiator->respond(SS_HTTPRequest)
LeftAndMain.php:513
LeftAndMain->index(SS_HTTPRequest)
RequestHandler.php:288
RequestHandler->handleAction(SS_HTTPRequest,index)
Controller.php:202
Controller->handleAction(SS_HTTPRequest,index)
RequestHandler.php:200
RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
Controller.php:158
Controller->handleRequest(SS_HTTPRequest,DataModel)
LeftAndMain.php:456
LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
AdminRootController.php:92
AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:385
Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:149
Director::direct(/admin/dashboard,DataModel)
main.php:188

Wording on the Readme File

On the Readme file for the section for the Google Analytics Panel it says "You need to add your Google Analytics config information to the project config.php", that should be config.yml instead. That tripped me up for a couple of minutes.

Errors in panels brings down the whole Dashboard

Errors in the config of panels such as an incorrect address for an RSS feed or incorrect ID for google analytics throws an error and makes the Dashboard unloadable (that's a word).

This makes it impossible to correct the link or ID without editing the db directly.

Instead the errors should just display within the affected panel and still allow editing of the panels config so that they can be corrected.

cant uninstall and dashboard slowing down latency

on my local and remote servers the I think the dash board module is slowing down load times.

I have tried to remove it but deleting the dashboard module toatly disables my site, I cant even do a dev/build after removing the dashboard module. I have even tried deleting the dashboard panels and then removing dashboard module.

any way i cant actually remove the dashboard module with out disablingmy site entirely front and back end.

Can any one help on this?

Dashboard with versioneddataobjects issue

Hi,

If I install the Dashboard Module 1.1.0 (https://github.com/unclecheese/silverstripe-dashboard)
It stops the change recognition on my silverstripe-versioneddataobjects dataobjects. (https://github.com/heyday/silverstripe-versioneddataobjects)

Meaning once I install Dashboard and go to one of my silverstripe-versioneddataobjects dataobjects and make a change to a published record the button “published” is not changing to “Save and publish”.

Is this something that can be fixed on your end or is this a versioneddataobjects error.

Error with panel administration

When attempting to use the Gear icon to edit the settings in a Dashboard panel, I get the following Javascript error in Firebug:

Error: cannot call methods on button prior to initialization; attempted to call method 'destroy' on lib.js line 31

The panel does it's flip animation, but no new information loads; the panel becomes a grey rectangle with no interactivity until the page is refreshed in the browser.

Deleting a preceding panel causes the affected panel to move "out from under" the grey rectangle, but the content does not interact. Likewise, if scrolling through multiple panels within the frame, the grey rectangle stays fixed to the frame, while the content moves under it, but with no means of interaction.

Using SilverStripe 3.0.3 with blog, widgets, Event Calendar and userforms modules (all latest versions). Browser is Firefox 16.0.2 on Ubuntu 12.04

Writing in onAfterWrite

In the DashboardMember DataExtension, you're executing a write on the member.

This initializes an endless loop.

SS4 upgrade discussion

Hey @unclecheese
As I discussed with you yesterday at StripeCon, I plan on upgrading this module to SS4.
I'd like to open a discussion on the tasks needed to complete the upgrade.

  • Run upgrader tool
  • Namespacing
  • Check and upgrade data model relationships
  • ?

You mentioned that you'd like to remove some of the dashboards. I remember that you mentioned the Google Analytics dashboard. What were the other ones?

Update Composer SS Requirements & Add 3.0 Branch

Just had some annoying issues after running a composer update on my sites, as the master of this module has been updated to support SS 3.1, so it no longer works on 3.0, but the composer.json file still says that only SS 3.* is required, so this caused composer to update this module on a 3.0 site breaking it. Had to manually restore an older version of the module from a backup, and remove it from composer.

To fix this can you please create a working 3.0 branch, and update the composer.json on the master branch to require SS ">=3.1.x-dev,<4.0".

Cheers!

Model admin editor

I cant get the Model admin panel to work, what am i doing wrong?
i have a simple dataobject and model admin file and if i add a model admin panel it list the dataobject but it is not saving it
any hints would be appreciated

DataObject:
`class tester extends DataObject
{

private static $db = array(
    'List' => 'Boolean',
    'Name' => 'Varchar(150)',
);

private static $singular_name = 'tester';
private static $plural_name = 'testers';


public function getCMSFields()
{
    $fields = parent::getCMSFields();
    $fields->addFieldToTab('Root.Main', CheckboxField::create('List', 'List on locations overview page'));
    $fields->addFieldToTab('Root.Main', TextField::create('Name', 'Name'));

    return $fields;
}

}`

Model Admin:
`class testerAdmin extends ModelAdmin
{

private static $managed_models = array(
    'tester'
);

private static $url_segment = 'testers';

private static $menu_title = 'testers';

Quick typo fix

Dashboard.php, line 89 and 97: the word dashboard has the letters o and a mixed up ;-)

SS4 branch?

Hi, just wondering if this will get a SS 4 branch added?

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.