Skip to content

Commit 14316fd

Browse files
committed
fixed the pull request comments.
1 parent b493035 commit 14316fd

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

client/src/app/dashboard/table-all/table-all.component.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ table {
3535
}
3636

3737
.customWidthClass{
38-
width: 300px;
38+
width: 235px;
3939
}
4040

4141
.mat-elevation-z8 {
4242
box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); }
4343

4444
.customWidthClassNew{
45-
padding-right: 50px;
45+
padding-right: 75px;
4646
}
4747

4848
.mat_cell{
@@ -81,3 +81,5 @@ tr.example-element-row:not(.example-expanded-row):active {
8181
.customOutline {
8282
outline: none;
8383
}
84+
85+

client/src/app/dashboard/table-all/table-all.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class TableAllComponent implements OnInit {
5757
dataSource: MatTableDataSource<Instance> = new MatTableDataSource<Instance>(this.dataArray);
5858
data = new MatTableDataSource<Instance>();
5959
dialogResult: string;
60-
expandedElement: number;
60+
expandedElement: Instance;
6161

6262
constructor(public dialog: MatDialog, private apiService: ApiService, private modelService: ModelService) {
6363
}
@@ -185,17 +185,18 @@ export class TableAllComponent implements OnInit {
185185
/**
186186
* Function used to expand table row and show details of Docker and Labels
187187
*/
188-
onRowClicked(row: Instance) {
189-
let filteredList;
190-
const NoId = 'Not available';
188+
onRowClicked(row: Instance): Array<{dockerId: string, labels: string[]}> {
189+
let filteredList: Array<{dockerId: string, labels: string[]}>;
190+
const NoId = 'Id not available';
191+
const NoIdLabels = ['Labels not available'];
191192
if (row.dockerId !== undefined && row.labels.length !== 0) {
192193
filteredList = [{ dockerId: row.dockerId, labels: row.labels }];
193194
} else if (row.dockerId === undefined && row.labels.length !== 0) {
194195
filteredList = [{ dockerId: NoId, labels: row.labels }];
195196
} else if (row.dockerId !== undefined && row.labels.length === 0) {
196-
filteredList = [{ dockerId: row.dockerId, labels: NoId }];
197+
filteredList = [{ dockerId: row.dockerId, labels: NoIdLabels }];
197198
} else {
198-
filteredList = [{ dockerId: NoId, labels: NoId }];
199+
filteredList = [{ dockerId: NoId, labels: NoIdLabels }];
199200
}
200201
return filteredList;
201202
}

0 commit comments

Comments
 (0)