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

[pull] main from KelvinTegelaar:main #7

Merged
merged 66 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
b6b20fe
Merge pull request #1 from KelvinTegelaar/dev
kris6673 Jan 20, 2024
c19cc9a
Update with all new licenses
kris6673 Jan 20, 2024
33561bb
Merge pull request #2036 from kris6673/dev
KelvinTegelaar Jan 20, 2024
24713c8
Add standard for enabling online archive
kris6673 Jan 20, 2024
aafba6e
Merge pull request #2038 from kris6673/dev
KelvinTegelaar Jan 20, 2024
a33a4af
Add AD synced field in view user
kris6673 Jan 20, 2024
32e1f94
Merge pull request #2039 from kris6673/dev
KelvinTegelaar Jan 20, 2024
d4ebc6a
Merge pull request #3 from KelvinTegelaar/dev
kris6673 Jan 23, 2024
b28e015
fixes bug
KelvinTegelaar Jan 23, 2024
42d15c7
Merge branch 'KelvinTegelaar:dev' into dev
kris6673 Jan 23, 2024
144145a
Yeah this is not great
kris6673 Jan 24, 2024
d275ea6
fixes copy paste error
KelvinTegelaar Jan 25, 2024
21f3587
Update AlertRules.jsx
JohnDuprey Jan 26, 2024
67f36f0
Update placeholder
CHRIS-BRANNON Jan 26, 2024
c67ce3b
Merge pull request #2055 from CHRIS-BRANNON/dev
KelvinTegelaar Jan 26, 2024
8299d90
Add partner center link
JohnDuprey Jan 27, 2024
7f9e3f9
Merge branch 'KelvinTegelaar:dev' into dev
JohnDuprey Jan 27, 2024
89d93bb
Merge pull request #2056 from johnduprey/dev
KelvinTegelaar Jan 27, 2024
ed8572b
Improvements to IP db
KelvinTegelaar Jan 28, 2024
3726b48
geo ip updates
KelvinTegelaar Jan 28, 2024
26ae7aa
small redesign to allow ip whitelist
KelvinTegelaar Jan 28, 2024
2d8bc9a
better look
KelvinTegelaar Jan 28, 2024
46a4691
Merge branch 'KelvinTegelaar:dev' into dev
kris6673 Jan 29, 2024
5f8317a
sam wizard update
KelvinTegelaar Jan 29, 2024
2ce07bc
Change mailbox filtering logic in MailboxForwarding
kris6673 Jan 31, 2024
628851b
Merge pull request #2065 from kris6673/filtering-for-forwarding
KelvinTegelaar Jan 31, 2024
27305d1
prettification
KelvinTegelaar Jan 31, 2024
488e747
Fix graph explorer all tenants reports
JohnDuprey Jan 31, 2024
3633ccb
Merge pull request #2068 from johnduprey/dev
KelvinTegelaar Jan 31, 2024
998377f
added excluded to list standards
KelvinTegelaar Feb 1, 2024
2cc37fa
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP into dev
KelvinTegelaar Feb 1, 2024
501dfec
nested standards table
KelvinTegelaar Feb 1, 2024
dc559d7
added copy button to actions
KelvinTegelaar Feb 1, 2024
981b1fe
add copy buttons to mass results
KelvinTegelaar Feb 1, 2024
bd7b41a
Add back Clear ImmutableId button
kris6673 Feb 1, 2024
ffea82c
Merge pull request #2070 from kris6673/dev-v2
KelvinTegelaar Feb 1, 2024
d0b4292
some prettification
KelvinTegelaar Feb 1, 2024
bfff6a7
Merge branches 'dev' and 'dev' of https://github.com/kris6673/CIPP in…
Feb 2, 2024
2c7bce3
IT WOOOOOOORKS
kris6673 Feb 2, 2024
93d9531
Add Alias field and spinner
kris6673 Feb 3, 2024
13c8d55
Multi line of the http results
kris6673 Feb 3, 2024
cf4b223
Flatten CSV for all columns export
JohnDuprey Feb 3, 2024
a7a455a
Improve mailbox rule output
JohnDuprey Feb 4, 2024
f90fb05
Update MailboxRuleList.jsx
JohnDuprey Feb 4, 2024
904f2c3
Merge pull request #2086 from JohnDuprey/dev
KelvinTegelaar Feb 4, 2024
17461b2
Merge pull request #2085 from kris6673/aliases-shared-mailbox
KelvinTegelaar Feb 4, 2024
64228e5
Merge pull request #2081 from kris6673/dev
KelvinTegelaar Feb 4, 2024
ccecc0b
Clean up vendorTenantList.json
rvdwegen Feb 5, 2024
152d8ac
Merge pull request #2087 from rvdwegen/patch-2
KelvinTegelaar Feb 5, 2024
8eae371
add setting of onedrive permission
KelvinTegelaar Feb 5, 2024
946a0bd
add remove option
KelvinTegelaar Feb 5, 2024
9f894dd
add setting sharepoint owner
KelvinTegelaar Feb 5, 2024
e9a7d16
add remove member
KelvinTegelaar Feb 5, 2024
5b29332
up version
KelvinTegelaar Feb 5, 2024
3a47892
Merge pull request #2089 from KelvinTegelaar/dev
KelvinTegelaar Feb 5, 2024
5356d7c
Merge pull request #5 from KelvinTegelaar/dev
kris6673 Feb 5, 2024
1278c64
Add disable legacy basic authentication for SharePoint
kris6673 Feb 5, 2024
1879971
Merge pull request #2096 from kris6673/sp-disable-basic-auth
KelvinTegelaar Feb 5, 2024
c7aea4e
Merge branch 'KelvinTegelaar:dev' into dev
kris6673 Feb 5, 2024
3d7c92d
Add disable users from installing add-ins in Outlook standard
kris6673 Feb 5, 2024
2c64273
Merge branch 'dev' of https://github.com/kris6673/CIPP into dev
kris6673 Feb 5, 2024
6fd72c2
Merge pull request #2099 from kris6673/dev
KelvinTegelaar Feb 5, 2024
d28134e
fixes flatten issue
KelvinTegelaar Feb 6, 2024
7d8df63
array fix
KelvinTegelaar Feb 6, 2024
fbe07ed
up version
KelvinTegelaar Feb 6, 2024
9d1698e
Merge pull request #2102 from KelvinTegelaar/dev
KelvinTegelaar Feb 6, 2024
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
2 changes: 1 addition & 1 deletion public/version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.1
5.1.1
2 changes: 1 addition & 1 deletion src/_nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const _nav = [
},
{
component: CNavItem,
name: 'Geo IP Lookup',
name: 'IP Database',
to: '/tenant/tools/geoiplookup',
},
{
Expand Down
55 changes: 53 additions & 2 deletions src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import PropTypes from 'prop-types'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import {
faCheck,
faClipboard,
faColumns,
faCopy,
faFileCsv,
faFilePdf,
faSearch,
Expand All @@ -38,6 +40,7 @@ import { useLazyGenericGetRequestQuery, useLazyGenericPostRequestQuery } from 's
import { ConfirmModal } from '../utilities/SharedModal'
import { debounce } from 'lodash-es'
import { useSearchParams } from 'react-router-dom'
import CopyToClipboard from 'react-copy-to-clipboard'

const FilterComponent = ({ filterText, onFilter, onClear, filterlist, onFilterPreset }) => (
<>
Expand Down Expand Up @@ -571,6 +574,14 @@ export default function CippTable({
}
filtered = filtered.map((item) => flatten(item))

let dataFlat

if (Array.isArray(data)) {
dataFlat = data.map((item) => flatten(item))
} else {
dataFlat = []
}

if (!disablePDFExport) {
if (dynamicColumns === true) {
const addColumn = (columnname) => {
Expand Down Expand Up @@ -675,7 +686,7 @@ export default function CippTable({
<CDropdownItem>
<ExportCsvButton
key="export-csv-action-all"
csvData={data}
csvData={dataFlat}
reportName={reportName}
nameText="Export All Columns"
/>
Expand Down Expand Up @@ -748,6 +759,12 @@ export default function CippTable({
filteredItems,
])
const tablePageSize = useSelector((state) => state.app.tablePageSize)
const [codeCopied, setCodeCopied] = useState(false)

const onCodeCopied = () => {
setCodeCopied(true)
setTimeout(() => setCodeCopied(false), 2000)
}

return (
<div className="ms-n3 me-n3 cipp-tablewrapper">
Expand Down Expand Up @@ -777,6 +794,20 @@ export default function CippTable({
{message.data?.Metadata?.Heading}
</CAccordionHeader>
<CAccordionBody>
<CopyToClipboard text={results} onCopy={() => onCodeCopied()}>
<CButton
color={codeCopied ? 'success' : 'info'}
className="cipp-code-copy-button"
size="sm"
variant="ghost"
>
{codeCopied ? (
<FontAwesomeIcon icon={faClipboard} />
) : (
<FontAwesomeIcon icon={faCopy} />
)}
</CButton>
</CopyToClipboard>
{results.map((line, i) => {
return <li key={i}>{line}</li>
})}
Expand All @@ -790,7 +821,27 @@ export default function CippTable({
massResults.map((message, idx) => {
const results = message.data?.Results
const displayResults = Array.isArray(results) ? results.join(', ') : results
return <li key={`message-${idx}`}>{displayResults}</li>
return (
<>
<li key={`message-${idx}`}>
{displayResults}
<CopyToClipboard text={displayResults} onCopy={() => onCodeCopied()}>
<CButton
color={codeCopied ? 'success' : 'info'}
className="cipp-code-copy-button"
size="sm"
variant="ghost"
>
{codeCopied ? (
<FontAwesomeIcon icon={faClipboard} />
) : (
<FontAwesomeIcon icon={faCopy} />
)}
</CButton>
</CopyToClipboard>
</li>
</>
)
})}
{loopRunning && (
<li>
Expand Down
19 changes: 14 additions & 5 deletions src/components/utilities/CippActionsOffcanvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
COffcanvasTitle,
CSpinner,
} from '@coreui/react'
import { CippOffcanvas, ModalService } from 'src/components/utilities'
import { CippCodeBlock, CippOffcanvas, ModalService } from 'src/components/utilities'
import { CippOffcanvasPropTypes } from 'src/components/utilities/CippOffcanvas'
import { CippOffcanvasTable } from 'src/components/tables'
import { useLazyGenericGetRequestQuery, useLazyGenericPostRequestQuery } from 'src/store/api/app'
Expand Down Expand Up @@ -304,14 +304,23 @@ export default function CippActionsOffcanvas(props) {
<CSpinner>Loading</CSpinner>
</CCallout>
)}
{postResults.isSuccess && <CCallout color="info">{postResults.data?.Results}</CCallout>}
{postResults.isSuccess && (
<CippCodeBlock
code={postResults.data?.Results}
callout={true}
calloutCopyValue={getResults.data?.Results}
/>
)}
{postResults.isError && (
<CCallout color="danger">Could not connect to API: {postResults.error.message}</CCallout>
)}
{getResults.isSuccess && (
<CCallout color={getResults.data?.colour ? getResults.data?.colour : 'info'}>
{getResults.data?.Results}
</CCallout>
<CippCodeBlock
code={getResults.data?.Results}
callout={true}
calloutColour={getResults.data?.colour ? getResults.data?.colour : 'info'}
calloutCopyValue={getResults.data?.Results}
/>
)}
{getResults.isError && (
<CCallout color="danger">Could not connect to API: {getResults.error.message}</CCallout>
Expand Down
33 changes: 19 additions & 14 deletions src/components/utilities/CippCodeBlock.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react'
import PropTypes from 'prop-types'
import { CopyToClipboard } from 'react-copy-to-clipboard'
import { CButton } from '@coreui/react'
import { CButton, CCallout } from '@coreui/react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCopy, faClipboard } from '@fortawesome/free-regular-svg-icons'
import SyntaxHighlighter from 'react-syntax-highlighter'
Expand All @@ -13,6 +13,9 @@ function CippCodeBlock({
showLineNumbers = true,
startingLineNumber,
wrapLongLines = true,
callout = false,
calloutColour = 'info',
calloutCopyValue = false,
}) {
const [codeCopied, setCodeCopied] = useState(false)

Expand All @@ -23,7 +26,7 @@ function CippCodeBlock({

return (
<div className="cipp-code">
<CopyToClipboard text={code} onCopy={() => onCodeCopied()}>
<CopyToClipboard text={calloutCopyValue || code} onCopy={() => onCodeCopied()}>
<CButton
color={codeCopied ? 'success' : 'info'}
className="cipp-code-copy-button"
Expand All @@ -33,18 +36,20 @@ function CippCodeBlock({
{codeCopied ? <FontAwesomeIcon icon={faClipboard} /> : <FontAwesomeIcon icon={faCopy} />}
</CButton>
</CopyToClipboard>

<SyntaxHighlighter
language={language}
showLineNumbers={showLineNumbers}
startingLineNumber={startingLineNumber}
wrapLongLines={wrapLongLines}
wrapLines={wrapLongLines}
style={atomOneDark}
className="cipp-code-block"
>
{code}
</SyntaxHighlighter>
{callout && <CCallout color={calloutColour}>{code}</CCallout>}
{!callout && (
<SyntaxHighlighter
language={language}
showLineNumbers={showLineNumbers}
startingLineNumber={startingLineNumber}
wrapLongLines={wrapLongLines}
wrapLines={wrapLongLines}
style={atomOneDark}
className="cipp-code-block"
>
{code}
</SyntaxHighlighter>
)}
</div>
)
}
Expand Down
34 changes: 24 additions & 10 deletions src/components/utilities/CippListOffcanvas.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import React from 'react'
import PropTypes from 'prop-types'
import { CListGroup, CListGroupItem } from '@coreui/react'
import {
CCard,
CCardBody,
CCardHeader,
CCardTitle,
CListGroup,
CListGroupItem,
} from '@coreui/react'
import { CippOffcanvas } from '.'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faGlobe } from '@fortawesome/free-solid-svg-icons'
import { CippOffcanvasTable } from '../tables'

export default function CippListOffcanvas(props) {
return (
Expand All @@ -13,7 +23,7 @@ export default function CippListOffcanvas(props) {
hideFunction={props.hideFunction}
>
{props.groups.map((group, key) => (
<OffcanvasListSection title={group.title} items={group.items} key={key} />
<OffcanvasListSection items={group.items} key={key} />
))}
</CippOffcanvas>
)
Expand All @@ -29,18 +39,22 @@ CippListOffcanvas.propTypes = {
}

export function OffcanvasListSection({ title, items }) {
console.log(items)
const mappedItems = items.map((item, key) => ({ value: item.content, label: item.heading }))
return (
<>
<h4 className="mt-4">{title}</h4>
{items.length > 0 && (
<CListGroup className="my-3">
{items.map((item, key) => (
<CListGroupItem className="d-flex justify-content-between align-items-center" key={key}>
{item.heading && <h6 className="w-50 mb-0">{item.heading}</h6>}
{item.content}
</CListGroupItem>
))}
</CListGroup>
<CCard className="content-card">
<CCardHeader className="d-flex justify-content-between align-items-center">
<CCardTitle>
<FontAwesomeIcon icon={faGlobe} className="mx-2" /> Extended Information
</CCardTitle>
</CCardHeader>
<CCardBody>
<CippOffcanvasTable rows={mappedItems} />
</CCardBody>
</CCard>
)}
</>
)
Expand Down
Loading
Loading