Skip to content

Commit

Permalink
feat(showjobs): Show delete file name
Browse files Browse the repository at this point in the history
Show the filename of the deleted upload in Show Job pages and add the
author table for UTF migration script.

Fix the color mismatch on show jobs.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
  • Loading branch information
GMishx committed Jul 9, 2020
1 parent 4be59ee commit dbd4115
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions install/db/dbmigrate_3.7-3.8.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
*/
const ENCODE_TABLES = array(
"copyright",
"author",
"ecc",
"keyword"
);
Expand Down
2 changes: 1 addition & 1 deletion src/www/ui/ajax-uploads.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function Output()
$V .= " (" . htmlentities($upload['upload_desc']) . ")";
}
if (! empty($upload['upload_ts'])) {
$V .= " :: " . htmlentities($upload['upload_ts']);
$V .= " :: " . htmlentities(Convert2BrowserTime($upload['upload_ts']));
}
$V .= "</option>\n";
}
Expand Down
14 changes: 11 additions & 3 deletions src/www/ui/async/AjaxShowJobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ protected function getGeekyScanDetailsForJob($job_pk)
case 'job_queued':
case 'jq_starttime':
case 'jq_endtime':
$value = Convert2BrowserTime($row[$field]);
if (! empty($row[$field])) {
$value = Convert2BrowserTime($row[$field]);
}
break;
case 'jq_itemsprocessed':
$value = number_format($row[$field]);
Expand Down Expand Up @@ -230,8 +232,14 @@ protected function getShowJobsForEachJob($jobData)
'jobQueue' => $jobs['jobqueue']
);
foreach ($jobArr['jobQueue'] as $key => $singleJobQueue) {
$jobArr['jobQueue'][$key]['jq_starttime'] = Convert2BrowserTime($jobArr['jobQueue'][$key]['jq_starttime']);
$jobArr['jobQueue'][$key]['jq_endtime'] = Convert2BrowserTime($jobArr['jobQueue'][$key]['jq_endtime']) ;
if (! empty($jobArr['jobQueue'][$key]['jq_starttime'])) {
$jobArr['jobQueue'][$key]['jq_starttime'] = Convert2BrowserTime(
$jobArr['jobQueue'][$key]['jq_starttime']);
}
if (! empty($jobArr['jobQueue'][$key]['jq_endtime'])) {
$jobArr['jobQueue'][$key]['jq_endtime'] = Convert2BrowserTime(
$jobArr['jobQueue'][$key]['jq_endtime']) ;
}
if (! empty($singleJobQueue["jq_endtime"])) {
$numSecs = strtotime($singleJobQueue['jq_endtime']) -
strtotime($singleJobQueue['jq_starttime']);
Expand Down
3 changes: 3 additions & 0 deletions src/www/ui/template/ui-showjobs.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ function createTableForJob(job) {
uploadLink = '<a title="{{ "Click to browse"|trans }}" ' +
'href="?mod=browse&upload=' + job.upload.uploadId + '&item=' +
job.upload.uploadItem + '">' + job.upload.uploadName + '</a>';
} else if (job.upload !== null && job.job.jobName == "Delete") {
uploadLink = '<span style="color:black">' + job.upload.uploadName +
' (Deleted)</span>';
} else {
uploadLink = '<span style="color:black">' + job.job.jobName + '</span>';
}
Expand Down

0 comments on commit dbd4115

Please sign in to comment.