Skip to content

Commit e695cfd

Browse files
add link to PDL status-log
1 parent 6503ddc commit e695cfd

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

bull/pdl-queue/consumer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ PDLQueue.process(async (job, done) => {
142142
job.progress(100);
143143
done(
144144
new Error(
145-
`Upload to Internet Archive failed because ${errorFlag.page} is not reachable. Please try again or contact Panjab Digital Library for more details.`
145+
`Upload to Internet Archive failed because <a href=${errorFlag.page} target='_blank'>${errorFlag.page}</a> is not reachable. Please try again or contact Panjab Digital Library for more details.`
146146
)
147147
);
148148
} else {

components/QueueTable.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,22 @@ const ShowUploadQueue = (props) => {
121121
label: "Status",
122122
minWidth: 30,
123123
align: "left",
124+
format: (value) => {
125+
const isPDLMissingPage = /<a [^>]*>([^<]+)<\/a>/;
126+
const missingPageLink = isPDLMissingPage.exec(value);
127+
return missingPageLink ? (
128+
<span>
129+
Failed! (Reason: Upload to Internet Archive failed because {""}
130+
<a href={missingPageLink[1]} target="_blank">
131+
{missingPageLink[1]}
132+
</a>{" "}
133+
is not reachable. Please try again or contact Panjab Digital Library
134+
for more details. )
135+
</span>
136+
) : (
137+
value
138+
);
139+
},
124140
},
125141
{
126142
id: "upload_progress",
@@ -158,6 +174,8 @@ const ShowUploadQueue = (props) => {
158174
return column.format((value === "-" ? "" : "User:") + value);
159175
} else if (column.id === "date") {
160176
return column.format(value);
177+
} else if (column.id === "status") {
178+
return column.format(value);
161179
} else {
162180
return value;
163181
}

0 commit comments

Comments
 (0)