Skip to content

Commit

Permalink
Add lots of deploy buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
kris6673 committed Nov 17, 2023
1 parent 8be49d2 commit a9dd5a8
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/views/email-exchange/connectors/ConnectorList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ const ConnectorList = () => {
title="Connector List"
titleButton={
<>
<TitleButton href="/email/connectors/deploy-connector" title="Deploy Connector" />
<TitleButton
href={`/email/connectors/deploy-connector?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy Connector"
/>
</>
}
tenantSelector={true}
Expand Down
9 changes: 9 additions & 0 deletions src/views/email-exchange/spamfilter/Spamfilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useSelector } from 'react-redux'
import { CippPageList } from 'src/components/layout'
import { CippActionsOffcanvas } from 'src/components/utilities'
import { cellBooleanFormatter, cellDateFormatter, CellTip } from 'src/components/tables'
import { TitleButton } from 'src/components/buttons'

const Offcanvas = (row, rowIndex, formatExtraData) => {
const tenant = useSelector((state) => state.app.currentTenant)
Expand Down Expand Up @@ -172,6 +173,14 @@ const SpamFilterList = () => {
return (
<CippPageList
title="Spam Filters"
titleButton={
<>
<TitleButton
href={`/email/spamfilter/deploy?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy Spam Filter"
/>
</>
}
tenantSelector={true}
datatable={{
reportName: `${tenant?.defaultDomainName}-Spamfilter-list`,
Expand Down
5 changes: 4 additions & 1 deletion src/views/email-exchange/transport/TransportRules.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ const TransportRulesList = () => {
tenantSelector={true}
titleButton={
<>
<TitleButton href="/email/transport/deploy-rules" title="Deploy Transport Rule" />
<TitleButton
href={`/email/transport/deploy-rules?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy Transport Rule"
/>
</>
}
datatable={{
Expand Down
31 changes: 31 additions & 0 deletions src/views/endpoint/applications/ApplicationsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { CippPageList } from 'src/components/layout'
import { faEllipsisV, faGlobeEurope, faPager, faUser } from '@fortawesome/free-solid-svg-icons'
import { CippActionsOffcanvas } from 'src/components/utilities'
import { CellTip } from 'src/components/tables'
import { TitleButton } from 'src/components/buttons'

const Offcanvas = (row, rowIndex, formatExtraData) => {
const tenant = useSelector((state) => state.app.currentTenant)
Expand Down Expand Up @@ -125,9 +126,39 @@ const columns = [
const ApplicationsList = () => {
const tenant = useSelector((state) => state.app.currentTenant)

const titleButtons = (
<div style={{ display: 'flex', alignItems: 'right' }}>
<div style={{ marginLeft: '10px' }}>
<TitleButton
href={`/endpoint/applications/add-choco-app?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Add Choco app"
/>
</div>
<div style={{ marginLeft: '10px' }}>
<TitleButton
href={`/endpoint/applications/add-winget-app?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Add Store app"
/>
</div>
<div style={{ marginLeft: '10px' }}>
<TitleButton
href={`/endpoint/applications/add-office-app?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Add Office app"
/>
</div>
<div style={{ marginLeft: '10px' }}>
<TitleButton
href={`/endpoint/applications/add-rmm-app?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Add MSP app"
/>
</div>
</div>
)

return (
<CippPageList
title="Applications"
titleButton={titleButtons}
datatable={{
keyField: 'id',
columns,
Expand Down
6 changes: 6 additions & 0 deletions src/views/endpoint/autopilot/AutopilotListDevices.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CippPageList } from 'src/components/layout'
import { ModalService } from 'src/components/utilities'
import { useLazyGenericGetRequestQuery } from 'src/store/api/app'
import { CellTip } from 'src/components/tables'
import { TitleButton } from 'src/components/buttons'

const AutopilotListDevices = () => {
const tenant = useSelector((state) => state.app.currentTenant)
Expand Down Expand Up @@ -100,6 +101,11 @@ const AutopilotListDevices = () => {
)}
<CippPageList
title="Autopilot Devices"
titleButton={
<>
<TitleButton href={`/endpoint/autopilot/add-device`} title="Deploy Autopilot Device" />
</>
}
datatable={{
keyField: 'id',
reportName: `${tenant?.defaultDomainName}-AutopilotDevices-List`,
Expand Down
9 changes: 9 additions & 0 deletions src/views/endpoint/autopilot/AutopilotListProfiles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { faEye } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { CippCodeBlock, CippOffcanvas } from 'src/components/utilities'
import { CippPageList } from 'src/components/layout'
import { TitleButton } from 'src/components/buttons'

const Offcanvas = (row, rowIndex, formatExtraData) => {
const [visible, setVisible] = useState(false)
Expand Down Expand Up @@ -88,6 +89,14 @@ const AutopilotListProfiles = () => {
return (
<CippPageList
title="Autopilot Profiles"
titleButton={
<>
<TitleButton
href={`/endpoint/autopilot/add-profile?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy Autopilot Profile"
/>
</>
}
tenantSelector={true}
datatable={{
reportName: `${tenant?.defaultDomainName}-AutopilotProfile-List`,
Expand Down
9 changes: 9 additions & 0 deletions src/views/endpoint/autopilot/AutopilotListStatusPages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import { useSelector } from 'react-redux'
import { CellTip, cellBooleanFormatter } from 'src/components/tables'
import { CippPageList } from 'src/components/layout'
import { TitleButton } from 'src/components/buttons'

const columns = [
{
Expand Down Expand Up @@ -61,6 +62,14 @@ const AutopilotListESP = () => {
return (
<CippPageList
title="Autopilot Status Pages"
titleButton={
<>
<TitleButton
href={`/endpoint/autopilot/add-status-page?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy Autopilot Status Page"
/>
</>
}
tenantSelector={true}
datatable={{
reportName: `${tenant?.defaultDomainName}-AutopilotStatusPages-List`,
Expand Down
9 changes: 9 additions & 0 deletions src/views/endpoint/intune/MEMListPolicies.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { CippPageList } from 'src/components/layout'
import { Link } from 'react-router-dom'
import { CippActionsOffcanvas } from 'src/components/utilities'
import { TitleButton } from 'src/components/buttons'

const Actions = (row, rowIndex, formatExtraData) => {
const [ocVisible, setOCVisible] = useState(false)
Expand Down Expand Up @@ -95,6 +96,14 @@ const IntuneList = () => {
return (
<CippPageList
title="MEM Policies"
titleButton={
<>
<TitleButton
href={`/endpoint/MEM/add-policy?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy MEM Policy"
/>
</>
}
tenantSelector={true}
datatable={{
path: '/api/ListIntunePolicy?type=ESP',
Expand Down
10 changes: 10 additions & 0 deletions src/views/tenant/conditional/ConditionalAccess.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { useSelector } from 'react-redux'
import { CippPageList } from 'src/components/layout'
import { CippActionsOffcanvas } from 'src/components/utilities'
import { cellDateFormatter, CellTip } from 'src/components/tables'
import { TitleButton } from 'src/components/buttons'

function DateNotNull(date) {
if (date === null || date === undefined || date === '' || date === 'undefined') {
return ' '
Expand Down Expand Up @@ -217,6 +219,14 @@ const ConditionalAccessList = () => {
return (
<CippPageList
title="Conditional Access"
titleButton={
<>
<TitleButton
href={`/tenant/conditional/deploy?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy Conditional Access"
/>
</>
}
tenantSelector={false}
datatable={{
reportName: `${tenant?.defaultDomainName}-ConditionalAccess-List`,
Expand Down
12 changes: 11 additions & 1 deletion src/views/tenant/conditional/NamedLocations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { useSelector } from 'react-redux'
import { CippPageList } from 'src/components/layout'
import { CippActionsOffcanvas } from 'src/components/utilities'
import { cellBooleanFormatter, cellDateFormatter, CellTip } from 'src/components/tables'
import { TitleButton } from 'src/components/buttons'

function DateNotNull(date) {
if (date === null || date === undefined || date === '' || date === 'undefined') {
return ' '
Expand Down Expand Up @@ -67,7 +69,15 @@ const NamedLocationsList = () => {

return (
<CippPageList
title="Conditional Access"
title="Named Locations"
titleButton={
<>
<TitleButton
href={`/tenant/conditional/deploy-named-location?customerId=${tenant?.customerId}&tableFilter=${tenant?.defaultDomainName}`}
title="Deploy Named Location"
/>
</>
}
tenantSelector={false}
datatable={{
reportName: `${tenant?.defaultDomainName}-ConditionalAccess-List`,
Expand Down

0 comments on commit a9dd5a8

Please sign in to comment.