|
@@ -8,6 +8,7 @@ import LatestVersionItem from './LatestVersionItem';
|
|
import PageLoader from '../../common/PageLoader/PageLoader';
|
|
import PageLoader from '../../common/PageLoader/PageLoader';
|
|
|
|
|
|
export interface DetailsProps {
|
|
export interface DetailsProps {
|
|
|
|
+ subject: SchemaName;
|
|
schema: SchemaSubject;
|
|
schema: SchemaSubject;
|
|
clusterName: ClusterName;
|
|
clusterName: ClusterName;
|
|
versions: SchemaSubject[];
|
|
versions: SchemaSubject[];
|
|
@@ -19,6 +20,7 @@ export interface DetailsProps {
|
|
}
|
|
}
|
|
|
|
|
|
const Details: React.FC<DetailsProps> = ({
|
|
const Details: React.FC<DetailsProps> = ({
|
|
|
|
+ subject,
|
|
schema,
|
|
schema,
|
|
clusterName,
|
|
clusterName,
|
|
fetchSchemaVersions,
|
|
fetchSchemaVersions,
|
|
@@ -26,8 +28,9 @@ const Details: React.FC<DetailsProps> = ({
|
|
isFetched,
|
|
isFetched,
|
|
}) => {
|
|
}) => {
|
|
React.useEffect(() => {
|
|
React.useEffect(() => {
|
|
- fetchSchemaVersions(clusterName, schema.subject as SchemaName);
|
|
|
|
|
|
+ fetchSchemaVersions(clusterName, subject);
|
|
}, [fetchSchemaVersions, clusterName]);
|
|
}, [fetchSchemaVersions, clusterName]);
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div className="section">
|
|
<div className="section">
|
|
<div className="level">
|
|
<div className="level">
|
|
@@ -39,59 +42,61 @@ const Details: React.FC<DetailsProps> = ({
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
>
|
|
>
|
|
- {schema.subject}
|
|
|
|
|
|
+ {subject}
|
|
</Breadcrumb>
|
|
</Breadcrumb>
|
|
</div>
|
|
</div>
|
|
- <div className="box">
|
|
|
|
- <div className="level">
|
|
|
|
- <div className="level-left">
|
|
|
|
- <div className="level-item">
|
|
|
|
- <div className="mr-1">
|
|
|
|
- <b>Latest Version</b>
|
|
|
|
|
|
+ {isFetched ? (
|
|
|
|
+ <>
|
|
|
|
+ <div className="box">
|
|
|
|
+ <div className="level">
|
|
|
|
+ <div className="level-left">
|
|
|
|
+ <div className="level-item">
|
|
|
|
+ <div className="mr-1">
|
|
|
|
+ <b>Latest Version</b>
|
|
|
|
+ </div>
|
|
|
|
+ <div className="tag is-info is-light" title="Version">
|
|
|
|
+ #{schema.version}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div className="tag is-info is-light" title="Version">
|
|
|
|
- #{schema.version}
|
|
|
|
|
|
+ <div className="level-right">
|
|
|
|
+ <button
|
|
|
|
+ className="button is-warning is-small level-item"
|
|
|
|
+ type="button"
|
|
|
|
+ title="in development"
|
|
|
|
+ disabled
|
|
|
|
+ >
|
|
|
|
+ Update Schema
|
|
|
|
+ </button>
|
|
|
|
+ <button
|
|
|
|
+ className="button is-danger is-small level-item"
|
|
|
|
+ type="button"
|
|
|
|
+ title="in development"
|
|
|
|
+ disabled
|
|
|
|
+ >
|
|
|
|
+ Delete
|
|
|
|
+ </button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <LatestVersionItem schema={schema} />
|
|
</div>
|
|
</div>
|
|
- <div className="level-right">
|
|
|
|
- <button
|
|
|
|
- className="button is-warning is-small level-item"
|
|
|
|
- type="button"
|
|
|
|
- title="in development"
|
|
|
|
- disabled
|
|
|
|
- >
|
|
|
|
- Update Schema
|
|
|
|
- </button>
|
|
|
|
- <button
|
|
|
|
- className="button is-danger is-small level-item"
|
|
|
|
- type="button"
|
|
|
|
- title="in development"
|
|
|
|
- disabled
|
|
|
|
- >
|
|
|
|
- Delete
|
|
|
|
- </button>
|
|
|
|
|
|
+ <div className="box">
|
|
|
|
+ <table className="table is-striped is-fullwidth">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th>Version</th>
|
|
|
|
+ <th>ID</th>
|
|
|
|
+ <th>Schema</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ {versions.map((version) => (
|
|
|
|
+ <SchemaVersion key={version.id} version={version} />
|
|
|
|
+ ))}
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <LatestVersionItem schema={schema} />
|
|
|
|
- </div>
|
|
|
|
- {isFetched ? (
|
|
|
|
- <div className="box">
|
|
|
|
- <table className="table is-striped is-fullwidth">
|
|
|
|
- <thead>
|
|
|
|
- <tr>
|
|
|
|
- <th>Version</th>
|
|
|
|
- <th>ID</th>
|
|
|
|
- <th>Schema</th>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- <tbody>
|
|
|
|
- {versions.map((version) => (
|
|
|
|
- <SchemaVersion key={version.id} version={version} />
|
|
|
|
- ))}
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </>
|
|
) : (
|
|
) : (
|
|
<PageLoader />
|
|
<PageLoader />
|
|
)}
|
|
)}
|