This commit is contained in:
2021-08-30 22:42:24 +00:00
parent 2718bebe38
commit dddc1ac7f9
4 changed files with 50 additions and 2 deletions

View File

@@ -36,6 +36,9 @@
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.edTags = new System.Windows.Forms.TextBox(); this.edTags = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.nTimeOut = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.nTimeOut)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnCancel // btnCancel
@@ -116,6 +119,42 @@
this.label1.TabIndex = 41; this.label1.TabIndex = 41;
this.label1.Text = "Tag all exported objects"; this.label1.Text = "Tag all exported objects";
// //
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(26, 195);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(165, 13);
this.label3.TabIndex = 43;
this.label3.Text = "Override HTTP timeout (seconds)";
//
// nTimeOut
//
this.nTimeOut.Increment = new decimal(new int[] {
60,
0,
0,
0});
this.nTimeOut.Location = new System.Drawing.Point(29, 211);
this.nTimeOut.Maximum = new decimal(new int[] {
3600,
0,
0,
0});
this.nTimeOut.Minimum = new decimal(new int[] {
30,
0,
0,
0});
this.nTimeOut.Name = "nTimeOut";
this.nTimeOut.Size = new System.Drawing.Size(120, 20);
this.nTimeOut.TabIndex = 44;
this.nTimeOut.Value = new decimal(new int[] {
100,
0,
0,
0});
//
// Opt // Opt
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -123,6 +162,8 @@
this.AutoSize = true; this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(614, 353); this.ClientSize = new System.Drawing.Size(614, 353);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.nTimeOut);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.edTags); this.Controls.Add(this.edTags);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
@@ -135,6 +176,7 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Export options"; this.Text = "Export options";
this.Load += new System.EventHandler(this.Opt_Load); this.Load += new System.EventHandler(this.Opt_Load);
((System.ComponentModel.ISupportInitialize)(this.nTimeOut)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -149,5 +191,7 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox edTags; private System.Windows.Forms.TextBox edTags;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown nTimeOut;
} }
} }

View File

@@ -13,6 +13,7 @@ namespace AyaNova.PlugIn.V8
{ {
public bool ExportAssignedDocs { get { return ckExportAssignedDocs.Checked; } } public bool ExportAssignedDocs { get { return ckExportAssignedDocs.Checked; } }
public string Tags { get { return edTags.Text; } } public string Tags { get { return edTags.Text; } }
public int HTTPTimeOut { get { return (int)nTimeOut.Value; } }
public Opt() public Opt()
{ {

View File

@@ -159,6 +159,9 @@ namespace AyaNova.PlugIn.V8
} }
ExportAssignedDocs = dOpt.ExportAssignedDocs; ExportAssignedDocs = dOpt.ExportAssignedDocs;
ImportTag = util.NormalizeTag(dOpt.Tags); ImportTag = util.NormalizeTag(dOpt.Tags);
util.HTTPCLIENT_TIMEOUT_SECONDS = dOpt.HTTPTimeOut;
util.InitClient();
//here because we logged in fine and can proceed //here because we logged in fine and can proceed
//MessageBox.Show("Login successful! JWT is " + util.JWT); //MessageBox.Show("Login successful! JWT is " + util.JWT);

View File

@@ -23,7 +23,7 @@ namespace AyaNova.PlugIn.V8
public const string API_BASE_ROUTE = "api/v8/"; public const string API_BASE_ROUTE = "api/v8/";
private const int MAX_TRIES = 3;//max times to retry an api call before giving up private const int MAX_TRIES = 3;//max times to retry an api call before giving up
private const int API_RETRY_DELAY = 3000;//pause in ms before retrying api call private const int API_RETRY_DELAY = 3000;//pause in ms before retrying api call
private const int HTTPCLIENT_TIMEOUT_SECONDS = 1200;//default for all ops, normally 100seconds but would kill large file uploads public static int HTTPCLIENT_TIMEOUT_SECONDS = 30;//default for all ops, normally 100seconds but would kill large file uploads
public static HttpClient client = null; public static HttpClient client = null;
//url once known to be good //url once known to be good
internal static string ApiBaseUrl { get; set; } internal static string ApiBaseUrl { get; set; }
@@ -40,7 +40,7 @@ namespace AyaNova.PlugIn.V8
#region INIT / AUTH #region INIT / AUTH
private static void InitClient() public static void InitClient()
{ {
if (client != null) if (client != null)
{ {