From b43ec69c8656a28573b30abef4b8f3a44a8caedc Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Mar 05 2020 14:56:46 +0000 Subject: Issue 50926 - Remove dual spinner and other UI fixes Description: Removed unnecessary spinner when loading the backup table. Removed duplicate ID's from html Revised Create Instance modal to be easier to read Fixed typo in posix winsync fixup task help description Removed unused CSS styles Fixed plugin modal alignment issues Fixed typo in Enable Replication modal relates: https://pagure.io/389-ds-base/issue/50926 Reviewed by: spichugi(Thanks!) --- diff --git a/src/cockpit/389-console/src/css/ds.css b/src/cockpit/389-console/src/css/ds.css index 76bf2a9..9248116 100644 --- a/src/cockpit/389-console/src/css/ds.css +++ b/src/cockpit/389-console/src/css/ds.css @@ -23,16 +23,6 @@ text-align: left !important; } -/* Main nav page index.html */ -.ds-content { - padding: 0; - padding-top: 115px; /* this pushes the content below fixed nav bar */ - padding-bottom: 50px; - margin-top: 0; - margin-right: 10px; - margin-bottom: 10px; -} - .ds-chart-right { margin-left: 65px; } @@ -70,25 +60,6 @@ td { max-width: 200px !important; } -.ds-hr { - margin-top: 0.5em; - margin-bottom: 0.5em; - border-style: inset; - border-width: 1px; - padding: 0px !important; -} - -.ds-hr-logs { - display: block; - margin-left: 0; - margin-top: 0.5em; - margin-bottom: 0.5em; - border-style: inset; - border-width: 1px; - padding: 0px !important; - width: 525px; -} - .ds-no-padding { padding: 0px !important; } @@ -117,10 +88,6 @@ td { opacity: 0.7; } -.ds-split { - width: 400px; -} - .ds-input { margin-top: 5px !important; padding-right: 5px !important; @@ -141,20 +108,6 @@ td { text-align: right; } -.ds-pw-input { - margin-top: 5px; - padding-right: 5px; - padding-left: 5px !important; - min-width: 65px !important; - max-width: 65px !important; -} - -.ds-history-input { - margin-top: !important; - margin-right: 5px; - margin-left: 40px; -} - .ds-divider { width: 35px; } @@ -180,27 +133,6 @@ td { text-align: left; } -.ds-dblink-form-input { - width: 415px !important; - margin-top: 5px; - padding-right: 10px; - height: 37px !important; -} - -.ds-repl-table { - background-color: white !important; - padding: 0px !important; - border: 1px solid #909090; - table-layout: fixed; - width: 100%; - clear: both; - word-wrap: break-word !important; - text-align: center; - margin-top: -10px !important; - line-height: 1; -} - - .ds-db-table { border: 1px solid #d1d1d1; word-wrap: break-word !important; @@ -270,12 +202,6 @@ td { margin-right: 5px !important; } -.ds-send-expiring-checkbox { - margin-top: 12px !important; - margin-right: 12px !important; - padding: 5px; -} - .ds-operate-spinner { margin-left: 10px; top: 10px; @@ -298,38 +224,11 @@ td { margin-bottom: 10px !important; } -.ds-config-label-lrg { - margin-top: 10px; - width: 160px !important; - margin-bottom: 10px !important; -} - -.ds-config-sub-label { - margin-top: 10px; - width: 225px !important; - margin-bottom: 10px !important; - padding-left: 20px; -} - .ds-label-sm { width: 175px !important; margin-bottom: 10px !important; } -.ds-expire-label { - margin-top: 7px; - margin-bottom: 7px; - width: 285px !important; -} - -.ds-minage-label { - padding: 10px; -} - -.ds-expired-div { - padding-left: 30px !important; -} - .ds-modal-row { margin-left: 20px; margin-right: 0px !important; @@ -348,17 +247,6 @@ td { width: 85px; } -.ds-oc-form-list { - width: 232px !important; - max-height: 350px !important; - min-height: 350px !important; -} - -.ds-oc-form-list:focus { - max-height: 350px !important; - min-height: 350px !important; -} - p { line-height: 1; white-space: normal; @@ -435,11 +323,6 @@ option { background-color: #f3f3f3; } -.ds-nav-tab a { - text-align: center; - min-width: 125px !important; -} - .ds-float-right { float: right; } @@ -459,29 +342,6 @@ option { Width: 18px !important; } -.ds-footer { - background-color: #f5f5f5 !important; - margin-left: -25px; - padding: 10px; - position: fixed; - bottom: 0; - width: 100%; - height: 50px; - border-top: 1px solid #e2e2e2 !important; -} - -.ds-nav-bar { - position: fixed; - top: 0; - width: 100%; - background-color: white; - z-index: 1; -} - -.ds-nav-item a { - text-align: left; -} - .ds-config-header { margin-bottom: 20px; } @@ -555,38 +415,6 @@ option { overflow-y:auto; } -/* wizard accordions are narrower */ -.ds-wiz-accordion { - margin-top: 20px; - color: #228bc0 !important; - background-color: white; - border: 0; - position: relative; - overflow: hidden; - width: 500px; - text-align: left; -} - -.ds-wiz-accordion:after { - display: inline-block; - content: ""; - height: 1px; - background: #228bc0; - position: absolute; - width: 500px; - top: 50% !important; - margin-left: 10px; - text-align: left; -} - -.ds-wiz-accordion:focus { - outline: none !important; - border: 0 !important; - -moz-outline: none !important; - -webkit-box-shadow: none !important; - box-shadow: 0 !important; -} - .ds-indent { margin-left: 15px !important; margin-right: 15px !important; @@ -678,10 +506,6 @@ option { transform: translate(-25%, -35%); } -.ds-popup { - min-width: 350px !important; -} - .ds-input-auto { width: 100%; margin-right: 10px; diff --git a/src/cockpit/389-console/src/ds.jsx b/src/cockpit/389-console/src/ds.jsx index 439a850..c003d16 100644 --- a/src/cockpit/389-console/src/ds.jsx +++ b/src/cockpit/389-console/src/ds.jsx @@ -120,13 +120,6 @@ export class DSInstance extends React.Component { state: "success" } })); - } else { - this.setState(prevState => ({ - pageLoadingState: { - ...prevState.pageLoadingState, - state: "loading" - } - })); } } ); @@ -311,9 +304,6 @@ export class DSInstance extends React.Component { } loadBackups() { - this.setState({ - loadingOperate: true - }); const cmd = ["dsctl", "-j", this.state.serverId, "backups"]; log_cmd("loadBackupsDSInstance", "Load Backups", cmd); cockpit.spawn(cmd, { superuser: true, err: "message" }).done(content => { @@ -324,7 +314,6 @@ export class DSInstance extends React.Component { } this.setState({ backupRows: rows, - loadingOperate: false }); }); } @@ -490,7 +479,6 @@ export class DSInstance extends React.Component { } = this.state; let mainContent = ""; - if (pageLoadingState.state === "loading") { mainContent = (
@@ -760,7 +748,7 @@ class CreateInstanceModal extends React.Component { createDBSuffix: "", createDBName: "", createTLSCert: true, - createInitDB: "", + createInitDB: "noInit", loadingCreate: false }; @@ -1088,19 +1076,19 @@ class CreateInstanceModal extends React.Component { > - Create New Server Instance + Create New Server Instance
Instance Name - + Port - + Secure Port - + - Create Self-Signed TLS Certificate DB + Create Self-Signed TLS Certificate - + Directory Manager DN - + Directory Manager Password - + - + Confirm Password - +
Optional Database Settings
- + Database Suffix - + Database Name - + - + - + - +
); @@ -400,7 +399,7 @@ DSTable.propTypes = { toolBarDisableLoadingSpinner: PropTypes.bool, toolBarPagination: PropTypes.array, toolBarPaginationPerPage: PropTypes.number, - noSearchBar: PropTypes.bool + noSearchBar: PropTypes.bool, }; DSShortTable.propTypes = { diff --git a/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx b/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx index 66453f9..e31532c 100644 --- a/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx +++ b/src/cockpit/389-console/src/lib/plugins/attributeUniqueness.jsx @@ -467,12 +467,14 @@ class AttributeUniqueness extends React.Component { - - - Config Name - + + Config Name - + Attribute Names - + Subtrees - + Top Entry OC - + { @@ -577,12 +579,12 @@ class AttributeUniqueness extends React.Component { > Subtree Entries OC - + { @@ -614,7 +616,7 @@ class AttributeUniqueness extends React.Component { > Enable config diff --git a/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx b/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx index 6de8d3a..ab0661c 100644 --- a/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx +++ b/src/cockpit/389-console/src/lib/plugins/autoMembership.jsx @@ -771,8 +771,8 @@ class AutoMembership extends React.Component { - - Definition Name + + Definition Name ( - - - {content.name} - + + {content.name} - - - Grouping Attributes - + + Grouping Attributes +
- - Regex Name + + Regex Name - - - Exclusive Regex - + + Exclusive Regex - - - Inclusive Regex - + + Inclusive Regex - - - Target Group - + + Target Group - - Config Name + + Config Name - - - Type - + + Type {Object.entries(modalConfigFields).map(([id, content]) => ( - - - {content.name} - + + {content.name} - - - Config Name - + + Config Name - - - Link Type - + + Link Type - - - Managed Type - + + Managed Type - - - Link Scope - + + Link Scope - - Config Name + + Config Name {Object.entries(modalConfigFields).map(([id, content]) => ( - - - {content.name} - + + {content.name} - - - Template DN - + + Template DN - - - Static Attribute - + + Static Attribute - - - Mapped Attributes - + + Mapped Attributes - - - Auto Add OC - + + Auto Add OC - Auto Add OC + Auto Add OC - - Config Name + + Config Name - - - ID Attribute - + + ID Attribute ( - - - {content.name} - + + {content.name} - - - Fallback - - - - - Secure - - + + + + Fallback Enabled + + + + + + + Require Secure Connection + + + @@ -975,7 +975,7 @@ class PassthroughAuthentication extends React.Component { - {newPAMConfigEntry ? "Add" : "Edit"} + {newPAMConfigEntry ? "Add " : "Edit "} Passthough Authentication Plugin URL @@ -1022,10 +1022,8 @@ class PassthroughAuthentication extends React.Component { {Object.entries(modalURLFields).map(([id, content]) => ( - - - {content.name} - + + {content.name} - + - - - Result URL - + + Result URL - - {urlConnType}://{urlAuthDS}/{urlSubtree}{" "} - {urlMaxConns},{urlMaxOps},{urlTimeout}, - {urlLDVer},{urlConnLifeTime}, - {urlStartTLS ? "1" : "0"} - + {urlConnType}://{urlAuthDS}/{urlSubtree}{" "} + {urlMaxConns},{urlMaxOps},{urlTimeout}, + {urlLDVer},{urlConnLifeTime}, + {urlStartTLS ? "1" : "0"} diff --git a/src/cockpit/389-console/src/lib/replication/replModals.jsx b/src/cockpit/389-console/src/lib/replication/replModals.jsx index 4c15d71..0ea6f47 100644 --- a/src/cockpit/389-console/src/lib/replication/replModals.jsx +++ b/src/cockpit/389-console/src/lib/replication/replModals.jsx @@ -1300,7 +1300,7 @@ export class EnableReplModal extends React.Component {

You can optionally define the authentication information for this replicated suffix. Either a Manager DN and Password, - a Bind Group DN, or both, can be provideed. The Manager DN should + a Bind Group DN, or both, can be provided. The Manager DN should be an entry under "cn=config" and if it does not exist it will be created, while the Bind Group DN is usually an existing group located in the database suffix. Typically, just the diff --git a/src/cockpit/389-console/src/monitor.jsx b/src/cockpit/389-console/src/monitor.jsx index a155f49..0b0c08e 100644 --- a/src/cockpit/389-console/src/monitor.jsx +++ b/src/cockpit/389-console/src/monitor.jsx @@ -166,11 +166,6 @@ export class Monitor extends React.Component { } loadSuffixTree(fullReset) { - if (this.state.firstLoad) { - this.setState({ - firstLoad: false - }); - } const cmd = [ "dsconf", "-j", "ldapi://%2fvar%2frun%2fslapd-" + this.props.serverId + ".socket", "backend", "get-tree", @@ -408,6 +403,11 @@ export class Monitor extends React.Component { // - SNMP // - Finally load the "tree" // + if (this.state.firstLoad) { + this.setState({ + firstLoad: false + }); + } let cmd = [ "dsconf", "-j", "ldapi://%2fvar%2frun%2fslapd-" + this.props.serverId + ".socket", "config", "get", "nsslapd-auditlog", "nsslapd-accesslog", "nsslapd-errorlog", "nsslapd-auditfaillog" diff --git a/src/cockpit/389-console/src/plugins.jsx b/src/cockpit/389-console/src/plugins.jsx index ae24945..53ef514 100644 --- a/src/cockpit/389-console/src/plugins.jsx +++ b/src/cockpit/389-console/src/plugins.jsx @@ -162,8 +162,7 @@ export class Plugins extends React.Component { var myObject = JSON.parse(content); this.setState({ rows: myObject.items - }); - this.toggleLoading(); + }, this.toggleLoading()); }) .fail(err => { if (err != 0) { diff --git a/src/lib389/lib389/cli_conf/plugins/posix_winsync.py b/src/lib389/lib389/cli_conf/plugins/posix_winsync.py index 0512418..d4de7ae 100644 --- a/src/lib389/lib389/cli_conf/plugins/posix_winsync.py +++ b/src/lib389/lib389/cli_conf/plugins/posix_winsync.py @@ -41,7 +41,7 @@ def do_fixup(inst, basedn, log, args): def _add_parser_args(parser): parser.add_argument('--create-memberof-task', choices=['true', 'false'], type=str.lower, - help='Sets whether to run the memberOf fix-up task immediately after a sync run in order ' + help='Sets whether to run the memberUID fix-up task immediately after a sync run in order ' 'to update group memberships for synced users (posixWinsyncCreateMemberOfTask)') parser.add_argument('--lower-case-uid', choices=['true', 'false'], type=str.lower, help='Sets whether to store (and, if necessary, convert) the UID value in the memberUID '