2023-02-28 04:08:52 +03:00
|
|
|
import React, { ReactElement, useContext } from 'react';
|
2022-12-28 05:48:21 +03:00
|
|
|
import { Tabs } from 'antd';
|
|
|
|
|
2023-01-10 07:57:29 +03:00
|
|
|
import StreamKeys from '../../../../components/admin/config/server/StreamKeys';
|
|
|
|
import ServerConfig from '../../../../components/admin/config/server/ServerConfig';
|
|
|
|
import StorageConfig from '../../../../components/admin/config/server/StorageConfig';
|
2023-02-28 04:08:52 +03:00
|
|
|
import { ServerStatusContext } from '../../../../utils/server-status-context';
|
2022-12-28 05:48:21 +03:00
|
|
|
|
2023-01-16 10:11:44 +03:00
|
|
|
import { AdminLayout } from '../../../../components/layouts/AdminLayout';
|
|
|
|
|
2022-12-28 05:48:21 +03:00
|
|
|
export default function PublicFacingDetails() {
|
2023-02-28 04:08:52 +03:00
|
|
|
const serverStatusData = useContext(ServerStatusContext);
|
|
|
|
|
|
|
|
const { serverConfig } = serverStatusData || {};
|
|
|
|
const { streamKeyOverridden } = serverConfig;
|
|
|
|
|
2022-12-28 05:48:21 +03:00
|
|
|
return (
|
|
|
|
<div className="config-public-details-page">
|
|
|
|
<Tabs
|
|
|
|
defaultActiveKey="1"
|
|
|
|
centered
|
|
|
|
items={[
|
|
|
|
{
|
|
|
|
label: `Server Config`,
|
|
|
|
key: '1',
|
|
|
|
children: <ServerConfig />,
|
|
|
|
},
|
2023-02-28 04:08:52 +03:00
|
|
|
!streamKeyOverridden && {
|
2022-12-28 05:48:21 +03:00
|
|
|
label: `Stream Keys`,
|
|
|
|
key: '2',
|
|
|
|
children: <StreamKeys />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: `S3 Object Storage`,
|
|
|
|
key: '3',
|
|
|
|
children: <StorageConfig />,
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2023-01-16 10:11:44 +03:00
|
|
|
|
|
|
|
PublicFacingDetails.getLayout = function getLayout(page: ReactElement) {
|
|
|
|
return <AdminLayout page={page} />;
|
|
|
|
};
|