…maybe stick with the emoncms blue theme??
Paul
…maybe stick with the emoncms blue theme??
Paul
A further PR tonight from Aymeric (not yet merged);
Main changes are that now just one button copies both SERVER INFORMATION
& CLIENT INFORMATION
(pasted below for comments), and formatting is now much cleaner and easier to read.
Another change is that by Ctrl-click the button, the data is copied RAW (except for carriage returns).
Also, Aymeric has added a ‘copy log to clipboard’ button, which when pasted in the forum looks like;
Paul
For some reason I am seeing the format with extra line breaks.
FF 57.0.4 on Win 10.
The original was better
Fair enough for the formatting, but can the extra line breaks be fixed? Is it a multiple space issue in which case can it be trimmed out?
Are you simply stripping all of the HTML out?
Oh I see you are just building the text. I think there are some additional /n that could go from a quick scan.
Brian, which extra line breaks?
In your screenshot, there are Subheadings & Labels (same as the Admin page).
Emoncms & Server are Subheadings, hence a line break added to maintain hierarchy.
Version, Modules & OS are Labels, separated from the values by a colon.
I wonder if it would be clearer if the subheadings were bolded?
Paul
Yes definitely or nest the details element. Had a look and it seems it is valid to nest them. Could you just include some Markup in the text string rather than forcing line breaks with \n?
I know from your previous comments, that the | separator is a problem with Markup (could replace them all in this case )
I’ve just merged the changes into a git emoncms feature branch - copy2clipboard
for further discussion.
To load the feature branch;
cd /var/www/emoncms
git pull
git checkout copy2clipboard
Paul
Just trying something else…
Emoncms Version 9.8.18 : 2017.11.20 Modules Administration : App v1.0.0 : Dashboard v1.1.1 : Device v1.1.0 : EventProcesses : Feed : Graph v1.0.0 : Input : CoreProcess : Schedule : Time : User : Visualisation Server OS Linux 4.9.0-4-amd64 Host test2 test2.localdomain (127.0.1.1) Date 2018-01-22 21:26:40 UTC Uptime 21:26:40 up 41 days, 51 min, 0 users, load average: 0.20, 0.28, 0.23 HTTP Server Apache/2.4.25 (Debian) HTTP/1.1 CGI/1.1 443 MySQL Version 5.5.5-10.1.26-MariaDB-0+deb9u1 Host localhost (127.0.0.1) Date 2018-01-22 21:26:40 (UTC 00:00) Stats Uptime: 3545461 Threads: 3 Questions: 35464336 Slow queries: 0 Opens: 54 Flush tables: 1 Open tables: 42 Queries per second avg: 10.002 Redis Version 3.2.6 Host localhost:6379 (127.0.0.1) Size 3845 keys (1.75M)Flush Uptime 5 days Memory RAM Used 10.40% Total: 3.77 GB Used: 401.43 MB Free: 3.38 GB Disk Mount Stats
/ Used 26.28% Total: 19.66 GB Used: 5.17 GB Free: 13.67 GB
/data Used 9.31% Total: 97.93 GB Used: 58.08 GB Free: 34.83 GBPHP Version 7.0.19-1 (Zend Version 3.0.0) Modules apache2handler : calendar v7.0.19-1 : Core v7.0.19-1 : ctype v7.0.19-1 : curl v7.0.19-1 : date v7.0.19-1 : dom v20031129 : exif v1.4 : fileinfo v1.0.5 : filter v7.0.19-1 : ftp v7.0.19-1 : gd v7.0.19-1 : gettext v7.0.19-1 : hash v1.0 : iconv v7.0.19-1 : json v1.4.0 : libxml v7.0.19-1 : mbstring v7.0.19-1 : mcrypt v7.0.19-1 : mysqli v7.0.19-1 : mysqlnd : openssl v7.0.19-1 : pcre v7.0.19-1 : PDO v7.0.19-1 : pdo_mysql v7.0.19-1 : Phar v2.0.2 : posix v7.0.19-1 : readline v7.0.19-1 : redis v3.1.6 : Reflection v7.0.19-1 : session v7.0.19-1 : shmop v7.0.19-1 : SimpleXML v7.0.19-1 : sockets v7.0.19-1 : SPL v7.0.19-1 : standard v7.0.19-1 : sysvmsg v7.0.19-1 : sysvsem v7.0.19-1 : sysvshm v7.0.19-1 : tokenizer v7.0.19-1 : wddx v7.0.19-1 : xml v7.0.19-1 : xmlreader v7.0.19-1 : xmlwriter v7.0.19-1 : xsl v7.0.19-1 : Zend OPcache v7.0.19-1 : zlib v7.0.19-1 :
Any thoughts? This works even on small screens as the table scrolls horizontally.
For those that can’t see Paul’s code…
<details>
<summary>System information</summary><pre>
| | | |
| --- | --- | --- |
| Emoncms | Version | 9.8.18 : 2017.11.20
| | Modules | Administration : App v1.0.0 : Dashboard v1.1.1 : Device v1.1.0 : EventProcesses : Feed : Graph v1.0.0 : Input : CoreProcess : Schedule : Time : User : Visualisation
| Server | OS | Linux 4.9.0-4-amd64
| | Host | test2 test2.localdomain (127.0.1.1)
| | Date | 2018-01-22 21:26:40 UTC
| | Uptime | 21:26:40 up 41 days, 51 min, 0 users, load average: 0.20, 0.28, 0.23
| HTTP | Server | Apache/2.4.25 (Debian) HTTP/1.1 CGI/1.1 443
| MySQL | Version | 5.5.5-10.1.26-MariaDB-0+deb9u1
| | Host | localhost (127.0.0.1)
| | Date | 2018-01-22 21:26:40 (UTC 00:00)
| | Stats | Uptime: 3545461 Threads: 3 Questions: 35464336 Slow queries: 0 Opens: 54 Flush tables: 1 Open tables: 42 Queries per second avg: 10.002
| Redis | Version | 3.2.6
| | Host | localhost:6379 (127.0.0.1)
| | Size | 3845 keys (1.75M)Flush
| | Uptime | 5 days
| Memory | RAM | Used 10.40% Total: 3.77 GB Used: 401.43 MB Free: 3.38 GB
| | Disk | Mount Stats<br>/ Used 26.28% Total: 19.66 GB Used: 5.17 GB Free: 13.67 GB <br>/data Used 9.31% Total: 97.93 GB Used: 58.08 GB Free: 34.83 GB
| PHP | Version | 7.0.19-1 (Zend Version 3.0.0)
| | Modules | apache2handler : calendar v7.0.19-1 : Core v7.0.19-1 : ctype v7.0.19-1 : curl v7.0.19-1 : date v7.0.19-1 : dom v20031129 : exif v1.4 : fileinfo v1.0.5 : filter v7.0.19-1 : ftp v7.0.19-1 : gd v7.0.19-1 : gettext v7.0.19-1 : hash v1.0 : iconv v7.0.19-1 : json v1.4.0 : libxml v7.0.19-1 : mbstring v7.0.19-1 : mcrypt v7.0.19-1 : mysqli v7.0.19-1 : mysqlnd : openssl v7.0.19-1 : pcre v7.0.19-1 : PDO v7.0.19-1 : pdo_mysql v7.0.19-1 : Phar v2.0.2 : posix v7.0.19-1 : readline v7.0.19-1 : redis v3.1.6 : Reflection v7.0.19-1 : session v7.0.19-1 : shmop v7.0.19-1 : SimpleXML v7.0.19-1 : sockets v7.0.19-1 : SPL v7.0.19-1 : standard v7.0.19-1 : sysvmsg v7.0.19-1 : sysvsem v7.0.19-1 : sysvshm v7.0.19-1 : tokenizer v7.0.19-1 : wddx v7.0.19-1 : xml v7.0.19-1 : xmlreader v7.0.19-1 : xmlwriter v7.0.19-1 : xsl v7.0.19-1 : Zend OPcache v7.0.19-1 : zlib v7.0.19-1 :
</pre>
</details>
Paul
I think this looks good and there is probably not enough information to make it worth nesting the details tags.
Gets my vote.
Aymeric has just updated to display as a Markdown table (as above).
The changes are contained within the copy2clipboardv2
branch.
The below is an example from my system;
Emoncms Version 9.8.27 : 2017.12.21 Modules Administration : App v1.1.0 : Dashboard v1.1.1 : EventProcesses : Feed : Input : CoreProcess : Schedule : Time : User : Visualisation Server OS Linux 4.9.59-v7+ Host raspberrypi raspberrypi (127.0.1.1) Date 2018-01-24 22:56:24 UTC Uptime 22:56:24 up 4 days, 23:16, 3 users, load average: 0.21, 0.30, 0.30 HTTP Server Apache/2.4.25 (Raspbian) HTTP/1.1 CGI/1.1 443 MySQL Version 5.5.5-10.1.23-MariaDB-9+deb9u1 Host localhost (127.0.0.1) Date 2018-01-24 22:56:24 (UTC 00:00) Stats Uptime: 429352 Threads: 3 Questions: 395213 Slow queries: 0 Opens: 37 Flush tables: 1 Open tables: 28 Queries per second avg: 0.920 Redis Version 3.2.6 Host localhost:6379 (127.0.0.1) Size 70 keys (693.59K)Flush Uptime 4 days MQTT Version 1.4.10 Host localhost:1883 (127.0.0.1) Pi CPU Temp 54.23°CShutdownReboot Memory RAM Used 54.20%Total: 875.78 MB Used: 474.65 MB Free: 401.13 MB Swap Used 64.70%Total: 100 MB Used: 64.7 MB Free: 35.3 MB Disk Mount Stats / Used 74.52%Total: 6.86 GB Used: 5.11 GB Free: 1.41 GB /boot Used 50.62%Total: 41.15 MB Used: 20.83 MB Free: 20.32 MB /mnt/data Used 16.08%Total: 458.49 GB Used: 73.71 GB Free: 384.78 GB PHP Version 7.0.19-1 (Zend Version 3.0.0) Modules apache2handler : bz2 v7.0.19-1 : calendar v7.0.19-1 : Core v7.0.19-1 : ctype v7.0.19-1 : curl v7.0.19-1 : date v7.0.19-1 : dio v0.1.0 : dom v20031129 : exif v1.4 : fileinfo v1.0.5 : filter v7.0.19-1 : ftp v7.0.19-1 : gd v7.0.19-1 : gettext v7.0.19-1 : hash v1.0 : iconv v7.0.19-1 : igbinary v2.0.1 : json v1.4.0 : libxml v7.0.19-1 : mbstring v7.0.19-1 : mcrypt v7.0.19-1 : mosquitto v0.4.0 : mysqli v7.0.19-1 : mysqlnd : openssl v7.0.19-1 : pcre v7.0.19-1 : PDO v7.0.19-1 : pdo_mysql v7.0.19-1 : Phar v2.0.2 : posix v7.0.19-1 : readline v7.0.19-1 : redis v3.1.1 : Reflection v7.0.19-1 : session v7.0.19-1 : shmop v7.0.19-1 : SimpleXML v7.0.19-1 : sockets v7.0.19-1 : SPL v7.0.19-1 : standard v7.0.19-1 : sysvmsg v7.0.19-1 : sysvsem v7.0.19-1 : sysvshm v7.0.19-1 : tokenizer v7.0.19-1 : wddx v7.0.19-1 : xml v7.0.19-1 : xmlreader v7.0.19-1 : xmlwriter v7.0.19-1 : xsl v7.0.19-1 : Zend OPcache v7.0.19-1 : zip v1.13.5 : zlib v7.0.19-1 :
HTTP Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Screen Resolution 1366 x 768 Window Size 1349 x 675
Paul
That looks much better!
I haven’t looked at the code or tried the changes myself yet (and it’s unlikely I will get a change for a couple more days) but the result looks good. A couple of minor formatting points, in the memory and disk sections another space is required between the Used % and Total labels, possibly another colon after those Initial Used labels to match the other fields. There needs a space in the CPU temp too and in the Redis Size section there appears to be a rogue line break before the keys value.
It might also be better to hide the button texts, eg Flush, Shutdown, Reboot.
And can we please loose the ALL CAPS TITLES to me it looks daft, at the very least it adds nothing and it’s not in-keeping with the rest of the project, the only other place I recall all caps being used is the page title within the android app and it looks equally out of place there too.
Overall a massive step in the right direction IMO
I’ve already submitted a PR - Add formatting to improve clipboard render by Paul-Reed · Pull Request #784 · emoncms/emoncms · GitHub to fix these, but not merged as I’m discussing with Aymeric some of the other formatting improvements.
With the PR applied;
Emoncms Version 9.8.27 : 2017.12.21 Modules Administration : App v1.1.0 : Dashboard v1.1.1 : EventProcesses : Feed : Input : CoreProcess : Schedule : Time : User : Visualisation Server OS Linux 4.9.59-v7+ Host raspberrypi raspberrypi (127.0.1.1) Date 2018-01-25 12:26:02 UTC Uptime 12:26:02 up 5 days, 12:45, 3 users, load average: 0.15, 0.12, 0.15 HTTP Server Apache/2.4.25 (Raspbian) HTTP/1.1 CGI/1.1 443 MySQL Version 5.5.5-10.1.23-MariaDB-9+deb9u1 Host localhost (127.0.0.1) Date 2018-01-25 12:26:02 (UTC 00:00) Stats Uptime: 477930 Threads: 3 Questions: 438866 Slow queries: 0 Opens: 37 Flush tables: 1 Open tables: 28 Queries per second avg: 0.918 Redis Version 3.2.6 Host localhost:6379 (127.0.0.1) Size 70 keys (693.61K) Uptime 5 days MQTT Version 1.4.10 Host localhost:1883 (127.0.0.1) Pi CPU Temp 49.39°C Memory RAM Used: 52.74% Total: 875.78 MB Used: 461.93 MB Free: 413.86 MB Swap Used: 76.31% Total: 100 MB Used: 76.31 MB Free: 23.69 MB Disk Mount Stats / Used: 74.46% Total: 6.86 GB Used: 5.11 GB Free: 1.41 GB /boot Used: 50.62% Total: 41.15 MB Used: 20.83 MB Free: 20.32 MB /mnt/data Used: 16.08% Total: 458.49 GB Used: 73.71 GB Free: 384.78 GB PHP Version 7.0.19-1 (Zend Version 3.0.0) Modules apache2handler : bz2 v7.0.19-1 : calendar v7.0.19-1 : Core v7.0.19-1 : ctype v7.0.19-1 : curl v7.0.19-1 : date v7.0.19-1 : dio v0.1.0 : dom v20031129 : exif v1.4 : fileinfo v1.0.5 : filter v7.0.19-1 : ftp v7.0.19-1 : gd v7.0.19-1 : gettext v7.0.19-1 : hash v1.0 : iconv v7.0.19-1 : igbinary v2.0.1 : json v1.4.0 : libxml v7.0.19-1 : mbstring v7.0.19-1 : mcrypt v7.0.19-1 : mosquitto v0.4.0 : mysqli v7.0.19-1 : mysqlnd : openssl v7.0.19-1 : pcre v7.0.19-1 : PDO v7.0.19-1 : pdo_mysql v7.0.19-1 : Phar v2.0.2 : posix v7.0.19-1 : readline v7.0.19-1 : redis v3.1.1 : Reflection v7.0.19-1 : session v7.0.19-1 : shmop v7.0.19-1 : SimpleXML v7.0.19-1 : sockets v7.0.19-1 : SPL v7.0.19-1 : standard v7.0.19-1 : sysvmsg v7.0.19-1 : sysvsem v7.0.19-1 : sysvshm v7.0.19-1 : tokenizer v7.0.19-1 : wddx v7.0.19-1 : xml v7.0.19-1 : xmlreader v7.0.19-1 : xmlwriter v7.0.19-1 : xsl v7.0.19-1 : Zend OPcache v7.0.19-1 : zip v1.13.5 : zlib v7.0.19-1 : CLIENT INFORMATION
HTTP Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36 Screen Resolution 1366 x 768 Window Size 548 x 658 Paul
Just updated the copy2clipboardv2
branch with a number of formatting tweaks (taking into account the feedback above - thanks), and the below is a paste of the result.
Is there any further feedback before it’s merged into the Master
branch?
Paul
Emoncms Version 9.8.27 : 2017.12.21 Modules Administration : App v1.1.0 : Dashboard v1.1.1 : EventProcesses : Feed : Input : CoreProcess : Schedule : Time : User : Visualisation Server OS Linux 4.9.59-v7+ Host raspberrypi raspberrypi (127.0.1.1) Date 2018-01-25 21:01:32 UTC Uptime 21:01:32 up 5 days, 21:21, 3 users, load average: 0.20, 0.18, 0.22 HTTP Server Apache/2.4.25 (Raspbian) HTTP/1.1 CGI/1.1 443 MySQL Version 5.5.5-10.1.23-MariaDB-9+deb9u1 Host localhost (127.0.0.1) Date 2018-01-25 21:01:32 (UTC 00:00) Stats Uptime: 508860 Threads: 3 Questions: 468140 Slow queries: 0 Opens: 37 Flush tables: 1 Open tables: 28 Queries per second avg: 0.919 Redis Version 3.2.6 Host localhost:6379 (127.0.0.1) Size 70 keys (693.59K) Uptime 5 days MQTT Version 1.4.10 Host localhost:1883 (127.0.0.1) Pi CPU Temp 53.69°C Memory RAM Used: 53.05% Total: 875.78 MB Used: 464.61 MB Free: 411.17 MB Swap Used: 79.05% Total: 100 MB Used: 79.04 MB Free: 20.95 MB Disk Mount Stats / Used: 74.53% Total: 6.86 GB Used: 5.11 GB Free: 1.41 GB /boot Used: 50.62% Total: 41.15 MB Used: 20.83 MB Free: 20.32 MB /mnt/data Used: 16.08% Total: 458.49 GB Used: 73.71 GB Free: 384.78 GB PHP Version 7.0.19-1 (Zend Version 3.0.0) Modules apache2handler : bz2 v7.0.19-1 : calendar v7.0.19-1 : Core v7.0.19-1 : ctype v7.0.19-1 : curl v7.0.19-1 : date v7.0.19-1 : dio v0.1.0 : dom v20031129 : exif v1.4 : fileinfo v1.0.5 : filter v7.0.19-1 : ftp v7.0.19-1 : gd v7.0.19-1 : gettext v7.0.19-1 : hash v1.0 : iconv v7.0.19-1 : igbinary v2.0.1 : json v1.4.0 : libxml v7.0.19-1 : mbstring v7.0.19-1 : mcrypt v7.0.19-1 : mosquitto v0.4.0 : mysqli v7.0.19-1 : mysqlnd : openssl v7.0.19-1 : pcre v7.0.19-1 : PDO v7.0.19-1 : pdo_mysql v7.0.19-1 : Phar v2.0.2 : posix v7.0.19-1 : readline v7.0.19-1 : redis v3.1.1 : Reflection v7.0.19-1 : session v7.0.19-1 : shmop v7.0.19-1 : SimpleXML v7.0.19-1 : sockets v7.0.19-1 : SPL v7.0.19-1 : standard v7.0.19-1 : sysvmsg v7.0.19-1 : sysvsem v7.0.19-1 : sysvshm v7.0.19-1 : tokenizer v7.0.19-1 : wddx v7.0.19-1 : xml v7.0.19-1 : xmlreader v7.0.19-1 : xmlwriter v7.0.19-1 : xsl v7.0.19-1 : Zend OPcache v7.0.19-1 : zip v1.13.5 : zlib v7.0.19-1 :
HTTP Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36 Screen Resolution 1366 x 768 Window Size 1349 x 675
The feature has now been merged into the emoncms Master branch.
Many thanks to Aymeric Thibaut for writing this.
Paul
Yes, this is really great. Thanks Aymeric, and also thanks everyone involved on this thread for testing and feeding back