Skip to content

Commit

Permalink
Merge branch 'master' into fix-max
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes authored Sep 5, 2024
2 parents a8cada4 + acda90e commit ec2cc2e
Show file tree
Hide file tree
Showing 29 changed files with 706 additions and 69 deletions.
2 changes: 1 addition & 1 deletion ee/billing/quota_limiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def org_quota_limited_until(

if posthoganalytics.feature_enabled(
QUOTA_LIMIT_DATA_RETENTION_FLAG,
organization.id,
str(organization.id),
groups={"organization": str(organization.id)},
group_properties={"organization": {"id": str(organization.id)}},
):
Expand Down
6 changes: 3 additions & 3 deletions ee/billing/test/test_quota_limiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def test_quota_limiting_feature_flag_enabled(self, patch_feature_enabled, patch_
quota_limited_orgs, quota_limiting_suspended_orgs = update_all_org_billing_quotas()
patch_feature_enabled.assert_called_with(
QUOTA_LIMIT_DATA_RETENTION_FLAG,
self.organization.id,
str(self.organization.id),
groups={"organization": org_id},
group_properties={"organization": {"id": org_id}},
group_properties={"organization": {"id": str(org_id)}},
)
patch_capture.assert_called_once_with(
org_id,
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_quota_limiting_feature_flag_enabled(self, patch_feature_enabled, patch_
quota_limited_orgs, quota_limiting_suspended_orgs = update_all_org_billing_quotas()
patch_feature_enabled.assert_called_with(
QUOTA_LIMIT_DATA_RETENTION_FLAG,
self.organization.id,
str(self.organization.id),
groups={"organization": org_id},
group_properties={"organization": {"id": org_id}},
)
Expand Down
2 changes: 1 addition & 1 deletion ee/session_recordings/session_recording_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def modify_recordings(
return response.Response({"success": True})

if request.method == "DELETE":
playlist_item = SessionRecordingPlaylistItem.objects.get(playlist=playlist, recording=session_recording_id) # type: ignore
playlist_item = SessionRecordingPlaylistItem.objects.get(playlist=playlist, recording=session_recording_id)

if playlist_item:
playlist_item.delete()
Expand Down
Binary file added frontend/public/services/vitally.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions frontend/src/scenes/data-warehouse/new/sourceWizardLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,45 @@ export const SOURCE_DETAILS: Record<ExternalDataSourceType, SourceConfig> = {
],
caption: 'Select an existing Salesforce account to link to PostHog or create a new connection',
},
Vitally: {
name: 'Vitally',
fields: [
{
name: 'secret_token',
label: 'Secret token',
type: 'text',
required: true,
placeholder: 'sk_live_...',
},
{
type: 'select',
name: 'region',
label: 'Vitally region',
required: true,
defaultValue: 'EU',
options: [
{
label: 'EU',
value: 'EU',
},
{
label: 'US',
value: 'US',
fields: [
{
name: 'subdomain',
label: 'Vitally subdomain',
type: 'text',
required: true,
placeholder: '',
},
],
},
],
},
],
caption: '',
},
}

export const buildKeaFormDefaultFromSourceDetails = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import IconSalesforce from 'public/services/salesforce.png'
import IconSnowflake from 'public/services/snowflake.png'
import IconMSSQL from 'public/services/sql-azure.png'
import IconStripe from 'public/services/stripe.png'
import IconVitally from 'public/services/vitally.png'
import IconZendesk from 'public/services/zendesk.png'
import { urls } from 'scenes/urls'

Expand Down Expand Up @@ -189,6 +190,7 @@ export function RenderDataWarehouseSourceIcon({
azure: Iconazure,
Salesforce: IconSalesforce,
MSSQL: IconMSSQL,
Vitally: IconVitally,
}[type]

return (
Expand All @@ -203,7 +205,7 @@ export function RenderDataWarehouseSourceIcon({
}
>
<Link to={getDataWarehouseSourceUrl(type)}>
<img src={icon} alt={type} height={sizePx} width={sizePx} className="rounded" />
<img src={icon} alt={type} height={sizePx} width={sizePx} className="rounded object-contain" />
</Link>
</Tooltip>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3861,6 +3861,7 @@ export const externalDataSources = [
'Zendesk',
'Snowflake',
'Salesforce',
'Vitally',
] as const

export type ExternalDataSourceType = (typeof externalDataSources)[number]
Expand Down
2 changes: 1 addition & 1 deletion latest_migrations.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name
ee: 0016_rolemembership_organization_member
otp_static: 0002_throttling
otp_totp: 0002_auto_20190420_0723
posthog: 0465_datawarehouse_stripe_account
posthog: 0466_alter_externaldatasource_source_type
sessions: 0001_initial
social_django: 0010_uid_db_index
two_factor: 0007_auto_20201201_1019
Loading

0 comments on commit ec2cc2e

Please sign in to comment.