Skip to content

Commit

Permalink
fix: ServiceList display namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
loadchange committed Jan 24, 2019
1 parent bef5407 commit 7b30369
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ class ServiceList extends React.Component {
});
}

setNowNameSpace = (nowNamespaceName, nowNamespaceId) =>
this.setState({
nowNamespaceName,
nowNamespaceId,
});

rowColor = row => ({ className: !row.healthyInstanceCount ? 'row-bg-red' : '' });

render() {
Expand All @@ -140,7 +146,7 @@ class ServiceList extends React.Component {
detail,
deleteAction,
} = locale;
const { keyword } = this.state;
const { keyword, nowNamespaceName, nowNamespaceId } = this.state;
const { init, getValue } = this.field;
this.init = init;
this.getValue = getValue;
Expand All @@ -154,7 +160,16 @@ class ServiceList extends React.Component {
tip="Loading..."
color="#333"
>
<RegionGroup left={serviceList} namespaceCallBack={this.getQueryLater} />
<RegionGroup
setNowNameSpace={this.setNowNameSpace}
namespaceCallBack={this.getQueryLater}
/>
<h3 className="page-title">
<span className="title-item">{serviceList}</span>
<span className="title-item">|</span>
<span className="title-item">{nowNamespaceName}</span>
<span className="title-item">{nowNamespaceId}</span>
</h3>
<Row className="demo-row" style={{ marginBottom: 10, padding: 0 }}>
<Col span="24">
<Form inline field={this.field}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,18 @@
*/

.service-management {
.page-title {
height: 30px;
width: 100%;
line-height: 30px;
margin: 0 0 20px;
padding: 0 0 0 10px;
border-left: 3px solid #09c;
color: #ccc;
}
.title-item {
font-size: 14px;
color: #000;
margin-right: 8px;
}
}
2 changes: 1 addition & 1 deletion console/src/main/resources/static/css/main.css

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions console/src/main/resources/static/js/main.js

Large diffs are not rendered by default.

0 comments on commit 7b30369

Please sign in to comment.