Skip to content

Extension tweaks #2522

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

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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