Hi @jazcam
looks like I’ve disappeared from this thread right after asking you for the details back then, sorry about that.
As for sharing modified GPL files - we have absolutely no problem with that.
@Contente
Regarding the issues with the live update module, since it was never included in the main package there hasn’t been any activity for a really long time.
But we do have an updated dev version which should work with the latest dhtmlxscheduler and Faye, which I can share
Download links (I’m also attaching those to the post)
Live updates: https://files.dhtmlx.com/30d/868033035d111d2259ad83d72be7468e/live_updates.zip
Demo: https://files.dhtmlx.com/30d/8894760b70ca39e07b620961562f4340/scheduler-live-updates-app.zip
The demo package consists of two apps:
-
One is a web app with dhtmlxScheduler, which is taken from here GitHub - DHTMLX/scheduler-howto-node: dhtmlxScheduler RESTful API implementation for Node/Express
-
And the other is live update service, it’s implemented as a separate app here.
Faye app (scheduler-live-updates-app.zip/live-update/server.js
) is mostly the same as in the live-update sample you’ve downloaded before. You can find the code file in scheduler-live-updates-app.zip/live-update/server.js
As for the scheduler app (scheduler-live-updates-app.zip/scheduler
), I’ve made some changes to the scheduler app in order to connect live updates to it.
I didn’t want to hardcode Faye urls to html pages (http://localhost:8008/
), so I’ve added a proxy route that will redirect routes from the local url to live updates app (/liveUpdates
→ http://localhost:8008
), you can find it in scheduler/hook_live_updates.js
.
It means that all requests from the front-end that starts with /liveUpdates
are redirected to live-updates app.
On the front-end:
Added live_update.js and the faye client:
<script src="https://cdn.dhtmlx.com/scheduler/edge/dhtmlxscheduler.js" charset="utf-8"></script>
<script src="./lib/dhtmlxscheduler/live_updates.js"></script>
<script src="/liveUpdates/client.js"></script>
And connected the live update module to the data processor.
// connect backend to scheduler
var dp = new dataProcessor("/events");
dp.live_updates("/liveUpdates");
How to run:
Open the terminal and run the Faye app:
cd live-update
npm install
npm run start
Open another terminal window and run the scheduler app:
cd scheduler
npm install
npm run start
open http://localhost:3000/
Everything seems working correctly on my end, both Basic
and Recurring
events examples should work.
The updated live_updates.js
seems to work ok with the latest scheduler.
No changes in dhtmlxscheduler library seem to be required, but there may be some issues we’re not aware of.
Note, that scheduler app requires MySQL database, which you need to import from scheduler-live-updates-app.zip\scheduler\mysql_dump.sql
and update database connection settings in scheduler\server.js
.
Also please note that the live update module is attached to the dataprocessor, and it won’t broadcast changes if the dataProcessor gets the error
action status from the server.
In this package, I’ve commented out error responses on the server (scheduler-howto-node/router.js at master · DHTMLX/scheduler-howto-node · GitHub) so it always reports success even if it’s actually not. This is so you can test live updates without setting up the database. If you’re going to reuse these apps, you may want to rollback changes in router.js (scheduler-live-updates-app.zip/scheduler/router.js
)
live_updates.zip (1.6 KB)
scheduler-live-updates-app.zip (10.1 KB)