diff --git a/frontend/src/components/federation-create.tsx b/frontend/src/components/federation-create.tsx index 6e8fa6fd..3956f8cb 100644 --- a/frontend/src/components/federation-create.tsx +++ b/frontend/src/components/federation-create.tsx @@ -7,6 +7,9 @@ import { Accordion, AccordionItem, ToastNotification, + ModalWrapper, + TextInput, + Link } from 'carbon-components-react'; import { ToastContainer } from 'react-toastify'; import GetApiServerUri from './helpers'; @@ -17,7 +20,7 @@ import { } from 'redux/actions'; import { RootState } from 'redux/reducers'; import { link } from './types'; -import { Launch } from '@carbon/icons-react'; +import { Launch, NextOutline } from '@carbon/icons-react'; type FederationCreateProps = { tornjakMessageFunc: (globalErrorMessage: string) => void, @@ -26,18 +29,34 @@ type FederationCreateProps = { globalErrorMessage: string, }; +type Federation = { + trust_domain?: string, + federation_relationships?: { + trust_domain?: string, + bundle_endpoint_url?: string, + [key: string]: any + }[], + [key: string]: any +}; + type FederationCreateState = { federationJson: string, + uploadedFederation: Federation | Federation[], + federationLoaded: boolean, loading: boolean, statusOK: string, successJsonMessage: string, message: string, + exposedBundleEndpoint: string, + newFederationsIds: { trustDomain: string }[], + selectedFederationId: number, + federationSelected: boolean, }; const NewFederationJsonFormatLink = (props: { link: link }) => (
); @@ -46,13 +65,21 @@ class FederationCreate extends Componentonly .json files
@@ -168,16 +300,136 @@ class FederationCreate extends Component{JSON.stringify(uploadedFederation, null, 2)}+
Step 2. EDIT FEDERATION
+(Upload JSON File to Enable)
)} diff --git a/frontend/src/components/style.css b/frontend/src/components/style.css index c266307c..54fc19c9 100644 --- a/frontend/src/components/style.css +++ b/frontend/src/components/style.css @@ -475,7 +475,7 @@ border-color: rgb(180, 178, 178); } -.view_entries_yaml_button { +.view_entries_yaml_button, .view_federations_yaml_button { display: inline-block; } @@ -644,6 +644,8 @@ .bundle-input-field { width: 400px; + margin-top: 10px; + margin-bottom: 15px; } .bundletitle{ diff --git a/frontend/src/components/trustbundle-create.tsx b/frontend/src/components/trustbundle-create.tsx index b9ab2745..b0ce7953 100644 --- a/frontend/src/components/trustbundle-create.tsx +++ b/frontend/src/components/trustbundle-create.tsx @@ -1,6 +1,6 @@ import { Component } from 'react'; import axios from 'axios'; -import { InlineNotification, TextArea, Button } from 'carbon-components-react'; +import { InlineNotification, TextArea, Button, TextInput } from 'carbon-components-react'; import { ToastContainer } from 'react-toastify'; import GetApiServerUri from './helpers'; import TornjakApi from './tornjak-api-helpers'; @@ -46,7 +46,7 @@ class TrustBundleCreate extends Component