Jump to content

adrian

PW-Moderators
  • Posts

    10,877
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Ok, please give the latest version a go. It should be much better in that you now get notification of new entries no matter when they happen relative to when you reload the page - they might even happen in another process. Thanks for prompting me to revisit this.
  2. It's a bit hacky - it looks for an entry within the last 5 seconds and color orange if there is one. I figured this was probably OK for manual reloads. It turns the icon red if the last entry (within those 5 seconds) is an error. I'll take a look at improving this - should be quite easy now that I am caching the results in a wirCache because I'll be able to tell if there is a new entry or not. This wasn't really possible until I introduced the caching.
  3. Thanks for taking a look @d'Hinnisdaël - I decided to go with a "template" panel type and build a custom chart, mostly because there was something amiss with using a time series with the way the module is configured and it was easier this way.
  4. I am not a regular ChartJS user so not sure of any breaking changes, although pointing the module's CDN link to the latest version does result in a JS error coming from the module's DashboardPanelChart.js file. I haven't looked into to see what fix is required though.
  5. Hi @d'Hinnisdaël - just wondering if you've had any thoughts about changing the charting library, or at least updating to v3 of ChartJS. The old 2.x branch has lots of limitations with the time axis type. Thanks!
  6. Does this relatively new feature help? https://processwire.com/blog/posts/pw-3.0.177/
  7. Hi @Mike Rockett - I know you're not around much these days, but I just had this exception: Obviously that's a weird request for mysite.com/? but it would still be nice if this was handled better. Not sure if you want to change the request_uri field to utf8mb4 so it can store these, or if you want to sanitize it somehow? Let me know if you need more details. Thanks.
  8. @gmclelland - it looks like the option to parse an array was only made available since PHP 7.2 - "This function now also accepts an array as string. Formerly, only strings have been supported." This is something I actually introduced back in December (I guess you haven't updated since then). Anyway, I've moved that call earlier onto the main string (before I break it into an array) which I think should have the same affect without breaking in older PHP versions. Can you please try the latest version and let me know?
  9. Thanks @kater - should be fixed in the latest version.
  10. @Pete - in case it helps, I had to do something with processing incoming emails recently and given the abandones status of the flourish library, I went with pure PHP. $inbox = imap_open('{imap.gmail.com:993/imap/ssl/novalidate-cert}', 'me@gmail.com', 'password'); $msgnos = imap_search($inbox, 'UNSEEN'); if($msgnos) { foreach($msgnos as $msgno) { imap_setflag_full($inbox, $msgno, "\\Seen \\Flagged", ST_UID); $header = imap_headerinfo($inbox, $msgno); $bodyText = imap_fetchbody($inbox, $msgno, 1.2); if(!strlen($bodyText) > 0) { $bodyText = imap_fetchbody($inbox, $msgno, 1); } $timestamp = strtotime($header->date); $toObj = $header->to[0]; $fromObj = $header->from[0]; $to = $toObj->mailbox.'@'.$toObj->host; $from = $fromObj->mailbox.'@'.$fromObj->host; $u = $users->get('email='.$from); if($u->id) { // process contents $bodyText here } } } I had this all ready to use and then decided to actually switch to using Mailgun's incoming callback feature - if you have access to it, I think it's much nicer because they will ping your site via a webhook callback, rather than you needing to regularly ping your email via imap.
  11. I want to love Nextcloud but I've always found it unusably slow once you have a lot of files and folders. I am running it on an system with several TB of data so maybe that's a bit high, but I still don't really understand why that's impacting its responsiveness, or even it's search for that matter. I used to use Pydio (and its previous incarnation as Ajaxplorer) and it had its problems with search but was generally but better performance. PS - I just updated to v21 and it does seem better - maybe they have improved things.
  12. I hope not - none of Tracy's panels should be loaded on the frontend of a site unless the debug bar is enabled (Tracy is in development mode) which should only happen for an authorized user (usually only superusers).
  13. Great to hear - sorry I didn't deal with this earlier.
  14. In case folks didn't see this post it is definitely worth upgrading to the latest version, especially if you have large PW or Tracy log files.
  15. Ok, new version removes the line number and I also implemented a faster way of getting the last lines from the log files. Should be a LOT faster now with large log files. @teppo - can you please confirm at your end?
  16. Yeah, good idea - leave the link, but without the line number.
  17. Another update - my new version is faster at parsing the log files and get the last number of lines required, but it turns out that the biggest slowdown in the entire process is generating the code editor link which is added to the "Text" column. The reason is that because we're only loading the last 10 lines of the file, I was having to get the total number of lines in the file to figure out what line number the entry is actually on. I think given the potential impact on performance I should remove the link. Any thoughts?
  18. I actually think I have a performant solution coming - I am testing with a 150MB log file and instead of 120ms, I am down to 2.5ms
  19. Superficially at least, it looks like PW is using something similar to the recommended method from that SO post, using fseek etc so I feel like it should be reasonably performant. Maybe I'll dig into it a bit deeper and see if there are key differences which are impacting performance.
  20. Hi @teppo - I have come across this a couple of times before so I would like to give it some attention. Tracy uses PW's $log->getEntries() method to get the last lines from each log file. I have been thinking about implementing a custom solution. There is an excellent writeup here: https://stackoverflow.com/questions/15025875/what-is-the-best-way-to-read-last-lines-i-e-tail-from-a-file-using-php I wonder if I should implement into Tracy or whether we should try to get a more performant solution in the PW core. Tracy caches log file entries, but if a file changes that benefit is lost and because the log files are loaded on every page load with Tracy, so it's obviously much more important than in the PW core. Any thoughts?
  21. I don't mind your wording in the way it suggests refreshing the session, but I am not really sure "refreshing cookies" really describes what is going on. Regarding the typo - I am a proponent of the Oxford Comma - https://www.colesandlopez.com/blog/what-is-the-oxford-comma - I wasn't taught it in school, but I do like the way it reduces ambiguity. Obviously not necessary here, but I just use it all the time these days :)
  22. @Ivan Gretsky - new version with this is now available. Note that in the end I didn't actually need the update to the Tracy core because I am actually overwriting their dump and barDump methods anyway - sorry I didn't notice that sooner. Let me know if you notice any problems - this hasn't had a lot of testing yet.
  23. Sorry about that :) New version committed - I built it into that option and decided to rename it to "Clear Session, Cookies, & Modules Refresh" Let me know if you have any problems with it.
  24. @bernhard - is that "Thanks" reaction an indication that you think that would be an OK solution?
  25. @bernhard - what do you think about me including a modules refresh in the Clear Sessions & Cookies option? Just trying to avoid yet another option and a very long name, eg "Modules Refresh, Clear Session & Cookies". Can you think of any instance where it would be a problem to also refresh modules when you really just want to clear the session and cookies? I am actually kind of surprised that you need to also do a modules refresh, because the session/cookies option actually logs you out and back in again, so I would have thought that also refreshed modules, but I've probably just forgotten. Can you confirm that both are needed?
×
×
  • Create New...