-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added setup page for k8 cluster setup
- Loading branch information
Showing
18 changed files
with
234 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules | ||
SetupApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import styles from './Setup.module.scss'; | ||
|
||
const Setup = (): JSX.Element => { | ||
return ( | ||
<div className={styles.buttonContainer}> | ||
<button className={styles.button1} style={{ alignSelf: 'center' }} | ||
onClick={() => fetch('/api/setup/promInstall')}>Install Prometheus Operator</button> | ||
<span style={{display: 'none'}}>complete!✔</span> | ||
<button className={styles.button1} style={{ alignSelf: 'center' }} onClick={() => fetch('/api/setup/applyGraf')}>Get Metrics</button> | ||
<button className={styles.button1} style={{ alignSelf: 'center' }} onClick={() => fetch('/api/setup/portForward')}>Launch Port Forwarding</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Setup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import Setup from './Setup'; | ||
import styles from './Setup.module.scss'; | ||
|
||
const SetupDisplay = (): JSX.Element => { | ||
return ( | ||
<div className={styles.container}> | ||
<h3>Configure Kubernetes</h3> | ||
<div><Setup /></div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SetupDisplay; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.container { | ||
height: 30vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-evenly; | ||
} | ||
|
||
.buttonContainer { | ||
height: 20vh; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
} | ||
|
||
button { | ||
color: color(light, tan); | ||
align-self: start; | ||
font-size: 1rem; | ||
border-radius: 5px; | ||
border: none; | ||
border-radius: 5px; | ||
padding: 0.25em 0.75em; | ||
min-width: 10ch; | ||
text-align: center; | ||
line-height: 1.1; | ||
cursor: pointer; | ||
transition: all 0.3s ease-in-out; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&family=Quicksand:wght@300;400;500;600;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<script src="index.js"></script> | ||
<title>Set Up Your Kubernetes Cluster</title> | ||
<style> | ||
body { | ||
height: 79vh; | ||
font-family: "Bai Jamjuree", sans-serif; | ||
background: rgb(132, 202, 241); | ||
background: linear-gradient( | ||
107deg, | ||
rgba(132, 202, 241, 1) 0%, | ||
rgba(74, 194, 172, 1) 50%, | ||
rgba(83, 139, 198, 1) 100% | ||
); | ||
background-size: cover; | ||
} | ||
|
||
.buttons { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-evenly; | ||
} | ||
|
||
.buttonContainer { | ||
margin-top: 20vh; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
display: flex; | ||
align-items: center; | ||
text-align: center; | ||
} | ||
|
||
button { | ||
font-family: "Bai Jamjuree", sans-serif; | ||
color: color(light, tan); | ||
align-self: center; | ||
font-size: 1rem; | ||
border-radius: 5px; | ||
border: none; | ||
border-radius: 5px; | ||
padding: 0.5em 0.75em; | ||
margin: 8px; | ||
min-width: 10ch; | ||
text-align: center; | ||
line-height: 1.1; | ||
cursor: pointer; | ||
transition: all 0.3s ease-in-out; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="root2"></div> | ||
<div class="buttonContainer"> | ||
|
||
<div class="buttons"> | ||
<h1>Set Up Your Kubernetes Cluster with Docketeer!</h1> | ||
<button id="prom">Install Prometheus Operator</button> | ||
<button id="metrics">Set Up Grafana</button> | ||
<button id="port">Launch Port Forwarding</button> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const promInstall = document.querySelector('#prom'); | ||
const grafInstall = document.querySelector('#metrics'); | ||
const portForward = document.querySelector('#port'); | ||
|
||
promInstall.addEventListener('click', () => { | ||
fetch('/api/setup/promInstall'); | ||
}); | ||
|
||
grafInstall.addEventListener('click', () => { | ||
fetch('/api/setup/applyGraf'); | ||
}); | ||
|
||
portForward.addEventListener('click', () => { | ||
fetch('/api/setup/portForward'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "setupapp", | ||
"type": "module", | ||
"productName": "Docketeer Setup", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"description": "Set up your Kubernetes cluster with Docketeer.", | ||
"author": "Docketeer", | ||
"main": "index.tsx", | ||
"scripts": { | ||
"start": "node index2.tsx", | ||
"build": "vite build" | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.21.4", | ||
"@babel/preset-env": "^7.21.4", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/preset-typescript": "^7.21.4", | ||
"@types/react": "^18.0.37", | ||
"@types/react-dom": "^18.0.11", | ||
"babel-loader": "^9.1.2", | ||
"css-loader": "^6.7.3", | ||
"express": "^4.18.2", | ||
"postcss": "^8.4.23", | ||
"postcss-loader": "^7.2.4", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"sass": "^1.62.0", | ||
"ts-loader": "^9.4.2", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.0.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.