forked from open-source-labs/Chronos
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from oslabs-beta/stephenfeature
modularized AwsModal, deleted unnecessary code in other modals
- Loading branch information
Showing
8 changed files
with
310 additions
and
209 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
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,34 @@ | ||
import React from 'react'; | ||
|
||
const AwsDescription = (props) => { | ||
return ( | ||
<> | ||
<div> | ||
<label htmlFor="aws-name"> | ||
Name<span>*</span> | ||
</label> | ||
<input | ||
id="aws-name" | ||
type="text" | ||
name="name" | ||
value={props.name} | ||
onChange={e => props.handleChange(e)} | ||
placeholder="Add a name for your new service" | ||
required | ||
/> | ||
</div> | ||
<div> | ||
<label htmlFor="db-desc">Description</label> | ||
<textarea | ||
id="db-desc" | ||
name="description" | ||
value={props.description} | ||
onChange={e => props.handleChange(e)} | ||
placeholder="Add a short description" | ||
/> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default AwsDescription; |
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,52 @@ | ||
import React from 'react'; | ||
|
||
const AwsKeyUrl = (props) => { | ||
return ( | ||
<> | ||
<div> | ||
<label htmlFor="aws-access-key">{(props.typeOfService === 'AWS/EKS') ? 'Bearer Token' : 'Access Key'} <span>*</span> | ||
</label> | ||
<input | ||
id="aws-access-key" | ||
type="password" | ||
name="accessKey" | ||
value={props.accessKey} | ||
onChange={e => props.handleChange(e)} | ||
placeholder={props.typeOfService === 'AWS/EKS' ? 'Grafana Bearer Token' : 'AWS Access Key'} | ||
required | ||
/> | ||
</div> | ||
{(props.typeOfService !== 'AWS/EKS') && ( | ||
<div> | ||
<label htmlFor="aws-secret-access-key"> | ||
Secret Access Key<span>*</span> | ||
</label> | ||
<input | ||
id="aws-secret-access-key" | ||
type="password" | ||
name="secretAccessKey" | ||
value={props.secretAccessKey} | ||
onChange={e => props.handleChange(e)} | ||
placeholder="AWS Secret Access Key" | ||
required | ||
/> | ||
</div> | ||
)} | ||
<div> | ||
<label htmlFor="aws-url"> | ||
{(props.typeOfService === 'AWS/EKS') ? 'Grafana URL' : 'Access Key'}<span>*</span> | ||
</label> | ||
<input | ||
id="aws-url" | ||
type="string" | ||
name="awsUrl" | ||
value={props.awsUrl} | ||
onChange={e => props.handleChange(e)} | ||
placeholder={props.typeOfService === 'AWS/EKS'? 'Grafana Provided URL': 'AWS Url'} | ||
/> | ||
</div> | ||
</> | ||
) | ||
}; | ||
|
||
export default AwsKeyUrl; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
|
||
const AwsRegion = (props) => { | ||
return ( | ||
<div> | ||
<label htmlFor="region"> | ||
Region<span>*</span> | ||
</label> | ||
<select | ||
id="aws-region" | ||
name="region" | ||
value={props.region} | ||
onChange={e => props.handleChange(e)} | ||
placeholder="AWS Region" | ||
required | ||
> | ||
<option value="us-east-1">US East (N. Virginia) / us-east-1</option> | ||
<option value="us-east-2">US East (Ohio) / us-east-2</option> | ||
<option value="us-west-1">US West (N.California) / us-west-1</option> | ||
<option value="us-west-2">US West (Oregon) / us-west-2</option> | ||
<option value="ap-south-1">Asia Pacific (Mumbai) / ap-south-1</option> | ||
<option value="ap-northeast-3">Asia Pacific (Osaka) / ap-northeast-3</option> | ||
<option value="ap-northeast-2">Asia Pacific (Seoul) / ap-northeast-2</option> | ||
<option value="ap-southeast-1">Asia Pacific (Singapore) / ap-southeast-1</option> | ||
<option value="ap-southeast-2">Asia Pacific (Sydney) / ap-southeast-2</option> | ||
<option value="ap-northeast-1">Asia Pacific (Tokyo) / ap-northeast-1</option> | ||
<option value="ca-central-1">Canada (Central) / ca-central-1</option> | ||
<option value="eu-central-1">Europe (Frankfurt) / eu-central-1</option> | ||
<option value="eu-west-1">Europe (Ireland) / eu-west-1</option> | ||
<option value="eu-west-2">Europe (London) / eu-west-2</option> | ||
<option value="eu-west-3">Europe (Paris) / eu-west-3</option> | ||
<option value="eu-north-1">Europe (Stockholm) / eu-north-1</option> | ||
<option value="sa-east-1">South America (Sao Paulo) / sa-east-1</option> | ||
</select> | ||
</div> | ||
) | ||
} | ||
|
||
export default AwsRegion; |
Oops, something went wrong.