Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 6625 - UI - fix various issues with LDAP browser, etc #6627

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/cockpit/389-console/po/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,7 @@ msgstr "警告! Account Policyの設定エントリ $0 が存在しません!"
#: src/lib/plugins/accountPolicy.jsx:485
#: src/lib/plugins/referentialIntegrity.jsx:623
#: src/lib/plugins/memberOf.jsx:843 src/lib/plugins/managedEntries.jsx:797
msgid "Config entry $0 was successfully $1ed"
msgid "Config entry $0 was successfully $1"
msgstr "構成エントリ $0 の $1 に成功しました"

#: src/lib/plugins/accountPolicy.jsx:503 src/lib/plugins/dna.jsx:575
Expand Down Expand Up @@ -2622,15 +2622,15 @@ msgid "Delete Shared Config"
msgstr "共有設定を削除"

#: src/lib/plugins/pluginBasicConfig.jsx:117
msgid "$0 plugin was successfully $1d."
msgid "$0 plugin was successfully $1."
msgstr "$0プラグインを$1にしました。"

#: src/lib/plugins/pluginBasicConfig.jsx:118
msgid "Please, restart the instance."
msgstr "インスタンスを再起動してください。"

#: src/lib/plugins/pluginBasicConfig.jsx:129
msgid "$0 plugin was successfully $1d. Please, restart the instance."
msgid "$0 plugin was successfully $1. Please, restart the instance."
msgstr "$0プラグインを$1にしました。インスタンスを再起動してください。"

#: src/lib/plugins/pluginBasicConfig.jsx:138 src/plugins.jsx:384
Expand Down Expand Up @@ -5512,7 +5512,7 @@ msgstr ""
"(passwordSendExpiringTime)"

#: src/lib/database/localPwp.jsx:414 src/lib/database/localPwp.jsx:2791
msgid "<>Always Send <i>Password Expiring</i> Control</>"
msgid "Always send Password Expiring Control"
msgstr "パスワードの有効期限切れを警告する"

#: src/lib/database/localPwp.jsx:425
Expand Down Expand Up @@ -7316,7 +7316,7 @@ msgid "Error loading global password policy - $0"
msgstr "グローバルパスワードポリシーの読み込み中にエラーが発生しました - $0"

#: src/lib/database/globalPwp.jsx:1235
msgid "<>Always Send <i>Password Expiring</i>&nbsp; Control</>"
msgid "Always send Password Expiring Control"
msgstr "パスワードの有効期限切れを警告する"

#: src/lib/database/globalPwp.jsx:1253
Expand Down Expand Up @@ -7595,7 +7595,7 @@ msgstr ""
"してください"

#: src/lib/replication/replConfig.jsx:153
msgid "Successfully $0d replica to a $1"
msgid "Successfully $0 replica to a $1"
msgstr "$1にレプリカを$0しました"

#: src/lib/replication/replConfig.jsx:165
Expand Down Expand Up @@ -9082,12 +9082,12 @@ msgstr "DNをリネームする"
#: src/lib/ldap_editor/lib/editableTable.jsx:734
msgid ""
"You cannot modify the RDN ( Relative Distinguished Name ) in the "
"<strong>Quick Update</strong> mode."
"edit mode."
msgstr "クイック更新モードでは、RDN(相対識別名)を変更することはできません。"

#: src/lib/ldap_editor/lib/editableTable.jsx:736
msgid ""
"If you want to modify the RDN, please use the <strong>Quick Update</strong> "
"If you want to modify the RDN, please use the <Rename "
"action option"
msgstr ""
"RDNを変更する場合は、クイック更新アクションオプションを使用してください。"
Expand Down
12 changes: 6 additions & 6 deletions src/cockpit/389-console/src/ds.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ export class DSInstance extends React.Component {
if (action === "stop") {
action = "stopp"; // Fixes typo in notification
}
this.addNotification("success", cockpit.format(_("Instance was successfully $0"), action));
this.addNotification("success", cockpit.format(_("Instance was successfully $0"), action + "ed"));
})
.fail(err => {
const errMsg = JSON.parse(err);
Expand Down Expand Up @@ -697,9 +697,9 @@ export class DSInstance extends React.Component {
<span className="spinner spinner-lg spinner-inline" />
</p>
<div className="ds-margin-top-lg">
<Progress
value={progressValue}
label={`${progressValue}%`}
<Progress
value={progressValue}
label={`${progressValue}%`}
measureLocation={ProgressMeasureLocation.inside}
aria-label="Directory Server Configuration loading progress"
/>
Expand Down Expand Up @@ -775,8 +775,8 @@ export class DSInstance extends React.Component {
position={DropdownPosition.right}
onSelect={this.handleDropdown}
toggle={
<DropdownToggle
onToggle={(event, isOpen) => this.handleToggle(event, isOpen)}
<DropdownToggle
onToggle={(event, isOpen) => this.handleToggle(event, isOpen)}
toggleIndicator={CaretDownIcon}
variant="primary"
id="ds-dropdown"
Expand Down
1 change: 0 additions & 1 deletion src/cockpit/389-console/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="../base1/cockpit.js"></script>
<script src="./vendor-react.js"></script>
<script type="text/javascript" src="po.js"></script>
<link href="./index.css" type="text/css" rel="stylesheet">
</head>
Expand Down
4 changes: 2 additions & 2 deletions src/cockpit/389-console/src/lib/database/globalPwp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ export class GlobalPwPolicy extends React.Component {
'nsslapd-pwdpbkdf2numiterations': '',
'_nsslapd-pwdpbkdf2numiterations': ''
};

if (!skipLoading) {
stateUpdates["loading"] = false
}
Expand Down Expand Up @@ -1393,7 +1393,7 @@ export class GlobalPwPolicy extends React.Component {
onChange={(e, checked) => {
this.handleExpChange(e);
}}
label={_("<>Always Send <i>Password Expiring</i>&nbsp; Control</>")}
label={_("Always send Password Expiring Control")}
/>
</GridItem>
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions src/cockpit/389-console/src/lib/database/localPwp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class CreatePolicy extends React.Component {
this.props.handleChange(e);
}}
isDisabled={!this.props.passwordexp}
label={_("<>Always Send <i>Password Expiring</i> Control</>")}
label={_("Always send Password Expiring Control")}
className="ds-lower-field"
/>
</GridItem>
Expand Down Expand Up @@ -2800,7 +2800,7 @@ export class LocalPwPolicy extends React.Component {
onChange={(e, checked) => {
this.handleExpChange(e);
}}
label={_("<>Always Send <i>Password Expiring</i> Control</>")}
label={_("Always send Password Expiring Control")}
/>
</GridItem>
</Grid>
Expand Down Expand Up @@ -3227,7 +3227,7 @@ export class LocalPwPolicy extends React.Component {
<TextContent>
<Text component={TextVariants.h3}>
{_("Local Password Policies")}
<Button
<Button
variant="plain"
aria-label={_("Refresh the local password policies")}
onClick={this.handleLoadPolicies}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,14 +714,14 @@ class EditableTable extends React.Component {
actionResolver = (rowData, { rowIndex }) => {
const myAttr = rowData.cells[0].props.value;
const myName = rowData.cells[0].props.name;

// Early return for DN
if (myAttr === "dn") {
return [];
}

const actions = [];

// Naming Action
if (!(myName === this.state.namingRowID || this.props.disableNamingChange) &&
((this.props.namingAttr && myAttr !== this.props.namingAttr) || this.props.namingAttr === "")) {
Expand All @@ -745,7 +745,7 @@ class EditableTable extends React.Component {
}

// Add separator if needed
if (actions.length > 0 && (!this.props.isAttributeSingleValued(myAttr) ||
if (actions.length > 0 && (!this.props.isAttributeSingleValued(myAttr) ||
!(this.state.tableRows.length === 1 || rowData.namingAttr ||
((this.props.isAttributeRequired(myAttr) || rowData.required) && this.hasSingleOccurrence(myAttr))))) {
actions.push({ isSeparator: true });
Expand Down Expand Up @@ -889,9 +889,9 @@ class EditableTable extends React.Component {
</Button>
]}
>
{_("You cannot modify the RDN ( Relative Distinguished Name ) in the <strong>Quick Update</strong> mode.")}
{_("You cannot modify the RDN ( Relative Distinguished Name ) in the edit mode.")}
<br />
{_("If you want to modify the RDN, please use the <strong>Quick Update</strong> action option")}
{_("If you want to modify the RDN, please use the Rename action option")}
</Modal>}

{isPasswordField &&
Expand Down Expand Up @@ -1023,7 +1023,7 @@ class EditableTable extends React.Component {
<Tr key={rowIndex}>
{row.cells.map((cell, cellIndex) => (
<Td key={cellIndex}>
{typeof cell.title === 'function'
{typeof cell.title === 'function'
? cell.title(cell.props.value, rowIndex, cellIndex, cell.props)
: cell.title}
</Td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ class DeleteOperationWizard extends React.Component {
this.state.numSubordinates,
(result) => {
this.setState({
commandOutput: result.errorCode === 0 ? _("Successfully deleted entry") : _("Failed to delete entry, error: ") + result.errorCode,
commandOutput: result.errorCode === 0 ?
_("Successfully deleted entry") :
_("Failed to delete entry: ") + result.output,
resultVariant: result.errorCode === 0 ? 'success' : 'danger',
deleting: false,
}, () => {
Expand Down Expand Up @@ -234,7 +236,7 @@ class DeleteOperationWizard extends React.Component {
);

let reviewInfo = '';
if (commandOutput === '') {
if (commandOutput === '' || commandOutput === "Successfully deleted entry") {
reviewInfo = numSubordinates > 0
? _("The entries were")
: _("The entry was");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class NewEntryWizard extends React.Component {
this.setState({ getStartedStepRadio: event.currentTarget.value });
};

onToggleWizard = () => {
this.props.handleToggleWizard();
};

createInitialLayout = () => {
// console.log(`this.props.createRootEntry = ${this.props.createRootEntry}`);
// Creation of a root entry.
Expand Down Expand Up @@ -130,10 +134,6 @@ variant="custom" isInline
]);
};

onToggleWizard () {
this.props.handleToggleWizard();
}

render () {
const {
getStartedStepRadio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,9 @@ class AddNewAci extends React.Component {
modifyLdapEntry(params, ldifArray, (result) => {
this.props.refreshAciTable();
this.setState({
commandOutput: result.errorCode === 0 ? _("Successfully added ACI!") : _("Failed to add ACI, error: ") + result.errorCode,
commandOutput: result.errorCode === 0 ?
_("Successfully added ACI!") :
_("Failed to add ACI: ") + result.output,
resultVariant: result.errorCode === 0 ? 'success' : 'danger',
adding: false
}, () => { this.props.onReload() }); // refreshes tableView
Expand Down Expand Up @@ -967,7 +969,7 @@ class AddNewAci extends React.Component {
<SelectOption key="allow" value="allow" />
<SelectOption key="deny" value="deny" />
</Select>
<Table
<Table
aria-label="Selectable Table User Rights"
variant="compact"
borders={false}
Expand Down Expand Up @@ -1432,7 +1434,7 @@ class AddNewAci extends React.Component {
component: resultComponent,
nextButtonText: _("Finish"),
canJumpTo: stepIdReachedVisual >= 9,
hideBackButton: true,
hideBackButton: this.state.resultVariant === "success" ? true : false,
enableNext: !this.state.adding,
}];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ class AddCosDefinition extends React.Component {
(result) => {
const myDn = myLdifArray[0].substring(4);
this.setState({
commandOutput: result.errorCode === 0 ? _("CoS Definition successfully created!") : _("Failed to create cos: ") + result.errorCode,
commandOutput: result.errorCode === 0 ?
_("CoS Definition successfully created!") :
_("Failed to create cos: ") + result.output,
resultVariant: result.errorCode === 0 ? 'success' : 'danger',
adding: false,
createdDefiniton: myDn,
Expand Down Expand Up @@ -1224,7 +1226,7 @@ class AddCosDefinition extends React.Component {
);

const ldifListItems = ldifArray.map((line, index) =>
<SimpleListItem key={index} isCurrent={line.startsWith('dn: ')}>
<SimpleListItem key={index} isActive={line.startsWith('dn: ')}>
{line}
</SimpleListItem>
);
Expand Down Expand Up @@ -1374,7 +1376,7 @@ class AddCosDefinition extends React.Component {
component: cosReviewStep,
nextButtonText: _("Finish"),
canJumpTo: stepIdReached >= 8 && stepIdReached < 9,
hideBackButton: true,
hideBackButton: this.state.resultVariant === "success" ? true : false,
enableNext: !this.state.adding
},
...((this.state.cosType === 'classic') && (resultVariant !== 'danger')
Expand All @@ -1385,7 +1387,7 @@ class AddCosDefinition extends React.Component {
component: cosReviewStep,
nextButtonText: _("Finish"),
canJumpTo: stepIdReached > 9,
hideBackButton: true,
hideBackButton: this.state.resultVariant === "success" ? true : false,
enableNext: !this.state.adding
}
]
Expand Down
Loading
Loading