Skip to content

Commit 1b825d9

Browse files
authored
Merge pull request #142 from delphi-hub/feature/beautify
Feature/beautify
2 parents aedecd9 + 6815194 commit 1b825d9

File tree

9 files changed

+65
-55
lines changed

9 files changed

+65
-55
lines changed

client/src/app/dashboard/instance-details/instance-details.component.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@
1717
* limitations under the License.
1818
*/ -->
1919

20-
<div class="container-fluid">
20+
<div class="container-fluid">
21+
<h4>Details</h4>
2122
<div *ngIf="instance">
2223
<div class="row">
24+
<div class="col-md-8 col-sm-12">
2325
<app-table-all type="instance.componentType" [hideControlElements]="true" [dataArray]="[instance]"> </app-table-all>
2426
</div>
25-
<div class="row">
27+
<div class="col-md-4 col-sm-12">
2628
<app-info-center [instanceId]="instanceId"></app-info-center>
2729
</div>
30+
</div>
31+
</div>
2832
<div class="row">
2933
<div class="col-md-8 col-sm-12">
3034
<app-graph-view [subnetElementId]="instanceId"></app-graph-view>
3135
</div>
3236
</div>
3337
</div>
34-
</div>

client/src/app/dashboard/instance-details/instance-details.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { TableAllComponent } from '../table-all/table-all.component';
88
import { RouterTestingModule } from '@angular/router/testing';
99
import { ApiService } from 'src/app/api/api/api.service';
1010
import { HttpClientTestingModule } from '@angular/common/http/testing';
11-
import { InfoCenterDataSource } from '../info-center/info-center-datasource';
1211
import { MatChipsModule } from '@angular/material/chips';
12+
import { JwtModule } from '@auth0/angular-jwt';
1313

1414
describe('InstanceDetailsComponent', () => {
1515
let component: InstanceDetailsComponent;
@@ -18,7 +18,8 @@ describe('InstanceDetailsComponent', () => {
1818
beforeEach(async(() => {
1919
TestBed.configureTestingModule({
2020
declarations: [ InstanceDetailsComponent, InfoCenterComponent, TableAllComponent],
21-
imports: [BrowserAnimationsModule, MaterialModule, GraphViewModule, RouterTestingModule, HttpClientTestingModule, MatChipsModule],
21+
imports: [BrowserAnimationsModule, MaterialModule, GraphViewModule, RouterTestingModule,
22+
JwtModule.forRoot({}), HttpClientTestingModule, MatChipsModule],
2223
providers: [ApiService]
2324
})
2425
.compileComponents();

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,7 @@ tr.example-element-row:not(.example-expanded-row):active {
8686
margin:30px;
8787
}
8888

89+
.fieldAlign{
90+
width: 100%;
91+
}
8992

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,20 @@
2121
<ng-template #tableBlock>
2222
<div class="container">
2323
<div *ngIf="!hideControlElements">
24-
<mat-form-field>
25-
<input id="filterData" matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
26-
</mat-form-field>
24+
<div class="row">
25+
<div class="col-lg-10 col-md-10 col-sm-10">
26+
<mat-form-field>
27+
<input id="filterData" matInput [ngClass]="'fieldAlign'"
28+
(keyup)="applyFilter($event.target.value)" placeholder="Filter">
29+
</mat-form-field>
30+
</div>
31+
<div class="col-lg-2 col-md-2 col-sm-2">
32+
<div *ngIf="authService.userIsAdmin()">
33+
<button mat-raised-button color="primary" id="addButton" (click)="openAddDialog()">Add
34+
Instance</button>
35+
</div>
36+
</div>
37+
</div>
2738
</div>
2839
<table class="mat-elevation-z8 mat-table" mat-table multiTemplateDataRows [dataSource]="dataSource">
2940
<ng-container matColumnDef="ID">
@@ -87,8 +98,7 @@
8798
<ng-container matColumnDef="Details">
8899
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
89100
<mat-cell *matCellDef="let element; let row" class="example-element-row"
90-
[class.example-expanded-row]="expandedID === element.id"
91-
(click)="onRowClicked(row)">
101+
[class.example-expanded-row]="expandedID === element.id" (click)="onRowClicked(row)">
92102
<button mat-button [ngClass]="'customOutline'">
93103
View Details
94104
</button>
@@ -142,9 +152,4 @@
142152
</ng-template>
143153
<div *ngIf="!hideControlElements">
144154
<mat-paginator class="paginator" [pageSizeOptions]="[5, 10, 20]"></mat-paginator>
145-
<div *ngIf="authService.userIsAdmin()">
146-
<div class="button-row">
147-
<button mat-raised-button color="primary" id="addButton" (click)="openAddDialog()">Add Instance</button>
148-
</div>
149-
</div>
150155
</div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.titleAlign{
2+
margin-left:15px;
3+
}

client/src/app/dashboard/table-overview/table-overview.component.html

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,35 @@
1616
~ limitations under the License.
1717
-->
1818

19-
<div class="container">
20-
<table>
19+
<div class="container-fluid">
20+
<h4 [ngClass]="'titleAlign'"> WebApi Details</h4>
21+
<div class="row">
22+
<div class="col-md-8 col-sm-12">
23+
<app-table-all type="WebApi" [dataArray]="webapiDetails"> </app-table-all>
24+
</div>
25+
<div class="col-md-4 col-sm-12">
26+
<app-info-center [compType]="'WebApi'"></app-info-center>
27+
</div>
2128

22-
<tr>
23-
<td>
24-
<h4> WebApi Details</h4>
25-
<div class="row">
26-
<app-table-all type="WebApi" [dataArray]="webapiDetails"> </app-table-all>
27-
</div>
28-
</td>
29-
<td>
30-
<app-info-center [compType]="'WebApi'"></app-info-center>
31-
</td>
32-
</tr>
33-
<tr>
34-
<td>
35-
<h4> Web Application Details </h4>
36-
<div class="row">
37-
<app-table-all type="WebApp" [dataArray]="webappDetails"> </app-table-all>
29+
</div>
30+
<h4 [ngClass]="'titleAlign'"> Web Application Details </h4>
31+
<div class="row">
32+
<div class="col-md-8 col-sm-12">
33+
<app-table-all type="WebApp" [dataArray]="webappDetails"> </app-table-all>
34+
</div>
35+
<div class="col-md-4 col-sm-12">
36+
<app-info-center [compType]="'WebApp'"></app-info-center>
37+
</div>
38+
</div>
39+
<h4 [ngClass]="'titleAlign'"> Crawler Details</h4>
40+
<div class="row">
41+
<div class="col-md-8 col-sm-12">
42+
<app-table-all type="Crawler" [dataArray]="crawlerDetails"> </app-table-all>
43+
</div>
44+
<div class="col-md-4 col-sm-12">
45+
<app-info-center [compType]="'Crawler'"></app-info-center>
46+
</div>
3847

39-
</div>
40-
</td>
41-
<td>
42-
<app-info-center [compType]="'WebApp'"></app-info-center>
43-
</td>
44-
</tr>
45-
<tr>
46-
<td>
47-
<h4> Crawler Details</h4>
48-
<div class="row">
49-
<app-table-all type="Crawler" [dataArray]="crawlerDetails"> </app-table-all>
50-
</div>
51-
</td>
52-
<td>
53-
<app-info-center [compType]="'Crawler'"></app-info-center>
54-
</td>
55-
</tr>
56-
</table>
57-
</div>
48+
</div>
49+
50+
</div>

client/src/app/dashboard/user-management/user-management.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<h2> User Management</h2>
2-
31
<div class="container">
2+
<h2> User Management</h2>
43
<mat-form-field>
54
<input id="filterData" matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
65
</mat-form-field>

client/src/app/landing-page/landing-page.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
3333
transform: translate(-50%, -50%);
3434
}
3535
.loginbtn{
36-
padding-left: 30%;
36+
padding-left: 25%;
3737
}

package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)