Skip to content

Commit

Permalink
Add queue name and target to admin UI
Browse files Browse the repository at this point in the history
Summary:
Since I'm going to be changing the way that targets are propagated in the
future, this makes it easier to verify that things are working correctly (and
notice problems with the existing system).

Test Plan:
Load a failed pipeline and a successful pipeline and click around to look at the
different child pipelines. All of them display the correct queue name and
target.

Reviewers: mattfaus, chris

Reviewed By: chris

Differential Revision: http://phabricator.khanacademy.org/D8556
  • Loading branch information
Alan Pierce authored and MattFaus committed Jun 11, 2015
1 parent bc46ac3 commit adb3fd1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/src/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2901,6 +2901,7 @@ def _get_internal_status(pipeline_key=None,
outputs: Dictionary of output slot dictionaries.
children: List of child pipeline IDs.
queueName: Queue on which this pipeline is running.
target: Target version/module for the pipeline.
afterSlotKeys: List of Slot Ids after which this pipeline runs.
currentAttempt: Number of the current attempt, starting at 1.
maxAttempts: Maximum number of attempts before aborting.
Expand Down Expand Up @@ -2969,6 +2970,7 @@ def _get_internal_status(pipeline_key=None,
'outputs': params['output_slots'].copy(),
'children': [key.name() for key in pipeline_record.fanned_out],
'queueName': params['queue_name'],
'target': params['target'],
'afterSlotKeys': [str(key) for key in params['after_all']],
'currentAttempt': pipeline_record.current_attempt + 1,
'maxAttempts': pipeline_record.max_attempts,
Expand Down
2 changes: 2 additions & 0 deletions python/src/pipeline/ui/status.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ abbr {

/* detail-specific styling */
.status-param,
.target-param,
.retry-param {
padding-left: 1em;
font-size: 0.85em;
Expand Down Expand Up @@ -110,6 +111,7 @@ abbr {
#detail .param-container,
#detail .child-container,
#detail .run-after-container,
#detail .status-target-params,
#detail .status-retry-params {
margin-top: 1em;
}
Expand Down
23 changes: 23 additions & 0 deletions python/src/pipeline/ui/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,29 @@ function constructStageNode(pipelineId, infoMap, sidebar) {
containerDiv.append(linksDiv);
}

// Target parameters.
if (!sidebar) {
var targetParamsDiv = $('<div class="status-target-params">');
targetParamsDiv.append(
$('<div class="target-params-title">').text('Target parameters'));

var queueNameDiv = $('<div class="target-param">');
$('<span>').text('Queue name: ').appendTo(queueNameDiv);
$('<span>')
.text(infoMap.queueName)
.appendTo(queueNameDiv);
targetParamsDiv.append(queueNameDiv);

var targetDiv = $('<div class="target-param">');
$('<span>').text('Target: ').appendTo(targetDiv);
$('<span>')
.text(infoMap.target || 'Unspecified')
.appendTo(targetDiv);
targetParamsDiv.append(targetDiv);

containerDiv.append(targetParamsDiv);
}

// Retry parameters.
if (!sidebar) {
var retryParamsDiv = $('<div class="status-retry-params">');
Expand Down

0 comments on commit adb3fd1

Please sign in to comment.