Skip to content

Commit

Permalink
feat(plugin): fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdmomo committed Aug 9, 2021
2 parents ca49b23 + 1cb7cb0 commit f8ea499
Show file tree
Hide file tree
Showing 207 changed files with 4,186 additions and 3,132 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/frontend-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
submodules: recursive

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend-plugin-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
submodules: recursive

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: 🚀 Use Node.js
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: '14.x'
- run: npm install -g markdownlint-cli@0.25.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
submodules: recursive

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-frontend-multiple-node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
submodules: recursive
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.4.0
with:
node-version: ${{ matrix.node-version }}

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ This release mainly refactors the dashboard.
- Added `Manager API` support to process logics between APISIX and Dashboard.
- Added Metrics/Route/SSL/Upstream/Consumer module.

## 1.0.0
# 1.0.0

This release is mainly to build some basic panels and resolve License issue.

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
-->

# Apache APISIX Dashboard (Experimental)
# Apache APISIX Dashboard

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/apache/apisix-dashboard/blob/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/apache/apisix-dashboard)](https://goreportcard.com/report/github.com/apache/apisix-dashboard)
Expand All @@ -40,8 +40,6 @@ The Apache APISIX Dashboard is designed to make it as easy as possible for users

The Dashboard is the control plane and performs all parameter checks; Apache APISIX mixes data and control planes and will evolve to a pure data plane.

This project includes `Manager API`, which will gradually replace `Admin API` in Apache APISIX.

Note: Currently the Dashboard does not have complete coverage of Apache APISIX features, [visit here](https://github.com/apache/apisix-dashboard/milestones) to view the milestones.

![architecture](./docs/assets/images/architecture.png)
Expand Down
151 changes: 126 additions & 25 deletions api/conf/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"type": "integer"
},
"username": {
"maxLength": 32,
"maxLength": 100,
"minLength": 1,
"pattern": "^[a-zA-Z0-9_]+$",
"type": "string"
Expand Down Expand Up @@ -397,6 +397,24 @@
"enum": [0, 1],
"type": "integer"
},
"timeout": {
"properties": {
"connect": {
"exclusiveMinimum": 0,
"type": "number"
},
"read": {
"exclusiveMinimum": 0,
"type": "number"
},
"send": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": ["connect", "read", "send"],
"type": "object"
},
"update_time": {
"type": "integer"
},
Expand Down Expand Up @@ -601,6 +619,19 @@
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
Expand Down Expand Up @@ -1042,6 +1073,19 @@
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
Expand Down Expand Up @@ -1293,12 +1337,12 @@
"type": "object"
},
"sni": {
"pattern": "^\\*?[0-9a-zA-Z-.]+$",
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"snis": {
"items": {
"pattern": "^\\*?[0-9a-zA-Z-.]+$",
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"minItems": 1,
Expand Down Expand Up @@ -1391,6 +1435,11 @@
"description": "server port",
"type": "integer"
},
"sni": {
"description": "server name indication",
"pattern": "^\\*?[0-9a-zA-Z-._]+$",
"type": "string"
},
"update_time": {
"type": "integer"
},
Expand Down Expand Up @@ -1595,6 +1644,19 @@
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
Expand Down Expand Up @@ -1964,6 +2026,19 @@
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
Expand Down Expand Up @@ -2391,6 +2466,23 @@
},
"version": 0.1
},
"client-control": {
"priority": 22000,
"schema": {
"$comment": "this is a mark for our injected plugin schema",
"properties": {
"disable": {
"type": "boolean"
},
"max_body_size": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"version": 0.1
},
"consumer-restriction": {
"priority": 2400,
"schema": {
Expand Down Expand Up @@ -2553,10 +2645,6 @@
"description": "body after the modification of filter phase.",
"type": "string"
},
"auth_value": {
"description": "auth value",
"type": "string"
},
"before_body": {
"description": "body before the filter phase.",
"type": "string"
Expand Down Expand Up @@ -2718,22 +2806,14 @@
"type": "string"
}
},
"required": ["name", "value"],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
},
"extra_info": {
"items": {
"maxLength": 64,
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
Expand All @@ -2757,22 +2837,14 @@
"type": "string"
}
},
"required": ["name", "value"],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"disable": {
"type": "boolean"
},
"extra_info": {
"items": {
"maxLength": 64,
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"type": "object"
Expand Down Expand Up @@ -3441,6 +3513,10 @@
"enum": ["consumer_name", "http_x_forwarded_for", "http_x_real_ip", "remote_addr", "server_addr"],
"type": "string"
},
"nodelay": {
"default": false,
"type": "boolean"
},
"rate": {
"exclusiveMinimum": 0,
"type": "number"
Expand Down Expand Up @@ -3486,7 +3562,15 @@
"type": "string"
},
"upstream": {
"oneOf": [{
"required": ["host", "port"]
}, {
"required": ["ip", "port"]
}],
"properties": {
"host": {
"type": "string"
},
"ip": {
"type": "string"
},
Expand Down Expand Up @@ -3770,6 +3854,10 @@
"required": ["http_to_https"]
}],
"properties": {
"append_query_string": {
"default": false,
"type": "boolean"
},
"disable": {
"type": "boolean"
},
Expand Down Expand Up @@ -4474,6 +4562,19 @@
"maxLength": 256,
"type": "string"
},
"discovery_args": {
"properties": {
"group_name": {
"description": "group name",
"type": "string"
},
"namespace_id": {
"description": "namespace id",
"type": "string"
}
},
"type": "object"
},
"discovery_type": {
"description": "discovery type",
"type": "string"
Expand Down
1 change: 1 addition & 0 deletions api/internal/filter/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (mw *AuthenticationMiddleware) Handle(ctx droplet.Context) error {

if err != nil || token == nil || !token.Valid {
log.Warnf("token validate failed: %s", err)
log.Warn("please check the secret in conf.yaml")
ctx.SetOutput(&data.SpecCodeResponse{StatusCode: http.StatusUnauthorized, Response: response})
return nil
}
Expand Down
10 changes: 3 additions & 7 deletions api/internal/handler/data_loader/route_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (h *Handler) RouteToOpenAPI3(c droplet.Context, routes []*entity.Route) (*o
if err != nil {
log.Errorf("ParseRouteUpstream err: ", err)
return nil, err
} else if err == nil && _upstream != nil {
} else if _upstream != nil {
extensions["x-apisix-upstream"] = _upstream
}

Expand Down Expand Up @@ -292,12 +292,8 @@ func (h *Handler) RouteToOpenAPI3(c droplet.Context, routes []*entity.Route) (*o
func ParseLabels(route *entity.Route, serviceLabels map[string]string) (map[string]string, error) {
if route.Labels != nil {
return route.Labels, nil
} else if route.Labels == nil && route.ServiceID != nil {
if serviceLabels != nil {
return serviceLabels, nil
} else if serviceLabels == nil {
return nil, nil
}
} else if route.ServiceID != nil {
return serviceLabels, nil
}
return nil, nil
}
Expand Down
Loading

0 comments on commit f8ea499

Please sign in to comment.