landing.tsx 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import Feature from 'sentry/components/acl/feature';
  2. import {Alert} from 'sentry/components/alert';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import NoProjectMessage from 'sentry/components/noProjectMessage';
  5. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  6. import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
  7. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  8. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  9. import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
  10. import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
  11. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  12. import {t} from 'sentry/locale';
  13. import useOrganization from 'sentry/utils/useOrganization';
  14. import {
  15. NumberOfPipelinesChart,
  16. PipelineDurationChart,
  17. TotalTokensUsedChart,
  18. } from 'sentry/views/aiAnalytics/aiAnalyticsCharts';
  19. import {PipelinesTable} from 'sentry/views/aiAnalytics/PipelinesTable';
  20. import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
  21. function NoAccessComponent() {
  22. return (
  23. <Layout.Page withPadding>
  24. <Alert type="warning">{t("You don't have access to this feature")}</Alert>
  25. </Layout.Page>
  26. );
  27. }
  28. export default function AiAnalyticsPage() {
  29. const organization = useOrganization();
  30. return (
  31. <PageFiltersContainer>
  32. <SentryDocumentTitle title={`AI Analytics — ${organization.slug}`}>
  33. <Layout.Page>
  34. <Feature
  35. features="ai-analytics"
  36. organization={organization}
  37. renderDisabled={NoAccessComponent}
  38. >
  39. <NoProjectMessage organization={organization}>
  40. <Layout.Header>
  41. <Layout.HeaderContent>
  42. <Layout.Title>
  43. {t('AI Analytics')}
  44. <PageHeadingQuestionTooltip
  45. title={t('View analytics and information about your AI pipelines')}
  46. docsUrl="https://docs.sentry.io/product/ai-analytics/"
  47. />
  48. </Layout.Title>
  49. </Layout.HeaderContent>
  50. </Layout.Header>
  51. <Layout.Body>
  52. <Layout.Main fullWidth>
  53. <ModuleLayout.Layout>
  54. <ModuleLayout.Full>
  55. <PageFilterBar condensed>
  56. <ProjectPageFilter />
  57. <EnvironmentPageFilter />
  58. <DatePageFilter />
  59. </PageFilterBar>
  60. </ModuleLayout.Full>
  61. <ModuleLayout.Third>
  62. <TotalTokensUsedChart />
  63. </ModuleLayout.Third>
  64. <ModuleLayout.Third>
  65. <NumberOfPipelinesChart />
  66. </ModuleLayout.Third>
  67. <ModuleLayout.Third>
  68. <PipelineDurationChart />
  69. </ModuleLayout.Third>
  70. <ModuleLayout.Full>
  71. <PipelinesTable />
  72. </ModuleLayout.Full>
  73. </ModuleLayout.Layout>
  74. </Layout.Main>
  75. </Layout.Body>
  76. </NoProjectMessage>
  77. </Feature>
  78. </Layout.Page>
  79. </SentryDocumentTitle>
  80. </PageFiltersContainer>
  81. );
  82. }