Skip to content

Commit

Permalink
[버그] 블루프린트 생성 후 노드 생성 문제 (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
FacerAin authored Aug 10, 2023
2 parents 9a7cb37 + 57bd90e commit 7a41df3
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 40 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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! (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)
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
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@
<summary>Table of Contents</summary>
<ol>
<li>
<a href="#about-the-project">About The Project</a>
<a href="#mag-about-the-projectt">About The Project</a>
<ul>
<li><a href="#built-with">Built With</a></li>
<li><a href="#card_file_box-built-with">Built With</a></li>
</ul>
</li>
<li>
<a href="#getting-started">Getting Started</a>
<a href="#rocket-getting-started">Getting Started</a>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#guideline">Guideline</a></li>
<li><a href="#zap-prerequisites">Prerequisites</a></li>
<li><a href="#-guideline">Guideline</a></li>
</ul>
</li>
<li><a href="#features">Features</a></li>
<li><a href="#contributing">Contributing</a></li>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#globe_with_meridians-features">Features</a></li>
<li><a href="#fire-contributing">Contributing</a></li>
<li><a href="#closed_lock_with_key-license">License</a></li>
<li><a href="#speech_balloon-contact">Contact</a></li>
</ol>
</details>

Expand Down Expand Up @@ -120,14 +120,19 @@ 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)


<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- CONTRIBUTING -->
## :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. 🥰

Expand Down
8 changes: 7 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
upstream api_server {
server 10.98.220.61:8000; # API upstream
server backend-cluster:8000; # API upstream
}


server {
listen 80;
location / {
Expand All @@ -13,5 +14,10 @@ server {
location /api/v1/ {
proxy_set_header Host $host;
proxy_pass http://api_server/api/v1/;

proxy_connect_timeout 6000;
proxy_send_timeout 6000;
proxy_read_timeout 6000;
send_timeout 6000;
}
}
44 changes: 25 additions & 19 deletions src/components/node/NodePlane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ watch(blueprintNodes, (newValue, oldValue) => {
if (newValue) {
let nodeData = newValue;
addNodes(nodeData);
id += getNodes.value.length;
}
});
Expand All @@ -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
Expand Down Expand Up @@ -133,50 +133,56 @@ const exportAndOpenModal = () => {
exportDataArr.push(nodeData);
});
exportData.value = JSON.stringify(exportDataArr);
showModal.value = true;
if (btnData.value === 'create') {
axios
.post('/terraform/usertf', exportData.value)
.then((res) => {
btnData.value = 'run';
btnData.value = 'destroy';
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) => {
btnData.value = 'create';
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);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7a41df3

Please sign in to comment.