Browse Source

迁移代码

tags/28bc364460
linfengjun 1 month ago
commit
0c44a5ba2e
100 changed files with 12529 additions and 0 deletions
  1. +395
    -0
      .drone.yml
  2. +9
    -0
      .github/PULL_REQUEST_TEMPLATE.md
  3. +69
    -0
      .golangci.yaml
  4. +0
    -0
      LICENSE
  5. +293
    -0
      Makefile
  6. +14
    -0
      admin-portal/.editorconfig
  7. +6
    -0
      admin-portal/.env.development
  8. +6
    -0
      admin-portal/.env.production
  9. +8
    -0
      admin-portal/.env.staging
  10. +4
    -0
      admin-portal/.eslintignore
  11. +198
    -0
      admin-portal/.eslintrc.js
  12. +16
    -0
      admin-portal/.gitignore
  13. +3
    -0
      admin-portal/.npmrc
  14. +5
    -0
      admin-portal/.travis.yml
  15. +21
    -0
      admin-portal/LICENSE
  16. +102
    -0
      admin-portal/README-zh.md
  17. +90
    -0
      admin-portal/README.md
  18. +14
    -0
      admin-portal/babel.config.js
  19. +35
    -0
      admin-portal/build/index.js
  20. +994
    -0
      admin-portal/element-variables.scss
  21. +24
    -0
      admin-portal/jest.config.js
  22. +9
    -0
      admin-portal/jsconfig.json
  23. +70
    -0
      admin-portal/package.json
  24. +8
    -0
      admin-portal/postcss.config.js
  25. +17
    -0
      admin-portal/public/index.html
  26. BIN
      admin-portal/public/logo.png
  27. +11
    -0
      admin-portal/src/App.vue
  28. +132
    -0
      admin-portal/src/api/dataManager.js
  29. +7
    -0
      admin-portal/src/api/globalVariable.js
  30. +67
    -0
      admin-portal/src/api/imageManager.js
  31. +34
    -0
      admin-portal/src/api/machineManager.js
  32. +139
    -0
      admin-portal/src/api/modelDev.js
  33. +86
    -0
      admin-portal/src/api/modelManager.js
  34. +101
    -0
      admin-portal/src/api/resourceManager.js
  35. +9
    -0
      admin-portal/src/api/table.js
  36. +39
    -0
      admin-portal/src/api/trainingManager.js
  37. +24
    -0
      admin-portal/src/api/user.js
  38. +93
    -0
      admin-portal/src/api/userManager.js
  39. BIN
      admin-portal/src/assets/404_images/404.png
  40. BIN
      admin-portal/src/assets/404_images/404_cloud.png
  41. +1985
    -0
      admin-portal/src/assets/adminPic.svg
  42. +1
    -0
      admin-portal/src/assets/background.svg
  43. +1
    -0
      admin-portal/src/assets/logo-w.svg
  44. BIN
      admin-portal/src/assets/logo.png
  45. +1
    -0
      admin-portal/src/assets/logo.svg
  46. +1
    -0
      admin-portal/src/assets/logoCollapse.svg
  47. +78
    -0
      admin-portal/src/components/Breadcrumb/index.vue
  48. +45
    -0
      admin-portal/src/components/Hamburger/index.vue
  49. +62
    -0
      admin-portal/src/components/SvgIcon/index.vue
  50. +81
    -0
      admin-portal/src/components/search/index.vue
  51. +414
    -0
      admin-portal/src/components/upload/index.vue
  52. +176
    -0
      admin-portal/src/error/index.js
  53. +9
    -0
      admin-portal/src/icons/index.js
  54. +249
    -0
      admin-portal/src/icons/svg/Caffe.svg
  55. +236
    -0
      admin-portal/src/icons/svg/Caffe2.svg
  56. +81
    -0
      admin-portal/src/icons/svg/Cntk.svg
  57. +1890
    -0
      admin-portal/src/icons/svg/M.svg
  58. +248
    -0
      admin-portal/src/icons/svg/Mxnet.svg
  59. +124
    -0
      admin-portal/src/icons/svg/Onnx.svg
  60. +146
    -0
      admin-portal/src/icons/svg/Paddle.svg
  61. +233
    -0
      admin-portal/src/icons/svg/Pytorch.svg
  62. +242
    -0
      admin-portal/src/icons/svg/TensorFlow.svg
  63. +1
    -0
      admin-portal/src/icons/svg/dashboard.svg
  64. +1
    -0
      admin-portal/src/icons/svg/data.svg
  65. +1
    -0
      admin-portal/src/icons/svg/dot.svg
  66. +1
    -0
      admin-portal/src/icons/svg/example.svg
  67. +1
    -0
      admin-portal/src/icons/svg/eye-open.svg
  68. +1
    -0
      admin-portal/src/icons/svg/eye.svg
  69. +1
    -0
      admin-portal/src/icons/svg/form.svg
  70. +219
    -0
      admin-portal/src/icons/svg/home.svg
  71. +1
    -0
      admin-portal/src/icons/svg/image.svg
  72. +507
    -0
      admin-portal/src/icons/svg/leftPic.svg
  73. +1
    -0
      admin-portal/src/icons/svg/link.svg
  74. +1
    -0
      admin-portal/src/icons/svg/model.svg
  75. +1
    -0
      admin-portal/src/icons/svg/model2.svg
  76. +1
    -0
      admin-portal/src/icons/svg/monitor.svg
  77. +1
    -0
      admin-portal/src/icons/svg/nested.svg
  78. +1
    -0
      admin-portal/src/icons/svg/password.svg
  79. +1
    -0
      admin-portal/src/icons/svg/resource.svg
  80. +1360
    -0
      admin-portal/src/icons/svg/rightPic.svg
  81. +1
    -0
      admin-portal/src/icons/svg/table.svg
  82. +1
    -0
      admin-portal/src/icons/svg/time.svg
  83. +1
    -0
      admin-portal/src/icons/svg/training.svg
  84. +1
    -0
      admin-portal/src/icons/svg/tree.svg
  85. +1
    -0
      admin-portal/src/icons/svg/user.svg
  86. +22
    -0
      admin-portal/src/icons/svgo.yml
  87. +42
    -0
      admin-portal/src/layout/components/AppMain.vue
  88. +118
    -0
      admin-portal/src/layout/components/Navbar.vue
  89. +26
    -0
      admin-portal/src/layout/components/Sidebar/FixiOSBug.js
  90. +41
    -0
      admin-portal/src/layout/components/Sidebar/Item.vue
  91. +43
    -0
      admin-portal/src/layout/components/Sidebar/Link.vue
  92. +82
    -0
      admin-portal/src/layout/components/Sidebar/Logo.vue
  93. +95
    -0
      admin-portal/src/layout/components/Sidebar/SidebarItem.vue
  94. +54
    -0
      admin-portal/src/layout/components/Sidebar/index.vue
  95. +3
    -0
      admin-portal/src/layout/components/index.js
  96. +92
    -0
      admin-portal/src/layout/index.vue
  97. +44
    -0
      admin-portal/src/layout/mixin/ResizeHandler.js
  98. +43
    -0
      admin-portal/src/main.js
  99. +45
    -0
      admin-portal/src/permission.js
  100. +218
    -0
      admin-portal/src/router/index.js

+ 395
- 0
.drone.yml View File

@@ -0,0 +1,395 @@
---
kind: pipeline
name: linter
platform:
os: linux
arch: amd64
trigger:
branch:
- master
- dev
event:
- push
steps:
- name: 代码检查
image: golangci/golangci-lint:v1.40.1
environment:
GO111MODULE: on
GOPROXY: https://goproxy.cn,direct
commands:
- make lint

---
kind: pipeline
name: base-server
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
# - name: 代码检查
# image: golangci/golangci-lint:v1.40.1
# environment:
# GO111MODULE: on
# GOPROXY: https://goproxy.cn,direct
# commands:
# - make base-server_lint

- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make base-server_image tag=${DRONE_TAG}

- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make base-server_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

---
kind: pipeline
name: admin-server
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
# - name: 代码检查
# image: golangci/golangci-lint:v1.40.1
# environment:
# GO111MODULE: on
# GOPROXY: https://goproxy.cn,direct
# commands:
# - make admin-server_lint

- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make admin-server_image tag=${DRONE_TAG}

- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make admin-server_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

---
kind: pipeline
name: openai-server
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
# - name: 代码检查
# image: golangci/golangci-lint:v1.40.1
# environment:
# GO111MODULE: on
# GOPROXY: https://goproxy.cn,direct
# commands:
# - make openai-server_lint

- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make openai-server_image tag=${DRONE_TAG}

- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make openai-server_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

---
kind: pipeline
name: taskset/pipeline
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
# - name: 代码检查
# image: golangci/golangci-lint:v1.40.1
# environment:
# GO111MODULE: on
# GOPROXY: https://goproxy.cn,direct
# commands:
# - make taskset_lint

- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make pipeline_image tag=${DRONE_TAG}

- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make pipeline_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

---
kind: pipeline
name: taskset/vc-controller
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
# - name: 代码检查
# image: golangci/golangci-lint:v1.40.1
# environment:
# GO111MODULE: on
# GOPROXY: https://goproxy.cn,direct
# commands:
# - make taskset_lint

- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make vc-controller_image tag=${DRONE_TAG}

- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make vc-controller_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

---
kind: pipeline
name: taskset/scheduler
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
# - name: 代码检查
# image: golangci/golangci-lint:v1.40.1
# environment:
# GO111MODULE: on
# GOPROXY: https://goproxy.cn,direct
# commands:
# - make taskset_lint

- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make scheduler_image tag=${DRONE_TAG}

- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make scheduler_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

---
kind: pipeline
name: charts
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: dockeretc
host:
path: /etc/docker
steps:
- name: Chart构建
image: 192.168.202.110:5000/common_mirror/helm:3.5.4-make
volumes:
- name: dockeretc
path: /etc/docker
environment:
HARBOR_HUB_HOST:
from_secret: harbor_hub_host
HARBOR_HUB_USERNAME:
from_secret: harbor_hub_userame
HARBOR_HUB_PASSWD:
from_secret: harbor_hub_passwd
HARBOR_HUB_CA_FILE:
from_secret: harbor_hub_ca_file
HARBOR_HUB_CERT_FILE:
from_secret: harbor_hub_cert_file
commands:
- make charts tag=${DRONE_TAG} harbor_hub_project=${DRONE_REPO_NAME} harbor_hub_host=$HARBOR_HUB_HOST harbor_hub_userame=$HARBOR_HUB_USERNAME harbor_hub_passwd=$HARBOR_HUB_PASSWD harbor_hub_ca_file=$HARBOR_HUB_CA_FILE HARBOR_HUB_CERT_FILE=$HARBOR_HUB_CERT_FILE

---
kind: pipeline
name: admin-portal
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make admin-portal_image tag=${DRONE_TAG}
- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make admin-portal_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

---
kind: pipeline
name: openai-portal
platform:
os: linux
arch: amd64
trigger:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
steps:
- name: 构建镜像
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- make openai-portal_image tag=${DRONE_TAG}
- name: 镜像推送
image: 192.168.202.110:5000/common_mirror/docker:20.10.6-make
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_HUB_HOST:
from_secret: docker_hub_host
DOCKER_HUB_USERNAME:
from_secret: docker_hub_userame
DOCKER_HUB_PASSWD:
from_secret: docker_hub_passwd
commands:
- make openai-portal_image_push need_latest=FALSE tag=${DRONE_TAG} docker_hub_project=${DRONE_REPO_NAME} docker_hub_host=$DOCKER_HUB_HOST docker_hub_userame=$DOCKER_HUB_USERNAME docker_hub_passwd=$DOCKER_HUB_PASSWD

+ 9
- 0
.github/PULL_REQUEST_TEMPLATE.md View File

@@ -0,0 +1,9 @@
Describe what this PR does / why we need it

Does this pull request fix one issue?

Describe how you did it.

Describe how to verify it.

Special notes for reviews.

+ 69
- 0
.golangci.yaml View File

@@ -0,0 +1,69 @@
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
# 打印行号
print-issued-lines: true
# 打印检查器的名称
print-linter-name: true

linters:
# 关闭其他linter
disable-all: true
enable:
- deadcode # 死代码检查
- errcheck # 返回错误是否使用检查
- gofmt # go格式化工具
- goimports # 检查没使用的imports
- gosimple # 检查代码是否可以简化
- govet # 代码可疑检查,比如格式化字符串和类型不一致
- ineffassign # 检查是否有未使用的代码
- ineffassign # 检查无效赋值
- structcheck # 查找未使用的结构体字段
- unconvert # 去掉不必要的类型转换
- unparam # 报告没使用的函数入参
- varcheck # 未使用的全局变量和常量检查
- unused # 未使用代码检查
- gosimple # 简化代码工具
- govet # 检查Go 代码正确性的工具
- lll # 每行代码长度检查,不超过150字符
- typecheck # 类型检查
#- revive # 不同于fmt,主要检查代码风格问题
#- misspell # 拼写检查,防止线上出现拼写出错导致的bug
#- gomnd # 检测幻数的工具

# linter配置
linters-settings:
# 检查函数的圈复杂
gocyclo:
# 最小复杂性
min-complexity: 35
gocognit:
# 最小复杂性
min-complexity: 35
maligned:
# 为内存对齐优化给出新的结构体字段排序建议
suggest-new: true
# 自动修复
auto-fix: true
# 检查代码长度
lll:
line-length: 180
tab-width: 4

run:
# 要使用的CPU核心数
concurrency: 4
# 分析超时
timeout: 5m
# 是否包含测试文件
tests: true
# 要跳过检查的目录
skip-dirs:
- third_party
- taskset
- harbor
# 跳过文件
skip-files:
- go.mod
- go.sum

+ 0
- 0
LICENSE View File


+ 293
- 0
Makefile View File

@@ -0,0 +1,293 @@
#外部参数
SERVER_BINARY_DIR=$(binary_dir)
ifeq (${SERVER_BINARY_DIR}, )
SERVER_BINARY_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/server/bin
endif

RELEASE_VER=$(tag)
ifeq (${RELEASE_VER}, )
RELEASE_VER=latest
endif

DOCKER_HUB_HOST=$(docker_hub_host)
DOCKER_HUB_USERNAME=$(docker_hub_userame)
DOCKER_HUB_PASSWD=$(docker_hub_passwd)
DOCKER_HUB_PROJECT=$(docker_hub_project)

HARBOR_HUB_HOST=$(harbor_hub_host)
HARBOR_HUB_USERNAME=$(harbor_hub_userame)
HARBOR_HUB_PASSWD=$(harbor_hub_passwd)
HARBOR_HUB_PROJECT=$(harbor_hub_project)
HARBOR_HUB_CA_FILE=$(harbor_hub_ca_file)
HARBOR_HUB_CERT_FILE=$(harbor_hub_cert_file)

NEED_LATEST=$(need_latest)

# 静态变量
Date=`date "+%Y-%m-%d %H:%M:%S"`
LD_FLAGS=" \
-X 'main.Built=${Date}' \
-X 'main.Version=${RELEASE_VER}'"

# 编译
all_build: server_build

server_build: base-server_build admin-server_build openai-server_build taskset_build

init:
mkdir -p ${SERVER_BINARY_DIR}

base-server_build: init
cd ./server && go generate

cd ./server/base-server && go build -ldflags ${LD_FLAGS} -o ${SERVER_BINARY_DIR} ./...

admin-server_build: init
cd ./server && go generate

cd ./server/admin-server && go build -ldflags ${LD_FLAGS} -o ${SERVER_BINARY_DIR} ./...

openai-server_build: init
cd ./server && go generate

cd ./server/openai-server && go build -ldflags ${LD_FLAGS} -o ${SERVER_BINARY_DIR} ./...

taskset_build: pipeline_build vc-controller_build scheduler_build

pipeline_build: init
cd ./server/taskset && go build -ldflags ${LD_FLAGS} -o ${SERVER_BINARY_DIR} ./main/pipeline

vc-controller_build: init
cd ./server/taskset && go build -ldflags ${LD_FLAGS} -o ${SERVER_BINARY_DIR} ./main/vc-controller

scheduler_build: init
cd ./server/taskset && go build -ldflags ${LD_FLAGS} -o ${SERVER_BINARY_DIR} ./main/scheduler

# 运行
all_run: server_run

server_run: base-server_run admin-server_run openai-server_run taskset_run

base-server_run:
cd server && ./bin/base-server -conf base-server/configs &

admin-server_run:
cd server && ./bin/admin-server -conf admin-server/configs &

openai-server_run:
cd server && ./bin/openai-server -conf openai-server/configs &

taskset_run: pipeline_run vc-controller_run scheduler_run

pipeline_run:
cd server && ./bin/pipeline &

vc-controller_run:
cd server && ./bin/vc-controller &

scheduler_run:
cd server && ./bin/scheduler &

# 停止
all_stop: server_stop

server_stop: base-server_stop admin-server_stop openai-server_stop taskset_stop

base-server_stop:
kill -9 `ps -ef|grep "base-server" |grep -v grep |awk '{print $2}'`

admin-server_stop:
kill -9 `ps -ef|grep "admin-server" |grep -v grep |awk '{print $2}'`

openai-server_stop:
kill -9 `ps -ef|grep "openai-server" |grep -v grep |awk '{print $2}'`

taskset_stop: pipeline_stop vc-controller_stop scheduler_stop

pipeline_stop:
kill -9 `ps -ef|grep "pipeline" |grep -v grep |awk '{print $2}'`

vc-controller_stop:
kill -9 `ps -ef|grep "vc-controller" |grep -v grep |awk '{print $2}'`

scheduler_stop:
kill -9 `ps -ef|grep "scheduler" |grep -v grep |awk '{print $2}'`

# 重启
all_stop: server_restart

server_restart: base-server_restart admin-server_restart openai-server_restart taskset_restart

base-server_restart: base-server_stop server_run

admin-server_restart: admin-server_stop admin-server_run

openai-server_restart: openai-server_stop openai-server_run

taskset_restart: pipeline_restart vc-controller_restart scheduler_restart

pipeline_restart: pipeline_stop pipeline_run

vc-controller_restart: vc-controller_stop vc-controller_run

scheduler_restart: scheduler_stop scheduler_run

# 代码检查
lint_init:
golangci-lint version

lint: lint_init
cd ./server && golangci-lint run ./...

common_lint: lint_init
cd ./server/common && golangci-lint run ./...

base-server_lint: lint_init
cd ./server/base-server && golangci-lint run ./...

admin-server_lint: lint_init
cd ./server/admin-server && golangci-lint run ./...

openai-server_lint: lint_init
cd ./server/openai-server && golangci-lint run ./...

taskset_lint: lint_init
cd ./server/taskset && golangci-lint run ./...
# 构建镜像
images: base-server_image admin-server_image openai-server_image taskset_image admin-portal_image openai-portal_image

base-server_image:
docker build --no-cache -t base-server:${RELEASE_VER} -f ./build/application/base-server/dockerfile .

admin-server_image:
docker build --no-cache -t admin-server:${RELEASE_VER} -f ./build/application/admin-server/dockerfile .

openai-server_image:
docker build --no-cache -t openai-server:${RELEASE_VER} -f ./build/application/openai-server/dockerfile .

taskset_image: pipeline_image vc-controller_image scheduler_image

pipeline_image:
docker build --no-cache -t pipeline:${RELEASE_VER} -f ./build/application/taskset/pipeline/dockerfile .

vc-controller_image:
docker build --no-cache -t vc-controller:${RELEASE_VER} -f ./build/application/taskset/vc-controller/dockerfile .

scheduler_image:
docker build --no-cache -t scheduler:${RELEASE_VER} -f ./build/application/taskset/scheduler/dockerfile .

admin-portal_image:
docker build --no-cache -t admin-portal:${RELEASE_VER} -f ./build/application/admin-portal/dockerfile .

openai-portal_image:
docker build --no-cache -t openai-portal:${RELEASE_VER} -f ./build/application/openai-portal/dockerfile .

# 镜像推送
images_push: base-server_image_push admin-server_image_push openai-server_image_push taskset_image_push admin-portal_image_push openai-portal_image_push

image_push_init:
(echo ${DOCKER_HUB_PASSWD} | docker login ${DOCKER_HUB_HOST} -u ${DOCKER_HUB_USERNAME} --password-stdin) 1>/dev/null 2>&1

base-server_image_push: image_push_init
docker tag base-server:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/base-server:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/base-server:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag base-server:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/base-server:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/base-server:latest
endif
endif


admin-server_image_push: image_push_init
docker tag admin-server:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-server:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-server:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag admin-server:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-server:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-server:latest
endif
endif

openai-server_image_push: image_push_init
docker tag openai-server:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-server:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-server:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag openai-server:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-server:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-server:latest
endif
endif

taskset_image_push: pipeline_image_push vc-controller_image_push scheduler_image_push

pipeline_image_push: image_push_init
docker tag pipeline:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/pipeline:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/pipeline:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag pipeline:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/pipeline:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/pipeline:latest
endif
endif

vc-controller_image_push: image_push_init
docker tag vc-controller:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/vc-controller:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/vc-controller:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag vc-controller:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/vc-controller:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/vc-controller:latest
endif
endif

scheduler_image_push: image_push_init
docker tag scheduler:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/scheduler:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/scheduler:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag scheduler:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/scheduler:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/scheduler:latest
endif
endif

admin-portal_image_push: image_push_init
docker tag admin-portal:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-portal:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-portal:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag admin-portal:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-portal:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/admin-portal:latest
endif
endif

openai-portal_image_push: image_push_init
docker tag openai-portal:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-portal:${RELEASE_VER}
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-portal:${RELEASE_VER}

ifneq (${RELEASE_VER}, latest)
ifeq (${NEED_LATEST}, TRUE)
docker tag openai-portal:${RELEASE_VER} ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-portal:latest
docker push ${DOCKER_HUB_HOST}/${DOCKER_HUB_PROJECT}/openai-portal:latest
endif
endif


# helm chart
charts: charts_build charts_push

charts_build:
-mkdir -p ./tmp/charts
helm package ./deploy/charts/octopus --dependency-update --version ${RELEASE_VER} --app-version ${RELEASE_VER} -d ./tmp/charts

charts_push:
-helm repo add --ca-file=${HARBOR_HUB_CA_FILE} --cert-file=${HARBOR_HUB_CERT_FILE} --username=${HARBOR_HUB_USERNAME} --password=${HARBOR_HUB_PASSWD} chartrepo ${HARBOR_HUB_HOST}/chartrepo/${HARBOR_HUB_PROJECT}
helm push --ca-file=${HARBOR_HUB_CA_FILE} --cert-file=${HARBOR_HUB_CERT_FILE} --username=${HARBOR_HUB_USERNAME} --password=${HARBOR_HUB_PASSWD} ./tmp/charts/octopus-${RELEASE_VER}.tgz chartrepo

+ 14
- 0
admin-portal/.editorconfig View File

@@ -0,0 +1,14 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

+ 6
- 0
admin-portal/.env.development View File

@@ -0,0 +1,6 @@
# just a flag
ENV = 'development'

# base api
VUE_APP_BASE_API = '/adminserver'
VUE_APP_BASE_API2 = ''

+ 6
- 0
admin-portal/.env.production View File

@@ -0,0 +1,6 @@
# just a flag
ENV = 'production'

# base api
VUE_APP_BASE_API = '/adminserver'
VUE_APP_BASE_API2 = ''

+ 8
- 0
admin-portal/.env.staging View File

@@ -0,0 +1,8 @@
NODE_ENV = production

# just a flag
ENV = 'staging'

# base api
VUE_APP_BASE_API = '/adminserver'
VUE_APP_BASE_API2 = ''

+ 4
- 0
admin-portal/.eslintignore View File

@@ -0,0 +1,4 @@
build/*.js
src/assets
public
dist

+ 198
- 0
admin-portal/.eslintrc.js View File

@@ -0,0 +1,198 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],

// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off",
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}

+ 16
- 0
admin-portal/.gitignore View File

@@ -0,0 +1,16 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
tests/**/coverage/

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

+ 3
- 0
admin-portal/.npmrc View File

@@ -0,0 +1,3 @@
phantomjs_cdnurl=http://cnpmjs.org/downloads
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
registry=https://registry.npm.taobao.org

+ 5
- 0
admin-portal/.travis.yml View File

@@ -0,0 +1,5 @@
language: node_js
node_js: 10
script: npm run test
notifications:
email: false

+ 21
- 0
admin-portal/LICENSE View File

@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017-present PanJiaChen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

+ 102
- 0
admin-portal/README-zh.md View File

@@ -0,0 +1,102 @@
# vue-admin-template

> 这是一个极简的启智章鱼平台。它只包含了 Element UI & axios & iconfont & permission control & lint,这些搭建后台必要的东西。

[线上地址](http://panjiachen.github.io/vue-admin-template)

[国内访问](https://panjiachen.gitee.io/vue-admin-template)

目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0),它不依赖 `vue-cli`。

## Extra

如果你想要根据用户角色来动态生成侧边栏和 router,你可以使用该分支[permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)

## 相关项目

- [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)

- [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)

- [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)

- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)

写了一个系列的教程配套文章,如何从零构建后一个完整的后台项目:

- [手摸手,带你用 vue 撸后台 系列一(基础篇)](https://juejin.im/post/59097cd7a22b9d0065fb61d2)
- [手摸手,带你用 vue 撸后台 系列二(登录权限篇)](https://juejin.im/post/591aa14f570c35006961acac)
- [手摸手,带你用 vue 撸后台 系列三 (实战篇)](https://juejin.im/post/593121aa0ce4630057f70d35)
- [手摸手,带你用 vue 撸后台 系列四(vueAdmin 一个极简的后台基础模板,专门针对本项目的文章,算作是一篇文档)](https://juejin.im/post/595b4d776fb9a06bbe7dba56)
- [手摸手,带你封装一个 vue component](https://segmentfault.com/a/1190000009090836)

## Build Setup

```bash
# 克隆项目
git clone https://github.com/PanJiaChen/vue-admin-template.git

# 进入项目目录
cd vue-admin-template

# 安装依赖
npm install

# 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org

# 启动服务
npm run dev
```

浏览器访问 [http://localhost:9528](http://localhost:9528)

## 发布

```bash
# 构建测试环境
npm run build:stage

# 构建生产环境
npm run build:prod
```

## 其它

```bash
# 预览发布环境效果
npm run preview

# 预览发布环境效果 + 静态资源分析
npm run preview -- --report

# 代码格式检查
npm run lint

# 代码格式检查并自动修复
npm run lint -- --fix
```

更多信息请参考 [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/)

## 购买贴纸

你也可以通过 购买[官方授权的贴纸](https://smallsticker.com/product/vue-element-admin) 的方式来支持 vue-element-admin - 每售出一张贴纸,我们将获得 2 元的捐赠。

## Demo

![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif)

## Browsers support

Modern browsers and Internet Explorer 10+.

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions

## License

[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.

Copyright (c) 2017-present PanJiaChen

+ 90
- 0
admin-portal/README.md View File

@@ -0,0 +1,90 @@
# vue-admin-template

English | [简体中文](./README-zh.md)

> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint

**Live demo:** http://panjiachen.github.io/vue-admin-template


**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0), it does not rely on `vue-cli`**

## Build Setup

```bash
# clone the project
git clone https://github.com/PanJiaChen/vue-admin-template.git

# enter the project directory
cd vue-admin-template

# install dependency
npm install

# develop
npm run dev
```

This will automatically open http://localhost:9528

## Build

```bash
# build for test environment
npm run build:stage

# build for production environment
npm run build:prod
```

## Advanced

```bash
# preview the release environment effect
npm run preview

# preview the release environment effect + static resource analysis
npm run preview -- --report

# code format check
npm run lint

# code format check and auto fix
npm run lint -- --fix
```

Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information

## Demo

![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif)

## Extra

If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)

For `typescript` version, you can use [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))

## Related Project

- [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)

- [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)

- [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)

- [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)

## Browsers support

Modern browsers and Internet Explorer 10+.

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions

## License

[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.

Copyright (c) 2017-present PanJiaChen

+ 14
- 0
admin-portal/babel.config.js View File

@@ -0,0 +1,14 @@
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
],
'env': {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
// https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
'plugins': ['dynamic-import-node']
}
}
}

+ 35
- 0
admin-portal/build/index.js View File

@@ -0,0 +1,35 @@
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')

if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')

run(`vue-cli-service build ${args}`)

const port = 9526
const publicPath = config.publicPath

var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()

app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)

app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}

})
} else {
run(`vue-cli-service build ${args}`)
}

+ 994
- 0
admin-portal/element-variables.scss View File

@@ -0,0 +1,994 @@
/* Element Chalk Variables */

// Special comment for theme configurator
// type|skipAutoTranslation|Category|Order
// skipAutoTranslation 1

/* Transition
-------------------------- */
$--all-transition: all .3s cubic-bezier(.645,.045,.355,1) !default;
$--fade-transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
$--fade-linear-transition: opacity 200ms linear !default;
$--md-fade-transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
$--border-transition-base: border-color .2s cubic-bezier(.645,.045,.355,1) !default;
$--color-transition-base: color .2s cubic-bezier(.645,.045,.355,1) !default;

/* Color
-------------------------- */
/// color|1|Brand Color|0
$--color-primary:#409EFF !default;
/// color|1|Background Color|4
$--color-white: #cccccc !default;
/// color|1|Background Color|4
$--color-black: #000000 !default;
$--color-primary-light-1: mix($--color-white, $--color-primary, 10%) !default; /* 53a8ff */
$--color-primary-light-2: mix($--color-white, $--color-primary, 20%) !default; /* 66b1ff */
$--color-primary-light-3: mix($--color-white, $--color-primary, 30%) !default; /* 79bbff */
$--color-primary-light-4: mix($--color-white, $--color-primary, 40%) !default; /* 8cc5ff */
$--color-primary-light-5: mix($--color-white, $--color-primary, 50%) !default; /* a0cfff */
$--color-primary-light-6: mix($--color-white, $--color-primary, 60%) !default; /* b3d8ff */
$--color-primary-light-7: mix($--color-white, $--color-primary, 70%) !default; /* c6e2ff */
$--color-primary-light-8: mix($--color-white, $--color-primary, 80%) !default; /* d9ecff */
$--color-primary-light-9: mix($--color-white, $--color-primary, 90%) !default; /* ecf5ff */
/// color|1|Functional Color|1
$--color-success: #67C23A !default;
/// color|1|Functional Color|1
$--color-warning: #E6A23C !default;
/// color|1|Functional Color|1
$--color-danger: #F56C6C !default;
/// color|1|Functional Color|1
$--color-info: #909399 !default;

$--color-success-light: mix($--color-white, $--color-success, 80%) !default;
$--color-warning-light: mix($--color-white, $--color-warning, 80%) !default;
$--color-danger-light: mix($--color-white, $--color-danger, 80%) !default;
$--color-info-light: mix($--color-white, $--color-info, 80%) !default;

$--color-success-lighter: mix($--color-white, $--color-success, 90%) !default;
$--color-warning-lighter: mix($--color-white, $--color-warning, 90%) !default;
$--color-danger-lighter: mix($--color-white, $--color-danger, 90%) !default;
$--color-info-lighter: mix($--color-white, $--color-info, 90%) !default;
/// color|1|Font Color|2
$--color-text-primary: #909399 !default;
/// color|1|Font Color|2
$--color-text-regular: #606266 !default;
/// color|1|Font Color|2
$--color-text-secondary: #909399 !default;
/// color|1|Font Color|2
$--color-text-placeholder: #C0C4CC !default;
/// color|1|Border Color|3
$--border-color-base: #DCDFE6 !default;
/// color|1|Border Color|3
$--border-color-light: #E4E7ED !default;
/// color|1|Border Color|3
$--border-color-lighter: #EBEEF5 !default;
/// color|1|Border Color|3
$--border-color-extra-light: #F2F6FC !default;

// Background
/// color|1|Background Color|4
$--background-color-base: #F5F7FA !default;

/* Link
-------------------------- */
$--link-color: $--color-primary-light-2 !default;
$--link-hover-color: $--color-primary !default;

/* Border
-------------------------- */
$--border-width-base: 1px !default;
$--border-style-base: solid !default;
$--border-color-hover: $--color-text-placeholder !default;
$--border-base: $--border-width-base $--border-style-base $--border-color-base !default;
/// borderRadius|1|Radius|0
$--border-radius-base: 4px !default;
/// borderRadius|1|Radius|0
$--border-radius-small: 2px !default;
/// borderRadius|1|Radius|0
$--border-radius-circle: 100% !default;
/// borderRadius|1|Radius|0
$--border-radius-zero: 0 !default;

// Box-shadow
/// boxShadow|1|Shadow|1
$--box-shadow-base: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04) !default;
// boxShadow|1|Shadow|1
$--box-shadow-dark: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .12) !default;
/// boxShadow|1|Shadow|1
$--box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !default;

/* Fill
-------------------------- */
$--fill-base: $--color-white !default;

/* Typography
-------------------------- */
$--font-path: 'fonts' !default;
$--font-display: 'auto' !default;
/// fontSize|1|Font Size|0
$--font-size-extra-large: 20px !default;
/// fontSize|1|Font Size|0
$--font-size-large: 18px !default;
/// fontSize|1|Font Size|0
$--font-size-medium: 16px !default;
/// fontSize|1|Font Size|0
$--font-size-base: 14px !default;
/// fontSize|1|Font Size|0
$--font-size-small: 13px !default;
/// fontSize|1|Font Size|0
$--font-size-extra-small: 12px !default;
/// fontWeight|1|Font Weight|1
$--font-weight-primary: 500 !default;
/// fontWeight|1|Font Weight|1
$--font-weight-secondary: 100 !default;
/// fontLineHeight|1|Line Height|2
$--font-line-height-primary: 24px !default;
/// fontLineHeight|1|Line Height|2
$--font-line-height-secondary: 16px !default;
$--font-color-disabled-base: #bbb !default;
/* Size
-------------------------- */
$--size-base: 14px !default;

/* z-index
-------------------------- */
$--index-normal: 1 !default;
$--index-top: 1000 !default;
$--index-popper: 2000 !default;

/* Disable base
-------------------------- */
$--disabled-fill-base: $--background-color-base !default;
$--disabled-color-base: $--color-text-placeholder !default;
$--disabled-border-base: $--border-color-light !default;

/* Icon
-------------------------- */
$--icon-color: #666 !default;
$--icon-color-base: $--color-info !default;

/* Checkbox
-------------------------- */
/// fontSize||Font|1
$--checkbox-font-size: 14px !default;
/// fontWeight||Font|1
$--checkbox-font-weight: $--font-weight-primary !default;
/// color||Color|0
$--checkbox-font-color: $--color-text-regular !default;
$--checkbox-input-height: 14px !default;
$--checkbox-input-width: 14px !default;
/// borderRadius||Border|2
$--checkbox-border-radius: $--border-radius-small !default;
/// color||Color|0
$--checkbox-background-color: $--color-white !default;
$--checkbox-input-border: $--border-base !default;

/// color||Color|0
$--checkbox-disabled-border-color: $--border-color-base !default;
$--checkbox-disabled-input-fill: #edf2fc !default;
$--checkbox-disabled-icon-color: $--color-text-placeholder !default;

$--checkbox-disabled-checked-input-fill: $--border-color-extra-light !default;
$--checkbox-disabled-checked-input-border-color: $--border-color-base !default;
$--checkbox-disabled-checked-icon-color: $--color-text-placeholder !default;

/// color||Color|0
$--checkbox-checked-font-color: $--color-primary !default;
$--checkbox-checked-input-border-color: $--color-primary !default;
/// color||Color|0
$--checkbox-checked-background-color: $--color-primary !default;
$--checkbox-checked-icon-color: $--fill-base !default;

$--checkbox-input-border-color-hover: $--color-primary !default;
/// height||Other|4
$--checkbox-bordered-height: 40px !default;
/// padding||Spacing|3
$--checkbox-bordered-padding: 9px 20px 9px 10px !default;
/// padding||Spacing|3
$--checkbox-bordered-medium-padding: 7px 20px 7px 10px !default;
/// padding||Spacing|3
$--checkbox-bordered-small-padding: 5px 15px 5px 10px !default;
/// padding||Spacing|3
$--checkbox-bordered-mini-padding: 3px 15px 3px 10px !default;
$--checkbox-bordered-medium-input-height: 14px !default;
$--checkbox-bordered-medium-input-width: 14px !default;
/// height||Other|4
$--checkbox-bordered-medium-height: 36px !default;
$--checkbox-bordered-small-input-height: 12px !default;
$--checkbox-bordered-small-input-width: 12px !default;
/// height||Other|4
$--checkbox-bordered-small-height: 32px !default;
$--checkbox-bordered-mini-input-height: 12px !default;
$--checkbox-bordered-mini-input-width: 12px !default;
/// height||Other|4
$--checkbox-bordered-mini-height: 28px !default;

/// color||Color|0
$--checkbox-button-checked-background-color: $--color-primary !default;
/// color||Color|0
$--checkbox-button-checked-font-color: $--color-white !default;
/// color||Color|0
$--checkbox-button-checked-border-color: $--color-primary !default;



/* Radio
-------------------------- */
/// fontSize||Font|1
$--radio-font-size: $--font-size-base !default;
/// fontWeight||Font|1
$--radio-font-weight: $--font-weight-primary !default;
/// color||Color|0
$--radio-font-color: $--color-text-regular !default;
$--radio-input-height: 14px !default;
$--radio-input-width: 14px !default;
/// borderRadius||Border|2
$--radio-input-border-radius: $--border-radius-circle !default;
/// color||Color|0
$--radio-input-background-color: $--color-white !default;
$--radio-input-border: $--border-base !default;
/// color||Color|0
$--radio-input-border-color: $--border-color-base !default;
/// color||Color|0
$--radio-icon-color: $--color-white !default;

$--radio-disabled-input-border-color: $--disabled-border-base !default;
$--radio-disabled-input-fill: $--disabled-fill-base !default;
$--radio-disabled-icon-color: $--disabled-fill-base !default;

$--radio-disabled-checked-input-border-color: $--disabled-border-base !default;
$--radio-disabled-checked-input-fill: $--disabled-fill-base !default;
$--radio-disabled-checked-icon-color: $--color-text-placeholder !default;

/// color||Color|0
$--radio-checked-font-color: $--color-primary !default;
/// color||Color|0
$--radio-checked-input-border-color: $--color-primary !default;
/// color||Color|0
$--radio-checked-input-background-color: $--color-white !default;
/// color||Color|0
$--radio-checked-icon-color: $--color-primary !default;

$--radio-input-border-color-hover: $--color-primary !default;

$--radio-bordered-height: 40px !default;
$--radio-bordered-padding: 12px 20px 0 10px !default;
$--radio-bordered-medium-padding: 10px 20px 0 10px !default;
$--radio-bordered-small-padding: 8px 15px 0 10px !default;
$--radio-bordered-mini-padding: 6px 15px 0 10px !default;
$--radio-bordered-medium-input-height: 14px !default;
$--radio-bordered-medium-input-width: 14px !default;
$--radio-bordered-medium-height: 36px !default;
$--radio-bordered-small-input-height: 12px !default;
$--radio-bordered-small-input-width: 12px !default;
$--radio-bordered-small-height: 32px !default;
$--radio-bordered-mini-input-height: 12px !default;
$--radio-bordered-mini-input-width: 12px !default;
$--radio-bordered-mini-height: 28px !default;

/// fontSize||Font|1
$--radio-button-font-size: $--font-size-base !default;
/// color||Color|0
$--radio-button-checked-background-color: $--color-primary !default;
/// color||Color|0
$--radio-button-checked-font-color: $--color-white !default;
/// color||Color|0
$--radio-button-checked-border-color: $--color-primary !default;
$--radio-button-disabled-checked-fill: $--border-color-extra-light !default;

/* Select
-------------------------- */
$--select-border-color-hover: $--border-color-hover !default;
$--select-disabled-border: $--disabled-border-base !default;
/// fontSize||Font|1
$--select-font-size: $--font-size-base !default;
$--select-close-hover-color: $--color-text-secondary !default;

$--select-input-color: $--color-text-placeholder !default;
$--select-multiple-input-color: #666 !default;
/// color||Color|0
$--select-input-focus-border-color: $--color-primary !default;
/// fontSize||Font|1
$--select-input-font-size: 14px !default;

$--select-option-color: $--color-text-regular !default;
$--select-option-disabled-color: $--color-text-placeholder !default;
$--select-option-disabled-background: $--color-white !default;
/// height||Other|4
$--select-option-height: 34px !default;
$--select-option-hover-background: $--background-color-base !default;
/// color||Color|0
$--select-option-selected-font-color: $--color-primary !default;
$--select-option-selected-hover: $--background-color-base !default;

$--select-group-color: $--color-info !default;
$--select-group-height: 30px !default;
$--select-group-font-size: 12px !default;

$--select-dropdown-background: $--color-white !default;
$--select-dropdown-shadow: $--box-shadow-light !default;
$--select-dropdown-empty-color: #999 !default;
/// height||Other|4
$--select-dropdown-max-height: 274px !default;
$--select-dropdown-padding: 6px 0 !default;
$--select-dropdown-empty-padding: 10px 0 !default;
$--select-dropdown-border: solid 1px $--border-color-light !default;

/* Alert
-------------------------- */
$--alert-padding: 8px 16px !default;
/// borderRadius||Border|2
$--alert-border-radius: $--border-radius-base !default;
/// fontSize||Font|1
$--alert-title-font-size: 13px !default;
/// fontSize||Font|1
$--alert-description-font-size: 12px !default;
/// fontSize||Font|1
$--alert-close-font-size: 12px !default;
/// fontSize||Font|1
$--alert-close-customed-font-size: 13px !default;

$--alert-success-color: $--color-success-lighter !default;
$--alert-info-color: $--color-info-lighter !default;
$--alert-warning-color: $--color-warning-lighter !default;
$--alert-danger-color: $--color-danger-lighter !default;

/// height||Other|4
$--alert-icon-size: 16px !default;
/// height||Other|4
$--alert-icon-large-size: 28px !default;

/* MessageBox
-------------------------- */
/// color||Color|0
$--messagebox-title-color: $--color-text-primary !default;
$--msgbox-width: 420px !default;
$--msgbox-border-radius: 4px !default;
/// fontSize||Font|1
$--messagebox-font-size: $--font-size-large !default;
/// fontSize||Font|1
$--messagebox-content-font-size: $--font-size-base !default;
/// color||Color|0
$--messagebox-content-color: $--color-text-regular !default;
/// fontSize||Font|1
$--messagebox-error-font-size: 12px !default;
$--msgbox-padding-primary: 15px !default;
/// color||Color|0
$--messagebox-success-color: $--color-success !default;
/// color||Color|0
$--messagebox-info-color: $--color-info !default;
/// color||Color|0
$--messagebox-warning-color: $--color-warning !default;
/// color||Color|0
$--messagebox-danger-color: $--color-danger !default;

/* Message
-------------------------- */
$--message-shadow: $--box-shadow-base !default;
$--message-min-width: 380px !default;
$--message-background-color: #edf2fc !default;
$--message-padding: 15px 15px 15px 20px !default;
/// color||Color|0
$--message-close-icon-color: $--color-text-placeholder !default;
/// height||Other|4
$--message-close-size: 16px !default;
/// color||Color|0
$--message-close-hover-color: $--color-text-secondary !default;

/// color||Color|0
$--message-success-font-color: $--color-success !default;
/// color||Color|0
$--message-info-font-color: $--color-info !default;
/// color||Color|0
$--message-warning-font-color: $--color-warning !default;
/// color||Color|0
$--message-danger-font-color: $--color-danger !default;

/* Notification
-------------------------- */
$--notification-width: 330px !default;
/// padding||Spacing|3
$--notification-padding: 14px 26px 14px 13px !default;
$--notification-radius: 8px !default;
$--notification-shadow: $--box-shadow-light !default;
/// color||Color|0
$--notification-border-color: $--border-color-lighter !default;
$--notification-icon-size: 24px !default;
$--notification-close-font-size: $--message-close-size !default;
$--notification-group-margin-left: 13px !default;
$--notification-group-margin-right: 8px !default;
/// fontSize||Font|1
$--notification-content-font-size: $--font-size-base !default;
/// color||Color|0
$--notification-content-color: $--color-text-regular !default;
/// fontSize||Font|1
$--notification-title-font-size: 16px !default;
/// color||Color|0
$--notification-title-color: $--color-text-primary !default;

/// color||Color|0
$--notification-close-color: $--color-text-secondary !default;
/// color||Color|0
$--notification-close-hover-color: $--color-text-regular !default;

/// color||Color|0
$--notification-success-icon-color: $--color-success !default;
/// color||Color|0
$--notification-info-icon-color: $--color-info !default;
/// color||Color|0
$--notification-warning-icon-color: $--color-warning !default;
/// color||Color|0
$--notification-danger-icon-color: $--color-danger !default;

/* Input
-------------------------- */
$--input-font-size: $--font-size-base !default;
/// color||Color|0
$--input-font-color: $--color-text-regular !default;
/// height||Other|4
$--input-width: 140px !default;
/// height||Other|4
$--input-height: 40px !default;
$--input-border: $--border-base !default;
$--input-border-color: $--border-color-base !default;
/// borderRadius||Border|2
$--input-border-radius: $--border-radius-base !default;
$--input-border-color-hover: $--border-color-hover !default;
/// color||Color|0
$--input-background-color: $--color-white !default;
$--input-fill-disabled: $--disabled-fill-base !default;
$--input-color-disabled: $--font-color-disabled-base !default;
/// color||Color|0
$--input-icon-color: $--color-text-placeholder !default;
/// color||Color|0
$--input-placeholder-color: $--color-text-placeholder !default;
$--input-max-width: 314px !default;

$--input-hover-border: $--border-color-hover !default;
$--input-clear-hover-color: $--color-text-secondary !default;

$--input-focus-border: $--color-primary !default;
$--input-focus-fill: $--color-white !default;

$--input-disabled-fill: $--disabled-fill-base !default;
$--input-disabled-border: $--disabled-border-base !default;
$--input-disabled-color: $--disabled-color-base !default;
$--input-disabled-placeholder-color: $--color-text-placeholder !default;

/// fontSize||Font|1
$--input-medium-font-size: 14px !default;
/// height||Other|4
$--input-medium-height: 36px !default;
/// fontSize||Font|1
$--input-small-font-size: 13px !default;
/// height||Other|4
$--input-small-height: 32px !default;
/// fontSize||Font|1
$--input-mini-font-size: 12px !default;
/// height||Other|4
$--input-mini-height: 28px !default;

/* Cascader
-------------------------- */
/// color||Color|0
$--cascader-menu-font-color: $--color-text-regular !default;
/// color||Color|0
$--cascader-menu-selected-font-color: $--color-primary !default;
$--cascader-menu-fill: $--fill-base !default;
$--cascader-menu-font-size: $--font-size-base !default;
$--cascader-menu-radius: $--border-radius-base !default;
$--cascader-menu-border: solid 1px $--border-color-light !default;
$--cascader-menu-shadow: $--box-shadow-light !default;
$--cascader-node-background-hover: $--background-color-base !default;
$--cascader-node-color-disabled:$--color-text-placeholder !default;
$--cascader-color-empty:$--color-text-placeholder !default;
$--cascader-tag-background: #f0f2f5;

/* Group
-------------------------- */
$--group-option-flex: 0 0 (1/5) * 100% !default;
$--group-option-offset-bottom: 12px !default;
$--group-option-fill-hover: rgba($--color-black, 0.06) !default;
$--group-title-color: $--color-black !default;
$--group-title-font-size: $--font-size-base !default;
$--group-title-width: 66px !default;

/* Tab
-------------------------- */
$--tab-font-size: $--font-size-base !default;
$--tab-border-line: 1px solid #e4e4e4 !default;
$--tab-header-color-active: $--color-text-secondary !default;
$--tab-header-color-hover: $--color-text-regular !default;
$--tab-header-color: $--color-text-regular !default;
$--tab-header-fill-active: rgba($--color-black, 0.06) !default;
$--tab-header-fill-hover: rgba($--color-black, 0.06) !default;
$--tab-vertical-header-width: 90px !default;
$--tab-vertical-header-count-color: $--color-white !default;
$--tab-vertical-header-count-fill: $--color-text-secondary !default;

/* Button
-------------------------- */
/// fontSize||Font|1
$--button-font-size: $--font-size-base !default;
/// fontWeight||Font|1
$--button-font-weight: $--font-weight-primary !default;
/// borderRadius||Border|2
$--button-border-radius: $--border-radius-base !default;
/// padding||Spacing|3
$--button-padding-vertical: 12px !default;
/// padding||Spacing|3
$--button-padding-horizontal: 20px !default;

/// fontSize||Font|1
$--button-medium-font-size: $--font-size-base !default;
/// borderRadius||Border|2
$--button-medium-border-radius: $--border-radius-base !default;
/// padding||Spacing|3
$--button-medium-padding-vertical: 10px !default;
/// padding||Spacing|3
$--button-medium-padding-horizontal: 20px !default;

/// fontSize||Font|1
$--button-small-font-size: 12px !default;
$--button-small-border-radius: #{$--border-radius-base - 1} !default;
/// padding||Spacing|3
$--button-small-padding-vertical: 9px !default;
/// padding||Spacing|3
$--button-small-padding-horizontal: 15px !default;
/// fontSize||Font|1
$--button-mini-font-size: 12px !default;
$--button-mini-border-radius: #{$--border-radius-base - 1} !default;
/// padding||Spacing|3
$--button-mini-padding-vertical: 7px !default;
/// padding||Spacing|3
$--button-mini-padding-horizontal: 15px !default;

/// color||Color|0
$--button-default-font-color: $--color-text-regular !default;
/// color||Color|0
$--button-default-background-color: $--color-white !default;
/// color||Color|0
$--button-default-border-color: $--border-color-base !default;

/// color||Color|0
$--button-disabled-font-color: $--color-text-placeholder !default;
/// color||Color|0
$--button-disabled-background-color: $--color-white !default;
/// color||Color|0
$--button-disabled-border-color: $--border-color-lighter !default;

/// color||Color|0
$--button-primary-border-color: $--color-primary !default;
/// color||Color|0
$--button-primary-font-color: $--color-white !default;
/// color||Color|0
$--button-primary-background-color: $--color-primary !default;
/// color||Color|0
$--button-success-border-color: $--color-success !default;
/// color||Color|0
$--button-success-font-color: $--color-white !default;
/// color||Color|0
$--button-success-background-color: $--color-success !default;
/// color||Color|0
$--button-warning-border-color: $--color-warning !default;
/// color||Color|0
$--button-warning-font-color: $--color-white !default;
/// color||Color|0
$--button-warning-background-color: $--color-warning !default;
/// color||Color|0
$--button-danger-border-color: $--color-danger !default;
/// color||Color|0
$--button-danger-font-color: $--color-white !default;
/// color||Color|0
$--button-danger-background-color: $--color-danger !default;
/// color||Color|0
$--button-info-border-color: $--color-info !default;
/// color||Color|0
$--button-info-font-color: $--color-white !default;
/// color||Color|0
$--button-info-background-color: $--color-info !default;

$--button-hover-tint-percent: 20% !default;
$--button-active-shade-percent: 10% !default;


/* cascader
-------------------------- */
$--cascader-height: 200px !default;

/* Switch
-------------------------- */
/// color||Color|0
$--switch-on-color: $--color-primary !default;
/// color||Color|0
$--switch-off-color: $--border-color-base !default;
/// fontSize||Font|1
$--switch-font-size: $--font-size-base !default;
$--switch-core-border-radius: 10px !default;
// height||Other|4 TODO: width 代码写死的40px 所以下面这三个属性都没意义
$--switch-width: 40px !default;
// height||Other|4
$--switch-height: 20px !default;
// height||Other|4
$--switch-button-size: 16px !default;

/* Dialog
-------------------------- */
$--dialog-background-color: $--color-white !default;
$--dialog-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !default;
/// fontSize||Font|1
$--dialog-title-font-size: $--font-size-large !default;
/// fontSize||Font|1
$--dialog-content-font-size: 14px !default;
/// fontLineHeight||LineHeight|2
$--dialog-font-line-height: $--font-line-height-primary !default;
/// padding||Spacing|3
$--dialog-padding-primary: 20px !default;

/* Table
-------------------------- */
/// color||Color|0
$--table-border-color: $--border-color-lighter !default;
$--table-border: 1px solid $--table-border-color !default;
/// color||Color|0
$--table-font-color: $--color-text-regular !default;
/// color||Color|0
$--table-header-font-color: $--color-text-secondary !default;
/// color||Color|0
$--table-row-hover-background-color: $--background-color-base !default;
$--table-current-row-background-color: $--color-primary-light-9 !default;
/// color||Color|0
$--table-header-background-color: $--color-white !default;
$--table-fixed-box-shadow: 0 0 10px rgba(0, 0, 0, .12) !default;

/* Pagination
-------------------------- */
/// fontSize||Font|1
$--pagination-font-size: 13px !default;
/// color||Color|0
$--pagination-background-color: $--color-white !default;
/// color||Color|0
$--pagination-font-color: $--color-text-primary !default;
$--pagination-border-radius: 3px !default;
/// color||Color|0
$--pagination-button-color: $--color-text-primary !default;
/// height||Other|4
$--pagination-button-width: 35.5px !default;
/// height||Other|4
$--pagination-button-height: 28px !default;
/// color||Color|0
$--pagination-button-disabled-color: $--color-text-placeholder !default;
/// color||Color|0
$--pagination-button-disabled-background-color: $--color-white !default;
/// color||Color|0
$--pagination-hover-color: $--color-primary !default;

/* Popup
-------------------------- */
/// color||Color|0
$--popup-modal-background-color: $--color-black !default;
/// opacity||Other|1
$--popup-modal-opacity: 0.5 !default;

/* Popover
-------------------------- */
/// color||Color|0
$--popover-background-color: $--color-white !default;
/// fontSize||Font|1
$--popover-font-size: $--font-size-base !default;
/// color||Color|0
$--popover-border-color: $--border-color-lighter !default;
$--popover-arrow-size: 6px !default;
/// padding||Spacing|3
$--popover-padding: 12px !default;
$--popover-padding-large: 18px 20px !default;
/// fontSize||Font|1
$--popover-title-font-size: 16px !default;
/// color||Color|0
$--popover-title-font-color: $--color-text-primary !default;

/* Tooltip
-------------------------- */
/// color|1|Color|0
$--tooltip-fill: $--color-text-primary !default;
/// color|1|Color|0
$--tooltip-color: $--color-white !default;
/// fontSize||Font|1
$--tooltip-font-size: 12px !default;
/// color||Color|0
$--tooltip-border-color: $--color-text-primary !default;
$--tooltip-arrow-size: 6px !default;
/// padding||Spacing|3
$--tooltip-padding: 10px !default;

/* Tag
-------------------------- */
/// color||Color|0
$--tag-info-color: $--color-info !default;
/// color||Color|0
$--tag-primary-color: $--color-primary !default;
/// color||Color|0
$--tag-success-color: $--color-success !default;
/// color||Color|0
$--tag-warning-color: $--color-warning !default;
/// color||Color|0