refs #4550 Fixes #1
|
@ -23,6 +23,7 @@ COPY \
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
COPY cupsd.conf /etc/cups/
|
COPY cupsd.conf /etc/cups/
|
||||||
|
RUN useradd admin && usermod -g lpadmin admin
|
||||||
|
|
||||||
COPY \
|
COPY \
|
||||||
main.js \
|
main.js \
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
useradd admin
|
|
||||||
echo "admin:$CUPS_PASSWORD" | chpasswd
|
echo "admin:$CUPS_PASSWORD" | chpasswd
|
||||||
usermod -g lpadmin admin
|
|
||||||
cupsd
|
cupsd
|
||||||
|
|
||||||
exec $@
|
exec $@
|
||||||
|
|
|
@ -85,7 +85,7 @@ class PrintServer {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await conn.beginTransaction();
|
await conn.beginTransaction();
|
||||||
[[printJob]] = await conn.query(selectQuery, ['LabelCollection', this.conf.printers]);
|
[[printJob]] = await conn.query(selectQuery);
|
||||||
if (!printJob) return;
|
if (!printJob) return;
|
||||||
|
|
||||||
jobId = printJob.id;
|
jobId = printJob.id;
|
||||||
|
@ -105,9 +105,8 @@ class PrintServer {
|
||||||
args[row.name] = row.value;
|
args[row.name] = row.value;
|
||||||
try {
|
try {
|
||||||
let methodPath = this.method.replace(/{\w+}/g, function(match) {
|
let methodPath = this.method.replace(/{\w+}/g, function(match) {
|
||||||
const params = {id: args.collectionFk};
|
|
||||||
const key = match.substr(1, match.length - 2);
|
const key = match.substr(1, match.length - 2);
|
||||||
const value = params[key];
|
const value = args[key];
|
||||||
return value !== undefined ? value : match;
|
return value !== undefined ? value : match;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@ SELECT pq.id,
|
||||||
JOIN report r ON r.id = pq.reportFk
|
JOIN report r ON r.id = pq.reportFk
|
||||||
JOIN printQueueArgs pqa ON pqa.printQueueFk = pq.id
|
JOIN printQueueArgs pqa ON pqa.printQueueFk = pq.id
|
||||||
LEFT JOIN printer p ON p.id = pq.printerFk
|
LEFT JOIN printer p ON p.id = pq.printerFk
|
||||||
WHERE r.name = ?
|
WHERE pq.statusCode = 'queued'
|
||||||
AND pq.statusCode = 'queued'
|
|
||||||
AND NOT r.method IS NULL
|
AND NOT r.method IS NULL
|
||||||
ORDER BY pq.priorityFk ASC
|
ORDER BY pq.priorityFk ASC
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
|
|
Loading…
Reference in New Issue