|
@@ -1,10 +1,10 @@
|
|
-import { SchemaSubject } from 'generated-sources';
|
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
|
|
+import { SchemaSubject } from 'generated-sources';
|
|
import { ClusterName, SchemaName } from 'redux/interfaces';
|
|
import { ClusterName, SchemaName } from 'redux/interfaces';
|
|
-import JSONViewer from 'components/common/JSONViewer/JSONViewer';
|
|
|
|
|
|
+import { clusterSchemasPath } from 'lib/paths';
|
|
import Breadcrumb from '../../common/Breadcrumb/Breadcrumb';
|
|
import Breadcrumb from '../../common/Breadcrumb/Breadcrumb';
|
|
-import { clusterSchemasPath } from '../../../lib/paths';
|
|
|
|
import SchemaVersion from './SchemaVersion';
|
|
import SchemaVersion from './SchemaVersion';
|
|
|
|
+import LatestVersionItem from './LatestVersionItem';
|
|
|
|
|
|
interface DetailsProps {
|
|
interface DetailsProps {
|
|
schema: SchemaSubject;
|
|
schema: SchemaSubject;
|
|
@@ -31,18 +31,16 @@ const Details: React.FC<DetailsProps> = ({
|
|
return (
|
|
return (
|
|
<div className="section">
|
|
<div className="section">
|
|
<div className="level">
|
|
<div className="level">
|
|
- <div className="level-item level-left">
|
|
|
|
- <Breadcrumb
|
|
|
|
- links={[
|
|
|
|
- {
|
|
|
|
- href: clusterSchemasPath(clusterName),
|
|
|
|
- label: 'Schema Registry',
|
|
|
|
- },
|
|
|
|
- ]}
|
|
|
|
- >
|
|
|
|
- {schema.subject}
|
|
|
|
- </Breadcrumb>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <Breadcrumb
|
|
|
|
+ links={[
|
|
|
|
+ {
|
|
|
|
+ href: clusterSchemasPath(clusterName),
|
|
|
|
+ label: 'Schema Registry',
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
|
|
+ >
|
|
|
|
+ {schema.subject}
|
|
|
|
+ </Breadcrumb>
|
|
</div>
|
|
</div>
|
|
<div className="box">
|
|
<div className="box">
|
|
<div className="level">
|
|
<div className="level">
|
|
@@ -83,34 +81,7 @@ const Details: React.FC<DetailsProps> = ({
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div className="tile is-ancestor mt-1">
|
|
|
|
- <div className="tile is-4 is-parent">
|
|
|
|
- <div className="tile is-child">
|
|
|
|
- <table className="table is-fullwidth">
|
|
|
|
- <tbody>
|
|
|
|
- <tr>
|
|
|
|
- <td>ID</td>
|
|
|
|
- <td>{schema.id}</td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td>Subject</td>
|
|
|
|
- <td>{schema.subject}</td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td>Compatibility</td>
|
|
|
|
- <td>{schema.compatibilityLevel}</td>
|
|
|
|
- </tr>
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div className="tile is-parent">
|
|
|
|
- <div className="tile is-child box py-1">
|
|
|
|
- <JSONViewer data={JSON.parse(schema.schema as string)} />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <LatestVersionItem schema={schema} />
|
|
</div>
|
|
</div>
|
|
<div className="box">
|
|
<div className="box">
|
|
<table className="table is-striped is-fullwidth">
|
|
<table className="table is-striped is-fullwidth">
|
|
@@ -122,11 +93,9 @@ const Details: React.FC<DetailsProps> = ({
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
- {versions
|
|
|
|
- .sort((a: SchemaSubject, b: SchemaSubject) => a.id - b.id)
|
|
|
|
- .map((version) => (
|
|
|
|
- <SchemaVersion key={version.id} version={version} />
|
|
|
|
- ))}
|
|
|
|
|
|
+ {versions.map((version) => (
|
|
|
|
+ <SchemaVersion key={version.id} version={version} />
|
|
|
|
+ ))}
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
</div>
|
|
</div>
|