Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use run estimates from rd_tool. #153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions www/src/components/Job.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ export class JobComponent extends React.Component<JobProps, {
if (job.status & JobStatus.Cancelable) {
let value = job.progress.total ? job.progress.value / job.progress.total : 0;
let label = `${job.progress.value} of ${job.progress.total}`;
let elapsed = minutesSince(job.date);
let remaining = Math.round(elapsed / value - elapsed);
let remaining = Math.round(job.progress.eta / 60);
label += " (" + remaining + "m left)";
let now = value > 0 ? 100 * value : 100;
if (value === 0) {
Expand Down
6 changes: 4 additions & 2 deletions www/src/stores/Stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ function parseBoolean(v) {
export class JobProgress {
constructor(
public value: number,
public total: number) {
public total: number,
public eta: number ) {
// ...
}
}
Expand All @@ -352,7 +353,7 @@ export class Job {
status: JobStatus = JobStatus.Unknown;
date: Date;

progress: JobProgress = new JobProgress(0, 0);
progress: JobProgress = new JobProgress(0, 0, 0);
selected: boolean = false;
selectedName: string = "";
color: string = "";
Expand Down Expand Up @@ -813,6 +814,7 @@ export class AppStore {
}
job.progress.value = o.completed;
job.progress.total = o.total;
job.progress.eta = o.eta;
job.loadLog(true);
job.onChange.post("updated status");
});
Expand Down