Skip to content

Commit

Permalink
selinux: lib: isReadOnly is deprecated for TextArea
Browse files Browse the repository at this point in the history
  • Loading branch information
jelly committed Jul 6, 2023
1 parent 302e400 commit f0782db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/lib/cockpit-components-modifications.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ class ModificationsExportDialog extends React.Component {
title={_("Automation script") }>
<Tabs activeKey={this.state.active_tab} onSelect={this.handleSelect}>
<Tab eventKey="shell" title={_("Shell script")}>
<TextArea resizeOrientation='vertical' isReadOnly defaultValue={this.props.shell.trim()} />
<TextArea resizeOrientation='vertical' readOnlyVariant="default" defaultValue={this.props.shell.trim()} />
</Tab>
<Tab eventKey="ansible" title={_("Ansible")}>
<TextArea resizeOrientation='vertical' isReadOnly defaultValue={this.props.ansible.trim()} />
<TextArea resizeOrientation='vertical' readOnlyVariant="default" defaultValue={this.props.ansible.trim()} />
<div className="ansible-docs-link">
<OutlinedQuestionCircleIcon />
{ _("Create new task file with this content.") }
Expand Down
4 changes: 2 additions & 2 deletions pkg/selinux/setroubleshoot-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class SELinuxEventDetails extends React.Component {

// One line usually means one command
if (itm.doText && itm.doText.indexOf("\n") < 0)
doElement = <TextArea aria-label={_("solution")} isReadOnly defaultValue={itm.doText} />;
doElement = <TextArea aria-label={_("solution")} readOnlyVariant="default" defaultValue={itm.doText} />;

// There can be text with commands. Command always starts on a new line with '#'
// Group subsequent commands into one `<TextArea>` element.
Expand All @@ -142,7 +142,7 @@ class SELinuxEventDetails extends React.Component {
});
doElement = parts.map((p, index) => p[0] == "#"
? <TextArea aria-label={_("solution")}
isReadOnly
readOnlyVariant="plain"
key={p}
defaultValue={p.substr(2)} />
: <span key={p}>{p}</span>);
Expand Down

0 comments on commit f0782db

Please sign in to comment.