This commit is contained in:
2020-07-06 21:22:34 +00:00
parent c1a064d14a
commit e84b5b6bd5
2 changed files with 91 additions and 96 deletions

View File

@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AyaNova.PlugIn.V8")]
[assembly: AssemblyDescription("V8 export plugin for AyaNova")]
[assembly: AssemblyDescription("V8 migrate plugin for AyaNova")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")]
[assembly: AssemblyProduct("AyaNova.PlugIn.V8")]

View File

@@ -16,10 +16,10 @@ namespace AyaNova.PlugIn.V8
{
class util
{
public static string PRE_RELEASE_VERSION_STRING {get;set;}
public static string PRE_RELEASE_VERSION_STRING { get; set; }
public static GZTW.AyaNova.BLL.LocalizedTextTable LocaleText = null;
const string TEST_ROUTE = "ServerInfo";
const string TEST_ROUTE = "notify/hello";
const string API_BASE_ROUTE = "api/v8/";
static HttpClient client = new HttpClient();
//url once known to be good
@@ -77,13 +77,8 @@ namespace AyaNova.PlugIn.V8
HttpResponseMessage response = await client.GetAsync(serverUrl + TEST_ROUTE);
if (response.IsSuccessStatusCode)
{
var ret = await response.Content.ReadAsStringAsync();
if (ret.Contains("AyaNova"))
{
ApiBaseUrl = serverUrl;
return "OK";
}
ApiBaseUrl = serverUrl;
return "OK";
}
else
{
@@ -93,7 +88,7 @@ namespace AyaNova.PlugIn.V8
catch { return "Failed"; }
return "failed";
// return "failed";
}
@@ -278,7 +273,7 @@ namespace AyaNova.PlugIn.V8
//deadman switch
if (appendValue > int.MaxValue)
{
throw new System.OverflowException("UniqueNameBuilder: Unique name could not be generated for item \""+oldName+"\" after "+int.MaxValue.ToString()+" attempts");
throw new System.OverflowException("UniqueNameBuilder: Unique name could not be generated for item \"" + oldName + "\" after " + int.MaxValue.ToString() + " attempts");
}
var appendString = "-" + appendValue.ToString();
string ret = oldName + appendString;
@@ -417,89 +412,89 @@ namespace AyaNova.PlugIn.V8
//***IMPORTANT: Also need to add translations for any new biz objects added that don't match exactly the name here in the key
//because enumlist gets it that way, i.e. "Global" would be the expected key
NoType = 0,
Global = 1,
//
Widget = 2,//attachable, wikiable, reviewable
//
User = 3,//attachable, wikiable, reviewable
ServerState = 4,
License = 5,
LogFile = 6,
PickListTemplate = 7,
//
Customer = 8,
ServerJob = 9,
//
Contract = 10,
TrialSeeder = 11,
Metrics = 12,
Translation = 13,
UserOptions = 14,
//
HeadOffice = 15,
//
LoanUnit = 16,
FileAttachment = 17,
DataListView = 18,
FormCustom = 19,
//
Part = 20,
//
PM = 21,
//
PMItem = 22,
//
PMTemplate = 23,
//
PMTemplateItem = 24,
//
Project = 25,
//
PurchaseOrder = 26,
//
Quote = 27,
//
QuoteItem = 28,
//
QuoteTemplate = 29,
//
QuoteTemplateItem = 30,
//
Unit = 31,
//
UnitModel = 32,
//
Vendor = 33,
//--- WorkOrder
//
WorkOrder = 34,
//
WorkOrderItem = 35,
//
WorkOrderItemExpense = 36,
//
WorkOrderItemLabor = 37,
//
WorkOrderItemLoan = 38,
//
WorkOrderItemPart = 39,
//
WorkOrderItemPartRequest = 40,
//
WorkOrderItemScheduledUser = 41,
//
WorkOrderItemTask = 42,
//
WorkOrderItemTravel = 43,
//
WorkOrderItemUnit = 44,
//---
//
WorkOrderTemplate = 45,
//
WorkOrderTemplateItem = 46
NoType = 0,
Global = 1,
//
Widget = 2,//attachable, wikiable, reviewable
//
User = 3,//attachable, wikiable, reviewable
ServerState = 4,
License = 5,
LogFile = 6,
PickListTemplate = 7,
//
Customer = 8,
ServerJob = 9,
//
Contract = 10,
TrialSeeder = 11,
Metrics = 12,
Translation = 13,
UserOptions = 14,
//
HeadOffice = 15,
//
LoanUnit = 16,
FileAttachment = 17,
DataListView = 18,
FormCustom = 19,
//
Part = 20,
//
PM = 21,
//
PMItem = 22,
//
PMTemplate = 23,
//
PMTemplateItem = 24,
//
Project = 25,
//
PurchaseOrder = 26,
//
Quote = 27,
//
QuoteItem = 28,
//
QuoteTemplate = 29,
//
QuoteTemplateItem = 30,
//
Unit = 31,
//
UnitModel = 32,
//
Vendor = 33,
//--- WorkOrder
//
WorkOrder = 34,
//
WorkOrderItem = 35,
//
WorkOrderItemExpense = 36,
//
WorkOrderItemLabor = 37,
//
WorkOrderItemLoan = 38,
//
WorkOrderItemPart = 39,
//
WorkOrderItemPartRequest = 40,
//
WorkOrderItemScheduledUser = 41,
//
WorkOrderItemTask = 42,
//
WorkOrderItemTravel = 43,
//
WorkOrderItemUnit = 44,
//---
//
WorkOrderTemplate = 45,
//
WorkOrderTemplateItem = 46
//NOTE: New objects added here need to also be added to the following classes:
@@ -565,7 +560,7 @@ Locale Français is customized [signature: 804154061] exporting
allStrings.Add(entry.Value);
}
int CurrentLocaleHash = GetOrderIndependentHashCode<string>(allStrings);
if (StockLocaleHashes.Contains(CurrentLocaleHash)) return false;
progress.Append("Locale " + localeName + " is customized [signature: " + CurrentLocaleHash.ToString() + "] exporting");