Skip to content

Commit 311331f

Browse files
author
Allan Asp Christensen
authored
Merge pull request #21 from OS2iot/feature/issues
Feature/issues
2 parents 3505842 + 69eed14 commit 311331f

File tree

434 files changed

+10147
-4326
lines changed

Some content is hidden

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

434 files changed

+10147
-4326
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ speed-measure-plugin*.json
2222
*.launch
2323
.settings/
2424
*.sublime-workspace
25+
*.log
2526

2627
# IDE - VSCode
2728
.vscode/*

.nginx/nginx.conf

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,37 @@
1-
worker_processes 4;
1+
server {
2+
listen 0.0.0.0:8081;
3+
root /app;
24

3-
events {
4-
worker_connections 1024;
5-
}
5+
index index.html;
66

7-
http {
8-
server {
9-
listen 80;
10-
root /usr/share/nginx/html/OS2IoT-frontend;
11-
include /etc/nginx/mime.types;
12-
13-
location / {
14-
if ($request_method = 'OPTIONS') {
15-
add_header 'Access-Control-Allow-Origin' '*';
16-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
17-
#
18-
# Custom headers and headers various browsers *should* be OK with but aren't
19-
#
20-
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
21-
#
22-
# Tell client that this pre-flight info is valid for 20 days
23-
#
24-
add_header 'Access-Control-Max-Age' 1728000;
25-
add_header 'Content-Type' 'text/plain; charset=utf-8';
26-
add_header 'Content-Length' 0;
27-
return 204;
28-
}
29-
if ($request_method = 'POST') {
30-
add_header 'Access-Control-Allow-Origin' '*';
31-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
32-
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
33-
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
34-
}
35-
if ($request_method = 'GET') {
36-
add_header 'Access-Control-Allow-Origin' '*';
37-
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
38-
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
39-
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
40-
}
41-
try_files $uri /index.html;
42-
}
7+
location / {
8+
#if ($request_method = 'OPTIONS') {
9+
# add_header 'Access-Control-Allow-Origin' '*' always;
10+
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
11+
# #
12+
# # Custom headers and headers various browsers *should* be OK with but aren't
13+
# #
14+
# add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
15+
# #
16+
# # Tell client that this pre-flight info is valid for 20 days
17+
# #
18+
# add_header 'Access-Control-Max-Age' 1728000 always;
19+
# add_header 'Content-Type' 'text/plain; charset=utf-8' always;
20+
# add_header 'Content-Length' 0 always;
21+
# return 204;
22+
#}
23+
#if ($request_method = 'POST') {
24+
# add_header 'Access-Control-Allow-Origin' '*' always;
25+
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
26+
# add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
27+
# add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
28+
#}
29+
#if ($request_method = 'GET') {
30+
# add_header 'Access-Control-Allow-Origin' '*' always;
31+
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
32+
# add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
33+
# add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
34+
#}
35+
try_files $uri $uri/ /index.html;
4336
}
44-
}
37+
}

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"tabWidth": 4,
2+
"tabWidth": 2,
33
"singleQuote": true
44
}

Dockerfile-prod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ FROM bitnami/nginx:latest
2929

3030
#!/bin/sh
3131

32-
# COPY ./.nginx/nginx.conf /etc/nginx/nginx.conf
32+
COPY ./.nginx/nginx.conf /opt/bitnami/nginx/conf/server_blocks/frontend.conf
3333

3434
## Remove default nginx index page
3535
# RUN rm -rf /app/*
@@ -38,5 +38,6 @@ FROM bitnami/nginx:latest
3838
COPY --from=builder /app/dist/OS2IoT-frontend /app
3939

4040
EXPOSE 8080
41+
EXPOSE 8081
4142

4243
ENTRYPOINT ["nginx", "-g", "daemon off;"]

angular.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"src/assets"
2929
],
3030
"styles": [
31+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
3132
"src/styles.scss"
3233
],
3334
"scripts": [
@@ -37,12 +38,10 @@
3738
},
3839
"configurations": {
3940
"production": {
40-
"fileReplacements": [
41-
{
42-
"replace": "src/environments/environment.ts",
43-
"with": "src/environments/environment.prod.ts"
44-
}
45-
],
41+
"fileReplacements": [{
42+
"replace": "src/environments/environment.ts",
43+
"with": "src/environments/environment.prod.ts"
44+
}],
4645
"optimization": true,
4746
"outputHashing": "all",
4847
"sourceMap": false,
@@ -51,8 +50,7 @@
5150
"extractLicenses": true,
5251
"vendorChunk": false,
5352
"buildOptimizer": true,
54-
"budgets": [
55-
{
53+
"budgets": [{
5654
"type": "initial",
5755
"maximumWarning": "2mb",
5856
"maximumError": "5mb"
@@ -132,4 +130,4 @@
132130
"cli": {
133131
"analytics": "5e34252a-5088-421b-bb34-6ef89cd9f167"
134132
}
135-
}
133+
}

package-lock.json

Lines changed: 31 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "os2-io-t-frontend",
3-
"version": "0.0.0",
3+
"version": "0.0.1",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
@@ -35,7 +35,10 @@
3535
"@ngx-translate/http-loader": "^6.0.0",
3636
"all": "0.0.0",
3737
"bootstrap": "^5.0.0-alpha1",
38+
"guid-typescript": "^1.0.9",
39+
"jwt-decode": "^2.2.0",
3840
"moment": "^2.27.0",
41+
"ngx-papaparse": "^5.0.0",
3942
"popper.js": "^1.16.0",
4043
"rxjs": "~6.5.4",
4144
"tslib": "^1.10.0",
@@ -49,6 +52,7 @@
4952
"@ngrx/store-devtools": "^10.0.0",
5053
"@types/jasmine": "~3.5.0",
5154
"@types/jasminewd2": "~2.0.3",
55+
"@types/jwt-decode": "^2.2.1",
5256
"@types/node": "^12.11.1",
5357
"codelyzer": "^5.1.2",
5458
"eslint": "^7.3.1",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import { NgModule } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
import { OrganisationDetailComponent } from './organisation/organisation-detail/organisation-detail.component';
4+
import { OrganisationEditComponent } from './organisation/organisation-edit/organisation-edit.component';
5+
import { OrganisationListComponent } from './organisation/organisation-list/organisation-list.component';
6+
import { OrganisationComponent } from './organisation/organisation.component';
7+
import { PermissionDetailComponent } from './permission/permission-detail/permission-detail.component';
8+
import { PermissionEditComponent } from './permission/permission-edit/permission-edit.component';
9+
import { PermissionListComponent } from './permission/permission-list/permission-list.component';
10+
import { PermissionComponent } from './permission/permission.component';
11+
import { UserDetailComponent } from './users/user-detail/user-detail.component';
12+
import { UserEditComponent } from './users/user-edit/user-edit.component';
13+
import { UserListComponent } from './users/user-list/user-list.component';
14+
import { UsersComponent } from './users/users.component';
15+
16+
17+
const adminRoutes: Routes = [
18+
{
19+
path: 'organisations', component: OrganisationComponent, children: [
20+
{ path: '', component: OrganisationListComponent },
21+
{ path: 'new-organisation', component: OrganisationEditComponent },
22+
{ path: ':org-id', component: OrganisationDetailComponent },
23+
{ path: ':org-id/edit-organisation', component: OrganisationEditComponent },
24+
]
25+
},
26+
{
27+
path: 'users', component: UsersComponent, children: [
28+
{ path: '', component: UserListComponent },
29+
{ path: 'new-user', component: UserEditComponent },
30+
{ path: ':user-id', component: UserDetailComponent },
31+
{ path: ':user-id/edit-user', component: UserEditComponent },
32+
]
33+
},
34+
{
35+
path: 'permissions',
36+
component: PermissionComponent,
37+
children: [
38+
{ path: '', component: PermissionListComponent },
39+
{ path: 'new-permission', component: PermissionEditComponent },
40+
{ path: ':permission-id', component: PermissionDetailComponent },
41+
{
42+
path: ':permission-id/edit-permission',
43+
component: PermissionEditComponent,
44+
},
45+
],
46+
},
47+
48+
49+
];
50+
51+
@NgModule({
52+
imports: [RouterModule.forChild(adminRoutes)],
53+
exports: [RouterModule]
54+
})
55+
export class AdminRoutingModule { }

src/app/views/administration-gateway/mine-lora-gateways/mine-lora-gateways.component.html renamed to src/app/admin/admin.component.html

File renamed without changes.

src/app/my-applications/applications-table/applications-table.component.scss renamed to src/app/admin/admin.component.scss

File renamed without changes.

0 commit comments

Comments
 (0)