Skip to content

Commit

Permalink
Modified filter function of k8s page
Browse files Browse the repository at this point in the history
  • Loading branch information
yongsikgi committed Dec 7, 2021
1 parent 97bed18 commit 80d59c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions frontend/src/hosts/components/KubernetesContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class KubernetesContents extends PureComponent<Props, State> {
}

private KubernetesInformation = () => {
const {handleOnClickPodName, activeTab, script, focuseNode} = this.props
const {activeTab, script, focuseNode} = this.props
const {HeaderWidth, DataWidth} = KUBERNETES_BASICS_TABLE_SIZE

return (
Expand All @@ -196,7 +196,7 @@ class KubernetesContents extends PureComponent<Props, State> {
Kind
</div>
<TableBodyRowItem
title={<div className="pod-name">{focuseNode.type}</div>}
title={<div className="k8s-obj-kind">{focuseNode.type}</div>}
width={DataWidth}
className={'align--start'}
/>
Expand All @@ -209,7 +209,9 @@ class KubernetesContents extends PureComponent<Props, State> {
Label
</div>
<TableBodyRowItem
title={<div className="pod-name">{focuseNode.label}</div>}
title={
<div className="k8s-obj-label">{focuseNode.label}</div>
}
width={DataWidth}
className={'align--start'}
/>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/hosts/components/KubernetesRawData.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {PureComponent} from 'react'
import _ from 'lodash'
import yaml from 'js-yaml'

import {Controlled as ReactCodeMirror} from 'react-codemirror2'
Expand Down Expand Up @@ -29,7 +30,7 @@ class KubernetesRawData extends PureComponent<Props> {
<ReactCodeMirror
autoFocus={true}
autoCursor={true}
value={yaml.dump(script)}
value={!_.isEmpty(script) ? yaml.dump(script) : ''}
options={options}
onBeforeChange={this.beforeChange}
onTouchStart={this.onTouchStart}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/hosts/components/host.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@
margin-right: 3px;
}

.pod-name {
.k8s-obj-kind {
color: #999dab;
}

// &:hover {
// color: #e35833;
// }
.k8s-obj-label {
color: #22adf6;
}

.kubernetes-header--bar {
Expand Down

0 comments on commit 80d59c6

Please sign in to comment.