This commit is contained in:
@@ -171,6 +171,7 @@ namespace Sockeye.Biz
|
||||
|
||||
#region CUSTOMERS
|
||||
log.LogInformation("RFImport customers");
|
||||
|
||||
res = await client.GetAsync($"{URL_ROCKFISH}api/customer/list");
|
||||
responseText = await res.Content.ReadAsStringAsync();
|
||||
var jaCustomerList = JArray.Parse(responseText);
|
||||
@@ -408,6 +409,7 @@ namespace Sockeye.Biz
|
||||
log.LogInformation("RFImport Licenses");
|
||||
|
||||
{
|
||||
|
||||
res = await client.GetAsync($"{URL_ROCKFISH}api/license/list");
|
||||
responseText = await res.Content.ReadAsStringAsync();
|
||||
var jaLicenseList = JArray.Parse(responseText);
|
||||
@@ -436,6 +438,8 @@ namespace Sockeye.Biz
|
||||
if (cust != null)
|
||||
l.CustomerId = cust.Id;
|
||||
|
||||
|
||||
|
||||
var KeyText = jLicense["key"].Value<string>();
|
||||
if (KeyText.Contains("AyaNovaLicenseKey"))
|
||||
{
|
||||
@@ -496,6 +500,25 @@ namespace Sockeye.Biz
|
||||
l.FetchCode = jLicense["code"].Value<string>();
|
||||
l.Tags.Add("v7");
|
||||
}
|
||||
else if (KeyText.Contains("AyaNovaLicenseKey"))
|
||||
{
|
||||
/*
|
||||
"[KEY\n{\n \"AyaNovaLiteLicenseKey\": {\n \"SchemaVersion\": \"7\",\n \"Id\": \"1648506791\",\n \"Created\": \"2022-03-28T15:33:11.6010225-07:00\",\n
|
||||
\"Sub\": \"true\",\n \"RegisteredTo\": \"Duncan Electric\",\n \"EmailAddress\": \"sandrajod@att.net\",\n
|
||||
\"FetchCode\": \"hGAmScqYcU\",\n \"Source\": \"5246494431\",\n \"InstallableUntil\": \"2023-03-28T15:33:11.6009851-07:00\",\n
|
||||
\"TotalScheduleableUsers\": \"1\",\n \"Expires\": \"2023-03-29T00:00:00\",\n \"RequestedTrial\": \"False\",\n \"Plugins\": {\n
|
||||
\"Plugin\": []\n }\n }\n}\nKEY]\n
|
||||
[SIGNATURE\nKuOF/SpBL1d8AFebvm2lipmKeGdbR6WzbhN68fun+ffVGRjXNX1jWI3rbf9P/shs2/M8gHqW/B7T0vVovGqosmNsGtvaYo30TKlZj9Eicr2+zDf7ojwZiBCeEnFzXr9+7aZrsZSvN20Pqof0xf/J4BVp1T66ecuZywMzH0NGsXXZtXhWYhGvLAZAR1X5/j5gqysSdysmV9j8Euz91zs/BRyfdU0uwwrdQzrJzI4V1MFl+/mIkhMUNcJ5bzjisWS2xeyNYCYnGpMF5oaGPaIcEtmTAdf5fPNNvw3sNhPaZgwlzN8FjfK6T0VgS19PcHCMOA1bTAiLLFNk6wkcjGp2Cw==\nSIGNATURE]\n"
|
||||
*/
|
||||
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(KeyText, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
|
||||
var jKey = JObject.Parse(keyNoWS);
|
||||
l.LicenseExpire = DateTime.MaxValue.ToUniversalTime();
|
||||
l.MaintenanceExpire = jKey["AyaNovaLiteLicenseKey"]["Expires"].Value<DateTime>().ToUniversalTime();
|
||||
|
||||
l.FetchCode = jLicense["code"].Value<string>();
|
||||
l.Tags.Add("v7");
|
||||
l.Tags.Add("lite");
|
||||
}
|
||||
else
|
||||
{
|
||||
//RAVEN KEY
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Sockeye.Models
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
public long CustomerId { get; set; }
|
||||
public long? CustomerId { get; set; }
|
||||
[NotMapped]
|
||||
public string CustomerViz { get; set; }
|
||||
public string RegTo { get; set; }
|
||||
|
||||
@@ -24,14 +24,14 @@ namespace Sockeye.Util
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 498;
|
||||
internal const long EXPECTED_INDEX_COUNT = 74;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 239;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 238;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 32;
|
||||
internal const long EXPECTED_VIEWS = 0;
|
||||
internal const long EXPECTED_ROUTINES = 2;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
///////////////////////////////////////// (C498:I74:CC239:FC32:V0:R2)
|
||||
///////////////////////////////////////// (C498:I74:CC238:FC32:V0:R2)
|
||||
|
||||
/*
|
||||
|
||||
@@ -875,7 +875,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
LogUpdateMessage(log);
|
||||
|
||||
await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, "
|
||||
+ "customerid BIGINT NOT NULL REFERENCES acustomer(id), regto TEXT NOT NULL, key TEXT NOT NULL, fetchcode TEXT, fetchemail TEXT, "
|
||||
+ "customerid BIGINT REFERENCES acustomer(id), regto TEXT NOT NULL, key TEXT NOT NULL, fetchcode TEXT, fetchemail TEXT, "
|
||||
+ "fetchedon TIMESTAMPTZ, dbid TEXT, licenseexpire TIMESTAMPTZ, maintenanceexpire TIMESTAMPTZ NOT NULL, "
|
||||
+ "wiki TEXT, tags VARCHAR(255) ARRAY )");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user