Skip to content

Commit

Permalink
fix: form style bug (apache#291)
Browse files Browse the repository at this point in the history
* fix: form style bug

* fix: modify the location of the 'id' field
  • Loading branch information
eurecalulu authored Jun 29, 2023
1 parent 27b0034 commit 1f470c3
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 40 deletions.
73 changes: 41 additions & 32 deletions src/routes/Plugin/Discovery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -349,6 +351,7 @@ export default class TCPProxy extends Component {
listenerNode,
handler,
discovery: {
id,
level: "0", // 0 selector
pluginName: "tcp",
discoveryType,
Expand Down Expand Up @@ -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',
Expand Down
26 changes: 18 additions & 8 deletions src/routes/Plugin/Discovery/tcp.less
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1f470c3

Please sign in to comment.