Skip to content

Commit 38c378a

Browse files
add more icons, and started work on menu and top bar
1 parent 1e268bb commit 38c378a

File tree

57 files changed

+722
-624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+722
-624
lines changed

src/app/app.module.ts

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
import { BrowserModule, Title } from "@angular/platform-browser";
1+
import { NgIf } from "@angular/common";
2+
import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from "@angular/common/http";
23
import { NgModule } from "@angular/core";
3-
import { TranslateModule, TranslateLoader } from "@ngx-translate/core";
4-
import { TranslateHttpLoader } from "@ngx-translate/http-loader";
5-
import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from "@angular/common/http";
6-
import { AppRoutingModule } from "./app-routing.module";
7-
import { AppComponent } from "./app.component";
8-
import { NavbarModule } from "./navbar/navbar.module";
9-
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
104
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
11-
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
12-
import { ProfilesModule } from "./profiles/profiles.module";
13-
import { AuthJwtInterceptor } from "@shared/helpers/auth-jwt.interceptor";
14-
import { AuthModule } from "./auth/auth.module";
15-
import { GatewayModule } from "./gateway/gateway.module";
16-
import { SharedVariableModule } from "@shared/shared-variable/shared-variable.module";
17-
import { SAVER, getSaver } from "@shared/providers/saver.provider";
18-
import { ErrorPageComponent } from "./error-page/error-page.component";
19-
import { SearchModule } from "./search/search.module";
20-
import { JwtModule } from "@auth0/angular-jwt";
21-
import { MonacoEditorModule } from "ngx-monaco-editor-v2";
225
import { MatInputModule } from "@angular/material/input";
236
import { MatPaginatorIntl } from "@angular/material/paginator";
24-
import { MatPaginatorIntlDa } from "@shared/helpers/mat-paginator-intl-da";
257
import { MatTooltipModule } from "@angular/material/tooltip";
26-
import { NewUserComponent } from "./admin/users/new-kombit-user-page/new-user.component";
8+
import { BrowserModule, Title } from "@angular/platform-browser";
9+
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
10+
import { JwtModule } from "@auth0/angular-jwt";
11+
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
12+
import { TranslateLoader, TranslateModule } from "@ngx-translate/core";
13+
import { TranslateHttpLoader } from "@ngx-translate/http-loader";
14+
import { MatSelectSearchModule } from "@shared/components/mat-select-search/mat-select-search.module";
2715
import { WelcomeDialogModule } from "@shared/components/welcome-dialog/welcome-dialog.module";
16+
import { AuthJwtInterceptor } from "@shared/helpers/auth-jwt.interceptor";
17+
import { MatPaginatorIntlDa } from "@shared/helpers/mat-paginator-intl-da";
2818
import { NGMaterialModule } from "@shared/Modules/materiale.module";
29-
import { MatSelectSearchModule } from "@shared/components/mat-select-search/mat-select-search.module";
30-
import { UserPageComponent } from "./admin/users/user-page/user-page.component";
31-
import { SharedModule } from "@shared/shared.module";
3219
import { PipesModule } from "@shared/pipes/pipes.module";
20+
import { SAVER, getSaver } from "@shared/providers/saver.provider";
21+
import { SharedVariableModule } from "@shared/shared-variable/shared-variable.module";
22+
import { SharedModule } from "@shared/shared.module";
3323
import { CookieService } from "ngx-cookie-service";
24+
import { MonacoEditorModule } from "ngx-monaco-editor-v2";
25+
import { NewUserComponent } from "./admin/users/new-kombit-user-page/new-user.component";
26+
import { UserPageComponent } from "./admin/users/user-page/user-page.component";
27+
import { AppRoutingModule } from "./app-routing.module";
28+
import { AppComponent } from "./app.component";
29+
import { AuthModule } from "./auth/auth.module";
30+
import { ErrorPageComponent } from "./error-page/error-page.component";
31+
import { GatewayModule } from "./gateway/gateway.module";
32+
import { NavbarModule } from "./navbar/navbar.module";
33+
import { ProfilesModule } from "./profiles/profiles.module";
34+
import { SearchModule } from "./search/search.module";
3435

3536
export function HttpLoaderFactory(http: HttpClient) {
3637
return new TranslateHttpLoader(http, "./assets/i18n/", ".json");
@@ -60,6 +61,7 @@ export function tokenGetter() {
6061
},
6162
}),
6263
NgbModule,
64+
NgIf,
6365
FormsModule,
6466
ReactiveFormsModule,
6567
BrowserAnimationsModule,

src/app/applications/applications-list/application-filter/application-filter.component.scss

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
}
2424

2525
.filter-button {
26-
align-self: flex-end;
27-
height: 35px !important;
26+
margin-top: 26px;
27+
height: 40px !important;
2828
width: 170px !important;
2929
min-width: 170px !important;
30+
justify-content: center;
3031
display: flex !important;
3132
align-items: center;
32-
justify-content: center;
33-
margin-bottom: 3px;
3433
border: 1px solid black !important;
3534
}
3635

@@ -49,7 +48,7 @@
4948
display: flex;
5049
align-items: center;
5150
font-size: 16px !important;
52-
color: rgb(186, 183, 183) !important;
51+
color: #737373 !important;
5352
}
5453

5554
.mat-mdc-form-field {
@@ -60,7 +59,7 @@
6059

6160
.mat-mdc-text-field-wrapper {
6261
background-color: #ffff !important;
63-
height: 35px !important;
62+
height: 40px !important;
6463
display: flex !important;
6564
align-items: center !important;
6665
}

src/app/applications/applications-list/application-filter/application-filter.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class ApplicationFilterComponent implements OnInit {
3131
this.loadOwnerOptions();
3232
}
3333

34-
statusOptions: { label: string; value: ApplicationState | "All" }[] = [
34+
stateOptions: { label: string; value: ApplicationState | "All" }[] = [
3535
{ label: "Alle", value: "All" },
3636
{ label: "Ingen", value: ApplicationState["NONE"] },
3737
{ label: "In operation", value: ApplicationState["IN-OPERATION"] },
@@ -40,9 +40,8 @@ export class ApplicationFilterComponent implements OnInit {
4040
{ label: "other", value: ApplicationState["OTHER"] },
4141
];
4242

43-
stateOptions: { label: string; value: ApplicationStatus | "All" }[] = [
43+
statusOptions: { label: string; value: ApplicationStatus | "All" }[] = [
4444
{ label: "Alle", value: "All" },
45-
{ label: "Warning", value: ApplicationStatus.WARNING },
4645
{ label: "Alert", value: ApplicationStatus.WARNING },
4746
{ label: "Stable", value: ApplicationStatus.STABLE },
4847
];
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
<div class="map-page thirty-height">
1+
<div class="map-page">
22
@if(coordinateList){
3-
43
<app-map [coordinateList]="coordinateList" [isFromApplication]="true" [applicationId]="22"></app-map>
5-
64
}
5+
<div class="map-overlay">
6+
<mat-checkbox class="example-margin" />
7+
<mat-checkbox class="example-margin" />
8+
</div>
79
</div>
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
.map-page {
22
background-color: #ffff;
33
padding: 20px;
4-
height: 500px;
4+
height: 600px;
5+
position: relative;
6+
}
7+
8+
.map-overlay {
9+
height: 89px;
10+
width: 132px;
11+
background-color: #ffff;
12+
position: absolute;
13+
bottom: 30px;
14+
left: 30px;
15+
z-index: 10000;
16+
border-radius: 4px;
517
}

src/app/applications/applications-list/application-map/application-map.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component, OnDestroy, OnInit } from "@angular/core";
2+
import { MatCheckboxModule } from "@angular/material/checkbox";
23
import { Application } from "@applications/application.model";
34
import { ApplicationService } from "@applications/application.service";
45
import { ApplicationState, ApplicationStatus } from "@applications/enums/status.enum";
@@ -13,7 +14,7 @@ import { ApplicationsFilterService } from "../applications-filter.service";
1314
@Component({
1415
selector: "app-application-map",
1516
standalone: true,
16-
imports: [SharedModule],
17+
imports: [MatCheckboxModule, SharedModule],
1718
templateUrl: "./application-map.component.html",
1819
styleUrls: ["./application-map.component.scss"],
1920
})
@@ -71,7 +72,6 @@ export class ApplicationMapComponent implements OnInit, OnDestroy {
7172
}
7273

7374
this.coordinateList = tempCoordinateList;
74-
console.log("Mapped Coordinates:", this.coordinateList);
7575
}
7676

7777
getApplications(): void {
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
<div class="visualization-page thirty-height">
2-
<p>application-visualization works!</p>
3-
<app-application-visualization-failed-requests></app-application-visualization-failed-requests>
4-
</div>
1+
<div class="visualization-page thirty-height"></div>

src/app/applications/applications-list/applications-filter.service.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,29 @@ export class ApplicationsFilterService {
6161
);
6262
}
6363

64+
private checkApplicationStatus() {
65+
// this.applicationService
66+
// .getApplications(100000, 0, "asc", "id")
67+
// .pipe(
68+
// map(applicationData => {
69+
// const filteredApplications = this.filterService.SortApplications(applicationData.data as Application[]);
70+
// return filteredApplications.map(app => app.id);
71+
// })
72+
// )
73+
// .subscribe(mappedCoordinates => {
74+
// this.applicationService.getApplicationDevicesForMap(mappedCoordinates).subscribe(data => {
75+
// this.devices = data;
76+
// this.mapDevicesToCoordinateList();
77+
// });
78+
// });
79+
// }
80+
this.applicationService.getApplicationDevicesForMap;
81+
}
82+
6483
constructor(private applicationService: ApplicationService) {}
6584

6685
getAppLicationIds(): Observable<{ label: string; value: string }[]> {
67-
return this.applicationService.getApplications(100000, 0, "asc", "id").pipe(
86+
return this.applicationService.getApplications(1000000, 0, "asc", "id").pipe(
6887
map(applicationData =>
6988
applicationData.data.map(data => ({
7089
label: data.owner,
@@ -75,7 +94,7 @@ export class ApplicationsFilterService {
7594
}
7695

7796
getOwnerOptions(): Observable<{ label: string; value: string }[]> {
78-
return this.applicationService.getApplications(100000, 0, "asc", "id").pipe(
97+
return this.applicationService.getApplications(1000000, 0, "asc", "id").pipe(
7998
map(applicationData =>
8099
applicationData.data.map(data => ({
81100
label: data.owner,
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<div class="info-box-containers">
2+
<app-basic-information-box
3+
[matSVGSrc]="'exclamation-triangle'"
4+
[type]="'warning'"
5+
[count]="133"
6+
[countOf]="1223"
7+
[description]="'API-KEY.EDIT.NAME-PLACEHOLDER' | translate"
8+
[height]="35"
9+
[width]="25"
10+
/>
11+
<app-basic-information-box
12+
[matSVGSrc]="'check-circle'"
13+
[type]="'check-circle'"
14+
[count]="28"
15+
[countOf]="28"
16+
[description]="'Applikationerder uden fejl'"
17+
[height]="30"
18+
[width]="25"
19+
/>
20+
<app-basic-information-box
21+
[height]="35"
22+
[width]="25"
23+
[matSVGSrc]="'micro-chip'"
24+
[type]="'default'"
25+
[count]="133"
26+
[description]="'Enheder'"
27+
/>
28+
<app-basic-information-box
29+
[height]="35"
30+
[width]="25"
31+
[matSVGSrc]="'satellite-dish'"
32+
[type]="'default'"
33+
[count]="gateways"
34+
[description]="'Gateways'"
35+
/>
36+
</div>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.info-box-containers {
2+
display: flex;
3+
flex-direction: row;
4+
gap: 30px;
5+
margin-bottom: 30px;
6+
height: fit-content;
7+
}

0 commit comments

Comments
 (0)