Skip to content
/ green-panel Public template

Admin panel for the mongo-orm project.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

kebasyaty/green-panel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Green Panel

Admin panel for easy use of Green Barrel. This template uses actix-web.

Attention

MongoDB version 4.4

MongoDB Rust Driver version 1.2.5 is used.

For examples of Model fields, use tests.

Requirements

Quick start

1. Install mongodb (if not installed)

    ### Ubuntu, Linux Mint:
    $ sudo apt install mongodb
    ## OR
    ### Ubuntu 20.04, Linux Mint 20.x:
    $ sudo apt update
    $ sudo apt install dirmngr gnupg apt-transport-https ca-certificates
    $ wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
    $ sudo add-apt-repository 'deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse'
    $ sudo apt update
    $ sudo apt install mongodb-org
    $ sudo systemctl enable --now mongod
    # For check
    $ mongod --version
    $ mongo --eval 'db.runCommand({ connectionStatus: 1 })'
    $ reboot
    #
    ### Configuration file:
    $ sudo nano /etc/mongod.conf
    #
    ### Systemd:
    $ sudo systemctl status mongod
    $ sudo systemctl start mongod
    $ sudo systemctl stop mongod
    $ sudo systemctl restart mongod
    $ sudo systemctl enable mongod
    $ sudo systemctl disable mongod
    #
    ### Uninstall:
    $ sudo systemctl stop mongod
    $ sudo systemctl disable mongod
    $ sudo apt --purge remove mongodb\*  # OR (for mongodb-org) - $ sudo apt --purge remove mongodb-org\**
    $ sudo rm -r /var/log/mongodb
    $ sudo rm -r /var/lib/mongodb
    $ sudo rm -f /etc/mongod.conf
    $ sudo apt-add-repository --remove 'deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse' # for mongodb-org
    $ sudo apt update

3. The panel uses reCAPTCHA v3

For development, replace the demo-keys with your own -> actix-greenpanel/src/settings/general.rs

4. Go to the project directory and run the following commands:

    $ cargo run

Open in a web browser http://127.0.0.1:8080/admin

Login page

On the first visit to the panel, the first user with administrator rights will be created.

  • Default login: admin
  • Default password: 12345678 Login page

Welcome page

Welcome page

List of documents

List of documents

List of documents

Opened filter

Document form

 Document form

Update password

Example of using a dynamic widget

Dynamic Widgets - This is a simplified alternative to ForeignKey and ManyToMan. Dynamic widgets are used to create document-style categories.

Example of using a dynamic widget

Image upload field

Image upload field

File upload field

File upload field

Color selection field

Color selection field

Date and time field

In the database, the date and time are stored in UTC format. In the admin panel, the date and time are displayed as local.

Date and time field

Date and time field

Field textarea type and CKEditor 5

Usag CKEditor 5 with textArea widget

Editor settings: mango-panel/admin-panel/src/store/modules/ckeditor.js

    //  Example of a field in the Model.
    #[serde(default)]
    #[field_attrs(
        widget = "textArea",
        label = "Text Editor",
        maxlength = 6000,
        css_classes = "ckeditor"
    )]
    pub text_editor: Option<String>,

Field textarea type and pulse CKEditor 5

License

This project is licensed under the MIT and Apache Version 2.0

About

Admin panel for the mongo-orm project.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published