![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
sails-hook-cms
Advanced tools
Beaware: This hook is still in a very early stage and is still in very active development.
The objective of this sails hook is to provide an easy way to create a simple CMS for your model's collections.
The hook reads the models schema to build simple CRUD operations and UI CMS.
Install using npm i sails-hook-cms
and then navigate to http://localhost:1337/admin
This hooks introduces a couple of routes to your application.
http://localhost:1337/admin
or homehttp://localhost:1337/admin/:model
A list of itemshttp://localhost:1337/admin/:model/create
The form to create a new itemhttp://localhost:1337/admin/:model/edit/:modelId
The form to edit an itemI want this hook to work as plug and play. However if you want more control over the CMS I want to be able to provide those configurations to set things up.
I decided not to make a config/cms.js
file yet since I think the model declaration could serve better for grain control configuraitons.
Having for example a model Book. We can start to modify how its /admin/:model
list view renders.
In this case we have overrided the model.name with a label Libro and removed the createdAt and updatedAt fields.
module.exports = {
//Setting this variable will tell the gook how to render
cms: {
//You can override the model name with label
label: "Libro",
//Sometimes you dont want to put your createdAt and updatedAt
//so we toggle them in the list view
createdAt:false,
updatedAt:false,
id:true
},
attributes: {
name: 'string',
description: 'text',
danum: 'integer',
dafloat: 'float',
dadate: 'date',
dadatetime: 'datetime',
dabool: 'boolean',
darray: 'array',
dajson: 'json'
}
};
I would like to have a minimal API but still have a decent flexibility.
Any suggestions are welcome on the issues page or in the gitter chat room.
FAQs
A simple sails admin panel
We found that sails-hook-cms demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.