Skip to content

Commit 197eb24

Browse files
committed
fix(web): Resolve terraform template downloaded file name issue
1 parent aef4bd5 commit 197eb24

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

web/src/pages/terraform-template/Docker/docker.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const Docker: FC = () => {
1313
>(TerraformTemplateAPI.Docker, 'docker');
1414
const { download, isPending: downloadPending } = useDownload({
1515
folderName: 'MyTerraform',
16-
source: 'iam',
17-
downloadFileName: 'Iam',
16+
source: 'docker',
17+
downloadFileName: 'Docker',
1818
});
1919

2020
const [services, setServices] = useState({
@@ -47,9 +47,9 @@ const Docker: FC = () => {
4747

4848
return (
4949
<form onSubmit={handleForm} className="w-full max-w-96">
50-
<div className="rounded-md border border-gray-500">
50+
<div className="border border-gray-500 rounded-md">
5151
<div className="divide-y divide-gray-500">
52-
<div className="flex w-full items-center justify-between px-3 py-3">
52+
<div className="flex items-center justify-between w-full px-3 py-3">
5353
<p>Key Pair</p>
5454
<input
5555
type="checkbox"
@@ -59,7 +59,7 @@ const Docker: FC = () => {
5959
onChange={() => handleServices('docker_image')}
6060
/>
6161
</div>
62-
<div className="flex w-full items-center justify-between px-3 py-3">
62+
<div className="flex items-center justify-between w-full px-3 py-3">
6363
<p>Security Group</p>
6464
<input
6565
type="checkbox"
@@ -75,7 +75,7 @@ const Docker: FC = () => {
7575
<button
7676
type="submit"
7777
disabled={dockerPending || downloadPending}
78-
className="btn mt-3 w-full bg-orange-base text-white hover:bg-orange-base/70 disabled:bg-orange-base/50 disabled:text-white/70"
78+
className="w-full mt-3 text-white btn bg-orange-base hover:bg-orange-base/70 disabled:bg-orange-base/50 disabled:text-white/70"
7979
>
8080
{dockerPending
8181
? 'Generate Terraform...'

web/src/pages/terraform-template/EC2/ec2.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const EC2 = () => {
1313
>(TerraformTemplateAPI.EC2, 'ec2');
1414
const { download, isPending: downloadPending } = useDownload({
1515
folderName: 'MyTerraform',
16-
source: 'iam',
17-
downloadFileName: 'Iam',
16+
source: 'ec2',
17+
downloadFileName: 'EC2',
1818
});
1919

2020
const [services, setServices] = useState({
@@ -49,9 +49,9 @@ const EC2 = () => {
4949

5050
return (
5151
<form onSubmit={handleForm} className="w-full max-w-96">
52-
<div className="rounded-md border border-gray-500">
52+
<div className="border border-gray-500 rounded-md">
5353
<div className="divide-y divide-gray-500">
54-
<div className="flex w-full items-center justify-between px-3 py-3">
54+
<div className="flex items-center justify-between w-full px-3 py-3">
5555
<p>Key Pair</p>
5656
<input
5757
type="checkbox"
@@ -61,7 +61,7 @@ const EC2 = () => {
6161
onChange={() => handleServices('key_pair')}
6262
/>
6363
</div>
64-
<div className="flex w-full items-center justify-between px-3 py-3">
64+
<div className="flex items-center justify-between w-full px-3 py-3">
6565
<p>Security Group</p>
6666
<input
6767
type="checkbox"
@@ -72,7 +72,7 @@ const EC2 = () => {
7272
onChange={() => handleServices('security_group')}
7373
/>
7474
</div>
75-
<div className="flex w-full items-center justify-between px-3 py-3">
75+
<div className="flex items-center justify-between w-full px-3 py-3">
7676
<p>AWS Instance</p>
7777
<input
7878
type="checkbox"
@@ -82,7 +82,7 @@ const EC2 = () => {
8282
onChange={() => handleServices('aws_instance')}
8383
/>
8484
</div>
85-
<div className="flex w-full items-center justify-between px-3 py-3">
85+
<div className="flex items-center justify-between w-full px-3 py-3">
8686
<p>AMI From Instance</p>
8787
<input
8888
type="checkbox"
@@ -98,7 +98,7 @@ const EC2 = () => {
9898
<button
9999
type="submit"
100100
disabled={ec2Pending || downloadPending}
101-
className="btn mt-3 w-full bg-orange-base text-white hover:bg-orange-base/70 disabled:bg-orange-base/50 disabled:text-white/70"
101+
className="w-full mt-3 text-white btn bg-orange-base hover:bg-orange-base/70 disabled:bg-orange-base/50 disabled:text-white/70"
102102
>
103103
{ec2Pending
104104
? 'Generate Terraform...'

web/src/pages/terraform-template/S3/s3.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const S3: FC = () => {
1313
>(TerraformTemplateAPI.S3, 's3');
1414
const { download, isPending: downloadPending } = useDownload({
1515
folderName: 'MyTerraform',
16-
source: 'iam',
17-
downloadFileName: 'Iam',
16+
source: 's3',
17+
downloadFileName: 'S3',
1818
});
1919

2020
const [services, setServices] = useState({
@@ -47,9 +47,9 @@ const S3: FC = () => {
4747

4848
return (
4949
<form onSubmit={handleForm} className="w-full max-w-96">
50-
<div className="rounded-md border border-gray-500">
50+
<div className="border border-gray-500 rounded-md">
5151
<div className="divide-y divide-gray-500">
52-
<div className="flex w-full items-center justify-between px-3 py-3">
52+
<div className="flex items-center justify-between w-full px-3 py-3">
5353
<p>S3 Bucket</p>
5454
<input
5555
type="checkbox"
@@ -59,7 +59,7 @@ const S3: FC = () => {
5959
onChange={() => handleServices('s3_bucket')}
6060
/>
6161
</div>
62-
<div className="flex w-full items-center justify-between px-3 py-3">
62+
<div className="flex items-center justify-between w-full px-3 py-3">
6363
<p>Bucket Versioning</p>
6464
<input
6565
type="checkbox"
@@ -75,7 +75,7 @@ const S3: FC = () => {
7575
<button
7676
type="submit"
7777
disabled={s3Pending || downloadPending}
78-
className="btn mt-3 w-full bg-orange-base text-white hover:bg-orange-base/70 disabled:bg-orange-base/50 disabled:text-white/70"
78+
className="w-full mt-3 text-white btn bg-orange-base hover:bg-orange-base/70 disabled:bg-orange-base/50 disabled:text-white/70"
7979
>
8080
{s3Pending
8181
? 'Generate Terraform...'

0 commit comments

Comments
 (0)