Ref: user earns points not credits
This commit is contained in:
@@ -145,7 +145,7 @@ public class GuiText implements Gui {
|
|||||||
|
|
||||||
@Override public void displayStats(Stats stats) {
|
@Override public void displayStats(Stats stats) {
|
||||||
System.out.println(String.format("%s Frames remaining: %d", this.df.format(new Date()), stats.getRemainingFrame()));
|
System.out.println(String.format("%s Frames remaining: %d", this.df.format(new Date()), stats.getRemainingFrame()));
|
||||||
System.out.println(String.format("%s Credits earned: %d", this.df.format(new Date()), stats.getCreditsEarnedSession()));
|
System.out.println(String.format("%s Points earned: %d", this.df.format(new Date()), stats.getPointsEarnedSession()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public void displayUploadQueueStats(int queueSize, long queueVolume) {
|
@Override public void displayUploadQueueStats(int queueSize, long queueVolume) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class GuiTextOneLine implements Gui {
|
|||||||
|
|
||||||
private String project;
|
private String project;
|
||||||
private int rendered;
|
private int rendered;
|
||||||
private String creditsEarned;
|
private String pointsEarned;
|
||||||
private int sigIntCount = 0;
|
private int sigIntCount = 0;
|
||||||
private DateFormat df;
|
private DateFormat df;
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ public class GuiTextOneLine implements Gui {
|
|||||||
downloadProgress = new DownloadProgress(this);
|
downloadProgress = new DownloadProgress(this);
|
||||||
project = "";
|
project = "";
|
||||||
rendered = 0;
|
rendered = 0;
|
||||||
creditsEarned = null;
|
pointsEarned = null;
|
||||||
status = "";
|
status = "";
|
||||||
computeMethod = "";
|
computeMethod = "";
|
||||||
line = "";
|
line = "";
|
||||||
@@ -157,7 +157,7 @@ public class GuiTextOneLine implements Gui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override public void displayStats(Stats stats) {
|
@Override public void displayStats(Stats stats) {
|
||||||
creditsEarned = String.valueOf(stats.getCreditsEarnedSession());
|
pointsEarned = String.valueOf(stats.getPointsEarnedSession());
|
||||||
updateLine();
|
updateLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ public class GuiTextOneLine implements Gui {
|
|||||||
System.out.print("\r");
|
System.out.print("\r");
|
||||||
|
|
||||||
line = String.format("%s Frames: %d Points: %s | Upload Queue: %d%s | %%s %s %s", df.format(new Date()), rendered,
|
line = String.format("%s Frames: %d Points: %s | Upload Queue: %d%s | %%s %s %s", df.format(new Date()), rendered,
|
||||||
creditsEarned != null ? creditsEarned : "unknown", this.uploadQueueSize,
|
pointsEarned != null ? pointsEarned : "unknown", this.uploadQueueSize,
|
||||||
(this.uploadQueueSize > 0 ? String.format(" (%.2fMB)", (this.uploadQueueVolume / 1024.0 / 1024.0)) : ""), computeMethod,
|
(this.uploadQueueSize > 0 ? String.format(" (%.2fMB)", (this.uploadQueueVolume / 1024.0 / 1024.0)) : ""), computeMethod,
|
||||||
status + (exiting ? " (Exiting after all frames are uploaded)" : ""));
|
status + (exiting ? " (Exiting after all frames are uploaded)" : ""));
|
||||||
|
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ import lombok.Data;
|
|||||||
|
|
||||||
@Data @AllArgsConstructor public class Stats {
|
@Data @AllArgsConstructor public class Stats {
|
||||||
private int remainingFrame;
|
private int remainingFrame;
|
||||||
private long creditsEarned;
|
private long pointsEarned;
|
||||||
private int creditsEarnedSession;
|
private int pointsEarnedSession;
|
||||||
private int renderableProject;
|
private int renderableProject;
|
||||||
private int waitingProject;
|
private int waitingProject;
|
||||||
private int connectedMachine;
|
private int connectedMachine;
|
||||||
|
|
||||||
@Override public String toString() {
|
@Override public String toString() {
|
||||||
return "Stats [remainingFrame=" + remainingFrame + ", creditsEarned=" + creditsEarned + ", creditsEarnedSession=" + creditsEarnedSession
|
return "Stats [remainingFrame=" + remainingFrame + ", pointsEarned=" + pointsEarned + ", pointsEarnedSession=" + pointsEarnedSession
|
||||||
+ ", renderableProject=" + renderableProject + ", waitingProject=" + waitingProject + ", connectedMachine=" + connectedMachine + "]";
|
+ ", renderableProject=" + renderableProject + ", waitingProject=" + waitingProject + ", connectedMachine=" + connectedMachine + "]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class Working implements Activity {
|
|||||||
private JLabel remainingFrameContent;
|
private JLabel remainingFrameContent;
|
||||||
private JLabel lastRenderTime;
|
private JLabel lastRenderTime;
|
||||||
private JLabel lastRender;
|
private JLabel lastRender;
|
||||||
private JLabel creditEarned;
|
private JLabel pointsEarned;
|
||||||
private JButton pauseButton;
|
private JButton pauseButton;
|
||||||
private JButton exitAfterFrame;
|
private JButton exitAfterFrame;
|
||||||
private JLabel current_project_name_value;
|
private JLabel current_project_name_value;
|
||||||
@@ -94,7 +94,7 @@ public class Working implements Activity {
|
|||||||
statusContent = new JLabel("Init");
|
statusContent = new JLabel("Init");
|
||||||
renderedFrameContent = new JLabel("0");
|
renderedFrameContent = new JLabel("0");
|
||||||
remainingFrameContent = new JLabel("");
|
remainingFrameContent = new JLabel("");
|
||||||
creditEarned = new JLabel("");
|
pointsEarned = new JLabel("");
|
||||||
current_project_name_value = new JLabel("");
|
current_project_name_value = new JLabel("");
|
||||||
current_project_duration_value = new JLabel("");
|
current_project_duration_value = new JLabel("");
|
||||||
currrent_project_progression_value = new JLabel("");
|
currrent_project_progression_value = new JLabel("");
|
||||||
@@ -138,7 +138,7 @@ public class Working implements Activity {
|
|||||||
statusContent = new JLabel(statusContent.getText());
|
statusContent = new JLabel(statusContent.getText());
|
||||||
renderedFrameContent = new JLabel(renderedFrameContent.getText());
|
renderedFrameContent = new JLabel(renderedFrameContent.getText());
|
||||||
remainingFrameContent = new JLabel(remainingFrameContent.getText());
|
remainingFrameContent = new JLabel(remainingFrameContent.getText());
|
||||||
creditEarned = new JLabel(creditEarned.getText());
|
pointsEarned = new JLabel(pointsEarned.getText());
|
||||||
current_project_name_value = new JLabel(current_project_name_value.getText());
|
current_project_name_value = new JLabel(current_project_name_value.getText());
|
||||||
current_project_duration_value = new JLabel(current_project_duration_value.getText());
|
current_project_duration_value = new JLabel(current_project_duration_value.getText());
|
||||||
currrent_project_progression_value = new JLabel(currrent_project_progression_value.getText());
|
currrent_project_progression_value = new JLabel(currrent_project_progression_value.getText());
|
||||||
@@ -187,7 +187,7 @@ public class Working implements Activity {
|
|||||||
session_info_panel = new CollapsibleJPanel(new GridLayout(7, 2), this);
|
session_info_panel = new CollapsibleJPanel(new GridLayout(7, 2), this);
|
||||||
session_info_panel.setBorder(BorderFactory.createTitledBorder("Session infos"));
|
session_info_panel.setBorder(BorderFactory.createTitledBorder("Session infos"));
|
||||||
|
|
||||||
JLabel user_info_credits_this_session = new JLabel("Points earned: ", JLabel.TRAILING);
|
JLabel user_info_points_this_session = new JLabel("Points earned: ", JLabel.TRAILING);
|
||||||
JLabel user_info_total_rendertime_this_session = new JLabel("Duration: ", JLabel.TRAILING);
|
JLabel user_info_total_rendertime_this_session = new JLabel("Duration: ", JLabel.TRAILING);
|
||||||
JLabel user_info_pending_uploads_and_size = new JLabel("Queued uploads: ", JLabel.TRAILING);
|
JLabel user_info_pending_uploads_and_size = new JLabel("Queued uploads: ", JLabel.TRAILING);
|
||||||
JLabel session_download_stats = new JLabel("Total Downloads: ", JLabel.TRAILING);
|
JLabel session_download_stats = new JLabel("Total Downloads: ", JLabel.TRAILING);
|
||||||
@@ -195,8 +195,8 @@ public class Working implements Activity {
|
|||||||
JLabel user_info_rendered_frame_this_session = new JLabel("Rendered frames: ", JLabel.TRAILING);
|
JLabel user_info_rendered_frame_this_session = new JLabel("Rendered frames: ", JLabel.TRAILING);
|
||||||
JLabel global_static_renderable_project = new JLabel("Renderable projects: ", JLabel.TRAILING);
|
JLabel global_static_renderable_project = new JLabel("Renderable projects: ", JLabel.TRAILING);
|
||||||
|
|
||||||
session_info_panel.add(user_info_credits_this_session);
|
session_info_panel.add(user_info_points_this_session);
|
||||||
session_info_panel.add(creditEarned);
|
session_info_panel.add(pointsEarned);
|
||||||
|
|
||||||
session_info_panel.add(user_info_rendered_frame_this_session);
|
session_info_panel.add(user_info_rendered_frame_this_session);
|
||||||
session_info_panel.add(renderedFrameContent);
|
session_info_panel.add(renderedFrameContent);
|
||||||
@@ -348,8 +348,8 @@ public class Working implements Activity {
|
|||||||
public void displayStats(Stats stats) {
|
public void displayStats(Stats stats) {
|
||||||
DecimalFormat df = new DecimalFormat("##,##,##,##,##,##,##0");
|
DecimalFormat df = new DecimalFormat("##,##,##,##,##,##,##0");
|
||||||
remainingFrameContent.setText(df.format(stats.getRemainingFrame()));
|
remainingFrameContent.setText(df.format(stats.getRemainingFrame()));
|
||||||
creditEarned.setText(df.format(stats.getCreditsEarnedSession()));
|
pointsEarned.setText(df.format(stats.getPointsEarnedSession()));
|
||||||
user_info_points_total_value.setText(df.format(stats.getCreditsEarned()));
|
user_info_points_total_value.setText(df.format(stats.getPointsEarned()));
|
||||||
renderable_projects_value.setText(df.format(stats.getRenderableProject()));
|
renderable_projects_value.setText(df.format(stats.getRenderableProject()));
|
||||||
waiting_projects_value.setText(df.format(stats.getWaitingProject()));
|
waiting_projects_value.setText(df.format(stats.getWaitingProject()));
|
||||||
connected_machines_value.setText(df.format(stats.getConnectedMachine()));
|
connected_machines_value.setText(df.format(stats.getConnectedMachine()));
|
||||||
|
|||||||
Reference in New Issue
Block a user