diff --git a/source/Plugins/AyaNova.Plugin.V8/Auth.cs b/source/Plugins/AyaNova.Plugin.V8/Auth.cs
index 855d03d..6529d47 100644
--- a/source/Plugins/AyaNova.Plugin.V8/Auth.cs
+++ b/source/Plugins/AyaNova.Plugin.V8/Auth.cs
@@ -19,8 +19,8 @@ namespace AyaNova.PlugIn.V8
private async void btnTest_Click(object sender, EventArgs e)
{
if (!ValidateAndCleanServerAddress()) return;
- btnOk.Enabled=btnTest.Enabled = false;
- var result = await util.TestUrlAsync(edServerUrl.Text);
+ btnOk.Enabled = btnTest.Enabled = false;
+ var result = await util.InitAndConfirmAddressAsync(edServerUrl.Text);
btnOk.Enabled = btnTest.Enabled = true;
if (result == "OK")
{
@@ -35,17 +35,17 @@ namespace AyaNova.PlugIn.V8
{
if (!ValidateAndCleanServerAddress()) return;
btnOk.Enabled = btnTest.Enabled = false;
- if (!util.Initialized)
+ // if (!util.Initialized)
+ //{
+ var result = await util.InitAndConfirmAddressAsync(edServerUrl.Text);
+ if (result != "OK")
{
- var result = await util.TestUrlAsync(edServerUrl.Text);
- if (result != "OK")
- {
- MessageBox.Show("Server could not be reached at that URL\n" + result);
- btnOk.Enabled = btnTest.Enabled = true;
- return;
- }
+ MessageBox.Show("Server could not be reached at that URL\n" + result);
+ btnOk.Enabled = btnTest.Enabled = true;
+ return;
}
- var res = await util.AuthenticateAsync(edUserName.Text,edPassword.Text);
+ // }
+ var res = await util.AuthenticateAsync(edUserName.Text, edPassword.Text);
if (!res)
{
MessageBox.Show("AyaNova 8 SuperUser account login failed");
@@ -80,8 +80,8 @@ namespace AyaNova.PlugIn.V8
private bool ValidateAndCleanServerAddress()
- {
- var serverUrl=edServerUrl.Text;
+ {
+ var serverUrl = edServerUrl.Text;
Uri u;
try
{
@@ -89,7 +89,7 @@ namespace AyaNova.PlugIn.V8
var scheme = u.Scheme;
var host = u.Host;
var port = u.Port;
- edServerUrl.Text= scheme + "://" + host + ":" + port + "/" + util.API_BASE_ROUTE;
+ edServerUrl.Text = scheme + "://" + host + ":" + port + "/" + util.API_BASE_ROUTE;
}
catch (Exception ex)
{
diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs
index 963f4dd..99138be 100644
--- a/source/Plugins/AyaNova.Plugin.V8/V8.cs
+++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs
@@ -1520,7 +1520,7 @@ namespace AyaNova.PlugIn.V8
await util.PutAsync("global-biz-setting", d.ToString());
return;
}
- progress.Append("v7 Use inventory is Active; parts will be exported with initial inventory to allow migration and adjusted to balance v7 at end of migration");
+ progress.Append("Info: v7 Use inventory is Active");
}
#endregion InitInventory
@@ -1619,6 +1619,7 @@ namespace AyaNova.PlugIn.V8
//INVENTORY?
if (V7UseInventory)
{
+ progress.SubOp("Creating temp opening inventory for part in all warehouses");
foreach (long l in Allv8WarehouseIds)
{
//create opening initial inventory just so migrate can proceed without v8 balking
diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs
index 2c8aeb1..7eee1b4 100644
--- a/source/Plugins/AyaNova.Plugin.V8/util.cs
+++ b/source/Plugins/AyaNova.Plugin.V8/util.cs
@@ -25,13 +25,13 @@ namespace AyaNova.PlugIn.V8
//url once known to be good
internal static string ApiBaseUrl { get; set; }
internal static string JWT { get; set; }
- public static bool Initialized { get; set; }
+ // public static bool Initialized { get; set; }
internal static string ServerState { get; set; }
public util()
{
- Initialized = false;
+ // Initialized = false;
JWT = string.Empty;
}
@@ -39,17 +39,17 @@ namespace AyaNova.PlugIn.V8
#region INIT / AUTH
private static void InitClient()
{
- if (Initialized) return;
+ // if (Initialized) return;
//if (client != null)
// client.Dispose();
//client = null;
//client = new HttpClient();
- client.Timeout = new TimeSpan(0, 1, 0);
+ client.Timeout = new TimeSpan(0, 0, 45);
client.BaseAddress = new Uri(ApiBaseUrl);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
// client.DefaultRequestHeaders.Add("X-AY-Import-Mode", "true");
- Initialized = true;
+ //Initialized = true;
}
///
@@ -57,7 +57,7 @@ namespace AyaNova.PlugIn.V8
///
///
///
- public static async Task TestUrlAsync(string serverUrl)
+ public static async Task InitAndConfirmAddressAsync(string serverUrl)
{
ApiBaseUrl = serverUrl;
InitClient();