You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2019/11/05 01:56:06 UTC
[incubator-apisix-dashboard] branch master updated: Feature remove
useless files (#67)
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 397fcca Feature remove useless files (#67)
397fcca is described below
commit 397fccab4acf4e27fbfda804e95cd0d80d0ae3e9
Author: 琚致远 <ju...@apache.org>
AuthorDate: Tue Nov 5 09:55:59 2019 +0800
Feature remove useless files (#67)
* remove stage related files
* remove apis
* remove icons
---
.env.staging | 5 -
.eslintignore | 1 -
.gitignore | 7 --
README.md | 1 -
package.json | 4 +-
src/api/roles.ts | 45 ---------
src/api/transactions.ts | 25 -----
src/api/types.d.ts | 53 ----------
src/assets/401-images/401.gif | Bin 164227 -> 0 bytes
src/assets/404-images/404-cloud.png | Bin 4766 -> 0 bytes
src/assets/404-images/404.png | Bin 98071 -> 0 bytes
src/assets/custom-theme/fonts/element-icons.ttf | Bin 11028 -> 0 bytes
src/assets/custom-theme/fonts/element-icons.woff | Bin 6124 -> 0 bytes
src/assets/custom-theme/index.css | 1 -
src/store/modules/user.ts | 2 +-
src/utils/request.ts | 3 +-
src/views/icons/element-icons.ts | 91 ------------------
src/views/icons/index.vue | 117 -----------------------
src/views/icons/svg-icons.ts | 26 -----
19 files changed, 3 insertions(+), 378 deletions(-)
diff --git a/.env.staging b/.env.staging
deleted file mode 100644
index 0633a84..0000000
--- a/.env.staging
+++ /dev/null
@@ -1,5 +0,0 @@
-# Set to production for building optimization
-NODE_ENV = production
-
-# Base api
-VUE_APP_BASE_API = '/stage-api'
diff --git a/.eslintignore b/.eslintignore
index 11be133..4bcf40f 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,4 +1,3 @@
dist/*.js
-src/assets
tests/unit/coverage
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 2cbfe57..2b33ebe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,13 +2,6 @@
node_modules
/dist
-/tests/e2e/videos/
-/tests/e2e/screenshots/
-/tests/**/coverage/
-/tests/e2e/reports/
-
-chromedriver.log
-
# local env files
.env.local
.env.*.local
diff --git a/README.md b/README.md
index e9914ad..472cdf0 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,6 @@ Dashboard for APISIX & based on ElementUI.
│ └── index.html # index.html template
├── src # main source code
│ ├── api # api service
-│ ├── assets # module assets like fonts, images (processed by webpack)
│ ├── components # global components
│ ├── icons # svg icons
│ ├── lang # i18n language
diff --git a/package.json b/package.json
index 3f21dc0..5f619c9 100644
--- a/package.json
+++ b/package.json
@@ -6,9 +6,7 @@
"scripts": {
"serve": "concurrently \"vue-cli-service serve\"",
"lint": "vue-cli-service lint",
- "build:prod": "vue-cli-service build",
- "build:stage": "vue-cli-service build --mode staging",
- "svg": "vsvg -s ./src/icons/svg -t ./src/icons/components --ext ts --es6"
+ "build:prod": "vue-cli-service build"
},
"dependencies": {
"axios": "^0.19.0",
diff --git a/src/api/roles.ts b/src/api/roles.ts
deleted file mode 100644
index fcfb0de..0000000
--- a/src/api/roles.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import request from '@/utils/request'
-
-export const getRoles = (params: any) =>
- request({
- url: '/roles',
- method: 'get',
- params
- })
-
-export const createRole = (data: any) =>
- request({
- url: '/roles',
- method: 'post',
- data
- })
-
-export const updateRole = (id: number, data: any) =>
- request({
- url: `/roles/${id}`,
- method: 'put',
- data
- })
-
-export const deleteRole = (id: number) =>
- request({
- url: `/roles/${id}`,
- method: 'delete'
- })
diff --git a/src/api/transactions.ts b/src/api/transactions.ts
deleted file mode 100644
index 7651f37..0000000
--- a/src/api/transactions.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import request from '@/utils/request'
-
-export const getTransactions = (params: any) =>
- request({
- url: '/transactions',
- method: 'get',
- params
- })
diff --git a/src/api/types.d.ts b/src/api/types.d.ts
index a81f84e..1bb4205 100644
--- a/src/api/types.d.ts
+++ b/src/api/types.d.ts
@@ -15,50 +15,6 @@
* limitations under the License.
*/
-export interface IArticleData {
- id: number
- status: string
- title: string
- abstractContent: string
- fullContent: string
- sourceURL: string
- imageURL: string
- timestamp: string | number
- platforms: string[]
- disableComment: boolean
- importance: number
- author: string
- reviewer: string
- type: string
- pageviews: number
-}
-
-export interface IRoleData {
- key: string
- name: string
- description: string
- routes: any
-}
-
-export interface ITransactionData {
- orderId: string
- timestamp: string | number
- username: string
- price: number
- status: string
-}
-
-export interface IUserData {
- id: number
- username: string
- password: string
- name: string
- email: string
- phone: string
- avatar: string
- introduction: string
- roles: string[]
-}
export type TypeID = number | string
export type TypePlugin = object
@@ -68,15 +24,7 @@ export interface IConsumerData {
plugins?: TypePlugin
}
-export enum EnumRouteMethod {
- GET,
- PUT,
- POST,
- DELETE
-}
export interface IRouteData {
- // TODO: https://github.com/iresty/apisix/blob/7953e5bb755bf7481b07a177f94d674f8b344741/lua/apisix/core/schema.lua#L175
- // TODO: https://github.com/iresty/apisix/blob/7953e5bb755bf7481b07a177f94d674f8b344741/lua/apisix/core/schema.lua#L149
methods: []
plugins: TypePlugin
upstream: IUpstreamData
@@ -88,7 +36,6 @@ export interface IRouteData {
id: TypeID
}
-// TODO: https://github.com/iresty/apisix/blob/7953e5bb755bf7481b07a177f94d674f8b344741/lua/apisix/core/schema.lua#L193
export interface IServiceData {
id: TypeID
plugins: TypePlugin
diff --git a/src/assets/401-images/401.gif b/src/assets/401-images/401.gif
deleted file mode 100644
index cd6e0d9..0000000
Binary files a/src/assets/401-images/401.gif and /dev/null differ
diff --git a/src/assets/404-images/404-cloud.png b/src/assets/404-images/404-cloud.png
deleted file mode 100644
index c6281d0..0000000
Binary files a/src/assets/404-images/404-cloud.png and /dev/null differ
diff --git a/src/assets/404-images/404.png b/src/assets/404-images/404.png
deleted file mode 100644
index 3d8e230..0000000
Binary files a/src/assets/404-images/404.png and /dev/null differ
diff --git a/src/assets/custom-theme/fonts/element-icons.ttf b/src/assets/custom-theme/fonts/element-icons.ttf
deleted file mode 100644
index 570a3e1..0000000
Binary files a/src/assets/custom-theme/fonts/element-icons.ttf and /dev/null differ
diff --git a/src/assets/custom-theme/fonts/element-icons.woff b/src/assets/custom-theme/fonts/element-icons.woff
deleted file mode 100644
index c2bcc00..0000000
Binary files a/src/assets/custom-theme/fonts/element-icons.woff and /dev/null differ
diff --git a/src/assets/custom-theme/index.css b/src/assets/custom-theme/index.css
deleted file mode 100644
index e8b4e08..0000000
--- a/src/assets/custom-theme/index.css
+++ /dev/null
@@ -1 +0,0 @@
-@charset "UTF-8";.custom-theme .fade-in-linear-enter-active,.custom-theme .fade-in-linear-leave-active{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.custom-theme .fade-in-linear-enter,.custom-theme .fade-in-linear-leave,.custom-theme .fade-in-linear-leave-active{opacity:0}.custom-theme .el-fade-in-linear-enter-active,.custom-theme .el-fade-in-linear-leave-active{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.custom-theme .el-fade-in-linear-ent [...]
\ No newline at end of file
diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index 1a92276..49bfd29 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -16,7 +16,7 @@
*/
import { VuexModule, Module, Action, Mutation, getModule } from 'vuex-module-decorators'
-import { login, logout, getUserInfo } from '@/api/users'
+// import { login, logout, getUserInfo } from '@/api/users'
import { getToken, setToken, removeToken } from '@/utils/cookies'
import router, { resetRouter } from '@/router'
import { PermissionModule } from './permission'
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 449ac53..6ce3b12 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -16,8 +16,7 @@
*/
import axios from 'axios'
-import { Message, MessageBox } from 'element-ui'
-import { UserModule } from '@/store/modules/user'
+import { Message } from 'element-ui'
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
diff --git a/src/views/icons/element-icons.ts b/src/views/icons/element-icons.ts
deleted file mode 100644
index 16ade18..0000000
--- a/src/views/icons/element-icons.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Full list here: https://element.eleme.io/#/en-US/component/icon
-
-const elementIcons = [
- 'info',
- 'error',
- 'success',
- 'warning',
- 'question',
- 'back',
- 'arrow-left',
- 'arrow-down',
- 'arrow-right',
- 'arrow-up',
- 'caret-left',
- 'caret-bottom',
- 'caret-top',
- 'caret-right',
- 'd-arrow-left',
- 'd-arrow-right',
- 'minus',
- 'plus',
- 'remove',
- 'circle-plus',
- 'remove-outline',
- 'circle-plus-outline',
- 'close',
- 'check',
- 'circle-close',
- 'circle-check',
- 'zoom-out',
- 'zoom-in',
- 'd-caret',
- 'sort',
- 'sort-down',
- 'sort-up',
- 'tickets',
- 'document',
- 'goods',
- 'sold-out',
- 'news',
- 'message',
- 'date',
- 'printer',
- 'time',
- 'bell',
- 'mobile-phone',
- 'service',
- 'view',
- 'menu',
- 'more',
- 'more-outline',
- 'star-on',
- 'star-off',
- 'location',
- 'location-outline',
- 'phone',
- 'phone-outline',
- 'picture',
- 'picture-outline',
- 'delete',
- 'search',
- 'edit',
- 'edit-outline',
- 'rank',
- 'refresh',
- 'share',
- 'setting',
- 'upload',
- 'upload2',
- 'download',
- 'loading'
-]
-
-export default elementIcons
diff --git a/src/views/icons/index.vue b/src/views/icons/index.vue
deleted file mode 100644
index d09cd4b..0000000
--- a/src/views/icons/index.vue
+++ /dev/null
@@ -1,117 +0,0 @@
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
--->
-
-<template>
- <div class="icons-container">
- <aside>
- <a
- href="https://armour.github.io/vue-typescript-admin-docs/guide/advanced/icon.html"
- target="_blank"
- >Add and use
- </a>
- </aside>
- <el-tabs type="border-card">
- <el-tab-pane label="Icons">
- <div
- v-for="item of svgIcons"
- :key="item"
- >
- <el-tooltip placement="top">
- <div slot="content">
- {{ generateSvgIconCode(item) }}
- </div>
- <div class="icon-item">
- <svg-icon
- :name="item"
- class="disabled"
- />
- <span>{{ item }}</span>
- </div>
- </el-tooltip>
- </div>
- </el-tab-pane>
- <el-tab-pane label="Element-UI Icons">
- <div
- v-for="item of elementIcons"
- :key="item"
- >
- <el-tooltip placement="top">
- <div slot="content">
- {{ generateElementIconCode(item) }}
- </div>
- <div class="icon-item">
- <i :class="'el-icon-' + item" />
- <span>{{ item }}</span>
- </div>
- </el-tooltip>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
-</template>
-
-<script lang="ts">
-import { Component, Vue } from 'vue-property-decorator'
-import elementIcons from './element-icons'
-import svgIcons from './svg-icons'
-
-@Component({
- name: 'Icons'
-})
-export default class extends Vue {
- private svgIcons = svgIcons
- private elementIcons = elementIcons
-
- private generateElementIconCode(symbol: string) {
- return `<i class="el-icon-${symbol}" />`
- }
-
- private generateSvgIconCode(symbol: string) {
- return `<svg-icon name="${symbol}" />`
- }
-}
-</script>
-
-<style lang="scss" scoped>
-.icons-container {
- margin: 10px 20px 0;
- overflow: hidden;
-
- .icon-item {
- margin: 20px;
- height: 85px;
- text-align: center;
- width: 100px;
- float: left;
- font-size: 30px;
- color: #24292e;
- cursor: pointer;
- }
-
- span {
- display: block;
- font-size: 16px;
- margin-top: 10px;
- }
-
- .disabled {
- pointer-events: none;
- }
-}
-</style>
diff --git a/src/views/icons/svg-icons.ts b/src/views/icons/svg-icons.ts
deleted file mode 100644
index 92dcd17..0000000
--- a/src/views/icons/svg-icons.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const req = require.context('../../icons/svg', false, /\.svg$/)
-const re = /\.\/(.*)\.svg/
-const requireAll = (requireContext: any) => requireContext.keys()
-
-const icons = requireAll(req).map((str: string) => {
- return str.match(re)![1]
-})
-
-export default icons