From e01bfd1625e095ff721170d699dbae83d7bd1707 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 22 Aug 2022 20:35:10 +0000 Subject: [PATCH] Implemented missing code for trial request to generate proper subscription / perpetual keys on request Removed unused or implemented main navigation item raven license key as it's done through trial requests or customer only --- Controllers/RvrController.cs | 8 +- notes/deploy.txt | 2 +- util/RfVersion.cs | 2 +- wwwroot/default.htm | 112 +++++++++++----------- wwwroot/js/app.api.js | 2 +- wwwroot/js/templates/app.shell.handlebars | 5 +- 6 files changed, 65 insertions(+), 66 deletions(-) diff --git a/Controllers/RvrController.cs b/Controllers/RvrController.cs index 6e9fd6c..d5de643 100644 --- a/Controllers/RvrController.cs +++ b/Controllers/RvrController.cs @@ -26,6 +26,7 @@ namespace rockfishCore.Controllers { [Required] public string DbId { get; set; } + public bool Perpetual { get; set; } = true;//not required and default true to not break any older beta testers out there, can set to required in future [Required, EmailAddress] public string Email { get; set; } [Required] @@ -51,8 +52,8 @@ namespace rockfishCore.Controllers return BadRequest(ModelState); } - // if (r.DbId == Guid.Empty) - if(string.IsNullOrWhiteSpace(r.DbId)) + // if (r.DbId == Guid.Empty) + if (string.IsNullOrWhiteSpace(r.DbId)) { return BadRequest("E1000 - DBId invalid"); } @@ -70,7 +71,7 @@ namespace rockfishCore.Controllers } - + //if there is an active trial for this db then can't do this they must request we re-release it or completely zap the database instead var MustBeOlderThan = DateUtil.DateToEpoch(DateTime.Now.AddDays((RavenKeyFactory.TRIAL_PERIOD_DAYS * -1))); @@ -85,6 +86,7 @@ namespace rockfishCore.Controllers NewRequest.DbId = r.DbId; NewRequest.CompanyName = r.Company; NewRequest.ContactName = r.Contact; + NewRequest.Perpetual=r.Perpetual; await ct.TrialRequest.AddAsync(NewRequest); await ct.SaveChangesAsync(); NewRequest.EmailConfirmCode = NewRequest.Id.ToString() + FetchKeyCode.generate(); diff --git a/notes/deploy.txt b/notes/deploy.txt index 371eb59..b523165 100644 --- a/notes/deploy.txt +++ b/notes/deploy.txt @@ -5,7 +5,7 @@ 1) SET VERSION SET app.api RFVERSION property -RENAME ?rfv=6.18 parameter in default.htm to the new version so all files update on mobile +RENAME ?rfv=6.19 parameter in default.htm to the new version so all files update on mobile 1.5) Run buildtemplates.bat if handlebars templates have changed at all diff --git a/util/RfVersion.cs b/util/RfVersion.cs index 186d542..bd0e19b 100644 --- a/util/RfVersion.cs +++ b/util/RfVersion.cs @@ -2,7 +2,7 @@ namespace rockfishCore.Util { public static class RfVersion { - public const string NumberOnly="6.18"; + public const string NumberOnly="6.19"; public const string Full = "Rockfish server " + NumberOnly; } } \ No newline at end of file diff --git a/wwwroot/default.htm b/wwwroot/default.htm index abd7325..4fbb54f 100644 --- a/wwwroot/default.htm +++ b/wwwroot/default.htm @@ -11,73 +11,73 @@ Rockfish loading.... - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + \ No newline at end of file diff --git a/wwwroot/js/app.api.js b/wwwroot/js/app.api.js index 6929abe..88cc127 100644 --- a/wwwroot/js/app.api.js +++ b/wwwroot/js/app.api.js @@ -29,7 +29,7 @@ app.api = (function () { generateFromRequest, licenseEmailResponse; - RockFishVersion = "6.18"; + RockFishVersion = "6.19"; ////////////////////////////////////////////////////////////////////////////////////// // NOT AUTHORIZED ERROR HANDLER diff --git a/wwwroot/js/templates/app.shell.handlebars b/wwwroot/js/templates/app.shell.handlebars index b116924..f427c37 100644 --- a/wwwroot/js/templates/app.shell.handlebars +++ b/wwwroot/js/templates/app.shell.handlebars @@ -24,10 +24,7 @@ Subscriptions - - +