diff --git a/app/log/goInventorize.log b/app/log/goInventorize.log index ad6e617..d0f9c7a 100644 --- a/app/log/goInventorize.log +++ b/app/log/goInventorize.log @@ -234,3 +234,185 @@ {"logtype":"webserver", "pid":"3324", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ {"level":"debug","time":"2022-04-11T22:40:10-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} {"logtype":"webserver", "pid":"3324", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"info","time":"2022-07-31T15:10:32-04:00","message":"Configuration loaded successfully..."} +{"level":"debug","time":"2022-07-31T15:10:32-04:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationFilesDir:./app/files/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"} +{"level":"info","time":"2022-07-31T15:10:32-04:00","message":"Database and Config loaded, starting webserver..."} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"level":"debug","time":"2022-07-31T15:13:39-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/files/locations/Location0/Location0_cover.png​"}​ +{"level":"debug","time":"2022-07-31T15:13:42-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T15:13:44-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T15:13:47-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"level":"debug","time":"2022-07-31T15:13:58-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T15:14:02-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"level":"debug","time":"2022-07-31T15:15:22-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T15:15:25-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"info","time":"2022-07-31T15:15:26-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"level":"debug","time":"2022-07-31T15:15:28-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T15:16:17-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T15:20:12-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"info","time":"2022-07-31T15:20:24-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"info","time":"2022-07-31T15:20:28-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"level":"info","time":"2022-07-31T15:20:34-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"info","time":"2022-07-31T15:20:43-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T15:20:46-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"level":"debug","time":"2022-07-31T21:41:30-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:41:35-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"level":"debug","time":"2022-07-31T21:43:24-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:46:35-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:46:36-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:46:38-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T21:46:41-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T21:46:44-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:50:04-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:50:13-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T21:50:17-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"level":"debug","time":"2022-07-31T21:50:56-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:51:51-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:52:31-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:52:33-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:52:43-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T21:53:22-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T21:59:52-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T21:59:54-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:02:58-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:04:55-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/config​"}​ +{"level":"info","time":"2022-07-31T22:05:02-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:05:06-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T22:05:09-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:05:24-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:05:33-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:06:04-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"info","time":"2022-07-31T22:06:11-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"info","time":"2022-07-31T22:06:15-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"level":"debug","time":"2022-07-31T22:06:17-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T22:06:19-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T22:06:40-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T22:07:14-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T22:09:18-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"debug","time":"2022-07-31T22:09:35-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"404", "method":"GET", "path":"/files/locations/undefined/undefined​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:12:05-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"info","time":"2022-07-31T22:12:07-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"level":"debug","time":"2022-07-31T22:12:12-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"404", "method":"GET", "path":"/files/locations/undefined/undefined​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:12:46-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"debug","time":"2022-07-31T22:12:48-04:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations​"}​ +{"level":"info","time":"2022-07-31T22:12:50-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"info","time":"2022-07-31T22:12:52-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"info","time":"2022-07-31T22:12:54-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all​"}​ +{"level":"info","time":"2022-07-31T22:12:55-04:00","message":"Getting all Rooms"} +{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms​"}​ diff --git a/frontend/src/App.js b/frontend/src/App.js index 8a2ff5e..769153a 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -8,7 +8,7 @@ import NotFound from './components/pages/NotFound'; import { BrowserRouter as Router, Routes, Route} from 'react-router-dom' import { Modal, Button, Text, Group, TextInput, Loader, AppShell, MediaQuery } from '@mantine/core'; import { useDebouncedValue, useLocalStorageValue } from '@mantine/hooks'; -import { useNotifications } from '@mantine/notifications'; +import { showNotification } from '@mantine/notifications'; import { backendAPI, defaultURLS } from './services/backend-api'; @@ -27,7 +27,7 @@ function App() { const [, setServerConfig] = useAtom(serverConfigAtom) - const notifications = useNotifications(); + // const navigate = useNavigate(); @@ -41,14 +41,14 @@ function App() { results.data.baseURL = defaultURLS.baseURL console.log("CONFIG: ", results.data) setServerConfig(results.data) - notifications.showNotification({ + showNotification({ title: 'Backend Notice', message: 'Config fetched from backend!', color: "green" }) setIsLoading(false) }).catch(err => { - notifications.showNotification({ + showNotification({ title: 'Backend Notice', message: `Failed to connect to backend! ${err}`, autoClose: false, @@ -74,11 +74,11 @@ function App() { > } /> - } /> + }/> } /> } /> - } /> + }/> } /> diff --git a/frontend/src/components/CustomDropZone.js b/frontend/src/components/CustomDropZone.js new file mode 100644 index 0000000..8f0c059 --- /dev/null +++ b/frontend/src/components/CustomDropZone.js @@ -0,0 +1,72 @@ +import React from 'react'; +import { Text, Group, useMantineTheme } from '@mantine/core' +import { BsCardImage, BsCloudUpload, BsXLg } from 'react-icons/bs' +import { Dropzone } from '@mantine/dropzone'; +import { showNotification } from '@mantine/notifications'; + + + +function CustomDropZone(props) { + const {uploadText1, uploadText2, uploadFormat, maxSize, multipleFiles, returnFiles} = props + + const theme = useMantineTheme(); + + + const handleFileRejections = (fileRejections) => { + let message = "" + let fileName = "" + if ((fileRejections.length > 1) && (!multipleFiles)) { + showNotification({color: 'red', title: "Too many Files!", message: "Only a single photo is allowed for the coverphoto!"}) + return + } + fileName = fileRejections[0].file.name + const errors = fileRejections[0].errors + errors.forEach(error => { + message = message + `${error.message} \n\n` + }) + showNotification({color: 'red', title: `Error accepting file: ${fileName}`, message: message}) + } + + + + return ( + returnFiles(files)} + onReject={(fileRejections) => handleFileRejections(fileRejections)} + maxSize={maxSize} + multiple={multipleFiles} + accept={uploadFormat} + > + + + + + + + + + + +
+ + {uploadText1} + + + {uploadText2} + +
+
+
+ + ); +} + +export default CustomDropZone; \ No newline at end of file diff --git a/frontend/src/components/SideBar.js b/frontend/src/components/SideBar.js index 7a6d18e..73c8017 100644 --- a/frontend/src/components/SideBar.js +++ b/frontend/src/components/SideBar.js @@ -5,7 +5,7 @@ import { BiCabinet } from 'react-icons/bi' import { LinksGroup } from './sidebar/SidebarLinksGroup'; const sideBarData = [ - { label: 'Dashboard', icon: GoDashboard, link: {label: 'Dashboard', link: '/'}}, + { label: 'Dashboard', icon: GoDashboard, link: "/"}, { label: 'Locations', icon: GoLocation, @@ -29,7 +29,7 @@ const sideBarData = [ }, { label: 'Cabinets', icon: BiCabinet, link: "/" }, { label: 'Items', icon: BsDiagram2, link: "/" }, - { label: 'Settings', icon: GoGear, link: '/' }, + { label: 'Settings', icon: GoGear, link: '/settings' }, ]; const useStyles = createStyles((theme) => ({ diff --git a/frontend/src/components/cards/LocationCard.js b/frontend/src/components/cards/LocationCard.js index 94c96d4..093224a 100644 --- a/frontend/src/components/cards/LocationCard.js +++ b/frontend/src/components/cards/LocationCard.js @@ -52,7 +52,7 @@ function LocationCard(props) { {location.Description} - + diff --git a/frontend/src/components/forms/LocationForm.js b/frontend/src/components/forms/LocationForm.js index d351af9..eb9bcf1 100644 --- a/frontend/src/components/forms/LocationForm.js +++ b/frontend/src/components/forms/LocationForm.js @@ -1,12 +1,13 @@ import React, {useState, useEffect} from 'react'; -import { Text, Title, TextInput, Button, NumberInput, Textarea, Grid, Group, useMantineTheme, MantineTheme } from '@mantine/core' +import { Text, Title, TextInput, Button, NumberInput, Textarea, Grid, Group, useMantineTheme, MantineTheme, Image, SimpleGrid } from '@mantine/core' import { DatePicker } from '@mantine/dates'; +import dayjs from 'dayjs'; import { useForm } from '@mantine/form'; import { useAtom } from 'jotai'; import { serverConfigAtom } from '../../state/main' import { backendAPI } from '../../services/backend-api'; -import { BsCardImage, BsCloudUpload, BsXLg } from 'react-icons/bs' -import { Dropzone, DropzoneStatus, IMAGE_MIME_TYPE, PDF_MIME_TYPE } from '@mantine/dropzone'; +import { IMAGE_MIME_TYPE } from '@mantine/dropzone'; +import CustomDropZone from '../CustomDropZone'; @@ -14,6 +15,11 @@ function LocationForm(props) { const {location, modify: bool} = props const [opened, setOpened] = useState(false); const [serverConfig] = useAtom(serverConfigAtom) + // Cover Photo + const [coverPhoto, setCoverPhoto] = useState(null) + // Additional Photos + const [additionalPhotos, setAdditionalPhotos] = useState([]) + const theme = useMantineTheme(); @@ -38,9 +44,6 @@ function LocationForm(props) { }, }); - // useEffect(() => { - // console.log("FORM", form) - // }, [form]) const submitNewLocation = (values) => { @@ -63,44 +66,41 @@ function LocationForm(props) { console.log("Error adding new location!", err) }) } + - function ImageUploadIcon({status, ...props}) { - if (status.accepted) { - return ; - } - - if (status.rejected) { - return ; - } - - return ; - } + const handleFileAccept = (files) => { + form.setFieldValue('CoverPhoto', files[0]) + const imageUrl = URL.createObjectURL(files[0]); + setCoverPhoto( + URL.revokeObjectURL(imageUrl) }} + /> + ) + } - function getIconColor(status, theme) { - return status.accepted - ? theme.colors[theme.primaryColor][theme.colorScheme === 'dark' ? 4 : 6] - : status.rejected - ? theme.colors.red[theme.colorScheme === 'dark' ? 4 : 6] - : theme.colorScheme === 'dark' - ? theme.colors.dark[0] - : theme.colors.gray[7]; - } + const handleAdditionalPhotos = (files) => { + setAdditionalPhotos(oldPhotos => [...oldPhotos, ...files]) + // setAdditionalPhotos(files) + console.log("FORM VALUES: ",form.values) + const oldValues = form.values['AdditionalPhotos'] + form.setFieldValue('AdditionalPhotos', [...oldValues, ...files]) + console.log("NEW FORM VALUES: ", form.values) - const dropzoneChildren = (status, theme, multiple) => ( - - - -
- - Drag images here or click to select file{multiple ? "s" : ""} - - - Attach as many files as you like, each file should not exceed 5mb - -
-
- ); + } + const previews = additionalPhotos.map((file, index) => { + console.log("FILE IS: ", file) + const imageUrl = URL.createObjectURL(file); + return ( + URL.revokeObjectURL(imageUrl) }} + /> + ) + }) return ( <> @@ -116,37 +116,47 @@ function LocationForm(props) { - + Location Cover Photo * - form.setFieldValue('CoverPhoto', files[0])} - onReject={(files) => console.log('rejected files', files)} + + {coverPhoto ? + coverPhoto + : + - {(status) => dropzoneChildren(status, theme, false)} - + multipleFiles={false} + returnFiles={handleFileAccept} + /> + } Additional Location Photos - form.setFieldValue('AdditionalPhotos', files)} - onReject={(files) => console.log('rejected files', files)} + + 0 ? 'xl' : 0} > - {(status) => dropzoneChildren(status, theme, true)} - + {previews} + - - diff --git a/frontend/src/components/pages/LocationsPage.js b/frontend/src/components/pages/LocationsPage.js index 35c6204..d247e99 100644 --- a/frontend/src/components/pages/LocationsPage.js +++ b/frontend/src/components/pages/LocationsPage.js @@ -53,7 +53,7 @@ function LocationsPage() { <>
{ isLoading && }
Locations
- + { const icon = getRef('icon'); @@ -13,6 +14,7 @@ const useStyles = createStyles((theme, _params, getRef) => { padding: `${theme.spacing.xs}px ${theme.spacing.md}px`, color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black, fontSize: theme.fontSizes.sm, + textDecoration: 'none', '&:hover': { backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.colors.gray[0], @@ -58,7 +60,7 @@ const useStyles = createStyles((theme, _params, getRef) => { }}); -export function LinksGroup({ icon: Icon, label, initiallyOpened, links }) { +export function LinksGroup({ icon: Icon, label, link, initiallyOpened, links }) { const mypath = useLocation() const { classes, theme, cx } = useStyles(); const hasLinks = Array.isArray(links); @@ -71,14 +73,41 @@ export function LinksGroup({ icon: Icon, label, initiallyOpened, links }) { className={({ isActive}) => (cx(classes.link, {[classes.linkActive]: isActive === true}))} key={link.label} to={link.link} + end > {link.label} )); + + console.log("TOP LINK: ", link) - useEffect(() => { - console.log("MYPATH: ", mypath) - }, []) + if (link) { + return ( + <> + + (cx(classes.control, {[classes.linkActive]: isActive === true}))} + key={label} + to={link} + end + + > + {/* */} + + + + + + {label} + + + {/* */} + + + + + ) + } return (