Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v150919-RC: Cache Statistics placeholder when no stats available #565

Closed
raamdev opened this issue Sep 19, 2015 · 8 comments
Closed

v150919-RC: Cache Statistics placeholder when no stats available #565

raamdev opened this issue Sep 19, 2015 · 8 comments
Labels
Milestone

Comments

@raamdev
Copy link
Contributor

raamdev commented Sep 19, 2015

When installing ZenCache Pro on a site that does not have any prior Cache Stats history available, the Cache Stats page shows an empty area where the pie chart would normally be. It would be nice if this area was filled in with an example image of the pie chart, greyed out, with some text on it that says something like, "Cache Stats history not available, please check back later."

2015-09-18_21-59-45

@raamdev raamdev added the todo label Sep 19, 2015
@raamdev raamdev added this to the Next Release (Pro) milestone Sep 19, 2015
@jaswrks
Copy link

jaswrks commented Sep 24, 2015

Next Actions

  • See this line of JavaScript where the $chartA div is hidden when there are no stats.

  • Same thing here for Chart B (i.e., chart on the right side).

  • Modify one or both of these, so that instead of hiding the chart, you fill it with an <img /> tag.

    $chartA.html('<img src="..." />');
    // $chartA.hide();
  • Compress menu-pages.js into menu-pages.min.js

  • Submit PR.

@jaswrks
Copy link

jaswrks commented Sep 24, 2015

See also: http://api.jquery.com/html/

@jaswrks
Copy link

jaswrks commented Sep 24, 2015

Generating the URL which leads to the image:

  • After this line of code add the following.

    'emptyStatsImageUrl' => $self->url('/src/client-s/images/empty-stats.png'),
  • In JavaScript, you can access it like this:

    $chartA.html('<img src="' + plugin.escHtml(plugin.vars.emptyStatsImageUrl) + '" />');

@raamdev
Copy link
Contributor Author

raamdev commented Sep 24, 2015

Same thing here for Chart B (i.e., chart on the right side).

So there should be two empty-stats placeholder images?

@jaswrks
Copy link

jaswrks commented Sep 24, 2015

Ideally, yes. However, you might decide that just doing $chartA is enough to convey what you need to.

@jaswrks
Copy link

jaswrks commented Sep 24, 2015

Compress menu-pages.js into menu-pages.min.js

Note that when you run the compress-js script I sent you, you can exclude the --old-style arg, as ZenCache Pro is up-to-date and uses .min.js (new) instead of -min.js (old).

@raamdev
Copy link
Contributor Author

raamdev commented Sep 24, 2015

2015-09-23_21-47-26

@raamdev
Copy link
Contributor Author

raamdev commented Sep 24, 2015

Closed by wpsharks/comet-cache-pro#148

@raamdev raamdev closed this as completed Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants