Skip to content

Commit

Permalink
Bump the patternfly group with 6 updates
Browse files Browse the repository at this point in the history
Bumps the patternfly group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@patternfly/patternfly](https://github.com/patternfly/patternfly) | `5.3.1` | `5.4.0` |
| [@patternfly/react-core](https://github.com/patternfly/patternfly-react) | `5.3.4` | `5.4.0` |
| [@patternfly/react-icons](https://github.com/patternfly/patternfly-react) | `5.3.2` | `5.4.0` |
| @patternfly/react-styles | `5.3.1` | `5.4.0` |
| [@patternfly/react-table](https://github.com/patternfly/patternfly-react) | `5.3.4` | `5.4.0` |
| [@patternfly/react-tokens](https://github.com/patternfly/patternfly-react) | `5.3.1` | `5.4.0` |

Updates `@patternfly/patternfly` from 5.3.1 to 5.4.0
- [Release notes](https://github.com/patternfly/patternfly/releases)
- [Changelog](https://github.com/patternfly/patternfly/blob/main/release.config.js)
- [Commits](patternfly/patternfly@patch-v5.3.1...v5.4.0)

Updates `@patternfly/react-core` from 5.3.4 to 5.4.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected])

Updates `@patternfly/react-icons` from 5.3.2 to 5.4.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected])

Updates `@patternfly/react-styles` from 5.3.1 to 5.4.0

Updates `@patternfly/react-table` from 5.3.4 to 5.4.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected])

Updates `@patternfly/react-tokens` from 5.3.1 to 5.4.0
- [Release notes](https://github.com/patternfly/patternfly-react/releases)
- [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected])

---
updated-dependencies:
- dependency-name: "@patternfly/patternfly"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-icons"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-styles"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-table"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
- dependency-name: "@patternfly/react-tokens"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patternfly
...

PatternFly's NumberInput has become stricter with the value's it
accepts, it now does not accept a string as a valid value. This was a
bug in podman as we had an inconsistent state which was either a string
or number.

Signed-off-by: dependabot[bot] <[email protected]>
  • Loading branch information
dependabot[bot] authored and jelly committed Sep 2, 2024
1 parent ff109e8 commit d43d3fd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
2 changes: 1 addition & 1 deletion node_modules
Submodule node_modules updated 3550 files
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
"stylelint-use-logical-spec": "5.0.1"
},
"dependencies": {
"@patternfly/patternfly": "5.3.1",
"@patternfly/react-core": "5.3.4",
"@patternfly/react-icons": "5.3.2",
"@patternfly/react-styles": "5.3.1",
"@patternfly/react-table": "5.3.4",
"@patternfly/react-tokens": "5.3.1",
"@patternfly/patternfly": "5.4.0",
"@patternfly/react-core": "5.4.0",
"@patternfly/react-icons": "5.4.0",
"@patternfly/react-styles": "5.4.0",
"@patternfly/react-table": "5.4.0",
"@patternfly/react-tokens": "5.4.0",
"@xterm/addon-canvas": "0.7.0",
"@xterm/xterm": "5.5.0",
"docker-names": "1.2.1",
Expand Down
43 changes: 26 additions & 17 deletions src/ImageRunModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ export class ImageRunModal extends React.Component {
}
const resourceLimit = {};
if (this.state.memoryConfigure && this.state.memory) {
const memorySize = this.state.memory * (1000 ** units[this.state.memoryUnit].baseExponent);
const memorySize = Number.parseInt(this.state.memory * (1000 ** units[this.state.memoryUnit].baseExponent));
resourceLimit.memory = { limit: memorySize };
createConfig.resource_limits = resourceLimit;
}
if (this.state.cpuSharesConfigure && parseInt(this.state.cpuShares) !== 0) {
resourceLimit.cpu = { shares: parseInt(this.state.cpuShares) };
if (this.state.cpuSharesConfigure && this.state.cpuShares !== 0) {
resourceLimit.cpu = { shares: this.state.cpuShares };
createConfig.resource_limits = resourceLimit;
}
createConfig.terminal = this.state.hasTTY;
Expand Down Expand Up @@ -203,7 +203,7 @@ export class ImageRunModal extends React.Component {
if (this.state.restartPolicy !== "no") {
createConfig.restart_policy = this.state.restartPolicy;
if (this.state.restartPolicy === "on-failure" && this.state.restartTries !== null) {
createConfig.restart_tries = parseInt(this.state.restartTries);
createConfig.restart_tries = this.state.restartTries;
}
// Enable podman-restart.service for system containers, for user
// sessions enable-linger needs to be enabled for containers to start on boot.
Expand All @@ -214,13 +214,13 @@ export class ImageRunModal extends React.Component {

if (this.state.healthcheck_command !== "") {
createConfig.healthconfig = {
Interval: parseInt(this.state.healthcheck_interval) * 1000000000,
Interval: this.state.healthcheck_interval * 1000000000,
Retries: this.state.healthcheck_retries,
StartPeriod: parseInt(this.state.healthcheck_start_period) * 1000000000,
StartPeriod: this.state.healthcheck_start_period * 1000000000,
Test: utils.unquote_cmdline(this.state.healthcheck_command),
Timeout: parseInt(this.state.healthcheck_timeout) * 1000000000,
Timeout: this.state.healthcheck_timeout * 1000000000,
};
createConfig.health_check_on_failure_action = parseInt(this.state.healthcheck_action);
createConfig.health_check_on_failure_action = this.state.healthcheck_action;
}

return createConfig;
Expand Down Expand Up @@ -327,11 +327,20 @@ export class ImageRunModal extends React.Component {
}

onPlusOne(key) {
this.setState(state => ({ [key]: parseInt(state[key]) + 1 }));
this.setState(state => ({ [key]: parseFloat(state[key]) + 1 }));
}

onMinusOne(key) {
this.setState(state => ({ [key]: parseInt(state[key]) - 1 }));
this.setState(state => ({ [key]: parseFloat(state[key]) - 1 }));
}

onNumberValue(key, value, minimum = 0, is_float = false) {
const parseFunc = is_float ? Number.parseFloat : Number.parseInt;
value = parseFunc(value);
if (isNaN(value) || value < minimum) {
value = minimum;
}
this.onValueChanged(key, value);
}

handleTabClick = (event, tabIndex) => {
Expand Down Expand Up @@ -897,7 +906,7 @@ export class ImageRunModal extends React.Component {
onMinus={() => this.onMinusOne('memory')}
minusBtnAriaLabel={_("Decrease memory")}
plusBtnAriaLabel={_("Increase memory")}
onChange={ev => this.onValueChanged('memory', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} />
onChange={ev => this.onNumberValue('memory', ev.target.value, 0, true)} />
<FormSelect id='memory-unit-select'
aria-label={_("Memory unit")}
value={this.state.memoryUnit}
Expand Down Expand Up @@ -939,7 +948,7 @@ export class ImageRunModal extends React.Component {
onMinus={() => this.onMinusOne('cpuShares')}
minusBtnAriaLabel={_("Decrease CPU shares")}
plusBtnAriaLabel={_("Increase CPU shares")}
onChange={ev => this.onValueChanged('cpuShares', parseInt(ev.target.value) < 2 ? 2 : ev.target.value)} />
onChange={ev => this.onNumberValue('cpuShares', ev.target.value, 2)} />
</Flex>
</FormGroup>
}
Expand Down Expand Up @@ -980,7 +989,7 @@ export class ImageRunModal extends React.Component {
plusBtnAriaLabel={_("Increase maximum retries")}
onMinus={() => this.onMinusOne('restartTries')}
onPlus={() => this.onPlusOne('restartTries')}
onChange={ev => this.onValueChanged('restartTries', parseInt(ev.target.value) < 1 ? 1 : ev.target.value)}
onChange={ev => this.onNumberValue('restartTries', ev.target.value, 1)}
/>
</FormGroup>
}
Expand Down Expand Up @@ -1051,7 +1060,7 @@ export class ImageRunModal extends React.Component {
plusBtnAriaLabel={_("Increase interval")}
onMinus={() => this.onMinusOne('healthcheck_interval')}
onPlus={() => this.onPlusOne('healthcheck_interval')}
onChange={ev => this.onValueChanged('healthcheck_interval', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} />
onChange={ev => this.onNumberValue('healthcheck_interval', ev.target.value)} />
<InputGroupText isPlain>{_("seconds")}</InputGroupText>
</InputGroup>
</FormGroup>
Expand All @@ -1076,7 +1085,7 @@ export class ImageRunModal extends React.Component {
plusBtnAriaLabel={_("Increase timeout")}
onMinus={() => this.onMinusOne('healthcheck_timeout')}
onPlus={() => this.onPlusOne('healthcheck_timeout')}
onChange={ev => this.onValueChanged('healthcheck_timeout', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} />
onChange={ev => this.onNumberValue('healthcheck_timeout', ev.target.value)} />
<InputGroupText isPlain>{_("seconds")}</InputGroupText>
</InputGroup>
</FormGroup>
Expand All @@ -1101,7 +1110,7 @@ export class ImageRunModal extends React.Component {
plusBtnAriaLabel={_("Increase start period")}
onMinus={() => this.onMinusOne('healthcheck_start_period')}
onPlus={() => this.onPlusOne('healthcheck_start_period')}
onChange={ev => this.onValueChanged('healthcheck_start_period', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} />
onChange={ev => this.onNumberValue('healthcheck_start_period', ev.target.value)} />
<InputGroupText isPlain>{_("seconds")}</InputGroupText>
</InputGroup>
</FormGroup>
Expand All @@ -1125,7 +1134,7 @@ export class ImageRunModal extends React.Component {
plusBtnAriaLabel={_("Increase retries")}
onMinus={() => this.onMinusOne('healthcheck_retries')}
onPlus={() => this.onPlusOne('healthcheck_retries')}
onChange={ev => this.onValueChanged('healthcheck_retries', parseInt(ev.target.value) < 0 ? 0 : ev.target.value)} />
onChange={ev => this.onNumberValue('healthcheck_retries', ev.target.value)} />
</FormGroup>
{version.localeCompare("4.3", undefined, { numeric: true, sensitivity: 'base' }) >= 0 &&
<FormGroup isInline hasNoPaddingTop fieldId='run-image-healthcheck-action' label={_("When unhealthy") }
Expand Down

0 comments on commit d43d3fd

Please sign in to comment.