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 2020/05/24 22:17:04 UTC

[incubator-apisix-dashboard] branch feat-setting updated (e030adc -> da34b73)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch feat-setting
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git.


    from e030adc  feat: refactor setting
     new 17100cb  fix: setting
     new da34b73  feat: update version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 package.json                   |  2 +-
 src/pages/Settings/constant.ts |  7 -------
 src/pages/Settings/service.ts  | 28 ++++++++++------------------
 3 files changed, 11 insertions(+), 26 deletions(-)
 delete mode 100644 src/pages/Settings/constant.ts


[incubator-apisix-dashboard] 01/02: fix: setting

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch feat-setting
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git

commit 17100cb87d4aa2a0ee71a0d8df4a1df3e176deb4
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Mon May 25 06:16:31 2020 +0800

    fix: setting
---
 src/pages/Settings/constant.ts |  7 -------
 src/pages/Settings/service.ts  | 28 ++++++++++------------------
 2 files changed, 10 insertions(+), 25 deletions(-)

diff --git a/src/pages/Settings/constant.ts b/src/pages/Settings/constant.ts
deleted file mode 100644
index 5bbaa1a..0000000
--- a/src/pages/Settings/constant.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { getRequestPrefix } from './service';
-
-export const ADMIN_API_SCHEMA = 'http';
-export const ADMIN_API_HOST = '127.0.0.1:9080';
-export const ADMIN_API_PATH = '/apisix/admin';
-export const API_KEY = '';
-export const API_REQUEST_PREFIX = getRequestPrefix();
diff --git a/src/pages/Settings/service.ts b/src/pages/Settings/service.ts
index 18cd2c6..18d87bd 100644
--- a/src/pages/Settings/service.ts
+++ b/src/pages/Settings/service.ts
@@ -1,24 +1,16 @@
-import {
-  ADMIN_API_HOST,
-  ADMIN_API_SCHEMA,
-  ADMIN_API_PATH,
-  API_KEY,
-  API_REQUEST_PREFIX,
-} from './constant';
-
-export const getAdminAPIConfig = (): SettingModule.AdminAPIConfig => {
-  return {
-    schema: localStorage.getItem('GLOBAL_ADMIN_API_SCHEMA') || ADMIN_API_SCHEMA,
-    host: localStorage.getItem('GLOBAL_ADMIN_API_HOST') || ADMIN_API_HOST,
-    path: localStorage.getItem('GLOBAL_ADMIN_API_PATH') || ADMIN_API_PATH,
-    prefix: API_REQUEST_PREFIX,
-    key: localStorage.getItem('GLOBAL_ADMIN_API_KEY') || API_KEY,
-  };
-};
-
 export const getRequestPrefix = () => {
   if (process.env.NODE_ENV === 'development') {
     return '/api';
   }
   return '';
 };
+
+export const getAdminAPIConfig = (): SettingModule.AdminAPIConfig => {
+  return {
+    schema: localStorage.getItem('GLOBAL_ADMIN_API_SCHEMA') || 'http',
+    host: localStorage.getItem('GLOBAL_ADMIN_API_HOST') || '127.0.0.1:9080',
+    path: localStorage.getItem('GLOBAL_ADMIN_API_PATH') || '/apisix/admin',
+    prefix: getRequestPrefix(),
+    key: localStorage.getItem('GLOBAL_ADMIN_API_KEY') || '',
+  };
+};


[incubator-apisix-dashboard] 02/02: feat: update version

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch feat-setting
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git

commit da34b7372fadc78cfaaa0b385bb1a2c21c3867c3
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Mon May 25 06:16:45 2020 +0800

    feat: update version
---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index f8f260c..1e38476 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "apisix-dashboard",
-  "version": "1.0.1",
+  "version": "1.0.2",
   "private": true,
   "description": "Dashboard for APISIX",
   "scripts": {