Skip to content

Commit 3756627

Browse files
committed
UI: integrity verification jobs: allow starting new even if have incomplete one
1 parent e2f409d commit 3756627

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

frontend/pages/views/IntegrityVerificationJobsView.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ export default class IntegrityVerificationJobsView extends React.Component<
137137
const runtimeSeconds = (nowOrCompleted.getTime() - new Date(job.Created).getTime()) / 1000;
138138
const bytesPerSecond = runtimeSeconds > 0 ? job.BytesScanned / runtimeSeconds : 0;
139139

140+
// we used to have start job only when there are no incomplete jobs, but that was not wise.
141+
// suppose we have old incomplete job from year ago with progress at 75 %.
142+
// new blobs have come within the year. if we didn't create new job but resumed the last 25 % we'd miss 75 % of
143+
// blobs created within this year.
144+
const startJob = (
145+
<CommandLink
146+
command={VolumeVerifyIntegrity(vol.Id, {
147+
disambiguation: vol.Label,
148+
})}
149+
/>
150+
);
151+
140152
return (
141153
<tr key={rowKey}>
142154
<td title={job.Id}>{showingHistorical && volumeTechnologyBadge(vol.Technology)}</td>
@@ -168,19 +180,12 @@ export default class IntegrityVerificationJobsView extends React.Component<
168180
)}
169181
</td>
170182
<td>
171-
{completed && (
172-
<Dropdown>
173-
<CommandLink
174-
command={VolumeVerifyIntegrity(vol.Id, {
175-
disambiguation: vol.Label,
176-
})}
177-
/>
178-
</Dropdown>
179-
)}
183+
{completed && <Dropdown>{startJob}</Dropdown>}
180184
{!completed && (
181185
<Dropdown>
182186
<CommandLink command={IntegrityverificationjobResume(job.Id)} />
183187
<CommandLink command={IntegrityverificationjobStop(job.Id)} />
188+
{startJob}
184189
</Dropdown>
185190
)}
186191
</td>

0 commit comments

Comments
 (0)