Skip to content

Commit

Permalink
fix(ui): css in sidebar and logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux committed Jun 25, 2019
1 parent 3c5e22e commit 5bd822b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
7 changes: 4 additions & 3 deletions engine/api/workflow/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,14 @@ func load(ctx context.Context, db gorp.SqlExecutor, store cache.Store, proj *sdk
dbRes := Workflow{}

_, next := observability.Span(ctx, "workflow.load.selectOne")
if err := db.SelectOne(&dbRes, query, args...); err != nil {
err := db.SelectOne(&dbRes, query, args...)
next()
if err != nil {
if err == sql.ErrNoRows {
return nil, sdk.ErrWorkflowNotFound
}
return nil, sdk.WrapError(err, "Unable to load workflow")
}
next()

res := sdk.Workflow(dbRes)
if proj.Key == "" {
Expand All @@ -538,11 +539,11 @@ func load(ctx context.Context, db gorp.SqlExecutor, store cache.Store, proj *sdk
// Load groups
_, next = observability.Span(ctx, "workflow.load.loadWorkflowGroups")
gps, err := group.LoadWorkflowGroups(db, res.ID)
next()
if err != nil {
return nil, sdk.WrapError(err, "Unable to load workflow groups")
}
res.Groups = gps
next()

res.Pipelines = map[int64]sdk.Pipeline{}
res.Applications = map[int64]sdk.Application{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,17 @@ <h3 class="ui header">
{{currentWorkflowNodeRun.start | amLocal | amDateFormat: 'DD/MM/YYYY HH:mm' }}</div>
</div>
</div>
<div *ngIf="currentWorkflowNodeRun && currentWorkflowNodeRun.stages && currentWorkflowNodeRun.stages.length > 0"
class="ui vertical fluid steps">
<ng-container *ngFor="let stage of currentWorkflowNodeRun.stages">
<app-stage-step-summary [stage]="stage" [workflowRun]="currentWorkflowRun" [workflowNode]="node"
[workflowNodeRun]="currentWorkflowNodeRun">
</app-stage-step-summary>
</ng-container>
</div>
<ng-container *ngIf="currentWorkflowNodeRun && currentWorkflowNodeRun.stages && currentWorkflowNodeRun.stages.length > 0">
<div class="stageContainer">
<div class="ui vertical fluid steps">
<ng-container *ngFor="let stage of currentWorkflowNodeRun.stages">
<app-stage-step-summary [stage]="stage" [workflowRun]="currentWorkflowRun" [workflowNode]="node"
[workflowNodeRun]="currentWorkflowNodeRun">
</app-stage-step-summary>
</ng-container>
</div>
</div>
</ng-container>
</ng-container>
<div class="logs" *ngIf="currentWorkflowNodeRun && currentWorkflowNodeRun.callback">
<h4 class="ui header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
padding: 10px;
}

.stageContainer {
overflow-y: auto;
}

.steps {
:host-context(.night) & {
background-color: $darkTheme_grey_1;
Expand All @@ -39,4 +43,4 @@
pre {
white-space: pre-line;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
[class.active]="selectedLine === logLine.lineNumber"
id="L{{job.pipeline_stage_id}}-{{job.pipeline_action_id}}-{{stepOrder}}-{{logLine.lineNumber}}"
*ngIf="!last">
<td class="number yellow right aligned pointing" (click)="generateLink(logLine.lineNumber)">{{logLine.lineNumber}}</td>
<td class="number right aligned pointing" (click)="generateLink(logLine.lineNumber)">{{logLine.lineNumber}}</td>
<td [innerHTML]="logLine.value | safeHtml:!htmlViewSelected" *ngIf="ansiViewSelected || htmlViewSelected"></td><td [innerText]="logLine.value" *ngIf="!ansiViewSelected && !htmlViewSelected"></td>
</tr>
<tr *ngIf="logLine.lineNumber === limitFrom" valign="middle" class="fold-log pointing" (click)="showAllLogs()">
Expand Down

0 comments on commit 5bd822b

Please sign in to comment.