Skip to content

Commit cc0ccc7

Browse files
committed
add dropdown to select data encapsulation format (#180)
This commit adds the configuration to the editor form to allow selecting between JSON and CBOR as data encapsulation. Also the Logging and Misc pannels have been swapped, to have Logging ever so slightly easier to spot. (cherry picked from commit e003889)
1 parent 088273a commit cc0ccc7

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

dsneditor/EsOdbcDsnEditor/DSNEditorForm.Designer.cs

Lines changed: 32 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dsneditor/EsOdbcDsnEditor/DSNEditorForm.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,12 @@ public DsnEditorForm(
152152
toolTipLogDirectoryPath.SetToolTip(textLogDirectoryPath, "Specify which directory to write the log files in.");
153153
toolTipLogLevel.SetToolTip(comboLogLevel, "Configure the verbosity of the logs.");
154154

155-
// Logging Panel
155+
// Misc Panel
156156
numericUpDownTimeout.Text = Builder.ContainsKey("Timeout") ? Builder["Timeout"].ToString().StripBraces() : "0";
157157
numericUpDownFetchSize.Text = Builder.ContainsKey("MaxFetchSize") ? Builder["MaxFetchSize"].ToString().StripBraces() : "1000";
158158
numericUpDownBodySize.Text = Builder.ContainsKey("MaxBodySizeMB") ? Builder["MaxBodySizeMB"].ToString().StripBraces() : "100";
159159
comboBoxFloatsFormat.Text = Builder.ContainsKey("ScientificFloats") ? Builder["ScientificFloats"].ToString().StripBraces() : "default";
160+
comboBoxDataEncoding.Text = Builder.ContainsKey("Packing") ? Builder["Packing"].ToString() : "JSON";
160161

161162
string[] noes = {"no", "false", "0"};
162163
checkBoxFollowRedirects.Checked = !noes.Contains(Builder.ContainsKey("Follow") ? Builder["Follow"].ToString().StripBraces() : "yes");
@@ -169,6 +170,7 @@ public DsnEditorForm(
169170
toolTipFetchSize.SetToolTip(numericUpDownFetchSize, "The maximum number of rows that Elasticsearch SQL server should send the driver for one page.");
170171
toolTipBodySize.SetToolTip(numericUpDownBodySize, "The maximum number of megabytes that the driver will accept for one page.");
171172
toolTipFloatsFormat.SetToolTip(comboBoxFloatsFormat, "How should the floating point numbers be printed, when these are converted to string by the driver.");
173+
toolTipDataEncoding.SetToolTip(comboBoxDataEncoding, "How should the data between the server and the driver be encoded as.");
172174
toolTipFollowRedirects.SetToolTip(checkBoxFollowRedirects, "Should the driver follow HTTP redirects of the requests to the server?");
173175
toolTipApplyTZ.SetToolTip(checkBoxApplyTZ, "Should the driver use machine's local timezone? The default is UTC.");
174176
toolTipAutoEscapePVA.SetToolTip(checkBoxAutoEscapePVA, "Should the driver auto-escape the pattern-value arguments?");
@@ -280,6 +282,7 @@ private bool RebuildAndValidateDsn()
280282
Builder["MaxFetchSize"] = numericUpDownFetchSize.Text;
281283
Builder["MaxBodySizeMB"] = numericUpDownBodySize.Text;
282284
Builder["ScientificFloats"] = comboBoxFloatsFormat.Text;
285+
Builder["Packing"] = comboBoxDataEncoding.Text;
283286
Builder["Follow"] = checkBoxFollowRedirects.Checked ? "true" : "false";
284287
Builder["ApplyTZ"] = checkBoxApplyTZ.Checked ? "true" : "false";
285288
Builder["AutoEscapePVA"] = checkBoxAutoEscapePVA.Checked ? "true" : "false";

dsneditor/EsOdbcDsnEditor/DSNEditorForm.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,6 +2834,9 @@
28342834
<metadata name="toolTipIndexIncludeFrozen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
28352835
<value>617, 213</value>
28362836
</metadata>
2837+
<metadata name="toolTipDataEncoding.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
2838+
<value>854, 213</value>
2839+
</metadata>
28372840
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
28382841
<value>314</value>
28392842
</metadata>

0 commit comments

Comments
 (0)