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