Skip to content

Commit

Permalink
Extension tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Jun 5, 2024
1 parent 8238f95 commit 95ee284
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 5 deletions.
60 changes: 60 additions & 0 deletions src/data/Extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,65 @@
}
],
"mappingRequired": true
},
{
"name": "PasswordPusher",
"type": "PWPush",
"cat": "Passwords",
"forceSyncButton": false,
"helpText": "This integration allows you to generate password links instead of plain text passwords. Visit https://pwpush.com/ or https://github.com/pglombardo/PasswordPusher for more information.",
"SettingOptions": [
{
"type": "checkbox",
"name": "PWPush.Enabled",
"label": "Replace generated passwords with PWPush links"
},
{
"type": "input",
"fieldtype": "text",
"name": "PWPush.BaseUrl",
"label": "PWPush URL",
"placeholder": "Enter your PWPush URL. (default: https://pwpush.com)"
},
{
"type": "input",
"fieldtype": "text",
"name": "PWPush.EmailAddress",
"label": "PWPush email address",
"placeholder": "Enter your email address for PWPush. (optional)"
},
{
"type": "input",
"fieldtype": "password",
"name": "PWPush.ApiKey",
"label": "PWPush API Key",
"placeholder": "Enter your PWPush API Key. (optional)"
},
{
"type": "checkbox",
"name": "PWPush.RetrievalStep",
"label": "Click to retrieve password (recommended)"
},
{
"type": "input",
"fieldtype": "number",
"name": "PWPush.ExpireAfterDays",
"label": "Expiration in Days",
"placeholder": "Expiration time in days. (optional)"
},
{
"type": "input",
"fieldtype": "number",
"name": "PWPush.ExpireAfterViews",
"label": "Expiration after views",
"placeholder": "Expiration after views. (optional)"
},
{
"type": "checkbox",
"name": "PWPush.DeletableByViewer",
"label": "Allow deletion of passwords"
}
],
"mappingRequired": false
}
]
26 changes: 23 additions & 3 deletions src/views/cipp/Extensions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
CTabContent,
CTabPane,
} from '@coreui/react'
import { CippPage } from 'src/components/layout'
import { CippCallout, CippPage } from 'src/components/layout'
import { CippLazy } from 'src/components/utilities'
import { useNavigate } from 'react-router-dom'
import useQuery from 'src/hooks/useQuery.jsx'
Expand Down Expand Up @@ -104,7 +104,7 @@ export default function CIPPExtensions() {
<CTabPane key={`pane-${idx}`} visible={active === idx} className="mt-3">
<CippLazy visible={active === idx}>
<CRow className="mb-3">
<CCol md={4}>
<CCol sm={12} md={integration.mappingRequired ? 4 : 12} className="mb-3">
<CippButtonCard
title={integration.name}
titleType="big"
Expand Down Expand Up @@ -158,9 +158,29 @@ export default function CIPPExtensions() {
)
}}
/>
{extensionConfigResult?.data?.Results && (
<CippCallout color={extensionConfigResult.isSuccess ? 'success' : 'danger'}>
{extensionConfigResult?.data?.Results}
</CippCallout>
)}
{listExtensionTestResult?.data?.Results && (
<CippCallout color={listExtensionTestResult.isSuccess ? 'success' : 'danger'}>
{listExtensionTestResult?.data?.Results}
{listExtensionTestResult?.data?.Link && (
<a
href={listExtensionTestResult?.data?.Link}
target="_blank"
rel="noreferrer"
className="ms-2"
>
Link
</a>
)}
</CippCallout>
)}
</CippButtonCard>
</CCol>
<CCol md={8}>
<CCol sm={12} md={8}>
<SettingsExtensionMappings type={integration.type} />
</CCol>
</CRow>
Expand Down
2 changes: 0 additions & 2 deletions src/views/cipp/app-settings/CIPPSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import { SettingsTenants } from 'src/views/cipp/app-settings/SettingsTenants.jsx
import { SettingsBackend } from 'src/views/cipp/app-settings/SettingsBackend.jsx'
import { SettingsNotifications } from 'src/views/cipp/app-settings/SettingsNotifications.jsx'
import { SettingsLicenses } from 'src/views/cipp/app-settings/SettingsLicenses.jsx'
import { SettingsExtensions } from 'src/views/cipp/app-settings/SettingsExtensions.jsx'
import { SettingsMaintenance } from 'src/views/cipp/app-settings/SettingsMaintenance.jsx'
import { SettingsExtensionMappings } from 'src/views/cipp/app-settings/SettingsExtensionMappings.jsx'
import { SettingsPartner } from 'src/views/cipp/app-settings/SettingsPartner.jsx'
import useQuery from 'src/hooks/useQuery.jsx'
import { SettingsSuperAdmin } from './SettingsSuperAdmin.jsx'
Expand Down

0 comments on commit 95ee284

Please sign in to comment.