Skip to content

Commit

Permalink
feat(admin-ui): fetch aalowed files extension and list of jans services
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Jun 12, 2024
1 parent b45df5e commit 3bcda28
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions admin-ui/plugins/admin/components/Assets/AssetForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const AssetForm = () => {
const { id } = useParams()
const [assetFile, setAssetFile] = useState(null)
const userAction = {}
const { selectedAsset } = useSelector((state) => state.assetReducer)
const { selectedAsset, fileTypes, services } = useSelector((state) => state.assetReducer)
const { t } = useTranslation()
const navigate = useNavigate()
const saveOperationFlag = useSelector(
Expand Down Expand Up @@ -178,7 +178,7 @@ const AssetForm = () => {
name='services'
label={t('fields.jansServices')}
formik={formik}
options={["config-api", "auth-server", "scim", "casa"]}
options={services || []}
lsize={4}
rsize={8}
required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ const JansAssetListPage = () => {
const [limit, setLimit] = useState(10)
const [pattern, setPattern] = useState(null)
useEffect(() => {
dispatch(getAssetServices({ action: options }))
dispatch(getAssetTypes({ action: options }))
options['limit'] = 10
dispatch(getJansAssets({ action: options }))
dispatch(getAssetServices({ action: options }))
}, [])

let memoLimit = limit
Expand Down
1 change: 1 addition & 0 deletions admin-ui/plugins/admin/redux/features/AssetSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const assetSlice = createSlice({
state.loading = true
},
getAssetServicesResponse: (state, action) => {
console.log("response", action)
state.loading = false
if (action.payload?.data) {
state.services = action.payload.data
Expand Down

0 comments on commit 3bcda28

Please sign in to comment.