Fetch the initial data when the widget loads, and then update every five
sec after that. Also better indication of uninitialized values.
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
There's no reason we should format the data into a string in the
Perfstats module. Let the recipient do what they want with it instead.
As an example, we reduce the precision of the loadavg stats in the
system status widget. 3 digits precision should be more than enough for
this type of status display.
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
The total number of queries is not that interesting for performance
measurements, so let's do queries pr/second instead. Adds a timestamp
column to the dataset, which could be useful for other purposes as well
(like making a graph over time etc.)
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
Make some stricter rules for accessing the perfstats module. We only
want to respond to GET request for json data made by a site admin.
This means we also need to pass along the credentials in the request.
Didn't immediately figure out how to do that using `z_fetch_url`, so we
just fall back to using the JavaScript to populate the widget. This
makes it idle for about 5 sec before it gets the first data sample.
I think that's probably OK.
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
At least for now, there's no sensible link target, so it's better to not
link anywhere.
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
Adds a bit of javascript that requests the performance stats every 5
seconds.
Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
Existing function account_allow() does not seem to be used a whole
lot, and certainly not when approving a registration request.
Created new function send_reg_confirmation_email_from_register
(going for longest-function-name-in-Hubzilla) which attempts to
send such a confirmation email, and also a new email template.
Plugged this into the create_account_from_register function.
Open question: Should the sending of this email be among the success
criteria for the create_account_from_register function?
Since there is no easy way to produce direct links to approve/reject
registrations, create new email template which simply links to the
Accounts admin page.
In response to comments:
- Add type annotations
- Simplify some 'if' statements
- add and fix some whitespace
- simplify input arguments to the function