Skip to content

Commit 3091046

Browse files
committed
fix: improve action sidebar layout and enhance action block styling for better usability
1 parent 9e5628c commit 3091046

3 files changed

Lines changed: 35 additions & 18 deletions

File tree

frontend/src/app/incident-response/shared/component/action-builder/action-builder.component.html

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,43 @@ <h4 class="panel-title m-0">Flow Actions</h4>
8484

8585
<div class="workflow-timeline mb-3">
8686

87-
<div *ngFor="let action of workflow; let first = first" class="action-wrapper d-flex flex-column align-items-center w-100">
87+
<div *ngFor="let action of workflow; let first = first" class="action-wrapper d-flex flex-column w-100">
8888
<!-- Action block -->
89-
<div class="action-block d-flex flex-column align-items-center justify-content-center w-100 p-2" style="height: 120px;">
90-
<div class="d-flex w-100 justify-content-end">
91-
<app-action-conditional *ngIf="!first" [option]="action.conditional" (optionChange)="updateAction(action, $event)" ></app-action-conditional>
89+
<div class="action-block d-flex flex-column w-100 p-2" style="height: 120px;">
90+
91+
<div class="d-flex justify-content-between align-items-center w-100 mb-1">
92+
<div class="fw-bold pl-2">{{ action.title }}</div>
93+
<div class="d-flex align-items-center">
94+
<app-action-conditional
95+
*ngIf="!first"
96+
[option]="action.conditional"
97+
(optionChange)="updateAction(action, $event)">
98+
</app-action-conditional>
99+
<div
100+
class="icon-cross2 font-size-xs cursor-pointer ml-2"
101+
(click)="removeAction(action)">
102+
</div>
103+
</div>
92104
</div>
93-
<div class="d-flex flex-column w-100 justify-content-center">
94-
<div class="card-body pl-2 pr-0 py-2 d-flex align-items-center justify-content-between w-100">
95-
<div class="d-flex align-items-center">
96-
<div class="icon-box mr-2" style="margin-right: 8px;"></div>
97-
<div>
98-
<div class="fw-bold">{{ action.title }}</div>
99-
<small style="display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;" class="text-muted">
100-
{{ action.description }}
101-
</small>
105+
106+
<div class="d-flex flex-grow-1 align-items-center w-100">
107+
<div class="icon-box mr-2" style="margin-right: 8px;"></div>
108+
<div class="d-flex flex-column w-100 justify-content-center">
109+
<div class="card-body pl-2 pr-0 py-2 w-100">
110+
<div class="text-muted" style="
111+
display: -webkit-box;
112+
-webkit-line-clamp: 2;
113+
-webkit-box-orient: vertical;
114+
overflow: hidden;
115+
text-overflow: ellipsis;">
116+
{{ action.description }}
102117
</div>
103118
</div>
104-
<div class="icon-bin font-size-xs text-danger cursor-pointer" (click)="removeAction(action)"></div>
105119
</div>
106120
</div>
107-
108121
</div>
109122

123+
110124
<div *ngIf="workflow" class="timeline-connector">
111125
<div class="line-vertical"></div>
112126
<div class="arrow-down">&#x2193;</div>

frontend/src/app/incident-response/shared/component/action-sidebar/action-sidebar.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,7 @@
5555
font-size: .720rem;
5656
}
5757

58+
.fw-bold {
59+
font-weight: 700;
60+
}
61+

frontend/src/app/incident-response/shared/component/action-sidebar/action-sidebar.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { Component, OnInit } from '@angular/core';
2+
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
23
import {WorkflowActionsService} from '../../services/workflow-actions.service';
4+
import {ActionTerminalComponent} from '../action-terminal/action-terminal.component';
35
import {ActionSidebarService} from './action-sidebar.service';
4-
import {ActionTerminalComponent} from "../action-terminal/action-terminal.component";
5-
import {ModalService} from "../../../../core/modal/modal.service";
6-
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
76

87
@Component({
98
selector: 'app-action-sidebar',

0 commit comments

Comments
 (0)