diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 3b1f5a1..8a61a97 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -35,7 +35,7 @@ namespace AyaNova.PlugIn.V8 public string PluginVersion { - get { return "7.6.1-alpha.106"; } + get { return "7.6.1-alpha.103"; } } public string About @@ -147,6 +147,15 @@ namespace AyaNova.PlugIn.V8 return; } + //check if in migrate mode + if (util.ServerState != "MigrateMode") + { + MessageBox.Show("The target server must be set to Server State - \"Migrate Mode\"\nbut is currently in Server State - \"" + util.ServerState + "\"\n\n- login to AyaNova 8 as the SuperUser\n- select \"Server Operations\" section then \"Server state\" page\n- set to \"Migrate mode\", save and logout\n- start V8Migrate", + "Target server is in \"Migrate mode\""); + return; + } + + Opt dOpt = new Opt(); var ro = dOpt.ShowDialog(); if (ro == DialogResult.Cancel) @@ -333,7 +342,7 @@ namespace AyaNova.PlugIn.V8 await ExportLoanItems(progress); await ExportParts(progress); await ExportProjects(progress); - //deferred to possibly never if people can live without it + //deferred to possibly never if people can live without it // await ExportPurchaseOrders(progress); diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs index c941634..0bc3207 100644 --- a/source/Plugins/AyaNova.Plugin.V8/util.cs +++ b/source/Plugins/AyaNova.Plugin.V8/util.cs @@ -26,7 +26,7 @@ namespace AyaNova.PlugIn.V8 internal static string ApiBaseUrl { get; set; } internal static string JWT { get; set; } public static bool Initialized { get; set; } - + internal static string ServerState { get; set; } public util() @@ -120,6 +120,9 @@ namespace AyaNova.PlugIn.V8 return false; } + a = await GetAsync("server-state/"); + ServerState = a.ObjectResponse["data"]["serverState"].Value(); + return true; } @@ -129,7 +132,7 @@ namespace AyaNova.PlugIn.V8 } - +