From 772d6efddb8a605537dfdf217f858a263599f0bc Mon Sep 17 00:00:00 2001 From: Sumin Kim <42088290+Eeap@users.noreply.github.com> Date: Mon, 7 Aug 2023 01:19:26 +0900 Subject: [PATCH 01/14] =?UTF-8?q?[=EC=88=98=EC=A0=95]=20nginx=20url?= =?UTF-8?q?=EC=9D=84=20ip=20=EB=8C=80=EC=8B=A0=20service=20name=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95=20(#73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 62b8688..7472ada 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,5 +1,5 @@ upstream api_server { - server 10.98.220.61:8000; # API upstream + server backend-cluster:8000; # API upstream } server { From 1850eccf7336a3d36b5af4c7fd41ee8fc560a183 Mon Sep 17 00:00:00 2001 From: Yong woo Song Date: Mon, 7 Aug 2023 16:31:54 +0900 Subject: [PATCH 02/14] fix: update README TOC --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1df0d58..35e90ec 100644 --- a/README.md +++ b/README.md @@ -37,22 +37,22 @@ Table of Contents
  1. - About The Project + About The Project
  2. - Getting Started + Getting Started
  3. -
  4. Features
  5. -
  6. Contributing
  7. -
  8. License
  9. -
  10. Contact
  11. +
  12. Features
  13. +
  14. Contributing
  15. +
  16. License
  17. +
  18. Contact
From 81a0590bd50379014ef2c0eabd34db46027931c2 Mon Sep 17 00:00:00 2001 From: Sumin Kim <42088290+Eeap@users.noreply.github.com> Date: Mon, 7 Aug 2023 16:38:59 +0900 Subject: [PATCH 03/14] fix: del volume config in build workflow --- .github/workflows/build.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c27af3e..9c0b1be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,10 +64,6 @@ jobs: labels: app: {{ include "terraform-canvas.name" . }}-front spec: - volumes: - - name: config-volume - configMap: - name: fe-config serviceAccountName: {{ include "terraform-canvas.serviceAccountName" . }} containers: - name: {{ .Chart.Name }}-front @@ -76,10 +72,6 @@ jobs: - name: http containerPort: {{ .Values.frontend.lb.http.targetPort}} protocol: TCP - volumeMounts: - - name: config-volume - mountPath: /usr/share/nginx/html/config.js - subPath: config.js --- apiVersion: v1 kind: Service From 059943514215d8da53d620a4f80e80781bbd85c7 Mon Sep 17 00:00:00 2001 From: Yong woo Song Date: Wed, 9 Aug 2023 02:02:53 +0900 Subject: [PATCH 04/14] docs: add CONTRIBUTING.md --- CONTRIBUTING.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a5aeafe --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +## Terraform Canvas contributing guide +Thank you for your interest in contributing to our project! This guide will provide you with an overview of the contribution workflow, from opening an issue to creating a pull request (PR), reviewing, and merging the PR. + +## Guide for New Contributors +To gain a better understanding of the project, please read the [README](https://github.com/Terraform-Canvas/front-end). +It contains valuable information on how to start making open-source contributions. + +## Getting Started +### Issues + +#### Creating a New Issue +Before creating a new issue, please search to check if a similar issue already exists. If you can't find a related issue, you can open a new one using the appropriate [issue form](https://github.com/Terraform-Canvas/front-end/issues/new/choose). +#### Resolving an Issue +Feel free to browse through our existing issues to find one that aligns with your interests. You can utilize labels as filters to narrow down your search. For more details, refer to the Labels section. Typically, we don't assign issues to specific individuals. If you identify an issue you'd like to address, you're welcome to open a PR with your proposed fix. +### Making Changes +1. Fork the repository. +2. Install or update dependency such as Node.js. For more information, see [README](https://github.com/Terraform-Canvas/front-end). +3. Create a working branch and start with your changes! +4. Test your code using prepared test code or you can add additional test code. +5. Commit your updates. +### Submitting a Pull Request (PR) +Once you've completed your changes, it's time to create a pull request (PR): +- Pull requests for developed changes should be directed towards the `dev` branch. +- Don't forget to link PR to issue if you are solving one. +- Once you submit your PR, team member will review your proposal. We may ask questions or request additional information. +- Once the review is complete, the changes will be automatically merged into the `dev` branch. +### Your PR is merged! +Congratulations! πŸŽ‰πŸŽ‰ Thank you for contributing to our project! Your efforts are greatly appreciated. ☺️ + +## Reference +- https://github.com/github/docs/blob/main/CONTRIBUTING.md From 77b0d66653218c7be46db0ea2ebc3f46465ababa Mon Sep 17 00:00:00 2001 From: Yong woo Song Date: Wed, 9 Aug 2023 02:05:12 +0900 Subject: [PATCH 05/14] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a5aeafe..efefae6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ Feel free to browse through our existing issues to find one that aligns with you ### Making Changes 1. Fork the repository. 2. Install or update dependency such as Node.js. For more information, see [README](https://github.com/Terraform-Canvas/front-end). -3. Create a working branch and start with your changes! +3. Create a working branch and start with your changes! (eg. feat/nodestyle) 4. Test your code using prepared test code or you can add additional test code. 5. Commit your updates. ### Submitting a Pull Request (PR) From 17dba71393a2954fedc3a349ca13a7b16828487c Mon Sep 17 00:00:00 2001 From: Yong woo Song Date: Wed, 9 Aug 2023 02:05:54 +0900 Subject: [PATCH 06/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 35e90ec..c1247d3 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ TBA ## :fire: Contributing -Please refer to `CONTRIBUTION.txt` for Contribution. +Please refer to [CONTRIBUTION.md](https://github.com/Terraform-Canvas/front-end/blob/main/CONTRIBUTING.md) for Contribution. For issues, new functions and requests to modify please follow the following procedure. πŸ₯° From e7e417f40df71e9b3d32a59bc2522d1f1a2a0121 Mon Sep 17 00:00:00 2001 From: FacerAin Date: Thu, 10 Aug 2023 19:57:38 +0900 Subject: [PATCH 07/14] feat: fix blueprint node id --- src/components/node/NodePlane.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/node/NodePlane.vue b/src/components/node/NodePlane.vue index 784abd3..c0a754d 100644 --- a/src/components/node/NodePlane.vue +++ b/src/components/node/NodePlane.vue @@ -74,6 +74,7 @@ watch(blueprintNodes, (newValue, oldValue) => { if (newValue) { let nodeData = newValue; addNodes(nodeData); + id += getNodes.value.length; } }); @@ -92,7 +93,6 @@ function onDrop(event) { position, label: `${type} node`, }; - addNodes([newNode]); // align node position after drop, so it's centered to the mouse @@ -134,6 +134,7 @@ const exportAndOpenModal = () => { }); exportData.value = JSON.stringify(exportDataArr); showModal.value = true; + if (btnData.value === 'create') { axios .post('/terraform/usertf', exportData.value) From 1c768d53a1e29e60b2f74c732131c7e4335ecb13 Mon Sep 17 00:00:00 2001 From: Eeap Date: Thu, 10 Aug 2023 20:14:26 +0900 Subject: [PATCH 08/14] fix: fix timeout --- src/plugins/axios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/axios.js b/src/plugins/axios.js index c8fe4b7..23f540e 100644 --- a/src/plugins/axios.js +++ b/src/plugins/axios.js @@ -20,7 +20,7 @@ axios.interceptors.request.use( config.url = url + config.url; //host 및 url 방식 μˆ˜μ •ν•„μš” } //헀더 μ…‹νŒ… - config.timeout = 20000; + config.timeout = 60000000; config.headers['Authorization'] = 'Bearer ' + VueCookies.get('accessToken'); config.headers['X-refresh-token'] = VueCookies.get('refreshToken'); From 22155282e13ed86e3dbecf03d2d52a5ee1359c4a Mon Sep 17 00:00:00 2001 From: Yong woo Song Date: Thu, 10 Aug 2023 20:21:53 +0900 Subject: [PATCH 09/14] docs: update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c1247d3..877461d 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,12 @@ Download and install packages and associated dependencies via `yarn install` ## :globe_with_meridians: Features -TBA +- Terraform File Generation and Execution Through Visual Programming +- User Private Key Registration for Provisioning +- Quick and Convenient Environment Configuration Using Pre-Prepared Blueprints + +![canvas-ex-1](https://github.com/Terraform-Canvas/front-end/assets/16442978/94fccd75-e988-4ad5-a10f-6391ae5aac61) +

(back to top)

From d7de53c17f3b0ad89412552537dccdcfde264e14 Mon Sep 17 00:00:00 2001 From: FacerAin Date: Thu, 10 Aug 2023 20:28:57 +0900 Subject: [PATCH 10/14] fix: NodePlane showModal --- src/components/node/NodePlane.vue | 40 ++++++++++++++++++------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/components/node/NodePlane.vue b/src/components/node/NodePlane.vue index 784abd3..1862f0e 100644 --- a/src/components/node/NodePlane.vue +++ b/src/components/node/NodePlane.vue @@ -133,7 +133,7 @@ const exportAndOpenModal = () => { exportDataArr.push(nodeData); }); exportData.value = JSON.stringify(exportDataArr); - showModal.value = true; + if (btnData.value === 'create') { axios .post('/terraform/usertf', exportData.value) @@ -142,29 +142,33 @@ const exportAndOpenModal = () => { btnType.value = 'success'; btnMsg.value = 'tf 생성 μ™„λ£Œ'; btnLoader.value = false; + showModal.value = true; }) .catch((err) => { btnMsg.value = 'tf 생성 μ‹€νŒ¨'; btnType.value = 'warning'; btnLoader.value = false; + showModal.value = true; console.error(err); }); - } else if (btnData.value === 'run') { - axios - .post('/terraform/apply', exportData.value) - .then((res) => { - btnData.value = 'destroy'; - btnMsg.value = 'tf μ‹€ν–‰ μ™„λ£Œ'; - btnType.value = 'success'; - btnLoader.value = false; - }) - .catch((err) => { - btnMsg.value = 'tf μ‹€ν–‰ μ‹€νŒ¨'; - btnType.value = 'warning'; - btnLoader.value = false; - console.error(err); - }); - } else if (btnData.value === 'destroy') { + } + // else if (btnData.value === 'run') { + // axios + // .post('/terraform/apply', exportData.value) + // .then((res) => { + // btnData.value = 'destroy'; + // btnMsg.value = 'tf μ‹€ν–‰ μ™„λ£Œ'; + // btnType.value = 'success'; + // btnLoader.value = false; + // }) + // .catch((err) => { + // btnMsg.value = 'tf μ‹€ν–‰ μ‹€νŒ¨'; + // btnType.value = 'warning'; + // btnLoader.value = false; + // console.error(err); + // }); + // } + else if (btnData.value === 'destroy') { axios .post('/terraform/destroy') .then((res) => { @@ -172,11 +176,13 @@ const exportAndOpenModal = () => { btnMsg.value = 'tf μ‚­μ œ μ™„λ£Œ'; btnType.value = 'success'; btnLoader.value = false; + showModal.value = true; }) .catch((err) => { btnMsg.value = 'tf μ‚­μ œ μ‹€νŒ¨'; btnType.value = 'warning'; btnLoader.value = false; + showModal.value = true; console.error(err); }); } From ca10839144f3c4097ec7c27cec399bfe9abd1e4b Mon Sep 17 00:00:00 2001 From: FacerAin Date: Thu, 10 Aug 2023 20:32:00 +0900 Subject: [PATCH 11/14] fix: update nginx timeout --- nginx.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nginx.conf b/nginx.conf index 7472ada..e73f26a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,7 +1,23 @@ +client_header_timeout 30m; +client_body_timeout 30m; +client_max_body_size 1024M; + +keepalive_timeout 20m; + +proxy_connect_timeout 6000; +proxy_send_timeout 6000; +proxy_read_timeout 6000; +send_timeout 6000; + +proxy_buffers 16 16k; +proxy_buffer_size 32k; + + upstream api_server { server backend-cluster:8000; # API upstream } + server { listen 80; location / { From 3237ef6a223685b7c879fcb0f100c7da471bf274 Mon Sep 17 00:00:00 2001 From: Eeap Date: Thu, 10 Aug 2023 20:44:41 +0900 Subject: [PATCH 12/14] fix: fix nginx timeout --- nginx.conf | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/nginx.conf b/nginx.conf index e73f26a..230b07a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,16 +1,4 @@ -client_header_timeout 30m; -client_body_timeout 30m; -client_max_body_size 1024M; -keepalive_timeout 20m; - -proxy_connect_timeout 6000; -proxy_send_timeout 6000; -proxy_read_timeout 6000; -send_timeout 6000; - -proxy_buffers 16 16k; -proxy_buffer_size 32k; upstream api_server { @@ -29,5 +17,16 @@ server { location /api/v1/ { proxy_set_header Host $host; proxy_pass http://api_server/api/v1/; + client_header_timeout 30m; + client_body_timeout 30m; + client_max_body_size 1024M; + + proxy_connect_timeout 6000; + proxy_send_timeout 6000; + proxy_read_timeout 6000; + send_timeout 6000; + + proxy_buffers 16 16k; + proxy_buffer_size 32k; } } \ No newline at end of file From 3f46bc8d891531798718866c6b1f411701195d9d Mon Sep 17 00:00:00 2001 From: Eeap Date: Thu, 10 Aug 2023 20:52:34 +0900 Subject: [PATCH 13/14] fix: del client conf --- nginx.conf | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nginx.conf b/nginx.conf index 230b07a..be1b436 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,6 +1,3 @@ - - - upstream api_server { server backend-cluster:8000; # API upstream } @@ -17,16 +14,10 @@ server { location /api/v1/ { proxy_set_header Host $host; proxy_pass http://api_server/api/v1/; - client_header_timeout 30m; - client_body_timeout 30m; - client_max_body_size 1024M; proxy_connect_timeout 6000; proxy_send_timeout 6000; proxy_read_timeout 6000; send_timeout 6000; - - proxy_buffers 16 16k; - proxy_buffer_size 32k; } } \ No newline at end of file From 57bd90e0401167ab1c9c6a35d7c8ed6904df4eed Mon Sep 17 00:00:00 2001 From: FacerAin Date: Thu, 10 Aug 2023 21:36:58 +0900 Subject: [PATCH 14/14] fix: export btn destroy --- src/components/node/NodePlane.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/node/NodePlane.vue b/src/components/node/NodePlane.vue index e52b468..9613bcc 100644 --- a/src/components/node/NodePlane.vue +++ b/src/components/node/NodePlane.vue @@ -138,7 +138,7 @@ const exportAndOpenModal = () => { axios .post('/terraform/usertf', exportData.value) .then((res) => { - btnData.value = 'run'; + btnData.value = 'destroy'; btnType.value = 'success'; btnMsg.value = 'tf 생성 μ™„λ£Œ'; btnLoader.value = false;