Feature: add session data consumption information in GUI/text UIs (#287)

* Feature: add session data consumption information in GUI/text UIs

Adds the total bytes downloaded and uploaded in the current session as well as the average data transfer rate for both UL/DL. The information is not added to the 1-line UI as the line will take 150+ characters in the screen.
This commit is contained in:
Luis Uguina
2020-09-12 10:00:24 +10:00
committed by GitHub
parent 4fa886c4de
commit d152e0b0ff
9 changed files with 126 additions and 10 deletions

View File

@@ -647,7 +647,7 @@ import lombok.Data;
args += "&extras=" + job_to_reset_.getExtras();
}
}
this.server.HTTPSendFile(this.server.getPage("error") + args, temp_file.getAbsolutePath(), step_);
this.server.HTTPSendFile(this.server.getPage("error") + args, temp_file.getAbsolutePath(), step_, this.gui);
temp_file.delete();
}
catch (Exception e) {
@@ -938,7 +938,7 @@ import lombok.Data;
Type confirmJobReturnCode = Error.Type.OK;
retryLoop:
while (nb_try < max_try && ret != ServerCode.OK) {
ret = this.server.HTTPSendFile(url_real, ajob.getOutputImagePath(), checkpoint);
ret = this.server.HTTPSendFile(url_real, ajob.getOutputImagePath(), checkpoint, this.gui);
switch (ret) {
case OK:
// no issue, exit the loop