Skip to content

Commit

Permalink
Minor touch ups on documentation and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Plenyx committed Nov 21, 2024
1 parent 315463e commit 41381a1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DpsReport/DpsReportJsonExtraJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ internal Target PossiblyLastTarget
{
get
{
if (TriggerId == (int)BossIds.Cerus)
if ((TriggerId is (int)BossIds.Cerus) || (TriggerId is (int)BossIds.Decima))
{
return TargetsByTotalHealth.FirstOrDefault();
}
Expand Down
19 changes: 10 additions & 9 deletions Forms/FormEditPing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ private void FormPing_FormClosing(object sender, FormClosingEventArgs e)
});
return;
}
if (pingLink.AllPings.ContainsKey(reservedId))
if (pingLink.AllPings.TryGetValue(reservedId, out PingConfiguration pingConfig))
{
pingLink.AllPings[reservedId].Active = config.Active;
pingLink.AllPings[reservedId].Name = textBoxName.Text;
pingLink.AllPings[reservedId].Url = textBoxURL.Text;
pingLink.AllPings[reservedId].SendDataAsJson = checkBoxSendDataAsJson.Checked;
pingConfig.Active = config.Active;
pingConfig.Name = textBoxName.Text;
pingConfig.Url = textBoxURL.Text;
pingConfig.SendDataAsJson = checkBoxSendDataAsJson.Checked;
if (radioButtonMethodPut.Checked)
{
pingLink.AllPings[reservedId].Method = PingMethod.Put;
Expand All @@ -146,10 +146,11 @@ private void FormPing_FormClosing(object sender, FormClosingEventArgs e)
{
pingLink.AllPings[reservedId].Method = PingMethod.Post;
}
pingLink.AllPings[reservedId].Authentication.Active = !radioButtonNoAuthorization.Checked && textBoxAuthToken.Text.Trim() != "";
pingLink.AllPings[reservedId].Authentication.UseAsAuth = radioButtonUseAuthField.Checked;
pingLink.AllPings[reservedId].Authentication.AuthName = textBoxAuthName.Text;
pingLink.AllPings[reservedId].Authentication.AuthToken = textBoxAuthToken.Text;

pingConfig.Authentication.Active = !radioButtonNoAuthorization.Checked && textBoxAuthToken.Text.Trim() != "";
pingConfig.Authentication.UseAsAuth = radioButtonUseAuthField.Checked;
pingConfig.Authentication.AuthName = textBoxAuthName.Text;
pingConfig.Authentication.AuthToken = textBoxAuthToken.Text;
pingLink.listViewPings.Items[pingLink.listViewPings.Items.IndexOfKey(reservedId.ToString())] = new ListViewItem()
{
Name = reservedId.ToString(),
Expand Down
10 changes: 8 additions & 2 deletions remote-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@ Where "**msg**" is used as a text response from the server and will be displayed
## Processing logs on the remote server
For GET and DELETE methods, the fields are encoded *within the url request* (*/?bossId=...*)

All of the data is sent as string via the url request except for the player list.
These are the fields being sent:

* "**permalink**" contains a direct link to a processed log on (a/b.)dps.report *as a string*
* "**bossId**" contains the encounter (boss) id *as a string*
* "**success**" contains "true" if the encounter was a success, "false" otherwise *as a string*
* "**arcVersion**" contains the arcdps version used to create the original log *as a string*

For POST and PUT methods, the fields are encoded as *application/x-www-form-urlencoded* (*/*)

These are the fields being sent:

* "**permalink**" contains a direct link to a processed log on (a/b.)dps.report *as a string*
* "**bossId**" contains the encounter (boss) id *as a string*
* "**success**" contains true if the encounter was a success, false otherwise *as a string*
* "**success**" contains "true" if the encounter was a success, "false" otherwise *as a string*
* "**arcVersion**" contains the arcdps version used to create the original log *as a string*
* "**gw2Build**" contains the GW2 build on which the log was created *as a string*
* "**fightName**" contains the name of the encounter *as a string*
Expand Down Expand Up @@ -56,6 +61,7 @@ If you opt in to be send a JSON format rather then Key=Pair values, the format w
"logErrors": (array of strings),
}

Additional fields when using JSON format:
* "**logErrors**" contains a list of error message EI genarated

## Other links
Expand Down

0 comments on commit 41381a1

Please sign in to comment.