Skip to content

Commit

Permalink
disable resolve refs check when no resolvable refs
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-deboer committed Nov 1, 2017
1 parent c7ff7bc commit 8a162dc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/ui/src/components/TerminalViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class TerminalViewer extends React.Component {
}}>
<IconButton
hoveredStyle={{backgroundColor: grey300, fill: grey800}}
iconStyle={{width: '30%', height: '30%'}}
iconStyle={{width: '20%', height: '20%'}}
style={{
backgroundColor: 'rgb(158, 158, 158)',
margin: '0 auto',
Expand Down
4 changes: 4 additions & 0 deletions pkg/ui/src/components/configuration-pane/ContainerPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ pre.quoted-string {
.item-array:after {
content: "]";
color: black; }

.resolve-env-refs-check.disabled svg, .resolve-env-refs-check.disabled label {
fill: rgba(0, 0, 0, 0.2) !important;
color: rgba(0, 0, 0, 0.2) !important; }
7 changes: 7 additions & 0 deletions pkg/ui/src/components/configuration-pane/ContainerPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,11 @@ pre.quoted-string {
content: "]";
color: rgb(0,0,0);
}
}

.resolve-env-refs-check.disabled {
svg, label {
fill: rgba(0, 0, 0, 0.2) !important;
color: rgba(0, 0, 0, 0.2) !important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Checkbox from 'material-ui/Checkbox'
import { Link } from 'react-router-dom'
import { connect } from 'react-redux'
import GenericExpanderButton from './GenericExpanderButton'
import './ContainerPanel.css'

const rowHeight = 22
const styles = {
Expand Down Expand Up @@ -137,12 +136,14 @@ class StringArrayExpander extends React.PureComponent {

let { props } = this
let { data, title, linkGenerator, resources } = props
let resolveRefsDisabled = (data.filter(env=>!!env.valueFrom && !env.valueFrom.fieldRef).length === 0)

return (
<GenericExpanderButton
title={<div>
{title}<Checkbox
className={`resolve-env-refs-check`}
className={`resolve-env-refs-check${resolveRefsDisabled ? ' disabled':''}`}
disabled={resolveRefsDisabled}
label="resolve refs"
checked={this.state.resolveRefs}
onCheck={this.toggleResolveRefs}
Expand Down
6 changes: 4 additions & 2 deletions pkg/ui/src/components/configuration-pane/GenericExpander.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const styles = {
popover: {
border: '1px solid rgba(0,0,0,0.3)',
backgroundColor: 'rgb(240,240,240)',
margin: 20,
},
popoverTitle: {
color: 'rgb(0,0,0)',
Expand Down Expand Up @@ -73,13 +74,14 @@ export default class GenericExpander extends React.Component {
background: 'transparent',
fontSize: 13,
overflow: 'hidden',

}}
zDepth={3}>
<Subheader style={styles.popoverTitle}>{title}</Subheader>
<div style={{
overflow: 'auto',
maxHeight: 'calc(100vh - 295px)',
maxWidth: 'calc(100vw - 100px)',
maxHeight: 'calc(100vh - 300px)',
maxWidth: 'calc(100vw - 200px)',
padding: 16,
}}>
{contents}
Expand Down

0 comments on commit 8a162dc

Please sign in to comment.