Skip to content

Commit

Permalink
[DOP-17434] fix (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-pedchenko committed Jun 25, 2024
1 parent 46dc619 commit a716422
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/entities/connection/create/hiveCreateForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { PasswordInput, required, TextInput } from "react-admin";

const HiveCreateForm = () => {
return (
<>
<TextInput
name={"connection_data.cluster"}
source="connection_data.cluster"
label={"Cluster"}
validate={required()}
/>
<TextInput
name={"auth_data.user"}
source="auth_data.user"
label={"User"}
validate={required()}
/>
<PasswordInput
name={"auth_data.password"}
source="auth_data.password"
label={"Password"}
validate={required()}
/>
</>
);
};

export default HiveCreateForm;
25 changes: 25 additions & 0 deletions src/entities/connection/edit/hiveEditForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { PasswordInput, TextInput } from "react-admin";

const HiveEditForm = () => {
return (
<>
<TextInput
name={"connection_data.cluster"}
source="connection_data.cluster"
label={"Cluster"}
/>
<TextInput
source="auth_data.user"
label={"User"}
name={"auth_data.user"}
/>
<PasswordInput
source="auth_data.password"
name={"auth_data.password"}
label={"Password"}
/>
</>
);
};

export default HiveEditForm;
29 changes: 29 additions & 0 deletions src/entities/connection/show/hiveShow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import BaseConnectionShow from "@entities/connection/show/baseShow";

import { ConnectionData } from "@widgets/connection/types";

const HiveConnectionShow = ({
data,
editable = true,
showTitle = true,
}: {
data: ConnectionData;
editable?: boolean;
showTitle?: boolean;
}) => {
return (
<BaseConnectionShow
data={data}
connectionColumns={[
{
source: "connection_data.cluster",
label: "Cluster",
},
]}
editable={editable}
showTitle={showTitle}
/>
);
};

export default HiveConnectionShow;

0 comments on commit a716422

Please sign in to comment.