diff --git a/public/version_latest.txt b/public/version_latest.txt index 81911389142b..ecedc98d1d5a 100644 --- a/public/version_latest.txt +++ b/public/version_latest.txt @@ -1 +1 @@ -4.3.0 \ No newline at end of file +4.3.1 \ No newline at end of file diff --git a/src/components/tables/CippDatatable.js b/src/components/tables/CippDatatable.js index d41dc8e342ed..e36befb3dea3 100644 --- a/src/components/tables/CippDatatable.js +++ b/src/components/tables/CippDatatable.js @@ -13,30 +13,23 @@ export default function CippDatatable({ path, params, ...rest }) { isFetching, error, } = useListDatatableQuery({ path, params: { refreshGuid, $filter: graphFilter, ...params } }) + + var defaultFilterText = '' + if (params?.Parameters?.$filter) { + defaultFilterText = 'Graph: ' + params?.Parameters?.$filter + } return ( <> - {data[0]?.Queued ? ( - <> - {data[0]?.QueueMessage} - - - ) : ( - - )} + {data[0]?.Queued && {data[0]?.QueueMessage}} + ) } diff --git a/src/components/tables/CippTable.js b/src/components/tables/CippTable.js index fc09031e33be..288685f43f1a 100644 --- a/src/components/tables/CippTable.js +++ b/src/components/tables/CippTable.js @@ -111,6 +111,8 @@ export default function CippTable({ graphFilterFunction = null, columns = [], dynamicColumns = true, + defaultFilterText = '', + isModal = false, filterlist, tableProps: { keyField = 'id', @@ -137,7 +139,7 @@ export default function CippTable({ const inputRef = useRef('') const [loopRunning, setLoopRunning] = React.useState(false) const [massResults, setMassResults] = React.useState([]) - const [filterText, setFilterText] = React.useState('') + const [filterText, setFilterText] = React.useState(defaultFilterText) const [filterviaURL, setFilterviaURL] = React.useState(false) const [updatedColumns, setUpdatedColumns] = React.useState(columns) const [selectedRows, setSelectedRows] = React.useState(false) @@ -147,7 +149,7 @@ export default function CippTable({ const [modalContent, setModalContent] = useState(null) //get the search params called "tableFilter" and set the filter to that. const [searchParams, setSearchParams] = useSearchParams() - if (searchParams.get('tableFilter') && !filterviaURL) { + if (searchParams.get('tableFilter') && !filterviaURL && !isModal) { setFilterText(searchParams.get('tableFilter')) setFilterviaURL(true) } @@ -219,8 +221,10 @@ export default function CippTable({ }, [filterText]) const filterData = (data, filterText) => { - const debouncedSetSearchParams = debounce(debounceSetSearchParams, 1000) - debouncedSetSearchParams() + if (!isModal) { + const debouncedSetSearchParams = debounce(debounceSetSearchParams, 1000) + debouncedSetSearchParams() + } if (filterText.startsWith('Graph:')) { var query = filterText.slice(6).trim() debounceSetGraphFilter(query) diff --git a/src/components/utilities/SharedModal.js b/src/components/utilities/SharedModal.js index 47fb57f2f547..4975c0cc17f6 100644 --- a/src/components/utilities/SharedModal.js +++ b/src/components/utilities/SharedModal.js @@ -13,7 +13,7 @@ import { CippTable } from 'src/components/tables' function mapBodyComponent({ componentType, data, componentProps }) { switch (componentType) { case 'table': - return + return case 'list': return
{Array.isArray(data) && data.map((el, idx) =>
{el}
)}
case 'text': diff --git a/src/data/Extensions.json b/src/data/Extensions.json index cb15aa1043e8..3c1a1e7f1cd8 100644 --- a/src/data/Extensions.json +++ b/src/data/Extensions.json @@ -4,7 +4,7 @@ "type": "CIPP-API", "cat": "API", "forceSyncButton": false, - "helpText": "This integration allows you to use to enable API access outside of CIPP usage. Requires Global Administrator permissions inside your tenant for activation of the API. These credentials will only be shown once.", + "helpText": "This integration allows you to enable CIPP-API access outside of CIPP. Requires Global Administrator permissions inside your tenant for activation of the API. The API credentials will only be shown once.", "SettingOptions": [ { "type": "checkbox", diff --git a/src/views/cipp/CIPPSettings.js b/src/views/cipp/CIPPSettings.js index 00deb2d85098..7ba3cb285ad7 100644 --- a/src/views/cipp/CIPPSettings.js +++ b/src/views/cipp/CIPPSettings.js @@ -1577,8 +1577,8 @@ const ExtensionsTab = () => { } const MappingsTab = () => { - const [listHaloBackend, listBackendHaloResult] = useLazyGenericGetRequestQuery() - const [setHaloExtensionconfig, extensionHaloConfigResult] = useLazyGenericPostRequestQuery() + const [listHaloBackend, listBackendHaloResult = []] = useLazyGenericGetRequestQuery() + const [setHaloExtensionconfig, extensionHaloConfigResult = []] = useLazyGenericPostRequestQuery() const onHaloSubmit = (values) => { setHaloExtensionconfig({ @@ -1608,7 +1608,7 @@ const MappingsTab = () => { Use the table below to map your client to the correct PSA client {listBackendHaloResult.isSuccess && - listBackendHaloResult.data.Tenants.map((tenant) => ( + listBackendHaloResult.data.Tenants?.map((tenant) => ( { let query = useQuery() const groupId = query.get('groupId') const tenantDomain = query.get('tenantDomain') - const [queryError, setQueryError] = useState(false) - + const [refreshToken, setRefresh] = useState('') const { data: group = {}, isFetching, @@ -47,14 +46,14 @@ const EditGroup = () => { isFetching: membersisFetching, error: membersError, isSuccess: membersIsSuccess, - } = useListGroupMembersQuery({ tenantDomain, groupId }) + } = useListGroupMembersQuery({ tenantDomain, groupId, refreshToken }) const { data: owners = [], isFetching: ownersisFetching, error: ownersError, isSuccess: ownersIsSuccess, - } = useListGroupOwnersQuery({ tenantDomain, groupId }) + } = useListGroupOwnersQuery({ tenantDomain, groupId, refreshToken }) const { data: users = [], isFetching: usersIsFetching, @@ -66,6 +65,7 @@ const EditGroup = () => { isFetching: contactsIsFetching, error: contactsError, } = useListContactsQuery({ tenantDomain }) + const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery() const [roleInfo, setroleInfo] = React.useState([]) useEffect(() => { @@ -86,7 +86,7 @@ const EditGroup = () => { }) setroleInfo(ownerWithRole.concat(memberwithRole)) } - }, [owners, members, ownersIsSuccess, membersIsSuccess]) + }, [owners, members, ownersIsSuccess, membersIsSuccess, postResults]) useEffect(() => { if (!groupId || !tenantDomain) { @@ -97,7 +97,6 @@ const EditGroup = () => { setQueryError(true) } }, [groupId, tenantDomain, dispatch]) - const [genericPostRequest, postResults] = useLazyGenericPostRequestQuery() const onSubmit = (values) => { const shippedValues = { tenantID: tenantDomain, @@ -114,7 +113,9 @@ const EditGroup = () => { mail: group[0].mail, } //window.alert(JSON.stringify(shippedValues)) - genericPostRequest({ path: '/api/EditGroup', values: shippedValues }) + genericPostRequest({ path: '/api/EditGroup', values: shippedValues }).then((res) => { + setRefresh(postResults.requestId) + }) } const tableColumns = [ { diff --git a/src/views/tenant/administration/ListAlertsQueue.js b/src/views/tenant/administration/ListAlertsQueue.js index d1da4bb53479..720e55a2fcc3 100644 --- a/src/views/tenant/administration/ListAlertsQueue.js +++ b/src/views/tenant/administration/ListAlertsQueue.js @@ -286,7 +286,7 @@ const ListAlertsQueue = () => { label: 'Delete webhook', color: 'info', modal: true, - modalUrl: `/api/RemoveWebhookAlert?CIPPID=!CIPPID&tenantfilter=!tenantName`, + modalUrl: `/api/RemoveWebhookAlert?CIPPID=!RowKey&tenantfilter=!PartitionKey`, modalMessage: 'Are you sure you want to delete this webhook alert?', }, ], diff --git a/version_latest.txt b/version_latest.txt new file mode 100644 index 000000000000..ecedc98d1d5a --- /dev/null +++ b/version_latest.txt @@ -0,0 +1 @@ +4.3.1 \ No newline at end of file