Skip to content

Commit

Permalink
DC | add dataset name to the json output
Browse files Browse the repository at this point in the history
  • Loading branch information
tkorchug committed Aug 29, 2024
1 parent e2bb00b commit 1cbf2f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/datacarousel/templates/dataCarouselDash.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 += '<a href="{{ request.session.rucio_ui }}rule?rule_id=' + full['rse'] + '">' + full['rse'].slice(0,3) + '...' + full['rse'].slice(full['rse'].length-3, full['rse'].length) + ' <img src="/static/images/rucio-logo.png" width=14 height=14 border=0></a>';
entry += '<a href="{{ request.session.rucio_ui }}rule?rule_id=' + full['rrule'] + '">' + full['rrule'].slice(0,3) + '...' + full['rrule'].slice(full['rrule'].length-3, full['rrule'].length) + ' <img src="/static/images/rucio-logo.png" width=14 height=14 border=0></a>';
if (data && full['status'] === 'staging') {
entry += ` <a target="_blank" ng-click="stuckfiles.toggle('` + full['rse'] + `','` + full['source_rse'] + `')"><div class="bp-tooltip left"><i class="fi-plus"></i><span class="tooltip-text">Look for stuck files</span></div></a>`
entry += ` <a target="_blank" ng-click="stuckfiles.toggle('` + full['rrule'] + `','` + full['source_rse'] + `')"><div class="bp-tooltip left"><i class="fi-plus"></i><span class="tooltip-text">Look for stuck files</span></div></a>`
}
}
else {
Expand Down
3 changes: 2 additions & 1 deletion core/datacarousel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ 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'])),
'source_rse': dsdata['source_rse'],
'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']
})
Expand Down

0 comments on commit 1cbf2f0

Please sign in to comment.