Skip to content

Commit

Permalink
feat: Refactor Frondend with Admin API (apache#521)
Browse files Browse the repository at this point in the history
* feat: update Upstream List

* feat: update upstream create

* feat: refactor consumer (apache#543)

* fix(Consumer): resolve conflicts

* feat(Upstream): debug API (apache#550)

* feat(Upstream): added components

* feat(Upstream): debug api

* feat: added license

* feat: added license

* feat: update styles

* feat: added default data

* feat: added Ref for upstreamForm

* feat: added lincense

* feat(Route): clean list (apache#544)

* feat:  deleting hosts when hosts is empty

* feat(Route): clean list

* feat: remove group

* feat(Route): update typing

* feat: remove WebSocket

* feat: sync branch from fe-refactor

* feat: use upstream component

* feat: added default upstream form data

* feat: update route transformer

* fix: ret_code not show in step1

Co-authored-by: litesun <7sunmiao@gmail.com>

* fix(Route): set upstream selector readonly on preview page

* fix: adjust import order

* fix(Upstream): use shorthand object

* fix(Route): check if data.plugins

* feat(Route): remove Upstream header

* feat: remove Debug

* feat: remove RouteGroup

* feat(Route): omit empty plugins and script

* fix: submit error

* feat(Upstream):fetch upstream_id data in edit mode

* fix: route step2 warnings

* fix(Upstream): use conditional id

* feat: update  Route SSL Consumer pagination

* feat: change login requestType form to json

* feat: update Consumer Route Upstream search

* fix: create button missing

* feat: update plugin & pluginchart

* feat: adjust codes order

* feat: codes clean

Co-authored-by: litesun <7sunmiao@gmail.com>
  • Loading branch information
juzhiyuan and LiteSun authored Oct 21, 2020
1 parent a1f96d4 commit f23bea3
Show file tree
Hide file tree
Showing 67 changed files with 1,168 additions and 2,756 deletions.
34 changes: 17 additions & 17 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
#

github:
description: Dashboard for Apache APISIX
homepage: https://apisix.apache.org/
labels:
- dashboard
- api
- api-management
- apisix
- devops
- docker
description: Dashboard for Apache APISIX
homepage: https://apisix.apache.org/
labels:
- dashboard
- api
- api-management
- apisix
- devops
- docker

enabled_merge_buttons:
squash: true
merge: false
rebase: false
enabled_merge_buttons:
squash: true
merge: false
rebase: false

notifications:
commits: notifications@apisix.apache.org
issues: notifications@apisix.apache.org
pullrequests: notifications@apisix.apache.org
notifications:
commits: notifications@apisix.apache.org
issues: notifications@apisix.apache.org
pullrequests: notifications@apisix.apache.org
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ module.exports = {
page: true,
REACT_APP_ENV: true,
},
rules: {
'@typescript-eslint/naming-convention': 'off',
},
};
6 changes: 3 additions & 3 deletions .github/apisix-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

etcd:
host:
- "http://etcd:2379"
- 'http://etcd:2379'

apisix:
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0 # If we don't set any IP list, then any IP access is allowed by default.
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0 # If we don't set any IP list, then any IP access is allowed by default.
6 changes: 1 addition & 5 deletions .github/workflows/api_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ jobs:
- name: run Makefile
run: |
make license-check
- name: get lua lib
run: |
wget https://github.com/api7/dag-to-lua/archive/v1.1.tar.gz
sudo mkdir -p /go/manager-api/dag-to-lua/
tar -zxvf v1.1.tar.gz
sudo mv ./dag-to-lua-1.1/lib/* /go/manager-api/dag-to-lua/
- name: install runtime
run: |
sudo apt-get update
Expand All @@ -46,7 +44,6 @@ jobs:
sudo apt update
export GO111MOUDULE=on
sudo apt install golang-1.14-go
- name: generate json schema
working-directory: ./api
run: |
Expand All @@ -56,9 +53,8 @@ jobs:
sudo mv ./apisix-master/apisix/* ./build-tools/apisix/
rm -rf ./apisix-master
cd ./build-tools/ && lua schema-sync.lua > ../conf/schema.json
- name: run test
working-directory: ./api
run: |
export APIX_ETCD_ENDPOINTS=127.0.0.1:2379
go test ./...
go test ./...
8 changes: 1 addition & 7 deletions .github/workflows/api_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,18 @@ jobs:
apache/apisix:dev
sleep 5
docker logs apisix
- name: setting up database
run: |
mysql -h 127.0.0.1 --port 3306 -u root -p123456 < ./api/script/db/schema.sql
- name: ping apisix
run: |
curl 127.0.0.1:9080
- name: get lua lib
run: |
wget https://github.com/api7/dag-to-lua/archive/v1.1.tar.gz
sudo mkdir -p /go/manager-api/dag-to-lua/
tar -zxvf v1.1.tar.gz
sudo mv ./dag-to-lua-1.1/lib/* /go/manager-api/dag-to-lua/
- name: install runtime
run: |
sudo apt-get update
Expand All @@ -63,7 +59,6 @@ jobs:
sudo apt update
export GO111MOUDULE=on
sudo apt install golang-1.14-go
- name: generate json schema
working-directory: ./api
run: |
Expand All @@ -73,7 +68,6 @@ jobs:
sudo mv ./apisix-master/apisix/* ./build-tools/apisix/
rm -rf ./apisix-master
cd ./build-tools/ && lua schema-sync.lua > ../conf/schema.json
- uses: Azure/docker-login@v1
with:
login-server: apisixacr.azurecr.cn
Expand All @@ -84,4 +78,4 @@ jobs:
run: |
cd ./api
docker build . -t apisixacr.azurecr.cn/managerapi:${{ github.sha }}
docker push apisixacr.azurecr.cn/managerapi:${{ github.sha }}
docker push apisixacr.azurecr.cn/managerapi:${{ github.sha }}
21 changes: 10 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@ name: Deploy to Azure

on:
push:
branches: [ master ]
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2
- uses: Azure/docker-login@v1
with:
login-server: apisixacr.azurecr.cn
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- uses: Azure/docker-login@v1
with:
login-server: apisixacr.azurecr.cn
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- run: |
docker build . -t apisixacr.azurecr.cn/dashboard:${{ github.sha }}
docker push apisixacr.azurecr.cn/dashboard:${{ github.sha }}
- run: |
docker build . -t apisixacr.azurecr.cn/dashboard:${{ github.sha }}
docker push apisixacr.azurecr.cn/dashboard:${{ github.sha }}
11 changes: 4 additions & 7 deletions .github/workflows/license_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ on:
- master

jobs:

check-license:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v2

- name: run license check
run: |
make license-check
- name: run license check
run: |
make license-check
4 changes: 2 additions & 2 deletions .github/workflows/multiple-node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ name: multiple-node-build
# events but only for the master branch
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
31 changes: 10 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,33 @@

# Contributing to Apache APISIX Dashboard

Firstly, thanks for your interest in contributing! I hope that this will be a
pleasant first experience for you, and that you will return to continue
contributing.
Firstly, thanks for your interest in contributing! I hope that this will be a pleasant first experience for you, and that you will return to continue contributing.

## Code of Conduct

This project and everyone participating in it is governed by the Apache
software Foundation's
[Code of Conduct](http://www.apache.org/foundation/policies/conduct.html). By
participating, you are expected to adhere to this code. If you are aware of
unacceptable behavior, please visit the
[Reporting Guidelines page](http://www.apache.org/foundation/policies/conduct.html#reporting-guidelines)
and follow the instructions there.
This project and everyone participating in it is governed by the Apache software Foundation's [Code of Conduct](http://www.apache.org/foundation/policies/conduct.html). By participating, you are expected to adhere to this code. If you are aware of unacceptable behavior, please visit the [Reporting Guidelines page](http://www.apache.org/foundation/policies/conduct.html#reporting-guidelines) and follow the instructions there.

## How to contribute?

Most of the contributions that we receive are code contributions, but you can
also contribute to the documentation or simply report solid bugs
for us to fix.
Most of the contributions that we receive are code contributions, but you can also contribute to the documentation or simply report solid bugs for us to fix.

## How to report a bug?

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/apache/apisix-dashboard/issues).

* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/apache/apisix-dashboard/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/apache/apisix-dashboard/issues).

- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/apache/apisix-dashboard/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

## How to add a new feature or change an existing one

_Before making any significant changes, please [open an issue](https://github.com/apache/apisix-dashboard/issues)._ Discussing your proposed changes ahead of time will make the contribution process smooth for everyone.

Once we've discussed your changes and you've got your code ready, make sure that tests are passing and open your pull request. Your PR is most likely to be accepted if it:

* Update the README.md with details of changes to the interface.
* Includes tests for new functionality.
* References the original issue in description, e.g. "resolve #123".
* Has a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
- Update the README.md with details of changes to the interface.
- Includes tests for new functionality.
- References the original issue in description, e.g. "resolve #123".
- Has a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).

## Do you have questions about the source code?

* Subscribe to our mail list and send the question mail to [dev@apisix.apache.org](mailto:dev@apisix.apache.org)
- Subscribe to our mail list and send the question mail to [dev@apisix.apache.org](mailto:dev@apisix.apache.org)
2 changes: 1 addition & 1 deletion api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: "3"
version: '3'

services:
manager:
Expand Down
19 changes: 9 additions & 10 deletions compose/apisix_conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ apisix:
allow_admin:
- 0.0.0.0/0
admin_key:
-
name: "admin"
- name: 'admin'
key: edd1c9f034335f136f87ad84b625c8f1
role: admin # admin: manage all configuration data
# viewer: only can view configuration data
-
name: "viewer"
role:
admin # admin: manage all configuration data
# viewer: only can view configuration data
- name: 'viewer'
key: 4054f7cf07e344346cd3f287985e76a1
role: viewer

etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "http://192.17.5.10:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- 'http://192.17.5.10:2379' # multiple etcd address
prefix: '/apisix' # apisix configurations prefix
timeout: 30 # 30 seconds
Loading

0 comments on commit f23bea3

Please sign in to comment.