import React, { FC } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { NavModelItem } from '@grafana/data'; import { Button, Input, Field, Form, FieldSet } from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; import { getConfig } from 'app/core/config'; import { createOrganization } from './state/actions'; const mapDispatchToProps = { createOrganization, }; const connector = connect(undefined, mapDispatchToProps); type Props = ConnectedProps; interface CreateOrgFormDTO { name: string; } const pageNav: NavModelItem = { icon: 'building', id: 'org-new', text: 'New organization', breadcrumbs: [{ title: 'Server admin', url: 'admin/orgs' }], }; export const NewOrgPage: FC = ({ createOrganization }) => { const createOrg = async (newOrg: { name: string }) => { await createOrganization(newOrg); window.location.href = getConfig().appSubUrl + '/org'; }; return (

Each organization contains their own dashboards, data sources, and configuration, which cannot be shared shared between organizations. While users might belong to more than one organization, multiple organizations are most frequently used in multi-tenant deployments.

onSubmit={createOrg}> {({ register, errors }) => { return ( <>
); }}
); }; export default connector(NewOrgPage);