Skip to content

Commit

Permalink
fix(admin-ui): bugs in admin-ui #1225
Browse files Browse the repository at this point in the history
  • Loading branch information
jv18creator committed Jul 21, 2023
1 parent 3241e97 commit 1779f62
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion admin-ui/app/routes/Apps/Gluu/GluuTypeAheadWithAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function GluuTypeAheadWithAdd({
lsize = 4,
rsize = 8,
disabled,
multiple = true
}) {
const [items, setItems] = useState(value)
const [opts, setOpts] = useState(options)
Expand Down Expand Up @@ -91,7 +92,7 @@ function GluuTypeAheadWithAdd({
id={name}
name={name}
data-testid={name}
multiple={true}
multiple={multiple}
selected={items}
options={opts}
/>
Expand Down
1 change: 0 additions & 1 deletion admin-ui/plugins/admin/components/Roles/UiRoleListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function UiRoleListPage({ apiRoles, permissions, loading, dispatch }) {
buildPayload(userAction, 'message', roleData)
dispatch(addRole({ action: userAction }))
toggle()
doFetchList()
}
return (
<Card style={applicationStyle.mainCard}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ const ClientBasicPanel = ({
<Col sm={6}>
<GluuToogleRow
name="disabled"
formik={formik}
handler={(event) => {
formik.setFieldValue('disabled', !event?.target?.checked)
}}
label="fields.is_active"
value={!client.disabled}
doc_category={DOC_CATEGORY}
Expand Down Expand Up @@ -301,6 +303,7 @@ const ClientBasicPanel = ({
validator={uriValidator}
inputId={uri_id}
doc_category={DOC_CATEGORY}
multiple={false}
lsize={3}
rsize={9}
disabled={viewOnly}
Expand Down
2 changes: 0 additions & 2 deletions admin-ui/plugins/auth-server/components/Scopes/ScopeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
result['id'] = result.id
result['creatorType'] = 'user'
result['creatorId'] = authReducer.userinfo.inum
result['attributes'].showInConfigurationEndpoint =
scope.attributes.showInConfigurationEndpoint
result['attributes'].spontaneousClientId =
scope.attributes.spontaneousClientId
result['attributes'].spontaneousClientScopes =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SetTitle from "Utils/SetTitle";
import GluuLoader from "Routes/Apps/Gluu/GluuLoader";
import { Card, CardBody } from "Components";
import GluuTabs from "Routes/Apps/Gluu/GluuTabs";
import CacheRefreshTab from "../Tabs/CacheRefreshTab";
import ConfigurationTab from "../Tabs/ConfigurationTab";
import CustomerBackendKeyTab from "../Tabs/CustomerBackendKeyTab";
import SourceBackendServersTab from "../Tabs/SourceBackendServersTab";
import InumDBServerTab from "../Tabs/InumDBServerTab";
Expand All @@ -23,16 +23,16 @@ const JansLinkPage = () => {
}, []);

const tabNames = [
t("menus.cache_refresh"),
t("menus.configuration"),
t("menus.customer_backend_key_attributes"),
t("menus.source_backend_ldap_servers"),
t("menus.inum_db_server"),
];

const tabToShow = (tabName) => {
switch (tabName) {
case t("menus.cache_refresh"):
return <CacheRefreshTab />;
case t("menus.configuration"):
return <ConfigurationTab />;
case t("menus.customer_backend_key_attributes"):
return <CustomerBackendKeyTab />;
case t("menus.source_backend_ldap_servers"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useTranslation } from 'react-i18next'
import { buildPayload } from 'Utils/PermChecker'
import moment from 'moment/moment'

const CacheRefreshTab = () => {
const ConfigurationTab = () => {
const { t } = useTranslation()
const dispatch = useDispatch()
const cacheRefreshConfiguration = useSelector(
Expand Down Expand Up @@ -264,7 +264,7 @@ const CacheRefreshTab = () => {
</Col>
<Col sm={12}>
<GluuToogleRow
label='fields.cache_refresh'
label='fields.enabled'
name='linkEnabled'
handler={(e) => {
formik.setFieldValue('linkEnabled', e.target.checked)
Expand Down Expand Up @@ -295,4 +295,4 @@ const CacheRefreshTab = () => {
)
}

export default CacheRefreshTab
export default ConfigurationTab
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React, { useEffect } from 'react'
import { useNavigate } from 'react-router-dom'
import { Container, CardBody, Card } from '../../../../app/components'
import { Container, CardBody, Card } from 'Components'
import UserForm from './UserForm'
import GluuAlert from '../../../../app/routes/Apps/Gluu/GluuAlert'
import GluuAlert from 'Routes/Apps/Gluu/GluuAlert'
import { useTranslation } from 'react-i18next'
import { updateUser } from '../../redux/features/userSlice'
import { updateUser } from 'Plugins/user-management/redux/features/userSlice'
import { useDispatch, useSelector } from 'react-redux'
import { getAttributesRoot } from '../../../../app/redux/actions'
import { getAttributesRoot } from 'Redux/features/attributesSlice'
import moment from 'moment'
import GluuLoader from 'Routes/Apps/Gluu/GluuLoader'
import { getPersistenceType } from '../../../services/redux/features/persistenceTypeSlice'
import { getPersistenceType } from 'Plugins/services/redux/features/persistenceTypeSlice'

function UserEditPage() {
const dispatch = useDispatch()
Expand Down

0 comments on commit 1779f62

Please sign in to comment.