Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/GoAdminGroup/go-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
realPy committed Mar 20, 2021
2 parents 9887e83 + 5c01c53 commit ffa1e55
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_install:
- createdb -U postgres go-admin-test

install:
- wget -N https://chromedriver.storage.googleapis.com/87.0.4280.88/chromedriver_linux64.zip -P ~/
- wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
- unzip ~/chromedriver_linux64.zip -d ~/
- rm ~/chromedriver_linux64.zip
- sudo chmod +x /home/travis/chromedriver
Expand Down
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GOCMD = go
GOBUILD = $(GOCMD) build
BINARY_NAME = adm
LAST_VERSION = v1.2.18
VERSION = v1.2.19
LAST_VERSION = v1.2.21
VERSION = v1.2.22
CLI = adm

TEST_CONFIG_PATH=./../../common/config.json
Expand All @@ -11,6 +11,12 @@ TEST_CONFIG_SQLITE_PATH=./../../common/config_sqlite.json
TEST_CONFIG_MS_PATH=./../../common/config_ms.json
TEST_FRAMEWORK_DIR=./tests/frameworks

## database configs
MYSQL_HOST = 127.0.0.1
MYSQL_PORT = 3306
MYSQL_USER = root
MYSQL_PWD = root

all: test

## tests
Expand Down Expand Up @@ -73,8 +79,8 @@ import-sqlite:
cp ./tests/data/admin.db ./tests/common/admin.db

import-mysql:
mysql -uroot -proot -e "create database if not exists \`go-admin-test\`"
mysql -uroot -proot go-admin-test < ./tests/data/admin.sql
mysql -h$(MYSQL_HOST) -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PWD} -e "create database if not exists \`go-admin-test\`"
mysql -h$(MYSQL_HOST) -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PWD} go-admin-test < ./tests/data/admin.sql

import-postgresql:
dropdb -U postgres go-admin-test
Expand Down Expand Up @@ -148,4 +154,4 @@ cli:
cp ./adm/build/windows/i386/adm_windows_i386_$(VERSION).zip ./adm/build/zip/
cp ./adm/build/mac/adm_darwin_x86_64_$(VERSION).zip ./adm/build/zip/

.PHONY: all fmt golint govet cp-mod restore-mod test black-box-test mysql-test sqlite-test import-sqlite import-mysql import-postgresql pg-test fix-gf lint cilint cli
.PHONY: all fmt golint govet cp-mod restore-mod test black-box-test mysql-test sqlite-test import-sqlite import-mysql import-postgresql pg-test fix-gf lint cilint cli
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ GO111MODULE=on go run main.go

这里是[开发计划](https://github.com/GoAdminGroup/go-admin/projects)

<strong>[点击这里加微信群](http://quick.go-admin.cn/resource/wechat_qrcode.jpg)</strong>
<strong>[点击这里申请加微信群(记得备注加群)](http://quick.go-admin.cn/resource/wechat_qrcode_02.jpg)</strong>

<strong>注:在社区中如有问题提问,请务必清晰描述,包括但不限于问题详叙/问题代码/复现方法/已经尝试过的方法,时间生命可贵,请珍惜自己和别人的时间!</strong>

Expand Down
6 changes: 3 additions & 3 deletions adm/minify.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"sort"
"strings"

"github.com/tdewolff/minify"
"github.com/tdewolff/minify/css"
"github.com/tdewolff/minify/js"
"github.com/tdewolff/minify/v2"
"github.com/tdewolff/minify/v2/css"
"github.com/tdewolff/minify/v2/js"
)

func cssMinifier(inputDir, outputFile string, hash bool) {
Expand Down
2 changes: 2 additions & 0 deletions adm/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ package tables
import "github.com/GoAdminGroup/go-admin/plugins/admin/modules/table"
// Generators is a map of table models.
//
// The key of Generators is the prefix of table info url.
// The corresponding value is the Form and Table data.
//
Expand Down
2 changes: 1 addition & 1 deletion examples/datamodel/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package datamodel

import "github.com/GoAdminGroup/go-admin/plugins/admin/modules/table"

// generators is a map of table models.
// Generators is a map of table models.
//
// The key of generators is the prefix of table info url.
// The corresponding value is the Form and TableName data.
Expand Down
2 changes: 1 addition & 1 deletion modules/system/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package system

const version = "v1.2.19"
const version = "v1.2.22"

var requireThemeVersion = map[string][]string{
"adminlte": {">=v0.0.41"},
Expand Down
2 changes: 1 addition & 1 deletion plugins/admin/modules/table/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func (tb *DefaultTable) getDataFromDatabase(params parameter.Parameters) (PanelI
// %s means: fields, table, join table, wheres, group by, order by field, order by type
queryStatement = "select %s from " + placeholder + "%s %s %s order by " + placeholder + "." + placeholder + " %s LIMIT ? OFFSET ?"
// %s means: table, join table, wheres
countStatement = "select count(*) from (select count(*) from " + placeholder + " %s %s %s) src"
countStatement = "select count(*) from (select " + pk + " from " + placeholder + " %s %s %s) src"
}
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func ExecuteWithMenu(ctx *context.Context,
Tmpl: tmpl,
Panel: panel,
Config: *config.Get(),
Menu: menu.GetGlobalMenu(user, conn, name).SetActiveClass(config.URLRemovePrefix(ctx.Path())),
Menu: menu.GetGlobalMenu(user, conn, ctx.Lang(), name).SetActiveClass(config.URLRemovePrefix(ctx.Path())),
Animation: options.Animation,
Buttons: navButtons.Copy().
RemoveInfoNavButton().
Expand Down

0 comments on commit ffa1e55

Please sign in to comment.