)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"e59c83a19ccffc58e9356d7c631f35f1d31cfbcc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5e9646a5_34e95eaf","updated":"2021-12-13 19:58:15.000000000","message":"I think this is basically ready, pending the two typos!","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"dd292be2be75cb3d2581dadd8e575442cb481212","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"edbf4b24_a91680ad","updated":"2021-10-21 16:14:30.000000000","message":"Typos","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"650710678056370f7ec0797b8b1da591413b3cbf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"e7b1050a_cd9d64ba","updated":"2021-12-20 23:34:13.000000000","message":"Awesome stuff :)","commit_id":"8659613b0238ef2eeb176c811647e85f7095c388"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"20f6fccdad93fb2831126f342486c47e7e60eb71","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"0a59062c_c6ac41fc","updated":"2022-01-27 15:12:27.000000000","message":"I only bumped apexcharts to the latest version. No visible changes.","commit_id":"d6398f5e7a85b86d5a4a370b8d163273f67e79ee"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"c8f528b156a461c70c2ba4df6ae9d58b8f8cb551","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"beb4beae_73c99b0c","updated":"2022-01-27 15:17:39.000000000","message":"Very good job, this is fantastic!\n\nThere are small improvements needed, but I would like to merge this and iterate in new patches.\n\nDocs are needed, in particular to describe required policy changes. I used the following:\n\n\"blazar:oshosts:get\": \"\"\n\"blazar:oshosts:get_allocations\": \"\"\n\nRelated, can we display the calendar without hostname (just host ID), if we don\u0027t have permissions for blazar:oshosts:get?","commit_id":"d6398f5e7a85b86d5a4a370b8d163273f67e79ee"}],"blazar_dashboard/api/client.py":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    _attrs \u003d [\u0027resource_id\u0027, \u0027reservations\u0027]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def __init__(self, apiresource):"},{"line_number":68,"context_line":"        super(Allocation, self).__init__(apiresource)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"35536d6a_f7120b3b","line":67,"updated":"2021-09-10 15:20:37.000000000","message":"Is overridding __init__ necessary? It seems like the function signature is the same in the superclass.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    _attrs \u003d [\u0027resource_id\u0027, \u0027reservations\u0027]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def __init__(self, apiresource):"},{"line_number":68,"context_line":"        super(Allocation, self).__init__(apiresource)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"cbe0b7fb_8b62c5fd","line":67,"in_reply_to":"35536d6a_f7120b3b","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"def compute_host_display_name(host):"},{"line_number":154,"context_line":"    return getattr(host, \u0027node_name\u0027, \u0027node{}\u0027.format(host.id))"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reservation_calendar(request):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5cdaf414_c94f2d12","line":154,"updated":"2021-09-10 15:20:37.000000000","message":"\"node_name\" is not a \u0027special\u0027 extra capability (at least not one is documented anywhere), yet it clearly is special here. I think we should either (a) make this configurable in the dashboard configuration somehow (\"resource_host_display_capability\" ?? -- probably something better) or (b) document that for the oshosts plugin, this is a special capability you can use.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"def compute_host_display_name(host):"},{"line_number":154,"context_line":"    return getattr(host, \u0027node_name\u0027, \u0027node{}\u0027.format(host.id))"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def reservation_calendar(request):"}],"source_content_type":"text/x-python","patch_set":2,"id":"e51835ca_a279a193","line":154,"in_reply_to":"5cdaf414_c94f2d12","updated":"2021-09-15 20:59:34.000000000","message":"I didn\u0027t mean to include this, as it isn\u0027t used in the frontend. I have updated it though with your suggestion to have a config option for it.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":163,"context_line":"            memory_mb\u003dh.memory_mb, local_gb\u003dh.local_gb, cpu_info\u003dh.cpu_info,"},{"line_number":164,"context_line":"            hypervisor_type\u003dh.hypervisor_type, )"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    hosts_by_id \u003d {h.id: h for h in host_list(request) if h.reservable}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def host_reservation_dict(reservation, resource_id):"},{"line_number":169,"context_line":"        host_reservation \u003d dict("}],"source_content_type":"text/x-python","patch_set":2,"id":"eabdc2e2_0e0c5edc","line":166,"updated":"2021-09-10 15:20:37.000000000","message":"May be worth a comment above this pointing out that hosts not marked as reservable will NOT be displayed on the calendar. That is probably also something to put in the release notes.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            memory_mb\u003dh.memory_mb, local_gb\u003dh.local_gb, cpu_info\u003dh.cpu_info,"},{"line_number":164,"context_line":"            hypervisor_type\u003dh.hypervisor_type, )"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    hosts_by_id \u003d {h.id: h for h in host_list(request) if h.reservable}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def host_reservation_dict(reservation, resource_id):"},{"line_number":169,"context_line":"        host_reservation \u003d dict("}],"source_content_type":"text/x-python","patch_set":2,"id":"dc2c6772_e0c71167","line":166,"in_reply_to":"eabdc2e2_0e0c5edc","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":193,"context_line":"    if datestr is None:"},{"line_number":194,"context_line":"        return datestr"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    dateobj \u003d datetime.strptime(datestr, \"%Y-%m-%dT%H:%M:%S.%f\")"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    return dateobj.replace(tzinfo\u003dUTC)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5810bc59_10e362f3","line":196,"updated":"2021-09-10 15:20:37.000000000","message":"I\u0027m surprised this isn\u0027t already in the dashboard logic somewhere!","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    if datestr is None:"},{"line_number":194,"context_line":"        return datestr"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    dateobj \u003d datetime.strptime(datestr, \"%Y-%m-%dT%H:%M:%S.%f\")"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    return dateobj.replace(tzinfo\u003dUTC)"}],"source_content_type":"text/x-python","patch_set":2,"id":"0abccfce_2e0f6ea1","line":196,"in_reply_to":"5810bc59_10e362f3","updated":"2021-09-15 20:59:34.000000000","message":"A similar function call is made elsewhere, but I do not see anything able to be reused.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"}],"blazar_dashboard/conf.py":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"host_reservation \u003d ("},{"line_number":4,"context_line":"    getattr(settings, \u0027OPENSTACK_BLAZAR_HOST_RESERVATION\u0027, {"},{"line_number":5,"context_line":"        \u0027enabled\u0027: True,"},{"line_number":6,"context_line":"    }))"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"floatingip_reservation \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"7a73b46e_aa832c95","line":5,"updated":"2021-09-10 15:20:37.000000000","message":"Here is a nice place to put the name of the extra capability that can provide the display name of the resource!","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"host_reservation \u003d ("},{"line_number":4,"context_line":"    getattr(settings, \u0027OPENSTACK_BLAZAR_HOST_RESERVATION\u0027, {"},{"line_number":5,"context_line":"        \u0027enabled\u0027: True,"},{"line_number":6,"context_line":"    }))"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"floatingip_reservation \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"f54729ea_32a69c51","line":5,"in_reply_to":"7a73b46e_aa832c95","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"e59c83a19ccffc58e9356d7c631f35f1d31cfbcc","unresolved":true,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from django.conf import settings"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"host_calendar_attribute \u003d ("},{"line_number":16,"context_line":"    getattr("},{"line_number":17,"context_line":"        settings,"},{"line_number":18,"context_line":"        \u0027OPENSTACK_BLAZAR_HOST_CALENDAR_ATTRIBUTE\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"14e3f418_35d93abf","line":15,"updated":"2021-12-13 19:58:15.000000000","message":"I was actually imagining that this would get rolled into the OPENSTACK_BLAZAR_HOST_RESERVATION, so the deployer would do like\n\n```\nOPENSTACK_BLAZAR_HOST_RESERVATION \u003d {\n  \u0027enabled\u0027: True,\n  \u0027calendar_attribute\u0027: \u0027hypervisor_hostname\u0027,\n}\n```","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"48ffc38b50e7480ad68535cf43b414f60a566d48","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from django.conf import settings"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"host_calendar_attribute \u003d ("},{"line_number":16,"context_line":"    getattr("},{"line_number":17,"context_line":"        settings,"},{"line_number":18,"context_line":"        \u0027OPENSTACK_BLAZAR_HOST_CALENDAR_ATTRIBUTE\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"37aaa0a7_6e84b31a","line":15,"in_reply_to":"14e3f418_35d93abf","updated":"2021-12-16 22:20:00.000000000","message":"Done","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"}],"blazar_dashboard/content/leases/templates/leases/base.html":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":1,"context_line":"{% extends \u0027base.html\u0027 %}"},{"line_number":2,"context_line":"{# vestigial; there was some JS/SCSS stuff here, but it\u0027s done with the #}"},{"line_number":3,"context_line":"{# enabled/ files. fix extends directives in other templates before deleting.#}"}],"source_content_type":"text/html","patch_set":2,"id":"093bf97d_1438b5a6","line":3,"updated":"2021-09-10 15:20:37.000000000","message":"I don\u0027t quite understand this comment. Was this taken from an example somewhere? It is implying that we\u0027re adding more code that effectively shouldn\u0027t be here (\"fix ... before deleting.\")","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{% extends \u0027base.html\u0027 %}"},{"line_number":2,"context_line":"{# vestigial; there was some JS/SCSS stuff here, but it\u0027s done with the #}"},{"line_number":3,"context_line":"{# enabled/ files. fix extends directives in other templates before deleting.#}"}],"source_content_type":"text/html","patch_set":2,"id":"b185b2a3_d84201e6","line":3,"in_reply_to":"093bf97d_1438b5a6","updated":"2021-09-15 20:59:34.000000000","message":"This was an old file that I initially copied along with all the other dependencies. I\u0027ve since removed this file.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"}],"blazar_dashboard/content/leases/urls.py":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"urlpatterns \u003d ["},{"line_number":22,"context_line":"    url(r\u0027^calendar/(?P\u003cresource_type\u003e(host))/$\u0027,"},{"line_number":23,"context_line":"        leases_views.CalendarView.as_view(), name\u003d\u0027calendar\u0027),"},{"line_number":24,"context_line":"    url(r\u0027^calendar/(?P\u003cresource_type\u003e(host))/resources\\.json$\u0027,"},{"line_number":25,"context_line":"        leases_views.calendar_data_view,"}],"source_content_type":"text/x-python","patch_set":2,"id":"14386b4a_859f996a","line":22,"updated":"2021-09-10 15:20:37.000000000","message":"I think it may make more sense to have this calendarview endpoint return a 404 if there is no calendar supported for \"resource_type\". Otherwise we have to update this pattern w/ each additional resource type, and the behavior when hitting something unsupported, e.g., GET /calendar/floatingip would be to 404 anyways b/c it did not match a route.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"urlpatterns \u003d ["},{"line_number":22,"context_line":"    url(r\u0027^calendar/(?P\u003cresource_type\u003e(host))/$\u0027,"},{"line_number":23,"context_line":"        leases_views.CalendarView.as_view(), name\u003d\u0027calendar\u0027),"},{"line_number":24,"context_line":"    url(r\u0027^calendar/(?P\u003cresource_type\u003e(host))/resources\\.json$\u0027,"},{"line_number":25,"context_line":"        leases_views.calendar_data_view,"}],"source_content_type":"text/x-python","patch_set":2,"id":"f0013b91_f01bcf7b","line":22,"in_reply_to":"14386b4a_859f996a","updated":"2021-09-15 20:59:34.000000000","message":"Done, now the views raise a 404.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"}],"blazar_dashboard/content/leases/views.py":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":52,"context_line":"    }"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def get_data(self, request, context, *args, **kwargs):"},{"line_number":55,"context_line":"        context[\"calendar_title\"] \u003d self.titles[context[\"resource_type\"]]"},{"line_number":56,"context_line":"        return context"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"c9ed5151_658c7151","line":55,"updated":"2021-09-10 15:20:37.000000000","message":"We should be more defensive here just in case, I think, at minimum using .get to default to None, or possibly empty string. Just don\u0027t want the stack to be generated from here; the validity of resource_type should be checked before we get here.\n\nAlternatively you could \"assert context[\"resource_type\"] in self.titles\", indicating that this is a check this code really shouldn\u0027t be making, yet it can indicate that the caller screwed up.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    }"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def get_data(self, request, context, *args, **kwargs):"},{"line_number":55,"context_line":"        context[\"calendar_title\"] \u003d self.titles[context[\"resource_type\"]]"},{"line_number":56,"context_line":"        return context"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"361caec1_8772dd31","line":55,"in_reply_to":"c9ed5151_658c7151","updated":"2021-09-15 20:59:34.000000000","message":"I\u0027ve updated this, so if the resource type is not valid, a 404 is raised.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def calendar_data_view(request, resource_type):"},{"line_number":60,"context_line":"    api_mapping \u003d {"},{"line_number":61,"context_line":"        \"host\": api.client.reservation_calendar,"},{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":"    data \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"052bdd1a_2845a3e5","line":60,"updated":"2021-09-10 15:20:37.000000000","message":"Same comment, I think if we just update the route to be generic then we gain the responsibility of doing the validity check anyways, which would make this code path a bit more protected over time, because it\u0027s doing the input bounds checking close to the logic that requires valid input.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def calendar_data_view(request, resource_type):"},{"line_number":60,"context_line":"    api_mapping \u003d {"},{"line_number":61,"context_line":"        \"host\": api.client.reservation_calendar,"},{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":"    data \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"030c21d9_fe904487","line":60,"in_reply_to":"052bdd1a_2845a3e5","updated":"2021-09-15 20:59:34.000000000","message":"Same as above, now a 404 is raised.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"e59c83a19ccffc58e9356d7c631f35f1d31cfbcc","unresolved":true,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def calendar_data_view(request, resource_type):"},{"line_number":63,"context_line":"    api_mapping \u003d {"},{"line_number":64,"context_line":"        \"host\": api.client.reservation_calendar,"},{"line_number":65,"context_line":"    }"},{"line_number":66,"context_line":"    attribute_mapping \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"4b115f90_be0d1397","line":63,"updated":"2021-12-13 19:58:15.000000000","message":"Cool, I like that :) -- probably not likely that the api mapping would be different but good to know.","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"48ffc38b50e7480ad68535cf43b414f60a566d48","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def calendar_data_view(request, resource_type):"},{"line_number":63,"context_line":"    api_mapping \u003d {"},{"line_number":64,"context_line":"        \"host\": api.client.reservation_calendar,"},{"line_number":65,"context_line":"    }"},{"line_number":66,"context_line":"    attribute_mapping \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"6f401ad5_8d9ec3df","line":63,"in_reply_to":"4b115f90_be0d1397","updated":"2021-12-16 22:20:00.000000000","message":"Ack","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"}],"blazar_dashboard/static/leases/js/calendar/lease_chart.js":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":1,"context_line":"(function(window, horizon, $, undefined) {"},{"line_number":2,"context_line":"  \u0027use strict\u0027;"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"  const RESTRICTED_BACKGROUND_COLOR \u003d \"#aaa\";"},{"line_number":5,"context_line":"  const CHART_TITLE_HEIGHT \u003d 68;"},{"line_number":6,"context_line":"  const ROW_HEIGHT \u003d 60;"},{"line_number":7,"context_line":""}],"source_content_type":"text/javascript","patch_set":2,"id":"50f98f4b_efc99ed1","line":4,"updated":"2021-09-10 15:20:37.000000000","message":"I don\u0027t really know how we would support this but: could be interesting if a theme could set this.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"(function(window, horizon, $, undefined) {"},{"line_number":2,"context_line":"  \u0027use strict\u0027;"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"  const RESTRICTED_BACKGROUND_COLOR \u003d \"#aaa\";"},{"line_number":5,"context_line":"  const CHART_TITLE_HEIGHT \u003d 68;"},{"line_number":6,"context_line":"  const ROW_HEIGHT \u003d 60;"},{"line_number":7,"context_line":""}],"source_content_type":"text/javascript","patch_set":2,"id":"7eef5d25_6b1b644e","line":4,"in_reply_to":"50f98f4b_efc99ed1","updated":"2021-09-15 20:59:34.000000000","message":"Oops, missed removing this. This patch doesn\u0027t include the restricted rows, and so now this line is deleted.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":5,"context_line":"  const CHART_TITLE_HEIGHT \u003d 68;"},{"line_number":6,"context_line":"  const ROW_HEIGHT \u003d 60;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"  var selector \u003d undefined; // what selector determines the calendarElement"},{"line_number":9,"context_line":"  var rowAttr \u003d undefined; // what attribute from resources.json labels each chart row"},{"line_number":10,"context_line":"  var pluralResourceType \u003d undefined; // This resource type plural display name"},{"line_number":11,"context_line":""}],"source_content_type":"text/javascript","patch_set":2,"id":"340de52c_9f425dbb","line":8,"updated":"2021-09-10 15:20:37.000000000","message":"In Javascript you can just \"var selector;\", it\u0027s a bit uncommon stylistically to explicitly set to undefined. I think though this would be a bit nicer if you could use const. Here\u0027s how you could do it: earlier error handling:\n\n```\nconst selector \u003d \u0027#blazar-calendar-host\u0027;\nconst rowAttr \u003d \u0027hypervisor_hostname\u0027;\nconst pluralResourceType \u003d gettext(\u0027Hosts\u0027);\n\nif ($(selector).length \u003c 1) {\n  return;\n}\n```","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":5,"context_line":"  const CHART_TITLE_HEIGHT \u003d 68;"},{"line_number":6,"context_line":"  const ROW_HEIGHT \u003d 60;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"  var selector \u003d undefined; // what selector determines the calendarElement"},{"line_number":9,"context_line":"  var rowAttr \u003d undefined; // what attribute from resources.json labels each chart row"},{"line_number":10,"context_line":"  var pluralResourceType \u003d undefined; // This resource type plural display name"},{"line_number":11,"context_line":""}],"source_content_type":"text/javascript","patch_set":2,"id":"33cd0b69_c3065d12","line":8,"in_reply_to":"340de52c_9f425dbb","updated":"2021-09-15 20:59:34.000000000","message":"Done, this remains this way to easily support more resource types, but for now I have removed this and gone with the simple const.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":26,"context_line":"    // Guard against re-running init() and a pointless calendar.json load."},{"line_number":27,"context_line":"    // Horizon seems to call us twice for some reason"},{"line_number":28,"context_line":"    if (calendarElement.hasClass(\"loaded\").length \u003e 0) {"},{"line_number":29,"context_line":"      console.log(\u0027blocking duplicate init\u0027);"},{"line_number":30,"context_line":"    }"},{"line_number":31,"context_line":"    calendarElement.addClass(\u0027loaded\u0027);"},{"line_number":32,"context_line":"    $.getJSON(\"resources.json\")"}],"source_content_type":"text/javascript","patch_set":2,"id":"30180310_f23ac212","line":29,"updated":"2021-09-10 15:20:37.000000000","message":"This doesn\u0027t seem to actually block a duplicate init, I think it should return here? I\u0027m also unsure of how this is the case that this happens; the script should execute once when it\u0027s loaded on the page, the only way it could load more than this is if it was removed and re-included in the DOM somehow (which I suppose is possible.)","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    // Guard against re-running init() and a pointless calendar.json load."},{"line_number":27,"context_line":"    // Horizon seems to call us twice for some reason"},{"line_number":28,"context_line":"    if (calendarElement.hasClass(\"loaded\").length \u003e 0) {"},{"line_number":29,"context_line":"      console.log(\u0027blocking duplicate init\u0027);"},{"line_number":30,"context_line":"    }"},{"line_number":31,"context_line":"    calendarElement.addClass(\u0027loaded\u0027);"},{"line_number":32,"context_line":"    $.getJSON(\"resources.json\")"}],"source_content_type":"text/javascript","patch_set":2,"id":"4797e372_9fd79d63","line":29,"in_reply_to":"30180310_f23ac212","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":33,"context_line":"      .done(function(resp) {"},{"line_number":34,"context_line":"        resources \u003d resp.resources;"},{"line_number":35,"context_line":"        // For this row shows up at all, we need at least 1 data point."},{"line_number":36,"context_line":"        var reservationsById \u003d {}"},{"line_number":37,"context_line":"        resp.reservations.forEach(function(reservation){"},{"line_number":38,"context_line":"          if(!(reservation.id in reservationsById)){"},{"line_number":39,"context_line":"            reservationsById[reservation.id] \u003d reservation"}],"source_content_type":"text/javascript","patch_set":2,"id":"fa6b44fd_3e1677ee","line":36,"updated":"2021-09-10 15:20:37.000000000","message":"const","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":33,"context_line":"      .done(function(resp) {"},{"line_number":34,"context_line":"        resources \u003d resp.resources;"},{"line_number":35,"context_line":"        // For this row shows up at all, we need at least 1 data point."},{"line_number":36,"context_line":"        var reservationsById \u003d {}"},{"line_number":37,"context_line":"        resp.reservations.forEach(function(reservation){"},{"line_number":38,"context_line":"          if(!(reservation.id in reservationsById)){"},{"line_number":39,"context_line":"            reservationsById[reservation.id] \u003d reservation"}],"source_content_type":"text/javascript","patch_set":2,"id":"795764c5_b294d517","line":36,"in_reply_to":"fa6b44fd_3e1677ee","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":40,"context_line":"            reservation.name \u003d reservation.id"},{"line_number":41,"context_line":"            reservation.data \u003d []"},{"line_number":42,"context_line":"          }"},{"line_number":43,"context_line":"          var newReservation \u003d {"},{"line_number":44,"context_line":"            \u0027start_date\u0027: new Date(reservation.start_date),"},{"line_number":45,"context_line":"            \u0027end_date\u0027: new Date(reservation.end_date),"},{"line_number":46,"context_line":"            \u0027x\u0027: reservation[rowAttr],"}],"source_content_type":"text/javascript","patch_set":2,"id":"7c41b95c_db95b8fb","line":43,"updated":"2021-09-10 15:20:37.000000000","message":"const","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":40,"context_line":"            reservation.name \u003d reservation.id"},{"line_number":41,"context_line":"            reservation.data \u003d []"},{"line_number":42,"context_line":"          }"},{"line_number":43,"context_line":"          var newReservation \u003d {"},{"line_number":44,"context_line":"            \u0027start_date\u0027: new Date(reservation.start_date),"},{"line_number":45,"context_line":"            \u0027end_date\u0027: new Date(reservation.end_date),"},{"line_number":46,"context_line":"            \u0027x\u0027: reservation[rowAttr],"}],"source_content_type":"text/javascript","patch_set":2,"id":"3eb8c6d6_dda3021b","line":43,"in_reply_to":"7c41b95c_db95b8fb","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":164,"context_line":"    });"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    $(\u0027.calendar-quickdays\u0027).click(function() {"},{"line_number":167,"context_line":"      var days \u003d parseInt($(this).data(\"calendar-days\"));"},{"line_number":168,"context_line":"      if (!isNaN(days)) {"},{"line_number":169,"context_line":"        var timeDomain \u003d computeTimeDomain(days);"},{"line_number":170,"context_line":"        setTimeDomain(timeDomain);"}],"source_content_type":"text/javascript","patch_set":2,"id":"38008526_9af860b9","line":167,"updated":"2021-09-10 15:20:37.000000000","message":"Try to make basically any variable a const, it will help keep the code a bit more predictable by removing the class of programming errors that involve re-using variable names and poisoning scope.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    });"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    $(\u0027.calendar-quickdays\u0027).click(function() {"},{"line_number":167,"context_line":"      var days \u003d parseInt($(this).data(\"calendar-days\"));"},{"line_number":168,"context_line":"      if (!isNaN(days)) {"},{"line_number":169,"context_line":"        var timeDomain \u003d computeTimeDomain(days);"},{"line_number":170,"context_line":"        setTimeDomain(timeDomain);"}],"source_content_type":"text/javascript","patch_set":2,"id":"dca98f44_10cecf94","line":167,"in_reply_to":"38008526_9af860b9","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"}],"blazar_dashboard/static/leases/scss/calendar.scss":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":5,"context_line":"}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":".blazar-calendar .chart {"},{"line_number":8,"context_line":"  width: inherit;"},{"line_number":9,"context_line":"}"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":".apexcharts-tooltip {"}],"source_content_type":"text/x-scss","patch_set":2,"id":"15eefc5b_7fac177d","line":8,"updated":"2021-09-10 15:20:37.000000000","message":"Inherit has some bizarre behavior, if for example .blazar-calendar changed to have width: 80%, then the chart inside would have its width be 80% of 80%! It seems that what we want is to have it take up the entire width of the parent, in which case width: 100% is safer.","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":5,"context_line":"}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":".blazar-calendar .chart {"},{"line_number":8,"context_line":"  width: inherit;"},{"line_number":9,"context_line":"}"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":".apexcharts-tooltip {"}],"source_content_type":"text/x-scss","patch_set":2,"id":"b0bc50d1_7b172951","line":8,"in_reply_to":"15eefc5b_7fac177d","updated":"2021-09-15 20:59:34.000000000","message":"Done","commit_id":"9145cb7b72730452d790733d4a34240453b17683"}],"blazar_dashboard/static/leases/scss/widgets.scss":[{"author":{"_account_id":29100,"name":"Jason Anderson","email":"jasonanderson@uchicago.edu","username":"jasonanderson"},"change_message_id":"d268e1f05bcf38317beb23016b7c983f67ab404c","unresolved":true,"context_lines":[{"line_number":1,"context_line":".inline-groups \u003e .control-group {"},{"line_number":2,"context_line":"  display: inline-block;"},{"line_number":3,"context_line":"  width: 32%;"},{"line_number":4,"context_line":"}"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":".control-sublabel {"}],"source_content_type":"text/x-scss","patch_set":2,"id":"86978542_a15910c4","line":3,"updated":"2021-09-10 15:20:37.000000000","message":"Interesting value :)","commit_id":"9145cb7b72730452d790733d4a34240453b17683"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"c4ad76829a4f2143f561e929aff17c72a11dcaa9","unresolved":false,"context_lines":[{"line_number":1,"context_line":".inline-groups \u003e .control-group {"},{"line_number":2,"context_line":"  display: inline-block;"},{"line_number":3,"context_line":"  width: 32%;"},{"line_number":4,"context_line":"}"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":".control-sublabel {"}],"source_content_type":"text/x-scss","patch_set":2,"id":"cd008480_55824a63","line":3,"in_reply_to":"86978542_a15910c4","updated":"2021-09-15 20:59:34.000000000","message":"Ack","commit_id":"9145cb7b72730452d790733d4a34240453b17683"}],"releasenotes/notes/host-calendar-2ecf4058929b269e.yaml":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"dd292be2be75cb3d2581dadd8e575442cb481212","unresolved":true,"context_lines":[{"line_number":1,"context_line":"features:"},{"line_number":2,"context_line":"  - |"},{"line_number":3,"context_line":"    A calendar view of host availiability is added. Any reservable host will"},{"line_number":4,"context_line":"    be shown in its own row, over a period of time. Allocations for the host"},{"line_number":5,"context_line":"    are indicated along the horizonal axis."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"2962b391_d3c353f6","line":3,"range":{"start_line":3,"start_character":28,"end_line":3,"end_character":41},"updated":"2021-10-21 16:14:30.000000000","message":"availability","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"48ffc38b50e7480ad68535cf43b414f60a566d48","unresolved":false,"context_lines":[{"line_number":1,"context_line":"features:"},{"line_number":2,"context_line":"  - |"},{"line_number":3,"context_line":"    A calendar view of host availiability is added. Any reservable host will"},{"line_number":4,"context_line":"    be shown in its own row, over a period of time. Allocations for the host"},{"line_number":5,"context_line":"    are indicated along the horizonal axis."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"6a7ed333_8560a9c9","line":3,"range":{"start_line":3,"start_character":28,"end_line":3,"end_character":41},"in_reply_to":"2962b391_d3c353f6","updated":"2021-12-16 22:20:00.000000000","message":"Done","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"dd292be2be75cb3d2581dadd8e575442cb481212","unresolved":true,"context_lines":[{"line_number":2,"context_line":"  - |"},{"line_number":3,"context_line":"    A calendar view of host availiability is added. Any reservable host will"},{"line_number":4,"context_line":"    be shown in its own row, over a period of time. Allocations for the host"},{"line_number":5,"context_line":"    are indicated along the horizonal axis."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"50825820_b93313d9","line":5,"range":{"start_line":5,"start_character":28,"end_line":5,"end_character":37},"updated":"2021-10-21 16:14:30.000000000","message":"horizontal","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"},{"author":{"_account_id":33582,"name":"Mark Powers","email":"markpowers@uchicago.edu","username":"markpowers"},"change_message_id":"48ffc38b50e7480ad68535cf43b414f60a566d48","unresolved":false,"context_lines":[{"line_number":2,"context_line":"  - |"},{"line_number":3,"context_line":"    A calendar view of host availiability is added. Any reservable host will"},{"line_number":4,"context_line":"    be shown in its own row, over a period of time. Allocations for the host"},{"line_number":5,"context_line":"    are indicated along the horizonal axis."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"a2d4cba7_a8b222fd","line":5,"range":{"start_line":5,"start_character":28,"end_line":5,"end_character":37},"in_reply_to":"50825820_b93313d9","updated":"2021-12-16 22:20:00.000000000","message":"Done","commit_id":"43c068d8465bf4afc8a2ae794f5e7b17c80dce50"}]}
