Add device page filter
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									26017568f0
								
							
						
					
					
						commit
						d7c38191ce
					
				| @ -25,11 +25,12 @@ namespace ManagementPage.Pages | |||||||
|             humidity = new List<DataSet>(); |             humidity = new List<DataSet>(); | ||||||
|             temperature = new List<DataSet>(); |             temperature = new List<DataSet>(); | ||||||
|             _dbClient = dbClient; |             _dbClient = dbClient; | ||||||
|  |             device = new DeviceData("","",0); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public async Task<IActionResult> OnGetAsync() |         public async Task<IActionResult> OnGetAsync() | ||||||
|         { |         { | ||||||
|             var deviceId = 0l ; |             var deviceId = 0L; | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 var idString = (string?)RouteData.Values.Where(k => k.Key == "id")?.First().Value; |                 var idString = (string?)RouteData.Values.Where(k => k.Key == "id")?.First().Value; | ||||||
|  | |||||||
| @ -50,7 +50,7 @@ | |||||||
| 
 | 
 | ||||||
|     <footer class="border-top footer text-muted"> |     <footer class="border-top footer text-muted"> | ||||||
|         <div class="container"> |         <div class="container"> | ||||||
|             © 2021 - ManagementPage - <a asp-area="" asp-page="/Privacy">Privacy</a> |             © 2021 - 51m0n</a> | ||||||
|         </div> |         </div> | ||||||
|     </footer> |     </footer> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -44,12 +44,9 @@ namespace ManagementPage.Pages | |||||||
|             var id = await binder.GetLocalAccount(User.FindFirstValue(ClaimTypes.NameIdentifier)); |             var id = await binder.GetLocalAccount(User.FindFirstValue(ClaimTypes.NameIdentifier)); | ||||||
|             name = User.FindFirstValue(ClaimTypes.GivenName); |             name = User.FindFirstValue(ClaimTypes.GivenName); | ||||||
| 
 | 
 | ||||||
|  |             data.Clear(); | ||||||
| 
 | 
 | ||||||
|             _dbClient.DeviceCollection.AsQueryable().Where(s => id.Devices.Contains(s._id)).ToArray(); |             data.AddRange(_dbClient.DeviceCollection.AsQueryable().Where(s => id.Devices.Contains(s._id)).ToArray()); | ||||||
| 
 |  | ||||||
|             using var cursor = await _dbClient.DeviceCollection.FindAsync(new BsonDocument()); |  | ||||||
|             data = cursor.ToList(); |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
|             foreach (var item in data) |             foreach (var item in data) | ||||||
|             { |             { | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ | |||||||
|       "environmentVariables": { |       "environmentVariables": { | ||||||
|         "ASPNETCORE_ENVIRONMENT": "Development" |         "ASPNETCORE_ENVIRONMENT": "Development" | ||||||
|       }, |       }, | ||||||
|       "applicationUrl": "https://environment.51m0n.com;http://+:80", |       "applicationUrl": "https://localhost:443;http://+:80", | ||||||
|       "dotnetRunMessages": true |       "dotnetRunMessages": true | ||||||
|     }, |     }, | ||||||
|     "IIS Express": { |     "IIS Express": { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user