Browse Source

Initial event reporting for the term dashboard works now

master
Peter J. Jones 1 year ago
parent
commit
4724ee9c01
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      lib/Merkel/Operations/Term/Event.hs

+ 4
- 4
lib/Merkel/Operations/Term/Event.hs View File

@@ -108,14 +108,14 @@ vmEventsAfter key cutoff =
108 108
                , VirtualMachineConstructor
109 109
                )
110 110
 
111
-    sql = "SELECT DISTINCT ON (vme_event) \
111
+    sql = "SELECT DISTINCT ON (vme_event, vme_machine) \
112 112
           \       vme_machine, vme_time, vme_event, \
113 113
           \       vm_name, vm_term, vm_assigned_student, vm_address, \
114
-          \       vm_available, 'vm_root_password#clear', 'vm_root_password#hashed', \
115
-          \       'vm_student_password#clear', 'vm_student_password#hashed', vm_access_token \
114
+          \       vm_available, \"vm_root_password#clear\", \"vm_root_password#hashed\", \
115
+          \       \"vm_student_password#clear\", \"vm_student_password#hashed\", vm_access_token \
116 116
           \  FROM virtual_machine_event_log, virtual_machine \
117 117
           \ WHERE vme_machine = virtual_machine.id \
118 118
           \   AND virtual_machine.vm_assigned_student IS NOT NULL \
119 119
           \   AND virtual_machine.vm_term = ? \
120 120
           \   AND vme_time >= ? \
121
-          \ ORDER BY vme_event, vme_time DESC"
121
+          \ ORDER BY vme_event, vme_machine, vme_time DESC"

Loading…
Cancel
Save