Skip to content

Commit

Permalink
Merge pull request #15 from Umius-Brian/MVP-Features
Browse files Browse the repository at this point in the history
MVP Features
  • Loading branch information
briannasookhoo authored May 14, 2020
2 parents 768d174 + 6ef8b9b commit b40dce7
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 14 deletions.
3 changes: 1 addition & 2 deletions app/components/AddService.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ const AddService = () => {

return (
<div className="mainContainer">
<img src="app/assets/logo2.png" alt="logo" id="addServiceLogo" />
<h2 className="signUpHeader">
Enter Your Database Information
</h2>
<form>
<form className="inputForm">
Database Type:
<select id="dbType" onChange={() => setDbType(document.getElementById('dbType').value)}>
<option value="SQL">SQL</option>
Expand Down
6 changes: 3 additions & 3 deletions app/components/DeleteService.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ const DeleteService = (props) => {

/* Iterates over the serviceList to create a button for each service. Each button is pushed into the databaseButtons array as the button is created. Each button has an onclick function that invokes the window confirm function with a warning message (ex:'Are you sure you want to delete this service?') and stores the result of invoking confirm into a constant moveForward. If the moveForward is true, then onDelete function is invoked with the index of where the service is stored within the serviceList*/
for(let i = 0; i<serviceList.length; i++){
databaseButtons.push(<button className="microserviceBtn deleteMicroservice" key ={"delete"+i} onClick={()=>{
databaseButtons.push(<button className="deleteMicroservice" key ={"delete"+i} onClick={()=>{
const moveForward = confirm(`Are you sure you want to delete ${serviceList[i]}? \n If "YES" press the "OK" button, else press the "Cancel" button`);
if (moveForward){onDelete(i)}

}}>{serviceList[i]}</button>)
}
// returns the title of the page with all of the services that can be deleted as buttons
return (
<div className="mainContainer">
<h1 className='overviewTitle'>Press on the Database You Want to Delete</h1>
<div className="deleteMainContainer">
<h1 className='overviewTitle'>Select Database To Delete</h1>
<div className="servicesList">{databaseButtons}</div>
</div>
);
Expand Down
40 changes: 33 additions & 7 deletions app/stylesheets/AddService.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans&family=Nunito:wght@200&family=Quicksand:wght@300&display=swap');

#addServiceLogo {
margin-bottom: 0px;
}
Expand All @@ -10,16 +12,39 @@ form {
font-size: 2vh;
}

.mainContainer {
font-family: 'Nunito', sans-serif;
display: grid;
justify-content: center;
align-items: center;
align-self: center;
}

#addServiceLogo {
display: grid;
justify-items: center;
justify-content: center;
}

.inputForm {
color: black;
}

.dbType {
color: black;
}

.userInput {
width: 70%;
border: 2px solid rgb(255, 206, 9);
border: 2px solid rgb(0, 0, 0);
border-radius: 45px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
text-align: center;
height: 50%;
font-size: 2vh;
padding-left: 0.25%;
margin: 15px auto 30px auto;
font-family: 'Nunito', sans-serif;
}

::placeholder {
Expand All @@ -34,17 +59,18 @@ form {
height: 40px;
color: white;
font-size: 2vh;
border: 1px solid rgb(255, 206, 9);
background-color: #333;
border: 1px solid rgb(0, 0, 0);
background-color: black;
transition: 0.25s;
border-radius: 10px
}

.submitBtn:hover {
font-weight: 700;
font-size: 2vh;
cursor: pointer;
border-radius: 10px;
color: #333;
background-color: rgb(255, 206, 9);
color: white;
background-color: #494FEE;
}

.signUpHeader {
Expand All @@ -61,7 +87,7 @@ select {
font-size: 1.75vh;
font-weight: 400;
/* background-color: rgb(196, 196, 196); */
border: 2px solid rgb(255, 206, 9);
border: 2px solid black;
margin-top: 1%;
margin-bottom: 2.5%;
}
45 changes: 43 additions & 2 deletions app/stylesheets/DeleteServices.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
.deleteMicroservice{
.deleteMicroservice {
padding: 10px;
margin: 10px;

}

.overviewTitle {
font-weight: 300;
font-size: 5.5vh;
}

.deleteMainContainer {
display: grid;
justify-content: center;
align-items: center;
align-self: center;
font-family: 'Nunito', sans-serif;
width: 100%;
}

.servicesList {
display: flex;
justify-content: center;
align-self: flex-start;
width: 100%;
}

.deleteMicroservice {
margin-top: 6%;
margin-bottom: 10%;
width: 50%;
height: 40px;
color: white;
font-size: 2vh;
border: 1px solid rgb(0, 0, 0);
background-color: black;
transition: 0.25s;
border-radius: 10px
}

.deleteMicroservice:hover {
font-size: 2vh;
cursor: pointer;
border-radius: 10px;
color: white;
background-color: #494FEE;
}

0 comments on commit b40dce7

Please sign in to comment.