Our pure JavaScript Scheduler component


Post by mmelcot »

In the export example, the rendering breaks when using dockerized rendering server, instead of the command line one.

node ./src/server.js -h 8080

produces:

Screenshot from 2020-10-01 12-19-06.png
Screenshot from 2020-10-01 12-19-06.png (47.39 KiB) Viewed 1142 times

whereas:

docker-compose up

produces:

Screenshot from 2020-10-01 12-18-57.png
Screenshot from 2020-10-01 12-18-57.png (11.72 KiB) Viewed 1142 times

So it looks like CSS are not used by the docker version.
Do you have an idea on how to fix that?


Post by Maxim Gorkovsky »

Hello.
Dockerized version by default doesn't have access to the application resources via -r /path/to/resource. If you used that option, you'll need to change docker image and copy application resources into it too, shouldn't be very difficult. But usually it should be enough to change feature config on the client side. You can try this:

pdfExport : {
  translateURLsToAbsolute : 'https://path.to.the.app.on.server'
}

https://www.bryntum.com/docs/gantt/#Gantt/feature/export/PdfExport#config-translateURLsToAbsolute


Post by mmelcot »

Thanks Maxim, yes now it works with translateURLsToAbsolute.

FYI, I noticed that libxss1 library is missing when building the Docker image:

I fixed it like that

RUN apt-get update \
    ..............
    # Note: 'libxss1' is missing in original Bryntum package
    && apt install libxss1
    && rm -rf /var/lib/apt/lists/*

Also I noticed that custom CSS classes (using cls attributue of Scheduler) are not taken into account when exporting to pdf.
So if we do

<BryntumScheduler
    cls={'my_class'}        
....

and the css:

      
.my_class * { background: orange}

The style is applied in the view, but is lost on pdf export.

This is an issue when we have multiple schedulers in an app and want to style them differently.


Post by Maxim Gorkovsky »

We haven't heard of libxss1 missing in the docker image. This sounds odd considering nature of the docker. I've opened ticket to investigate this: https://github.com/bryntum/support/issues/1603
Can you tell us more about your env? On which system do you run docker? How do you run this image? Do you have any changes to original image beside this libxss1 installation?

And here is another ticket about missing styles: https://github.com/bryntum/support/issues/1604 Thank you for report.


Post by mmelcot »

Ok thanks.
Just noticed that the pdfexporter uses a Debian image. It would be valuable to use an Alpine one, as it is yields a way lighter final image, and is also more secure ;)

FROM node:10.x.0-alpine

insead of

FROM node:10.x.0

Post by Maxim Gorkovsky »

Thank you for input, I opened ticket to check if we can find better base docker image: https://github.com/bryntum/support/issues/1606


Post Reply