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.
sails-adminpanel
Advanced tools
Only for use sails > v1.5
Community Link: Join SailsJS Discord Community Feel free to use this link to connect with the community and engage in discussions or ask any questions you may have.
The admin panel offers automatic generation capabilities, ensuring ease of use, and includes features such as internationalization, user and group access rights, policy enforcement, and a modern user interface. In the near future, installation steps will be provided for a smoother setup experience.
Key Features and Components:
This comprehensive set of features and components makes the admin panel a powerful tool for managing and controlling various aspects of your application with a focus on simplicity and a modern user interface.
To install this hook, you will need to run:
npm install sails-adminpanel
Currently, we have to patch sails framework, so you install our patches for using all functionality. Without these patches, i18n will not work. Read how to install the patch
Then you will need to create a config file for the admin panel generator into config/adminpanel.js
For use Typescript look below
This is an example of this file:
'use strict';
module.exports.adminpanel = {
models: {
pages: {
title: 'Pages',
model: 'Page',
list: {
fields: {
id: 'ID',
name: 'Article name'
}
},
edit: {
fields: {
name: 'Article name',
content: {
type: 'wysiwyg',
title: 'Article body'
}
}
}
}
}
};
And your admin panel will be accessible under: http://127.0.0.1:port/admin
For comprehensive information on configuration and usage, it is highly recommended to refer to the docs folder within the project repository. The documentation provides detailed insights into various aspects of the admin panel, including configuration options and usage guidelines.
When working with TypeScript in the project, it is advisable to explore the type definitions located in the /interfaces/adminpanelConfig.d.ts
file. This TypeScript definition file outlines the types and structures associated with the admin panel configuration. It serves as a valuable resource for understanding the available options and ensuring type safety when configuring the admin panel.
For projects utilizing TypeScript, consider the following example:
import { ModelConfig, AdminpanelConfig } from "sails-adminpanel/interfaces/adminpanelConfig";
let models: { [key: string]: ModelConfig } = {
// Define your model configurations here
};
var config: AdminpanelConfig = {
//auth: true,
dashboard: {
autoloadWidgetsPath: 'api/dashboardWidgets',
defaultWidgets: ['reload_website']
},
brand: {
link: {
title: 'SailsJS adminpanel',
id: "brand_link",
link: "/admin"
}
}
};
module.exports.adminpanel = config;
This TypeScript example demonstrates how to structure model configurations and the overall admin panel configuration. Utilizing TypeScript enhances code clarity, provides autocompletion support, and helps prevent potential configuration errors.
The UI of the project is designed with the Tailwind CSS framework, providing a modern and responsive user interface.
gulpfile.js
gulp
- Executes in development mode.gulp prod
- Executes in production mode.assets/src/scripts/ckeditor5/app.js
gulp ckeditorBuild
The CKeditor5 section indicates the custom build file location for CKeditor5, which can be found at assets/src/scripts/ckeditor5/app.js
. Additionally, there is a Gulp task named gulp ckeditorBuild
associated with building CKeditor5.
These details provide information on the project's build process, specifically related to Gulp tasks and CKeditor5 customization.
for fileUploader (readmore in TODO)
csrf: false
MIT
FAQs
Basic adminpanel for Sails 1x
The npm package sails-adminpanel receives a total of 451 weekly downloads. As such, sails-adminpanel popularity was classified as not popular.
We found that sails-adminpanel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.