This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch juzhiyuan/feat-plugin
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/juzhiyuan/feat-plugin by this
push:
new 44ca4f2 chore: format codes
44ca4f2 is described below
commit 44ca4f210a6ee9fe70a5b12f4cfde655d468ae30
Author: juzhiyuan <[email protected]>
AuthorDate: Sat Nov 28 09:05:17 2020 +0800
chore: format codes
---
web/config/config.ts | 2 +-
web/src/e2e/Login.e2e.js | 7 ++-----
web/src/e2e/Logout.e2e.js | 9 +++------
web/src/e2e/service.js | 2 +-
web/src/helpers.tsx | 6 +++---
web/src/pages/Route/components/Step1/MatchingRulesView.tsx | 2 +-
web/src/pages/Route/components/Step1/RequestConfigView.tsx | 2 +-
7 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/web/config/config.ts b/web/config/config.ts
index f71d512..024b223 100644
--- a/web/config/config.ts
+++ b/web/config/config.ts
@@ -61,5 +61,5 @@ export default defineConfig({
manifest: {
basePath: '/',
},
- outputPath: '../output/html'
+ outputPath: '../output/html',
});
diff --git a/web/src/e2e/Login.e2e.js b/web/src/e2e/Login.e2e.js
index 1829daa..5ea3ac9 100644
--- a/web/src/e2e/Login.e2e.js
+++ b/web/src/e2e/Login.e2e.js
@@ -18,10 +18,7 @@
/* eslint-disable import/no-extraneous-dependencies */
const puppeteer = require('puppeteer');
-const {
- setupLogin,
- BASE_URL
-} = require('./service')
+const { setupLogin, BASE_URL } = require('./service');
let browser;
const domSelectors = {
@@ -38,7 +35,7 @@ const loginFailedData = {
beforeAll(async () => {
browser = await puppeteer.launch({
headless: true,
- slowMo: 100
+ slowMo: 100,
});
});
diff --git a/web/src/e2e/Logout.e2e.js b/web/src/e2e/Logout.e2e.js
index cef92cf..c10083c 100644
--- a/web/src/e2e/Logout.e2e.js
+++ b/web/src/e2e/Logout.e2e.js
@@ -18,24 +18,21 @@
/* eslint-disable import/no-extraneous-dependencies */
const puppeteer = require('puppeteer');
-const {
- setupLogin
-} = require('./service')
+const { setupLogin } = require('./service');
let browser;
const domSelectors = {
userProfile: '.ant-space-horizontal div:nth-child(2)',
dropdownMenuItem: '.ant-dropdown-menu-item',
- buttonLogin: ".ant-btn-lg",
+ buttonLogin: '.ant-btn-lg',
logoutButton: '.ant-dropdown > ul > li:nth-child(3)',
};
describe('Logout', () => {
-
beforeAll(async () => {
browser = await puppeteer.launch({
headless: true,
- slowMo: 100
+ slowMo: 100,
});
});
diff --git a/web/src/e2e/service.js b/web/src/e2e/service.js
index 84bfcb0..49279cd 100644
--- a/web/src/e2e/service.js
+++ b/web/src/e2e/service.js
@@ -36,4 +36,4 @@ export const setupLogin = async (page) => {
await page.click(domSelectors.buttonLogin);
await page.waitForSelector(domSelectors.loginSuccessIcon);
await page.waitForNavigation();
-}
+};
diff --git a/web/src/helpers.tsx b/web/src/helpers.tsx
index ac8eb84..34860ab 100644
--- a/web/src/helpers.tsx
+++ b/web/src/helpers.tsx
@@ -101,8 +101,8 @@ export const getUrlQuery: (key: string) => string | false =
(key: string) => {
export const timestampToLocaleString = (timestamp: number) => {
if (!timestamp) {
// TODO: i18n
- return "None"
+ return 'None';
}
- return moment.unix(timestamp).format('YYYY-MM-DD HH:mm:ss')
-}
+ return moment.unix(timestamp).format('YYYY-MM-DD HH:mm:ss');
+};
diff --git a/web/src/pages/Route/components/Step1/MatchingRulesView.tsx
b/web/src/pages/Route/components/Step1/MatchingRulesView.tsx
index 9ba0b80..48260e7 100644
--- a/web/src/pages/Route/components/Step1/MatchingRulesView.tsx
+++ b/web/src/pages/Route/components/Step1/MatchingRulesView.tsx
@@ -149,7 +149,7 @@ const MatchingRulesView:
React.FC<RouteModule.Step1PassProps> = ({
</Space>
),
},
- ].filter(item => Object.keys(item).length)
+ ].filter((item) => Object.keys(item).length);
const renderModal = () => (
<Modal
diff --git a/web/src/pages/Route/components/Step1/RequestConfigView.tsx
b/web/src/pages/Route/components/Step1/RequestConfigView.tsx
index 0d41815..20d8457 100644
--- a/web/src/pages/Route/components/Step1/RequestConfigView.tsx
+++ b/web/src/pages/Route/components/Step1/RequestConfigView.tsx
@@ -30,7 +30,7 @@ import {
const RequestConfigView: React.FC<RouteModule.Step1PassProps> = ({
form,
disabled,
- onChange = () => { },
+ onChange = () => {},
}) => {
const { formatMessage } = useIntl();
const HostList = () => (