This commit is contained in:
2023-01-11 20:23:14 +00:00
parent d77b97bb33
commit 9471bc8b5c
3 changed files with 20 additions and 44 deletions

9
.vscode/launch.json vendored
View File

@@ -4,7 +4,6 @@
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
@@ -23,9 +22,8 @@
"serverReadyAction": {
"action": "openExternally",
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
},
"env": {
},
"env": {
// "ASPNETCORE_ENVIRONMENT": "Development",
"SOCKEYE_JWT_SECRET": "1111111MyRandom32CharacterSecret",
"SOCKEYE_LOG_LEVEL": "Info",
@@ -35,7 +33,7 @@
"SOCKEYE_DB_CONNECTION": "Server=localhost;Username=postgres;Password=sockeye;Database=sockeye;CommandTimeout=300;",
"SOCKEYE_DATA_PATH": "c:\\temp\\sockeye",
"SOCKEYE_USE_URLS": "http://*:7676;",
//"SOCKEYE_PERMANENTLY_ERASE_DATABASE":"true",
"SOCKEYE_PERMANENTLY_ERASE_DATABASE": "true",
//"SOCKEYE_REPORT_RENDERING_TIMEOUT":"1",
"SOCKEYE_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin"
},
@@ -43,7 +41,6 @@
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",

View File

@@ -14,28 +14,10 @@ namespace Sockeye.DataList
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
DefaultColumns = new List<string>() { "id", "TrialLicenseRequestCompanyName", "TrialLicenseRequestRequested", "TrialLicenseRequestStatus", "TrialLicenseRequestFetchedOn", "ProductGroup" };
DefaultColumns = new List<string>() { "id", "TrialLicenseRequestCompanyName", "TrialLicenseRequestRequested", "TrialLicenseRequestStatus", "licenseid", "ProductGroup" };
DefaultSortBy = new Dictionary<string, string>() { { "id", "-" } };
FieldDefinitions = new List<DataListFieldDefinition>();
/*
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequest', 'Trial license request' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestList', 'Trial license requests' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestCompanyName', 'Company' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestContactName', 'Contact' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestEmail', 'Email address' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestEmailValidated', 'Email validated' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestRequested', 'Requested' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestProcessed', 'Processed' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestStatus', 'Status' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestRejectReason', 'Reject reason' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestFetchedOn', 'Fetched' FROM atranslation t where t.baselanguage = 'en'");
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'TrialLicenseRequestPerpetual', 'Perpetual' FROM atranslation t where t.baselanguage = 'en'");
"CREATE TABLE atriallicenserequest (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, dbid TEXT NOT NULL, companyname TEXT NOT NULL, "
+ "contactname TEXT NOT NULL, email TEXT NOT NULL, emailconfirmcode TEXT NOT NULL, emailvalidated BOOL DEFAULT false, "
+ "requested TIMESTAMPTZ NOT NULL, processed TIMESTAMPTZ, status INTEGER NOT NULL DEFAULT 0, rejectreason TEXT, key TEXT, "
+ "fetchedon TIMESTAMPTZ, perpetual BOOL DEFAULT false NOT NULL )"
*/
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "ID",
@@ -55,6 +37,17 @@ await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SE
SqlValueColumnName = "atriallicenserequest.dbid"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "License",
FieldKey = "licenseid",
SockType = (int)SockType.License,
UiFieldDataType = (int)UiFieldDataType.Integer,
SqlIdColumnName = "atriallicenserequest.licenseid",
SqlValueColumnName = "atriallicenserequest.licenseid"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TrialLicenseRequestCompanyName",
@@ -117,21 +110,8 @@ await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SE
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TrialLicenseRequestFetchedOn",
FieldKey = "TrialLicenseRequestFetchedOn",
UiFieldDataType = (int)UiFieldDataType.DateTime,
SqlValueColumnName = "atriallicenserequest.fetchedon"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "TrialLicenseRequestPerpetual",
FieldKey = "TrialLicenseRequestPerpetual",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "atriallicenserequest.perpetual"
});
FieldDefinitions.Add(new DataListFieldDefinition
{

View File

@@ -159,7 +159,6 @@ namespace Sockeye.Biz
var authToken = responseJson["token"].Value<string>();
var dlKey = responseJson["dlkey"].Value<string>();
var userId = responseJson["id"].Value<long>();
//client.DefaultRequestHeaders.Add("Bearer", authToken);
var contentType = new MediaTypeWithQualityHeaderValue("application/json");
client.DefaultRequestHeaders.Accept.Add(contentType);
@@ -556,7 +555,7 @@ namespace Sockeye.Biz
//l.Users=jKey["AyaNovaLicenseKey"]["TotalScheduleableUsers"].Value<int>();
l.PGroup = ProductGroup.AyaNova7;
l.FetchCode = jLicense["code"].Value<string>();
}
else if (KeyText.Contains("AyaNovaLiteLicenseKey"))
{
@@ -579,7 +578,7 @@ namespace Sockeye.Biz
l.PGroup = ProductGroup.AyaNova7;
l.FetchCode = jLicense["code"].Value<string>();
l.Tags.Add("lite");
}
else