From 29fbccf667e29833b0c379fc6c87fc1f69759e0b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 29 Dec 2022 01:35:22 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- server/DataList/LicenseDataList.cs | 46 +++++++++++++++++------------- server/util/AySchema.cs | 16 +++++------ 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3300e7e..b4e9329 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -35,7 +35,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_REMOVE_LICENSE_FROM_DB":"true", //"SOCKEYE_REPORT_RENDERING_TIMEOUT":"1", "SOCKEYE_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin" diff --git a/server/DataList/LicenseDataList.cs b/server/DataList/LicenseDataList.cs index 964d5b2..59bcc47 100644 --- a/server/DataList/LicenseDataList.cs +++ b/server/DataList/LicenseDataList.cs @@ -14,8 +14,8 @@ namespace Sockeye.DataList var RoleSet = BizRoles.GetRoleSet(DefaultListAType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; - DefaultColumns = new List() { "licenseid", "licensecreated", "licensecustomer", "licenseregto", "licensemaintexpire", "licenseexpire" }; - DefaultSortBy = new Dictionary() { { "licenseid", "-" } }; + DefaultColumns = new List() { "licensecreated", "licenseregto", "licensecustomer", "LicenseFetchedOn", "licensetags" }; + DefaultSortBy = new Dictionary() { { "licensecreated", "-" } }; FieldDefinitions = new List(); /* "License": "License", @@ -40,23 +40,35 @@ namespace Sockeye.DataList + "wiki TEXT, tags VARCHAR(255) ARRAY )"); */ - FieldDefinitions.Add(new DataListFieldDefinition - { - TKey = "LicenseSerial", - FieldKey = "licenseid", - SockType = (int)SockType.License, - UiFieldDataType = (int)UiFieldDataType.Integer, - SqlIdColumnName = "alicense.id", - SqlValueColumnName = "alicense.id", - IsRowId = true - }); + // FieldDefinitions.Add(new DataListFieldDefinition + // { + // TKey = "LicenseSerial", + // FieldKey = "licenseid", + // SockType = (int)SockType.License, + // UiFieldDataType = (int)UiFieldDataType.Integer, + // SqlIdColumnName = "alicense.id", + // SqlValueColumnName = "alicense.id", + // IsRowId = true + // }); FieldDefinitions.Add(new DataListFieldDefinition { TKey = "Created", FieldKey = "licensecreated", + SockType = (int)SockType.License, UiFieldDataType = (int)UiFieldDataType.DateTime, - SqlValueColumnName = "alicense.created" + SqlValueColumnName = "alicense.created", + IsRowId = true + }); + + FieldDefinitions.Add(new DataListFieldDefinition + { + TKey = "LicenseRegTo", + FieldKey = "licenseregto", + SockType = (int)SockType.License, + UiFieldDataType = (int)UiFieldDataType.Text, + SqlIdColumnName = "alicense.id", + SqlValueColumnName = "alicense.regto" }); FieldDefinitions.Add(new DataListFieldDefinition @@ -77,13 +89,7 @@ namespace Sockeye.DataList SqlValueColumnName = "alicense.tags" }); - FieldDefinitions.Add(new DataListFieldDefinition - { - TKey = "LicenseRegTo", - FieldKey = "licenseregto", - UiFieldDataType = (int)UiFieldDataType.Text, - SqlValueColumnName = "alicense.regto" - }); + FieldDefinitions.Add(new DataListFieldDefinition { diff --git a/server/util/AySchema.cs b/server/util/AySchema.cs index c825b92..cdd0a53 100644 --- a/server/util/AySchema.cs +++ b/server/util/AySchema.cs @@ -917,43 +917,43 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); #region LICENSE //english translations await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseList', 'Licenses' FROM atranslation t where t.baselanguage = 'en'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'en'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Licensed to' FROM atranslation t where t.baselanguage = 'en'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'en'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'en'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'en'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'en'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'en'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'en'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expires' FROM atranslation t where t.baselanguage = 'en'"); //spanish translations await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseList', 'Licenses' FROM atranslation t where t.baselanguage = 'es'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'es'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Licensed to' FROM atranslation t where t.baselanguage = 'es'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'es'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'es'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'es'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'es'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'es'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'es'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expires' FROM atranslation t where t.baselanguage = 'es'"); //french translations await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseList', 'Licenses' FROM atranslation t where t.baselanguage = 'fr'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'fr'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Licensed to' FROM atranslation t where t.baselanguage = 'fr'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'fr'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'fr'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'fr'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'fr'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'fr'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'fr'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expires' FROM atranslation t where t.baselanguage = 'fr'"); //german translations await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseList', 'Licenses' FROM atranslation t where t.baselanguage = 'de'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Registered to' FROM atranslation t where t.baselanguage = 'de'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseRegTo', 'Licensed to' FROM atranslation t where t.baselanguage = 'de'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseKey', 'License key' FROM atranslation t where t.baselanguage = 'de'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchCode', 'Fetch code' FROM atranslation t where t.baselanguage = 'de'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchEmail', 'Fetch email' FROM atranslation t where t.baselanguage = 'de'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseFetchedOn', 'Fetched date' FROM atranslation t where t.baselanguage = 'de'"); await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseDBID', 'DBID' FROM atranslation t where t.baselanguage = 'de'"); - await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expire to' FROM atranslation t where t.baselanguage = 'de'"); + await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'LicenseMaintenanceExpire', 'Maintenance expires' FROM atranslation t where t.baselanguage = 'de'"); #endregion license