Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync main branch to docs #62

Merged
merged 38 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
223da39
fix
xxl4 Nov 9, 2023
7d4c0af
fix
xxl4 Nov 9, 2023
cbd774d
upgrade docs
xxl4 Nov 9, 2023
8151671
upgrade demo
xxl4 Nov 9, 2023
d7a5802
build:prod:base
xxl4 Nov 9, 2023
bc1c389
add srv db sql
xxl4 Nov 9, 2023
36335f4
fix ui
xxl4 Nov 9, 2023
d4d9f75
fix core
xxl4 Nov 9, 2023
2066e25
upgrade
xxl4 Nov 9, 2023
d18ef87
upgrade
xxl4 Nov 10, 2023
0e0e63b
upgrade
xxl4 Nov 10, 2023
acfb371
upgrade docker links
xxl4 Nov 11, 2023
22acbe6
升级跨越配置设置
xxl4 Nov 11, 2023
2c79902
add docker version
xxl4 Nov 11, 2023
8273283
upgrade the core
xxl4 Nov 11, 2023
6b1ae55
upgrade build
xxl4 Nov 11, 2023
14ecec0
upgrade makefile
xxl4 Nov 11, 2023
2e29b68
upgrade build param
xxl4 Nov 11, 2023
08ab257
upgrade build
xxl4 Nov 11, 2023
85f9956
Update README.md
xxl4 Nov 11, 2023
dfe379f
fix the build docker
xxl4 Nov 11, 2023
0e10c1a
Merge branch 'main' into dev-1.2.0
xxl4 Nov 11, 2023
825c98a
fix the build docker (#54)
xxl4 Nov 11, 2023
de529ab
back build
xxl4 Nov 12, 2023
c18047e
Merge branch 'dev-1.2.0' of github.com:nicelizhi/easy-admin into dev-…
xxl4 Nov 12, 2023
f18743b
Dev 1.2.0 (#55)
xxl4 Nov 12, 2023
66451cc
Bump github.com/aliyun/aliyun-oss-go-sdk
dependabot[bot] Nov 13, 2023
f36b7e8
Bump github.com/google/uuid from 1.3.1 to 1.4.0
dependabot[bot] Nov 13, 2023
d7a90f6
Bump gorm.io/driver/sqlserver from 1.4.1 to 1.5.2
dependabot[bot] Nov 13, 2023
7f75e20
Bump github.com/shirou/gopsutil/v3 from 3.23.9 to 3.23.10
dependabot[bot] Nov 13, 2023
5578bbb
Bump golang.org/x/text from 0.13.0 to 0.14.0
dependabot[bot] Nov 13, 2023
5a12096
Bump golang.org/x/text from 0.13.0 to 0.14.0 (#60)
xxl4 Nov 15, 2023
fe05dd7
Bump gorm.io/driver/sqlserver from 1.4.1 to 1.5.2 (#58)
xxl4 Nov 15, 2023
3ff3891
Bump github.com/shirou/gopsutil/v3 from 3.23.9 to 3.23.10 (#59)
xxl4 Nov 15, 2023
bb7cd84
Bump github.com/google/uuid from 1.3.1 to 1.4.0 (#57)
xxl4 Nov 15, 2023
510c403
Bump github.com/aliyun/aliyun-oss-go-sdk from 2.2.9+incompatible to 3…
xxl4 Nov 15, 2023
86d7ee8
upgrade README
xxl4 Nov 17, 2023
a75e2a4
add static packaging fun
xxl4 Nov 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: cd ./ui/ && npm install --legacy-peer-deps

- name : npm build
run: cd ./ui/ && npm run build:prod --legacy-peer-deps
run: cd ./ui/ && npm run build:prod:base --legacy-peer-deps

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
Expand All @@ -67,7 +67,7 @@ jobs:
run: go mod tidy

- name: Build
run: CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -a -installsuffix "" -o easy-admin .
run: CGO_ENABLED=0 go build -ldflags="-s -w" -a -installsuffix "" -o easy-admin .

- name: Build the Docker image and push
run: |
Expand All @@ -81,6 +81,7 @@ jobs:
echo "************ docker images end"
docker push ${{ env.IMAGE_NAME_TAG }} # 推送
echo "************ docker push end"


- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
Expand All @@ -100,4 +101,8 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: nicesteven/easy-admin:latest
tags: nicesteven/easy-admin:latest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ all:
# build vue ui
build-ui:
@echo "build node start"
cd ./ui/ && npm run build:prod
cd ./ui/ && npm run build:prod:base

# build go application
build:
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@

# easy-admin

# Easy-Admin
[![Go Reference](https://godoc.org/github.com/nicelizhi/easy-admin?status.svg)](https://godoc.org/github.com/nicelizhi/easy-admin)
[![Build Status](https://github.com/nicelizhi/easy-admin/workflows/Build/badge.svg)](https://github.com/nicelizhi/easy-admin)
[![Release](https://img.shields.io/github/release/nicelizhi/easy-admin.svg?style=flat-square)](https://github.com/nicelizhi/easy-admin/releases)
[![Go Report Card](https://goreportcard.com/badge/github.com/nicelizhi/easy-admin)](https://goreportcard.com/report/github.com/nicelizhi/easy-admin)
[![HitCount](https://views.whatilearened.today/views/github/nicelizhi/easy-admin.svg)](https://github.com/nicelizhi/easy-admin)
[![License](https://img.shields.io/github/license/nicelizhi/easy-admin
)](https://github.com/nicelizhi/easy-admin)
[![Commits](https://img.shields.io/github/commit-activity/m/nicelizhi/easy-admin?color=ffff00)](https://github.com/nicelizhi/easy-admin/commits/main)
[![Docker Pulls](https://img.shields.io/docker/pulls/nicesteven/easy-admin)](https://hub.docker.com/r/nicesteven/easy-admin)


## About Easy-Admin

Expand All @@ -18,11 +20,13 @@ English | [简体中文](https://nicelizhi.github.io/easy-admin/zh/)

>> The front-end and back-end separation authority management system based on Gin + Vue is extremely simple to initialize the system. You only need to modify the database connection in the configuration file. The system supports multi-instruction operations. Migration instructions can make it easier to initialize database information. Service instructions It's easy to start the api service.

## ✨ Feature
## Online demo
- [Vue2 demo](https://easy-admin-ui.vercel.app)
- [Arco demo](https://hello-arco-pro.vercel.app/)( testing now)

- Follow RESTful API design specifications
## Feature

- Based on the GIN WEB API framework, it provides rich middleware support (user authentication, cross-domain, access log, tracking ID, etc.)
- Based on the GIN WEB API framework, it provides rich middleware support (user authentication, cross-domain, access log, tracking ID, Cahce, Zip etc.)

- RBAC access control model based on Casbin

Expand All @@ -44,8 +48,10 @@ English | [简体中文](https://nicelizhi.github.io/easy-admin/zh/)

- TimeZone Support

- Static packaging for vue page


## 🎁 Internal
## Internal

1. User management: The user is the system operator, this function mainly completes the system user configuration.
2. Department management: configure the system organization (company, department, group), and display the tree structure to support data permissions.
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ func initRouter() {
AcceptLanguage: []language.Tag{language.English, language.Chinese},
DefaultLanguage: language.English,
UnmarshalFunc: json.Unmarshal,
FormatBundleFile: "json",
FormatBundleFile: "json", //default json format
})))

// when you will pack vue into go,you should need config it
r.NoRoute(func(ctx *gin.Context) {
accept := ctx.Request.Header.Get("Accept")
flag := strings.Contains(accept, "text/html")
Expand Down
11 changes: 9 additions & 2 deletions common/middleware/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ func Options(c *gin.Context) {
if c.Request.Method != "OPTIONS" {
c.Next()
} else {
c.Header("Access-Control-Allow-Origin", "*")
origin := c.Request.Header.Get("Origin")
c.Header("Access-Control-Allow-Origin", origin)
c.Header("Access-Control-Allow-Methods", "GET,POST,PUT,PATCH,DELETE,OPTIONS")
c.Header("Access-Control-Allow-Headers", "authorization, origin, content-type, accept")
c.Header("Allow", "HEAD,GET,POST,PUT,PATCH,DELETE,OPTIONS")
c.Header("Access-Control-Allow-Credentials", "true")
c.Header("Content-Type", "application/json")
c.AbortWithStatus(200)
}
Expand All @@ -35,7 +37,12 @@ func Options(c *gin.Context) {
// Secure is a middleware function that appends security
// and resource access headers.
func Secure(c *gin.Context) {
c.Header("Access-Control-Allow-Origin", "*")
origin := c.Request.Header.Get("Origin")
c.Header("Access-Control-Allow-Origin", origin)
c.Header("Access-Control-Allow-Methods", "GET,POST,PUT,PATCH,DELETE,OPTIONS")
c.Header("Access-Control-Allow-Headers", "authorization, origin, content-type, accept")
c.Header("Allow", "HEAD,GET,POST,PUT,PATCH,DELETE,OPTIONS")
c.Header("Access-Control-Allow-Credentials", "true")
//c.Header("X-Frame-Options", "DENY")
c.Header("X-Content-Type-Options", "nosniff")
c.Header("X-XSS-Protection", "1; mode=block")
Expand Down
10 changes: 5 additions & 5 deletions config/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ CREATE TABLE `sys_dept` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 0, '/0/1/', '上海申东', 0, '姚老师', '13524084051', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2023-10-21 21:36:42.379', 0),
(7, 1, '/0/1/7/', '研发部', 1, 'aituo', '13782218188', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-16 21:35:00.109', 0),
(8, 1, '/0/1/8/', '运维部', 0, 'aituo', '13782218188', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-16 21:41:39.747', 0),
(9, 1, '/0/1/9/', '客服部', 0, 'aituo', '13782218188', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-05 17:07:05.993', 0),
(10, 1, '/0/1/10/', '人力资源', 3, 'aituo', '13782218188', 'atuo@aituo.com', 1, 1, 1, '2021-05-13 19:56:37.913', '2021-06-05 17:07:08.503', 0),
(1, 0, '/0/1/', '上海公司', 0, '姚老师', '13524084051', 'nice.lizhi@gmail.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2023-10-21 21:36:42.379', 0),
(7, 1, '/0/1/7/', '研发部', 1, 'aituo', '13524084051', 'nice.lizhi@gmail.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-16 21:35:00.109', 0),
(8, 1, '/0/1/8/', '运维部', 0, 'aituo', '13524084051', 'nice.lizhi@gmail.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-16 21:41:39.747', 0),
(9, 1, '/0/1/9/', '客服部', 0, 'aituo', '13524084051', 'nice.lizhi@gmail.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-05 17:07:05.993', 0),
(10, 1, '/0/1/10/', '人力资源', 3, 'aituo', '13524084051', 'nice.lizhi@gmail.com', 1, 1, 1, '2021-05-13 19:56:37.913', '2021-06-05 17:07:08.503', 0),
(11, 10, '/0/1/10/11/', '财务部门', 10, 'admin', '13524084051', '[email protected]', 2, 0, 0, '2023-10-13 20:53:10.408', '2023-10-13 20:53:10.410', 0);

DROP TABLE IF EXISTS `sys_dict_data`;
Expand Down
Loading
Loading