Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@dhtmlx/gantt-data-provider
Advanced tools
Data proxy between client side Gantt widget and a server side API
Data proxy between client side Gantt widget and a server side API
import { RestDataProvider } from "@dhtmlx/gantt-data-provider";
// create an instance
const server = new RestDataProvider(url); // url = https://some.com
// get data
server.getData().then(({ tasks, links }) => {
console.log(tasks, links);
});
// save changes
server.saveData({
action: "add-task", /* add-task|update-task|delete-task|add-link|delete-link */
obj: { /* GanttItem/LinkItem */ }
}).then(res => {
console.log(res.id);
})
tasks
POST: {url}/tasks
PUT: {url}/tasks/{id}
DELETE: {url}/tasks/{id}
links
POST: {url}/links
PUT: {url}/links/{id}
DELETE: {url}/links/{id}
For all actions client expect that server will respond with valid json object. Returning non-json response will be processed as an error.
For add-link/add-task actions, client expect that response will contain the server side ID (string or number) for the newly added item
{ id:"some" }
It possible to update data after saving. To do so, you need to init the provider like next
// create an instance
const server = new RestDataProvider(url, {
task: res => updateTask(res),
link: res => updateLink(res)
});
after add-link/add-task/update-link/update-task actions, the updateTask/updateLink handlers will be called with response details, so the saved task/link can be updated ( or you can trigger any other custom after-save processing )
FAQs
Data proxy between client side Gantt widget and a server side API
We found that @dhtmlx/gantt-data-provider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.