This is an automated email from the ASF dual-hosted git repository.
likeguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 1f470c35 fix: form style bug (#291)
1f470c35 is described below
commit 1f470c35e70a2b887d42f3561372bbdf3cd478df
Author: lulu <[email protected]>
AuthorDate: Thu Jun 29 22:14:10 2023 +0800
fix: form style bug (#291)
* fix: form style bug
* fix: modify the location of the 'id' field
---
src/routes/Plugin/Discovery/index.js | 73 ++++++++++++++++++++----------------
src/routes/Plugin/Discovery/tcp.less | 26 +++++++++----
2 files changed, 59 insertions(+), 40 deletions(-)
diff --git a/src/routes/Plugin/Discovery/index.js
b/src/routes/Plugin/Discovery/index.js
index 0cfc3671..2ad82feb 100644
--- a/src/routes/Plugin/Discovery/index.js
+++ b/src/routes/Plugin/Discovery/index.js
@@ -322,9 +322,11 @@ export default class TCPProxy extends Component {
},
callback: discoveryConfigList => {
let tcpType = '';
+ let id = null;
let isSetConfig = false;
if (discoveryConfigList !== null) {
tcpType = discoveryConfigList.type;
+ id = discoveryConfigList.id
isSetConfig = true;
}
this.setState({
@@ -349,6 +351,7 @@ export default class TCPProxy extends Component {
listenerNode,
handler,
discovery: {
+ id,
level: "0", // 0 selector
pluginName: "tcp",
discoveryType,
@@ -484,43 +487,49 @@ export default class TCPProxy extends Component {
</div>
</Row>
- <Row className={tcpStyles.bar}>
- <h3 style={{overflow: "visible", margin: 0}}>
- {getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.TITLE")}
- </h3>
- <AuthButton perms="plugin:tcpSelector:add">
- <Button
- type="primary"
- onClick={this.addConfiguration}
+ <Row>
+ <div className={tcpStyles["header-bar"]}>
+ <h3 style={{overflow: "visible", margin: 0}}>
+ {getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.TITLE")}
+ </h3>
+ <AuthButton perms="plugin:tcpSelector:add">
+ <Button
+ type="primary"
+ onClick={this.addConfiguration}
+ >
+ {getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.CONFIGURATION")}
+ </Button>
+ </AuthButton>
+ {/* <div className={styles.headerSearch}> */}
+ <div>
+ <AuthButton perms="plugin:tcpSelector:query">
+ <Search
+ placeholder={getIntlContent(
+ "SHENYU.PLUGIN.SEARCH.SELECTOR.NAME"
+ )}
+ enterButton={getIntlContent("SHENYU.SYSTEM.SEARCH")}
+ size="default"
+ onChange={this.searchSelectorOnchange}
+ onSearch={this.searchSelector}
+ style={{
+ marginRight: '20px',
+ display: 'flex',
+ alignItems: 'center'}}
+ />
+ </AuthButton>
+ </div>
+
+ <AuthButton
+ perms="plugin:tcpSelector:add"
>
- {getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.CONFIGURATION")}
- </Button>
- </AuthButton>
- {/* <div className={styles.headerSearch}> */}
- <div>
- <AuthButton perms="plugin:tcpSelector:query">
- <Search
- className={tcpStyles.search}
- placeholder={getIntlContent(
- "SHENYU.PLUGIN.SEARCH.SELECTOR.NAME"
- )}
- enterButton={getIntlContent("SHENYU.SYSTEM.SEARCH")}
- size="default"
- onChange={this.searchSelectorOnchange}
- onSearch={this.searchSelector}
- />
+ <Button type="primary" onClick={this.addSelector} style={{
marginRight: '20px' }}>
+ {getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.ADD")}
+ </Button>
</AuthButton>
</div>
-
- <AuthButton
- perms="plugin:tcpSelector:add"
- >
- <Button type="primary" onClick={this.addSelector}>
- {getIntlContent("SHENYU.PLUGIN.SELECTOR.LIST.ADD")}
- </Button>
- </AuthButton>
</Row>
+
<Row>
<div style={{
margin: '0px 0',
diff --git a/src/routes/Plugin/Discovery/tcp.less
b/src/routes/Plugin/Discovery/tcp.less
index 8d59f357..25d16c9b 100644
--- a/src/routes/Plugin/Discovery/tcp.less
+++ b/src/routes/Plugin/Discovery/tcp.less
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
.cardTag {
min-width: 200px;
height: 32px;
@@ -40,14 +57,7 @@
}
-.search {
- margin-right: 10px;
- display: flex;
- align-items: center;
-
-}
-
-.bar {
+.header-bar {
margin: 20px 0;
display: flex;
justify-content: space-between;