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

Add stats for pilot #90

Closed
wants to merge 76 commits into from
Closed

Add stats for pilot #90

wants to merge 76 commits into from

Conversation

dancunningham
Copy link
Member

Adds some additional tools to the "dashboard" for the pilot team to use:

  • Soft shutdown link
  • Uptime stats and downtime report
  • Backup and restore status page (including USB stick status)

To deploy this on a live server, all the files need to be put in place in Debian and then the commands in /packages/buendia-utils/control/postinst need to be run.

Alternatively, you could build new versions of the buendia-dashboard and buendia-utils packages and let the autoupdate script install those from USB.

geotheory and others added 30 commits November 12, 2015 18:56
This needs folder /home/buendia to exist and contain file server_status.txt
with write permissions for buendia scripts. Current implementation is for
these to be created on setup if they don't exist by Yocto.
Patients weren't able to be synced until they were edited, due to a bug in the SQL trigger that
creates entries in the `buendia_patient_sync_map` on person insert.

This change fixes that bug. Fixes projectbuendia/client#187
Previously, secondary concepts in chart fields (any concepts other than the first listed concept)
were not synced to the client. This resulted in the client not knowing how to render these secondary
concepts unless they were also a primary concept in another chart field.

Fixes projectbuendia/client#202.
Fix patients not syncing until an observation was added.
Sync secondary concepts that aren't referenced anywhere else.
- Allow free-text observations to be submitted as part of encounters.
- Attribute encounters to the user who entered them.
- Standardise the way observations are represented in encounters, so they more closely match the
  representation used for observation sync.
…-default-form-section

Create default form section [invisible]
…-unknown

In profile, make yes_no really mean yes or no and introduce yes_no_unknown
Server-side changes required to support notes panel.
…uired-fields

Outputs the required property of fields.
…tus-reporting

Feature/buendia backup status reporting
@@ -42,7 +53,7 @@ Content-Type: text/html

<h1>Project Buendia server</h1>

<h2>Staff access</h2>
<h2>Bokoro Pilot - Server 9 (ATFC Simple Server)</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have a TODO to make it dynamic and not hard coded.

@llvasconcellos
Copy link
Contributor

My only concern is the shutdown request check interval. Everything else seems fine.

@dancunningham
Copy link
Member Author

Thanks @llvasconcellos. I've changed the interval for the shutdown and reboot services to 30s, and added a TODO as you suggested, also removing the specific server name which probably shouldn't be committed.

@capnfabs
Copy link
Member

The dashboard stuff looks good, but the shutdown checker and the reboot checker should be unified - currently we've got a service in Debian checking for shutdown and a service in Yocto checking for reboots.

@capnfabs
Copy link
Member

Also, the fact that so many different pieces of code have to be able to interpret status codes is pretty scary.

@dancunningham
Copy link
Member Author

@capnfabs - both checks are on the Yocto side I think. I did the shutdown check in the same way as the reboot check. Do you recommend merging them both into a single service that checks for both reboot and shutdown requests then?

@dancunningham dancunningham self-assigned this Feb 23, 2016
@capnfabs
Copy link
Member

@dancunningham Ah yes, you're right - sorry about that.

@dancunningham
Copy link
Member Author

@capnfabs @llvasconcellos does anything need done to this before we can merge it in?

I'd like to verify that it works on an Edison. For that we need to merge it and do a release anyway!

@llvasconcellos
Copy link
Contributor

@dancunningham It's fine by me. You can merge it.


buendia_status=$(cat /home/buendia/server_status.txt)

if [ $buendia_status -eq 2 ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use bash case statements for this: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_03.html.

Also, as is, you should be quoting the $buendia_status variable in these tests because you're using [ as opposed to [[. See http://serverfault.com/a/52050/145418

@capnfabs capnfabs assigned dancunningham and unassigned capnfabs Mar 5, 2016
@capnfabs
Copy link
Member

capnfabs commented Mar 5, 2016

All in all, looks good, but back over to you for adjustments and tweaks @dancunningham :)

@zestyping
Copy link
Contributor

This PR has been reconstituted in #117.

@zestyping zestyping closed this Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants