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

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

View File

@@ -14,27 +14,9 @@ namespace Sockeye.DataList
var RoleSet = BizRoles.GetRoleSet(DefaultListAType); var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; 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", "-" } }; DefaultSortBy = new Dictionary<string, string>() { { "id", "-" } };
FieldDefinitions = new List<DataListFieldDefinition>(); 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 FieldDefinitions.Add(new DataListFieldDefinition
{ {
@@ -55,6 +37,17 @@ await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SE
SqlValueColumnName = "atriallicenserequest.dbid" 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 FieldDefinitions.Add(new DataListFieldDefinition
{ {
TKey = "TrialLicenseRequestCompanyName", 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 FieldDefinitions.Add(new DataListFieldDefinition
{ {

View File

@@ -159,7 +159,6 @@ namespace Sockeye.Biz
var authToken = responseJson["token"].Value<string>(); var authToken = responseJson["token"].Value<string>();
var dlKey = responseJson["dlkey"].Value<string>(); var dlKey = responseJson["dlkey"].Value<string>();
var userId = responseJson["id"].Value<long>(); var userId = responseJson["id"].Value<long>();
//client.DefaultRequestHeaders.Add("Bearer", authToken);
var contentType = new MediaTypeWithQualityHeaderValue("application/json"); var contentType = new MediaTypeWithQualityHeaderValue("application/json");
client.DefaultRequestHeaders.Accept.Add(contentType); client.DefaultRequestHeaders.Accept.Add(contentType);