Files
zeekayandHanzo Dev f888991a7a drop the Sentry wordmark from the react app
FSL-1.0-Apache-2.0 grants us the code, not the name. "Sentry" is
Functional Software's trademark, so every place the running app says it
to a user -- page titles, onboarding, empty states, toasts, settings
copy, the self-hosted footer -- now says Sentinel.

Attribution is the other half of the deal and stays untouched: upstream
copyright headers, LICENSE, NOTICE. So does anything where the mark is a
fact rather than a brand -- @sentry/* packages, sentry-cli, the wizard
and bundler plugins, docs.sentry.io, the whole gettingStartedDocs tree.
Renaming those would leave instructions that no longer work.

Nothing structural moved. No import, identifier, route path, feature
flag, API field or test id changed; the diff is 312 lines in and 312
out. Colocated specs were updated in lockstep with the copy they assert.
Marketing and community links point at hanzo.ai, only where a real page
exists to point at.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-10 18:01:22 -07:00

121 lines
3.4 KiB
TypeScript

import {useState} from 'react';
import {Alert} from 'sentry/components/alert';
import {Button} from 'sentry/components/button';
import ErrorBoundary from 'sentry/components/errorBoundary';
import * as Layout from 'sentry/components/layouts/thirds';
import {t, tct} from 'sentry/locale';
import AlertStore from 'sentry/stores/alertStore';
import type {Organization} from 'sentry/types';
import useApi from 'sentry/utils/useApi';
import useOrganization from 'sentry/utils/useOrganization';
type OrganizationProps = {
organization: Organization;
};
type BodyProps = {
children?: React.ReactNode;
};
function DeletionInProgress({organization}: OrganizationProps) {
return (
<Layout.Body>
<Layout.Main>
<Alert type="warning" showIcon>
{tct(
'The [organization] organization is currently in the process of being deleted from Sentinel.',
{
organization: <strong>{organization.slug}</strong>,
}
)}
</Alert>
</Layout.Main>
</Layout.Body>
);
}
function DeletionPending({organization}: OrganizationProps) {
const api = useApi();
const [isRestoring, setIsRestoring] = useState(false);
const onRestore = async () => {
setIsRestoring(true);
try {
await api.requestPromise(`/organizations/${organization.slug}/`, {
method: 'PUT',
data: {cancelDeletion: true},
});
window.location.reload();
} catch {
setIsRestoring(false);
AlertStore.addAlert({
message:
'We were unable to restore this organization. Please try again or contact support.',
type: 'error',
});
}
};
return (
<Layout.Body>
<Layout.Main>
<h3>{t('Deletion Scheduled')}</h3>
<p>
{tct('The [organization] organization is currently scheduled for deletion.', {
organization: <strong>{organization.slug}</strong>,
})}
</p>
{organization.access.includes('org:admin') ? (
<div>
<p>
{t(
'Would you like to cancel this process and restore the organization back to the original state?'
)}
</p>
<p>
<Button priority="primary" onClick={onRestore} disabled={isRestoring}>
{t('Restore Organization')}
</Button>
</p>
</div>
) : (
<p>
{t(
'If this is a mistake, contact an organization owner and ask them to restore this organization.'
)}
</p>
)}
<p>
<small>
{t(
"Note: Restoration is available until the process begins. Once it does, there's no recovering the data that has been removed."
)}
</small>
</p>
</Layout.Main>
</Layout.Body>
);
}
function OrganizationDetailsBody({children}: BodyProps) {
// Organization may be null in account settings
const organization = useOrganization({allowNull: true});
const status = organization?.status?.id;
if (organization && status === 'pending_deletion') {
return <DeletionPending organization={organization} />;
}
if (organization && status === 'deletion_in_progress') {
return <DeletionInProgress organization={organization} />;
}
return <ErrorBoundary>{children}</ErrorBoundary>;
}
export default OrganizationDetailsBody;