From 1cbf2f00dc9c5170776f67347a8035906e803b32 Mon Sep 17 00:00:00 2001 From: Tatiana Korchuganova Date: Thu, 29 Aug 2024 12:53:00 +0200 Subject: [PATCH] DC | add dataset name to the json output --- core/datacarousel/templates/dataCarouselDash.html | 6 +++--- core/datacarousel/views.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/datacarousel/templates/dataCarouselDash.html b/core/datacarousel/templates/dataCarouselDash.html index 4782e06c..3603faa2 100644 --- a/core/datacarousel/templates/dataCarouselDash.html +++ b/core/datacarousel/templates/dataCarouselDash.html @@ -654,13 +654,13 @@ { title: 'Destination RSE', data: 'destination_rse' }, { title: 'Time elapsed [d:h:m:s]', data: 'elapsedtime', defaultValue: '---'}, { title: 'Started at', data: 'start_time' }, - { title: 'Rucio rule', data: 'rse', className: 'text icons1', + { title: 'Rucio rule', data: 'rrule', className: 'text icons1', "render": function(data, type, full, meta) { let entry = '' if (data && "{{ request.session.rucio_ui }}".length > 0) { - entry += '' + full['rse'].slice(0,3) + '...' + full['rse'].slice(full['rse'].length-3, full['rse'].length) + ' '; + entry += '' + full['rrule'].slice(0,3) + '...' + full['rrule'].slice(full['rrule'].length-3, full['rrule'].length) + ' '; if (data && full['status'] === 'staging') { - entry += `
Look for stuck files
` + entry += `
Look for stuck files
` } } else { diff --git a/core/datacarousel/views.py b/core/datacarousel/views.py index 9cfab81e..8d5e4afb 100644 --- a/core/datacarousel/views.py +++ b/core/datacarousel/views.py @@ -176,6 +176,7 @@ def get_data_carousel_data(request): 'campaign': dsdata['campaign'], 'pr_id': dsdata['pr_id'], 'taskid': dsdata['taskid'], + 'dataset': dsdata['dataset'], 'status': dsdata['status'], 'total_files': dsdata['total_files'], 'staged_files': dsdata['staged_files'], 'size': round(convert_bytes(dsdata['dataset_bytes'], output_unit='GB'), 2), 'progress': int(math.floor(dsdata['staged_files'] * 100.0 / dsdata['total_files'])), @@ -183,7 +184,7 @@ def get_data_carousel_data(request): 'destination_rse': dsdata['destination_rse'] if 'destination_rse' in dsdata and dsdata['destination_rse'] else '---', 'elapsedtime': convert_sec(epltime.total_seconds(), out_unit='str') if epltime is not None else '---', 'start_time': dsdata['start_time'].strftime(settings.DATETIME_FORMAT) if dsdata['start_time'] else '---', - 'rse': dsdata['rse'], + 'rrule': dsdata['rse'], 'update_time': convert_sec(dsdata['update_time'].total_seconds(), out_unit='str') if dsdata['update_time'] is not None else '---', 'processingtype': dsdata['processingtype'] })