From 04601d40eb6fc200fd07ac90fedb30a823719b03 Mon Sep 17 00:00:00 2001 From: Adam Stewart Date: Fri, 18 Sep 2020 13:49:06 +1000 Subject: [PATCH 01/58] Remove 'Analysis' menu option --- templates/base.html | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/templates/base.html b/templates/base.html index e9c5f7ad6..a2a72495f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -117,19 +117,6 @@ - - - From 104759c0dd02cdfb2aa93c0a43bde792af292f97 Mon Sep 17 00:00:00 2001 From: Adam Stewart Date: Tue, 22 Sep 2020 10:37:26 +1000 Subject: [PATCH 02/58] Sidebar and job detail celestial * Changed sidebar behaviour. * Added celestial plot to job detail page. --- pipeline/utils/view.py | 4 +++- pipeline/views.py | 11 +++++++-- static/css/sb-admin-2.css | 5 ++-- templates/base.html | 48 ++++++++++++++++++++------------------- templates/index.html | 4 ++-- templates/run_detail.html | 37 ++++++++++++++++++++++++++---- 6 files changed, 75 insertions(+), 34 deletions(-) diff --git a/pipeline/utils/view.py b/pipeline/utils/view.py index 8b67cf14b..13239b8bf 100644 --- a/pipeline/utils/view.py +++ b/pipeline/utils/view.py @@ -179,11 +179,13 @@ def generate_colsfields(fields, url_prefix_dict, not_orderable_col=[]): return colsfields -def get_skyregions_collection(): +def get_skyregions_collection(run_id: int=None): """ Produce Sky region geometry shapes for d3-celestial. """ skyregions = SkyRegion.objects.all() + if run_id is not None: + skyregions = skyregions.filter(run=run_id) features = [] diff --git a/pipeline/views.py b/pipeline/views.py index 2267e5507..cf66ac749 100644 --- a/pipeline/views.py +++ b/pipeline/views.py @@ -201,7 +201,7 @@ def RunDetail(request, id): 'images', '_'.join([ x['name'].replace('.','_'), - x['datetime'].strftime('%Y-%m-%dT%H_%M_%S%z') + # x['datetime'].strftime('%Y-%m-%dT%H_%M_%S%z') ]), 'measurements.parquet' ), @@ -257,7 +257,14 @@ def RunDetail(request, id): with open(f_path) as fp: p_run['log_txt'] = fp.read() - return render(request, 'run_detail.html', {'p_run': p_run}) + return render( + request, 'run_detail.html', + { + 'p_run': p_run, + 'd3_celestial_skyregions': get_skyregions_collection(run_id=id), + 'static_url': settings.STATIC_URL + } + ) # Images table diff --git a/static/css/sb-admin-2.css b/static/css/sb-admin-2.css index d2c0db213..dcbee3c7b 100644 --- a/static/css/sb-admin-2.css +++ b/static/css/sb-admin-2.css @@ -10081,7 +10081,8 @@ a:focus { } .sidebar { - width: 4.5rem; + text-align: center; + width: 6.5rem; min-height: 100vh; } @@ -10236,7 +10237,7 @@ a:focus { font-size: 0.65rem; } -@media (min-width: 768px) { +@media (min-width: 2000px) { .sidebar { width: 13rem !important; } diff --git a/templates/base.html b/templates/base.html index a2a72495f..1cee0ad38 100644 --- a/templates/base.html +++ b/templates/base.html @@ -67,55 +67,57 @@ - + + + + @@ -177,7 +179,7 @@
-
-
+
+ diff --git a/templates/run_detail.html b/templates/run_detail.html index dfa9f7af3..d63f90149 100644 --- a/templates/run_detail.html +++ b/templates/run_detail.html @@ -8,6 +8,10 @@ + + + + {% endblock head %} @@ -152,16 +156,33 @@