This commit is contained in:
2022-02-21 20:52:05 +00:00
parent 4147b3bd44
commit eab0a2b989
2 changed files with 504 additions and 496 deletions

View File

@@ -22,9 +22,9 @@ You can click on the eye icon to conceal your entry from onlookers.
Current (2022) security industry best practices around passwords focus entirely on length and not 'complexity' and AyaNova fully supports this by allowing very lengthy passwords and not requiring any special characters. Current (2022) security industry best practices around passwords focus entirely on length and not 'complexity' and AyaNova fully supports this by allowing very lengthy passwords and not requiring any special characters.
For the highest security ensure your password is as long as you can comfortably remember without writing it down. For the highest security ensure your password is **at minimum** 15 characters long or as long as you can comfortably remember without writing it down.
We recommend using a lengthy but easily remembered phrase as a password, for example a song lyric or a line from a poem that is 32 characters or more of words is currently *extremely* difficult to hack by brute force methods. We recommend using a lengthy but easily remembered phrase as a password, for example a song lyric or a line from a poem that is **at least** 15 characters or more of words is currently *extremely* difficult to hack by brute force methods.
There is no security advantage in modern practice to using mixed case, unusual symbols or numbers in your password as brute force hacking techniques try all enterable characters anyway. There is no security advantage in modern practice to using mixed case, unusual symbols or numbers in your password as brute force hacking techniques try all enterable characters anyway.

View File

@@ -245,12 +245,12 @@ namespace AyaNova.Util
await SeedLoanLoanUnitAsync(log, 5); await SeedLoanLoanUnitAsync(log, 5);
await SeedCustomerServiceRequestAsync(log, 5); await SeedCustomerServiceRequestAsync(log, 5);
await SeedPartWarehouseAsync(log, 5); await SeedPartWarehouseAsync(log, 5);
await SeedPartAsync(log, 20, 100); await SeedPartAsync(log, 20, 1000);
await SeedPartAssemblyAsync(log, 5); await SeedPartAssemblyAsync(log, 5);
await SeedPurchaseOrderAsync(log, 10); await SeedPurchaseOrderAsync(log, 10);
await SeedQuoteAsync(log, 5); await SeedQuoteAsync(log, 5);
await SeedPMAsync(log, 3); await SeedPMAsync(log, 3);
await SeedWorkOrderAsync(log, 100, slevel); await SeedWorkOrderAsync(log, slevel);
//PERF //PERF
watch.Stop(); watch.Stop();
@@ -312,12 +312,12 @@ namespace AyaNova.Util
await SeedLoanLoanUnitAsync(log, 10); await SeedLoanLoanUnitAsync(log, 10);
await SeedCustomerServiceRequestAsync(log, 10); await SeedCustomerServiceRequestAsync(log, 10);
await SeedPartWarehouseAsync(log, 10); await SeedPartWarehouseAsync(log, 10);
await SeedPartAsync(log, 100, 100); await SeedPartAsync(log, 100, 1000);
await SeedPartAssemblyAsync(log, 5); await SeedPartAssemblyAsync(log, 5);
await SeedPurchaseOrderAsync(log, 30); await SeedPurchaseOrderAsync(log, 30);
await SeedQuoteAsync(log, 5); await SeedQuoteAsync(log, 5);
await SeedPMAsync(log, 3); await SeedPMAsync(log, 3);
await SeedWorkOrderAsync(log, 900, slevel); await SeedWorkOrderAsync(log, slevel);
//PERF //PERF
watch.Stop(); watch.Stop();
@@ -387,12 +387,12 @@ namespace AyaNova.Util
await SeedLoanLoanUnitAsync(log, 20); await SeedLoanLoanUnitAsync(log, 20);
await SeedCustomerServiceRequestAsync(log, 20); await SeedCustomerServiceRequestAsync(log, 20);
await SeedPartWarehouseAsync(log, 20); await SeedPartWarehouseAsync(log, 20);
await SeedPartAsync(log, 200, 100); await SeedPartAsync(log, 200, 1000);
await SeedPartAssemblyAsync(log, 5); await SeedPartAssemblyAsync(log, 5);
await SeedPurchaseOrderAsync(log, 50); await SeedPurchaseOrderAsync(log, 50);
await SeedQuoteAsync(log, 5); await SeedQuoteAsync(log, 5);
await SeedPMAsync(log, 3); await SeedPMAsync(log, 3);
await SeedWorkOrderAsync(log, 1800, slevel); await SeedWorkOrderAsync(log, slevel);
//PERF //PERF
watch.Stop(); watch.Stop();
@@ -462,12 +462,12 @@ namespace AyaNova.Util
await SeedLoanLoanUnitAsync(log, 200); await SeedLoanLoanUnitAsync(log, 200);
await SeedCustomerServiceRequestAsync(log, 200); await SeedCustomerServiceRequestAsync(log, 200);
await SeedPartWarehouseAsync(log, 200); await SeedPartWarehouseAsync(log, 200);
await SeedPartAsync(log, 10000, 100); await SeedPartAsync(log, 10000, 1000);
await SeedPartAssemblyAsync(log, 500); await SeedPartAssemblyAsync(log, 500);
await SeedPurchaseOrderAsync(log, 1000); await SeedPurchaseOrderAsync(log, 1000);
await SeedQuoteAsync(log, 10); await SeedQuoteAsync(log, 10);
await SeedPMAsync(log, 3);//DO NOT want too many of these as they affect performance await SeedPMAsync(log, 3);//DO NOT want too many of these as they affect performance
await SeedWorkOrderAsync(log, 3600, slevel); await SeedWorkOrderAsync(log, slevel);
//PERF //PERF
watch.Stop(); watch.Stop();
@@ -2808,7 +2808,8 @@ namespace AyaNova.Util
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
//WORK ORDER //WORK ORDER
// //
public async Task SeedWorkOrderAsync(ILogger log, int count, Level.SeedLevel seedLevel) //public async Task SeedWorkOrderAsync(ILogger log, int count, Level.SeedLevel seedLevel)
public async Task SeedWorkOrderAsync(ILogger log, Level.SeedLevel seedLevel)
{ {
//Goal is 5 workorders per day for each level and window //Goal is 5 workorders per day for each level and window
//accepting that some days will have way more and some none, it's ok //accepting that some days will have way more and some none, it's ok
@@ -2829,7 +2830,6 @@ namespace AyaNova.Util
case Level.SeedLevel.Large: case Level.SeedLevel.Large:
PastMonthsToSeed = 11; PastMonthsToSeed = 11;
MaximumWorkOrderItemCount = 2; MaximumWorkOrderItemCount = 2;
woItemUnitCount = 1; woItemUnitCount = 1;
break; break;
case Level.SeedLevel.Huge: case Level.SeedLevel.Huge:
@@ -2842,14 +2842,21 @@ namespace AyaNova.Util
DateTime seedStartWindow = DateTime.UtcNow.AddMonths(-PastMonthsToSeed);//goes back based on seed level DateTime seedStartWindow = DateTime.UtcNow.AddMonths(-PastMonthsToSeed);//goes back based on seed level
DateTime seedEndWindow = DateTime.UtcNow.AddMonths(1);//always one month from now DateTime seedEndWindow = DateTime.UtcNow.AddMonths(1);//always one month from now
for (int x = 0; x < count; x++) int totalDays = (int)(seedEndWindow - seedStartWindow).TotalDays;
//generate 5 per day starting with oldest seed start window up to seed end window
for (int x = 0; x < totalDays; x++)
{
for (int perDay = 0; perDay < 4; perDay++)
{ {
WorkOrder o = new WorkOrder(); WorkOrder o = new WorkOrder();
o.Notes = Fake.Lorem.Sentence(null, 6); o.Notes = Fake.Lorem.Sentence(null, 6);
o.Tags = RandomTags(); o.Tags = RandomTags();
if (Fake.Random.Bool())//50% have projects if (Fake.Random.Bool())//50% have projects
o.ProjectId = Fake.Random.Long(1, TotalSeededProjects); o.ProjectId = Fake.Random.Long(1, TotalSeededProjects);
var tempDate = Fake.Date.Between(seedStartWindow, seedEndWindow); var tempDate = seedStartWindow.AddDays(x);
var tempHour = Fake.Random.Int(9, 17);//9am to 5 pm (except some times may be in different dst state so this will be out by an hour for example depending on time of year and time zone in question) var tempHour = Fake.Random.Int(9, 17);//9am to 5 pm (except some times may be in different dst state so this will be out by an hour for example depending on time of year and time zone in question)
var woDate = DesiredTimeInUtc(new DateTime(tempDate.Year, tempDate.Month, tempDate.Day, tempHour, 0, 0, DateTimeKind.Utc)); var woDate = DesiredTimeInUtc(new DateTime(tempDate.Year, tempDate.Month, tempDate.Day, tempHour, 0, 0, DateTimeKind.Utc));
bool isPast = (woDate.Subtract(DateTime.UtcNow).TotalDays < -7); bool isPast = (woDate.Subtract(DateTime.UtcNow).TotalDays < -7);
@@ -3367,6 +3374,7 @@ namespace AyaNova.Util
} }
} }
} }
}