diff --git a/src/cockpit/389-console/src/LDAPEditor.jsx b/src/cockpit/389-console/src/LDAPEditor.jsx index de581175c..4a83ee84a 100644 --- a/src/cockpit/389-console/src/LDAPEditor.jsx +++ b/src/cockpit/389-console/src/LDAPEditor.jsx @@ -45,7 +45,6 @@ import EditorTreeView from './lib/ldap_editor/treeView.jsx'; import { SearchDatabase } from './lib/ldap_editor/search.jsx'; import GenericWizard from './lib/ldap_editor/wizards/genericWizard.jsx'; import { SyncAltIcon } from '@patternfly/react-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; import { log_cmd } from "./lib/tools.jsx"; const _ = cockpit.gettext; diff --git a/src/cockpit/389-console/src/database.jsx b/src/cockpit/389-console/src/database.jsx index 121404dcd..c33c1e2d2 100644 --- a/src/cockpit/389-console/src/database.jsx +++ b/src/cockpit/389-console/src/database.jsx @@ -28,12 +28,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faLeaf, - faTree, - faLink -} from '@fortawesome/free-solid-svg-icons'; +import { TreeIcon, LeafIcon, LinkIcon } from '@patternfly/react-icons'; import { CatalogIcon, CogIcon, @@ -467,11 +462,11 @@ export class Database extends React.Component { processTree(suffixData) { for (const suffix of suffixData) { if (suffix.type === "suffix") { - suffix.icon = ; + suffix.icon = ; } else if (suffix.type === "subsuffix") { - suffix.icon = ; + suffix.icon = ; } else { - suffix.icon = ; + suffix.icon = ; } if (suffix.children.length === 0) { delete suffix.children; diff --git a/src/cockpit/389-console/src/lib/database/chaining.jsx b/src/cockpit/389-console/src/lib/database/chaining.jsx index 1e881da58..aeee4b500 100644 --- a/src/cockpit/389-console/src/lib/database/chaining.jsx +++ b/src/cockpit/389-console/src/lib/database/chaining.jsx @@ -1358,22 +1358,14 @@ export class ChainingConfig extends React.Component { - <> - - - {' '} - {this.props.suffix} ( - - {this.props.bename} - - ) - + +   {this.props.suffix} ({this.props.bename}) diff --git a/src/cockpit/389-console/src/lib/database/globalPwp.jsx b/src/cockpit/389-console/src/lib/database/globalPwp.jsx index 02f8366cc..a757361ec 100644 --- a/src/cockpit/389-console/src/lib/database/globalPwp.jsx +++ b/src/cockpit/389-console/src/lib/database/globalPwp.jsx @@ -26,11 +26,7 @@ import { SelectOption } from '@patternfly/react-core/deprecated'; import PropTypes from "prop-types"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; const _ = cockpit.gettext; @@ -1639,13 +1635,14 @@ export class GlobalPwPolicy extends React.Component { {_("Global Password Policy")} - + className="ds-left-margin" + > + + diff --git a/src/cockpit/389-console/src/lib/database/localPwp.jsx b/src/cockpit/389-console/src/lib/database/localPwp.jsx index 77dc50b72..b933b043c 100644 --- a/src/cockpit/389-console/src/lib/database/localPwp.jsx +++ b/src/cockpit/389-console/src/lib/database/localPwp.jsx @@ -30,11 +30,7 @@ import { SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from "@patternfly/react-icons"; import PropTypes from "prop-types"; const _ = cockpit.gettext; @@ -3231,13 +3227,13 @@ export class LocalPwPolicy extends React.Component { {_("Local Password Policies")} - + > + + diff --git a/src/cockpit/389-console/src/lib/database/suffix.jsx b/src/cockpit/389-console/src/lib/database/suffix.jsx index fb3c58871..c6f19e640 100644 --- a/src/cockpit/389-console/src/lib/database/suffix.jsx +++ b/src/cockpit/389-console/src/lib/database/suffix.jsx @@ -7,13 +7,6 @@ import { SuffixReferrals } from "./referrals.jsx"; import { SuffixIndexes } from "./indexes.jsx"; import { VLVIndexes } from "./vlvIndexes.jsx"; import { log_cmd, bad_file_name } from "../tools.jsx"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faLeaf, - faTree, - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; import { ImportModal, ExportModal, @@ -21,12 +14,18 @@ import { CreateLinkModal, } from "./databaseModal.jsx"; import { + Button, Grid, GridItem, Tab, Tabs, TabTitleText } from '@patternfly/react-core'; +import { + FolderIcon, + LeafIcon, + SyncAltIcon +} from '@patternfly/react-icons'; import { Dropdown, DropdownToggle, @@ -851,9 +850,9 @@ export class Suffix extends React.Component { // Render the component // render () { - let suffixIcon = faTree; + let SuffixIcon = FolderIcon; if (this.props.dbtype === "subsuffix") { - suffixIcon = faLeaf; + SuffixIcon = LeafIcon; } const { dropdownIsOpen, activeTabKey } = this.state; @@ -883,13 +882,15 @@ export class Suffix extends React.Component {
-   {this.props.suffix} ({this.props.bename}) - +   {this.props.suffix} ({this.props.bename}) + this.handleToggle(event, isOpen)}> + this.handleToggle(event, isOpen)}> {_("Suffix Tasks")} } diff --git a/src/cockpit/389-console/src/lib/ldap_editor/lib/editableTable.jsx b/src/cockpit/389-console/src/lib/ldap_editor/lib/editableTable.jsx index d6ba15c2c..65b99146b 100644 --- a/src/cockpit/389-console/src/lib/ldap_editor/lib/editableTable.jsx +++ b/src/cockpit/389-console/src/lib/ldap_editor/lib/editableTable.jsx @@ -21,7 +21,6 @@ import { Th, Td, ActionsColumn, - TableVariant, applyCellEdits, breakWord, cancelCellEdits, @@ -33,6 +32,7 @@ import { EyeIcon, EyeSlashIcon, InfoCircleIcon, + PencilAltIcon, } from '@patternfly/react-icons'; import { BINARY_ATTRIBUTES, @@ -47,59 +47,147 @@ import PropTypes from "prop-types"; const _ = cockpit.gettext; -// Define EditableTextCell as a separate component outside the class -const EditableTextCell = ({ - value, - rowIndex, - cellIndex, - props, - handleTextInputChange, - isDisabled, - inputAriaLabel, - onUpdate +const buttonGroupStyles = { + display: 'flex', + gap: '8px', + alignItems: 'center' +}; + +const EditButtonsCell = ({ + onClick, + elementToFocusOnEditRef, + rowAriaLabel = 'row', + isEditing, + isDisabled }) => { - const [isEditing, setIsEditing] = React.useState(false); - const [editedValue, setEditedValue] = React.useState(value); - - return isEditing ? ( -
- { - setEditedValue(newValue); - handleTextInputChange(newValue, null, rowIndex, cellIndex); - }} - aria-label={inputAriaLabel} - isDisabled={isDisabled} - /> -
+ const editButtonRef = React.useRef(); + + const onKeyDown = (event, action) => { + if (event.key === 'Enter' || event.key === ' ') { + event.preventDefault(); + event.target.click(); + setTimeout(() => { + const focusRef = action === 'edit' ? elementToFocusOnEditRef : editButtonRef; + focusRef?.current?.focus(); + }, 0); + } + }; + + if (isEditing) { + return ( +
-
- ) : ( -
!isDisabled && setIsEditing(true)} - className={!isDisabled ? "pf-c-inline-edit--editable" : ""} + ); + } + + return ( +
+ + + ); +}; + +const EditableTextCell = ({ + value, + rowIndex, + cellIndex, + props, + handleTextInputChange, + isDisabled, + inputAriaLabel, + onUpdate +}) => { + const [isEditing, setIsEditing] = React.useState(false); + const [editedValue, setEditedValue] = React.useState( + typeof value === 'object' ? '' : value + ); + const inputRef = React.useRef(null); + + React.useEffect(() => { + if (isEditing && inputRef.current) { + inputRef.current.focus(); + } + }, [isEditing]); + + const displayValue = typeof value === 'object' ? value : editedValue; + + const handleClick = (action) => { + if (action === 'edit') { + // First notify parent about edit attempt + const canEdit = onUpdate(null, 'edit', true, rowIndex, null); + + // If parent returns false or undefined, cancel the edit + if (canEdit === false) { + setIsEditing(false); + setEditedValue(typeof value === 'object' ? '' : value); + // Explicitly call cancel to ensure proper cleanup + onUpdate(null, 'cancel', false, rowIndex, null); + return; + } + setIsEditing(true); + } else if (action === 'save') { + onUpdate(null, 'save', false, rowIndex, null); + setIsEditing(false); + } else if (action === 'cancel') { + setIsEditing(false); + setEditedValue(typeof value === 'object' ? '' : value); + onUpdate(null, 'cancel', false, rowIndex, null); + } + }; + + return ( + +
+
+ {isEditing ? ( + { + setEditedValue(newValue); + handleTextInputChange(newValue, null, rowIndex, cellIndex); + }} + aria-label={inputAriaLabel} + isDisabled={isDisabled} + /> + ) : ( +
{displayValue}
+ )} +
+ {!isDisabled && ( + + )} +
+
); }; @@ -385,7 +473,7 @@ class EditableTable extends React.Component { // DN row. if (rowIndex === 0) { this.handleDnModalToggle(); - return; + return false; // Explicitly return false to cancel edit } // RDN row. const attrCell = this.state.tableRows[rowIndex].cells[0]; @@ -397,7 +485,7 @@ class EditableTable extends React.Component { if ((myAttr === rdnInfo.rdnAttr.toLowerCase()) && (myVal === rdnInfo.rdnVal)) { this.handleDnModalToggle(); - return; + return false; // Explicitly return false to cancel edit } } @@ -410,14 +498,14 @@ class EditableTable extends React.Component { isPasswordField: true, pwdRowIndex: rowIndex }); - return; + return false; // Cancel normal edit flow } else if (BINARY_ATTRIBUTES.includes(myAttr)) { this.setState({ showFileUri: true, attrIsJpegPhoto: myAttr === 'jpegphoto', currentRowIndex: rowIndex }); - return; + return false; // Cancel normal edit flow } } @@ -425,7 +513,7 @@ class EditableTable extends React.Component { if (validationErrors && Object.keys(validationErrors).length) { newRows[rowIndex] = validateCellEdits(newRows[rowIndex], type, validationErrors); this.setState({ tableRows: newRows }); - return; + return false; } if (type === 'cancel') { @@ -438,7 +526,7 @@ class EditableTable extends React.Component { const foundEmptyValue = newRows.find(el => el.cells[1].props.value === ''); this.props.enableNextStep(foundEmptyValue === undefined); // } - return; + return false; } newRows[rowIndex] = applyCellEdits(newRows[rowIndex], type); @@ -459,6 +547,7 @@ class EditableTable extends React.Component { this.props.saveCurrentRows(rowDataToSave, this.state.namingRowID); } }); + return true; }; // Returns an array of row data to store in the parent component. @@ -922,19 +1011,31 @@ class EditableTable extends React.Component { } - {this.columns.map((column, columnIndex) => ( - - ))} + + {this.columns.map((column, columnIndex) => ( + + ))} + + - {tableRows.map((row, rowIndex) => ( - {row.cells.map((cell, cellIndex) => ( - - ))} - ))} + + {tableRows.map((row, rowIndex) => ( + + {row.cells.map((cell, cellIndex) => ( + + ))} + + + ))} +
{column.title}Actions
{column.title}Actions
{typeof cell.title === 'function' - ? cell.title(cell.props.value, rowIndex, cellIndex, cell.props) - : cell.title} - -
+ {typeof cell.title === 'function' + ? cell.title(cell.props.value, rowIndex, cellIndex, cell.props) + : cell.title} + + {rowIndex !== 0 && ( + + )} +
); diff --git a/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/addLdapEntry.jsx b/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/addLdapEntry.jsx index 43138414c..ffb8b8f7a 100644 --- a/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/addLdapEntry.jsx +++ b/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/addLdapEntry.jsx @@ -849,7 +849,8 @@ class AddLdapEntry extends React.Component { select={{ rowIndex, onSelect: this.handleSelectAttr, - isSelected: row.selected + isSelected: row.selected, + isDisabled: row.disableCheckbox }} /> {row.cells.map((cell, cellIndex) => ( diff --git a/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/editLdapEntry.jsx b/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/editLdapEntry.jsx index bd494b52b..231ef55e1 100644 --- a/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/editLdapEntry.jsx +++ b/src/cockpit/389-console/src/lib/ldap_editor/wizards/operations/editLdapEntry.jsx @@ -1351,7 +1351,9 @@ class EditLdapEntry extends React.Component { select={{ rowIndex, onSelect: this.handleSelectAttr, - isSelected: row.selected + isSelected: row.selected, + isDisabled: row.disableCheckbox + }} /> {row.cells.map((cell, cellIndex) => ( diff --git a/src/cockpit/389-console/src/lib/monitor/accesslog.jsx b/src/cockpit/389-console/src/lib/monitor/accesslog.jsx index 1de45738d..1024d42f8 100644 --- a/src/cockpit/389-console/src/lib/monitor/accesslog.jsx +++ b/src/cockpit/389-console/src/lib/monitor/accesslog.jsx @@ -2,6 +2,7 @@ import cockpit from "cockpit"; import React from "react"; import PropTypes from "prop-types"; import { + Button, Checkbox, FormSelect, FormSelectOption, @@ -13,11 +14,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; const _ = cockpit.gettext; @@ -115,13 +112,13 @@ export class AccessLogMonitor extends React.Component { {_("Access Log")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/auditfaillog.jsx b/src/cockpit/389-console/src/lib/monitor/auditfaillog.jsx index 755844077..c09b0ff67 100644 --- a/src/cockpit/389-console/src/lib/monitor/auditfaillog.jsx +++ b/src/cockpit/389-console/src/lib/monitor/auditfaillog.jsx @@ -2,6 +2,7 @@ import cockpit from "cockpit"; import React from "react"; import PropTypes from "prop-types"; import { + Button, Checkbox, FormSelect, FormSelectOption, @@ -13,11 +14,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; const _ = cockpit.gettext; @@ -109,13 +106,13 @@ export class AuditFailLogMonitor extends React.Component { {_("Audit Failure Log")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/auditlog.jsx b/src/cockpit/389-console/src/lib/monitor/auditlog.jsx index aa53eee34..9b5b643af 100644 --- a/src/cockpit/389-console/src/lib/monitor/auditlog.jsx +++ b/src/cockpit/389-console/src/lib/monitor/auditlog.jsx @@ -2,6 +2,7 @@ import cockpit from "cockpit"; import React from "react"; import PropTypes from "prop-types"; import { + Button, Checkbox, FormSelect, FormSelectOption, @@ -13,11 +14,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; const _ = cockpit.gettext; @@ -108,13 +105,13 @@ export class AuditLogMonitor extends React.Component { {_("Audit Log")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/chainingMonitor.jsx b/src/cockpit/389-console/src/lib/monitor/chainingMonitor.jsx index 45552a621..573fd8f3c 100644 --- a/src/cockpit/389-console/src/lib/monitor/chainingMonitor.jsx +++ b/src/cockpit/389-console/src/lib/monitor/chainingMonitor.jsx @@ -2,6 +2,7 @@ import cockpit from "cockpit"; import React from "react"; import PropTypes from "prop-types"; import { + Button, Form, Grid, GridItem, @@ -9,12 +10,10 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { - faLink, - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; + SyncAltIcon, + LinkIcon +} from '@patternfly/react-icons'; const _ = cockpit.gettext; @@ -29,13 +28,15 @@ export class ChainingMonitor extends React.Component {
- {this.props.suffix} ({this.props.bename}) - +   {this.props.suffix} ({this.props.bename}) + diff --git a/src/cockpit/389-console/src/lib/monitor/errorlog.jsx b/src/cockpit/389-console/src/lib/monitor/errorlog.jsx index 9bc2f7e0d..5d6c94909 100644 --- a/src/cockpit/389-console/src/lib/monitor/errorlog.jsx +++ b/src/cockpit/389-console/src/lib/monitor/errorlog.jsx @@ -2,6 +2,7 @@ import cockpit from "cockpit"; import React from "react"; import PropTypes from "prop-types"; import { + Button, Checkbox, FormSelect, FormSelectOption, @@ -13,11 +14,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; const _ = cockpit.gettext; @@ -169,13 +166,13 @@ export class ErrorLogMonitor extends React.Component { {_("Errors Log")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/replMonAgmts.jsx b/src/cockpit/389-console/src/lib/monitor/replMonAgmts.jsx index 27f2d6b1d..4bc1b19dc 100644 --- a/src/cockpit/389-console/src/lib/monitor/replMonAgmts.jsx +++ b/src/cockpit/389-console/src/lib/monitor/replMonAgmts.jsx @@ -7,12 +7,12 @@ import { } from "./monitorTables.jsx"; import { + Button, Text, TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faSyncAlt } from '@fortawesome/free-solid-svg-icons'; +import { SyncAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; @@ -60,13 +60,13 @@ export class ReplAgmtMonitor extends React.Component { {_("Monitor Replication Agreements")} - + > + +
diff --git a/src/cockpit/389-console/src/lib/monitor/replMonConflict.jsx b/src/cockpit/389-console/src/lib/monitor/replMonConflict.jsx index 760ecb9ad..569a3b6fd 100644 --- a/src/cockpit/389-console/src/lib/monitor/replMonConflict.jsx +++ b/src/cockpit/389-console/src/lib/monitor/replMonConflict.jsx @@ -10,6 +10,7 @@ import { ConflictCompareModal, } from "./monitorModals.jsx"; import { + Button, Tab, Tabs, TabTitleText, @@ -19,8 +20,7 @@ import { Tooltip, } from "@patternfly/react-core"; import { DoubleConfirmModal } from "../notifications.jsx"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faSyncAlt } from '@fortawesome/free-solid-svg-icons'; +import { SyncAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; @@ -396,13 +396,13 @@ export class ReplMonConflict extends React.Component { {_("Monitor Conflict and Glue Entries")} - + > + +
diff --git a/src/cockpit/389-console/src/lib/monitor/replMonTasks.jsx b/src/cockpit/389-console/src/lib/monitor/replMonTasks.jsx index 6a175fbf3..7c443e605 100644 --- a/src/cockpit/389-console/src/lib/monitor/replMonTasks.jsx +++ b/src/cockpit/389-console/src/lib/monitor/replMonTasks.jsx @@ -9,6 +9,7 @@ import { TaskLogModal, } from "./monitorModals.jsx"; import { + Button, Tab, Tabs, TabTitleText, @@ -16,8 +17,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faSyncAlt } from '@fortawesome/free-solid-svg-icons'; +import { SyncAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; @@ -90,13 +90,13 @@ export class ReplMonTasks extends React.Component { {_("Monitor Replication Tasks")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/replMonWinsync.jsx b/src/cockpit/389-console/src/lib/monitor/replMonWinsync.jsx index 076b94d2c..4723aa02b 100644 --- a/src/cockpit/389-console/src/lib/monitor/replMonWinsync.jsx +++ b/src/cockpit/389-console/src/lib/monitor/replMonWinsync.jsx @@ -6,12 +6,12 @@ import { WinsyncAgmtTable, } from "./monitorTables.jsx"; import { + Button, Text, TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faSyncAlt } from '@fortawesome/free-solid-svg-icons'; +import { SyncAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; @@ -59,13 +59,13 @@ export class ReplAgmtWinsync extends React.Component { {_("Monitor Winsync Agreements")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/replMonitor.jsx b/src/cockpit/389-console/src/lib/monitor/replMonitor.jsx index 656393a74..c6d338b61 100644 --- a/src/cockpit/389-console/src/lib/monitor/replMonitor.jsx +++ b/src/cockpit/389-console/src/lib/monitor/replMonitor.jsx @@ -31,8 +31,7 @@ import { SortByDirection, } from '@patternfly/react-table'; import { TrashAltIcon } from '@patternfly/react-icons/dist/js/icons/trash-alt-icon'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faSyncAlt } from '@fortawesome/free-solid-svg-icons'; +import { SyncAltIcon } from "@patternfly/react-icons"; import { DoubleConfirmModal } from "../notifications.jsx"; const _ = cockpit.gettext; @@ -1516,13 +1515,13 @@ export class ReplMonitor extends React.Component { {_("Synchronization Report")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/securitylog.jsx b/src/cockpit/389-console/src/lib/monitor/securitylog.jsx index 08ca6e356..7ef0721c9 100644 --- a/src/cockpit/389-console/src/lib/monitor/securitylog.jsx +++ b/src/cockpit/389-console/src/lib/monitor/securitylog.jsx @@ -2,6 +2,7 @@ import cockpit from "cockpit"; import React from "react"; import PropTypes from "prop-types"; import { + Button, Checkbox, FormSelect, FormSelectOption, @@ -13,11 +14,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; const _ = cockpit.gettext; @@ -115,13 +112,13 @@ export class SecurityLogMonitor extends React.Component { {_("Security Log")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/serverMonitor.jsx b/src/cockpit/389-console/src/lib/monitor/serverMonitor.jsx index 264430e48..599595acd 100644 --- a/src/cockpit/389-console/src/lib/monitor/serverMonitor.jsx +++ b/src/cockpit/389-console/src/lib/monitor/serverMonitor.jsx @@ -27,10 +27,7 @@ import { ChartThemeColor, ChartVoronoiContainer, } from '@patternfly/react-charts'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; +import { SyncAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; @@ -327,13 +324,13 @@ export class ServerMonitor extends React.Component { {_("Server Statistics")} - + > + + diff --git a/src/cockpit/389-console/src/lib/monitor/suffixMonitor.jsx b/src/cockpit/389-console/src/lib/monitor/suffixMonitor.jsx index 891076206..464137731 100644 --- a/src/cockpit/389-console/src/lib/monitor/suffixMonitor.jsx +++ b/src/cockpit/389-console/src/lib/monitor/suffixMonitor.jsx @@ -22,11 +22,7 @@ import { ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faLeaf, - faTree, -} from '@fortawesome/free-solid-svg-icons'; +import { LeafIcon, TreeIcon } from "@patternfly/react-icons"; import { numToCommas, displayBytes, log_cmd } from '../tools.jsx'; const _ = cockpit.gettext; @@ -225,10 +221,10 @@ export class SuffixMonitor extends React.Component { let dncachecurr = 0; let dncachecount = 0; let dnutilratio = 1; - let suffixIcon = faTree; + let SuffixIcon = TreeIcon; if (this.props.dbtype === "subsuffix") { - suffixIcon = faLeaf; + SuffixIcon = LeafIcon; } let content = ( @@ -606,7 +602,7 @@ export class SuffixMonitor extends React.Component {
- {this.props.suffix} ({this.props.bename}) + {this.props.suffix} ({this.props.bename})
diff --git a/src/cockpit/389-console/src/lib/plugins/usn.jsx b/src/cockpit/389-console/src/lib/plugins/usn.jsx index ae4fea15f..b21bf126c 100644 --- a/src/cockpit/389-console/src/lib/plugins/usn.jsx +++ b/src/cockpit/389-console/src/lib/plugins/usn.jsx @@ -339,6 +339,8 @@ class USNPlugin extends React.Component { this.handleSwitchChange(globalMode)} isDisabled={disableSwitch} diff --git a/src/cockpit/389-console/src/lib/replication/replSuffix.jsx b/src/cockpit/389-console/src/lib/replication/replSuffix.jsx index d0f7059d3..8c346364a 100644 --- a/src/cockpit/389-console/src/lib/replication/replSuffix.jsx +++ b/src/cockpit/389-console/src/lib/replication/replSuffix.jsx @@ -19,14 +19,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faClone, - faLeaf, - faTree, - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon, TreeIcon, CloneIcon, LeafIcon } from "@patternfly/react-icons"; import PropTypes from "prop-types"; import { log_cmd, valid_dn, callCmdStreamPassword } from "../tools.jsx"; @@ -296,12 +289,12 @@ export class ReplSuffix extends React.Component { render () { let spinning = ""; let spintext = ""; - let suffixIcon = faTree; + let SuffixIcon = TreeIcon; if (this.props.replicated) { - suffixIcon = faClone; + SuffixIcon = CloneIcon; } else { if (this.props.repl === "subsuffix") { - suffixIcon = faLeaf; + SuffixIcon = LeafIcon; } } if (this.props.spinning) { @@ -416,13 +409,15 @@ export class ReplSuffix extends React.Component {
-   {this.props.suffix} - +   {this.props.suffix} + {spinning} {spintext} diff --git a/src/cockpit/389-console/src/lib/replication/replTasks.jsx b/src/cockpit/389-console/src/lib/replication/replTasks.jsx index 49135ff4f..99646ae3b 100644 --- a/src/cockpit/389-console/src/lib/replication/replTasks.jsx +++ b/src/cockpit/389-console/src/lib/replication/replTasks.jsx @@ -14,11 +14,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; @@ -361,30 +357,30 @@ export class ReplRUV extends React.Component { {_("Local RUV")} - { this.props.reload(this.props.suffix); }} - /> + > + + {localRUV} {_("Remote RUV's")} - { this.props.reload(this.props.suffix); }} - /> + > + +
diff --git a/src/cockpit/389-console/src/lib/server/accessLog.jsx b/src/cockpit/389-console/src/lib/server/accessLog.jsx index 416fd8d9f..f2dd852c0 100644 --- a/src/cockpit/389-console/src/lib/server/accessLog.jsx +++ b/src/cockpit/389-console/src/lib/server/accessLog.jsx @@ -31,11 +31,7 @@ import { Tbody, Td, } from '@patternfly/react-table'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; import PropTypes from "prop-types"; const settings_attrs = [ @@ -884,15 +880,15 @@ export class ServerAccessLog extends React.Component { {_("Access Log Settings")} - { this.refreshConfig(); }} - /> + > + + diff --git a/src/cockpit/389-console/src/lib/server/auditLog.jsx b/src/cockpit/389-console/src/lib/server/auditLog.jsx index f29068930..cabf0c362 100644 --- a/src/cockpit/389-console/src/lib/server/auditLog.jsx +++ b/src/cockpit/389-console/src/lib/server/auditLog.jsx @@ -27,11 +27,7 @@ import { SelectVariant, SelectOption } from '@patternfly/react-core/deprecated'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; import PropTypes from "prop-types"; const settings_attrs = [ @@ -906,15 +902,15 @@ export class ServerAuditLog extends React.Component { {_("Audit Log Settings")} - { this.refreshConfig(); }} - /> + > + + diff --git a/src/cockpit/389-console/src/lib/server/auditfailLog.jsx b/src/cockpit/389-console/src/lib/server/auditfailLog.jsx index 5b29e54db..4ebf4cd6a 100644 --- a/src/cockpit/389-console/src/lib/server/auditfailLog.jsx +++ b/src/cockpit/389-console/src/lib/server/auditfailLog.jsx @@ -21,11 +21,7 @@ import { TextVariants, TimePicker, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; import PropTypes from "prop-types"; const settings_attrs = [ @@ -713,15 +709,15 @@ export class ServerAuditFailLog extends React.Component { {_("Audit Fail Log Settings")} - { this.refreshConfig(); }} - /> + > + + diff --git a/src/cockpit/389-console/src/lib/server/errorLog.jsx b/src/cockpit/389-console/src/lib/server/errorLog.jsx index 4e5216e33..61ca26bdf 100644 --- a/src/cockpit/389-console/src/lib/server/errorLog.jsx +++ b/src/cockpit/389-console/src/lib/server/errorLog.jsx @@ -31,11 +31,7 @@ import { Tbody, Td } from '@patternfly/react-table'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; import PropTypes from "prop-types"; const settings_attrs = [ @@ -891,15 +887,15 @@ export class ServerErrorLog extends React.Component { {_("Error Log Settings")} - { this.handleRefreshConfig(); }} - /> + > + + diff --git a/src/cockpit/389-console/src/lib/server/ldapi.jsx b/src/cockpit/389-console/src/lib/server/ldapi.jsx index 8781818f7..59970fdd0 100644 --- a/src/cockpit/389-console/src/lib/server/ldapi.jsx +++ b/src/cockpit/389-console/src/lib/server/ldapi.jsx @@ -18,11 +18,7 @@ import { SelectOption, SelectVariant } from '@patternfly/react-core/deprecated'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from "@patternfly/react-icons"; import PropTypes from "prop-types"; const ldapi_attrs = [ @@ -409,13 +405,13 @@ export class ServerLDAPI extends React.Component { {_("LDAPI & AutoBind Settings")} - + > + + diff --git a/src/cockpit/389-console/src/lib/server/sasl.jsx b/src/cockpit/389-console/src/lib/server/sasl.jsx index a4478498a..6d95d66ef 100644 --- a/src/cockpit/389-console/src/lib/server/sasl.jsx +++ b/src/cockpit/389-console/src/lib/server/sasl.jsx @@ -21,11 +21,7 @@ import { } from '@patternfly/react-core/deprecated'; import { SASLTable } from "./serverTables.jsx"; import { SASLMappingModal } from "./serverModals.jsx"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from "@patternfly/react-icons"; const _ = cockpit.gettext; @@ -628,13 +624,13 @@ export class ServerSASL extends React.Component { {_("SASL Settings")} - + > + + diff --git a/src/cockpit/389-console/src/lib/server/securityLog.jsx b/src/cockpit/389-console/src/lib/server/securityLog.jsx index 6cf7e8c0f..4b8cc55d3 100644 --- a/src/cockpit/389-console/src/lib/server/securityLog.jsx +++ b/src/cockpit/389-console/src/lib/server/securityLog.jsx @@ -4,7 +4,6 @@ import { log_cmd } from "../tools.jsx"; import { Button, Checkbox, - ExpandableSection, Form, FormGroup, FormSelect, @@ -23,11 +22,7 @@ import { TextVariants, TimePicker, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faSyncAlt -} from '@fortawesome/free-solid-svg-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; +import { SyncAltIcon } from '@patternfly/react-icons'; import PropTypes from "prop-types"; const _ = cockpit.gettext; @@ -593,6 +588,7 @@ export class ServerSecurityLog extends React.Component { id="nsslapd-securitylog-compress" isChecked={this.state['nsslapd-securitylog-compress']} onChange={(_event, value) => this.handleSwitchChange(value)} + aria-label="nsslapd-securitylog-compress" /> @@ -736,15 +732,15 @@ export class ServerSecurityLog extends React.Component { {_("Security Log Settings")} - { this.refreshConfig(); }} - /> + > + + diff --git a/src/cockpit/389-console/src/lib/server/settings.jsx b/src/cockpit/389-console/src/lib/server/settings.jsx index 0e0c2fd21..f6432ecd4 100644 --- a/src/cockpit/389-console/src/lib/server/settings.jsx +++ b/src/cockpit/389-console/src/lib/server/settings.jsx @@ -29,7 +29,6 @@ import { SelectVariant } from '@patternfly/react-core/deprecated'; import { SyncAltIcon } from '@patternfly/react-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; import PropTypes from "prop-types"; const general_attrs = [ diff --git a/src/cockpit/389-console/src/lib/server/tuning.jsx b/src/cockpit/389-console/src/lib/server/tuning.jsx index 5a4eccf84..489c520b5 100644 --- a/src/cockpit/389-console/src/lib/server/tuning.jsx +++ b/src/cockpit/389-console/src/lib/server/tuning.jsx @@ -16,7 +16,6 @@ import { } from "@patternfly/react-core"; import PropTypes from "prop-types"; import { SyncAltIcon } from '@patternfly/react-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; const tuning_attrs = [ 'nsslapd-ndn-cache-enabled', diff --git a/src/cockpit/389-console/src/monitor.jsx b/src/cockpit/389-console/src/monitor.jsx index c6d72b7d4..d4ee265ed 100644 --- a/src/cockpit/389-console/src/monitor.jsx +++ b/src/cockpit/389-console/src/monitor.jsx @@ -23,13 +23,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faBook, - faLeaf, - faLink, - faTree, -} from '@fortawesome/free-solid-svg-icons'; +import { BookIcon, TreeIcon, LeafIcon, LinkIcon } from '@patternfly/react-icons'; import { CatalogIcon, ClusterIcon, @@ -132,11 +126,11 @@ export class Monitor extends React.Component { processTree(suffixData) { for (const suffix of suffixData) { if (suffix.type === "suffix") { - suffix.icon = ; + suffix.icon = ; } else if (suffix.type === "subsuffix") { - suffix.icon = ; + suffix.icon = ; } else { - suffix.icon = ; + suffix.icon = ; } if (suffix.children.length === 0) { delete suffix.children; @@ -150,7 +144,7 @@ export class Monitor extends React.Component { for (const suffix of this.state.replicatedSuffixes) { suffixTree.push({ name: suffix, - icon: , + icon: , id: "replication-suffix-" + suffix, type: "replication-suffix", defaultExpanded: false, @@ -242,31 +236,31 @@ export class Monitor extends React.Component { children: [ { name: _("Access Log"), - icon: , + icon: , id: "access-log-monitor", type: "log", }, { name: _("Audit Log"), - icon: , + icon: , id: "audit-log-monitor", type: "log", }, { name: _("Audit Failure Log"), - icon: , + icon: , id: "auditfail-log-monitor", type: "log", }, { name: _("Errors Log"), - icon: , + icon: , id: "error-log-monitor", type: "log", }, { name: _("Security Log"), - icon: , + icon: , id: "security-log-monitor", type: "log", }, diff --git a/src/cockpit/389-console/src/replication.jsx b/src/cockpit/389-console/src/replication.jsx index 4c84a8003..581e2b759 100644 --- a/src/cockpit/389-console/src/replication.jsx +++ b/src/cockpit/389-console/src/replication.jsx @@ -10,12 +10,7 @@ import { TextContent, TextVariants, } from "@patternfly/react-core"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - faClone, - faTree, - faLeaf, -} from '@fortawesome/free-solid-svg-icons'; +import { TreeIcon, LeafIcon, CloneIcon } from '@patternfly/react-icons'; import { TopologyIcon } from '@patternfly/react-icons'; @@ -157,7 +152,7 @@ export class Replication extends React.Component { treeBranch.splice(sub, 1); continue; } else if (treeBranch[sub].replicated) { - treeBranch[sub].icon = ; + treeBranch[sub].icon = ; treeBranch[sub].replicated = true; } if (treeBranch[sub].children.length === 0) { @@ -194,9 +189,9 @@ export class Replication extends React.Component { treeData = JSON.parse(content); for (const suffix of treeData) { if (suffix.type === "suffix") { - suffix.icon = ; + suffix.icon = ; } else if (suffix.type === "subsuffix") { - suffix.icon = ; + suffix.icon = ; } if (suffix.children.length === 0) { delete suffix.children; @@ -219,7 +214,7 @@ export class Replication extends React.Component { let found = false; for (let i = 0; i < treeData.length; i++) { if (treeData[i].replicated) { - treeData[i].icon = ; + treeData[i].icon = ; replicated = true; if (!found) { // Load the first replicated suffix we find @@ -255,7 +250,7 @@ export class Replication extends React.Component { replicated = suffix.replicated; } if (suffix.replicated) { - suffix.icon = ; + suffix.icon = ; } } this.loadReplSuffix(current_node); diff --git a/src/cockpit/389-console/src/security.jsx b/src/cockpit/389-console/src/security.jsx index cb622d927..9d974be30 100644 --- a/src/cockpit/389-console/src/security.jsx +++ b/src/cockpit/389-console/src/security.jsx @@ -28,7 +28,6 @@ import { } from '@patternfly/react-core/deprecated'; import PropTypes from "prop-types"; import { SyncAltIcon } from '@patternfly/react-icons'; -import '@fortawesome/fontawesome-svg-core/styles.css'; const _ = cockpit.gettext;