Skip to content

Update deploy.yml #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@ on:
# Environment variables available to all jobs and steps in this workflow
env:
IBM_CLOUD_REGION: eu-gb
IBM_CLOUD_GROUP: default
IBM_CLOUD_SPACE: dev-uk
IBM_CLOUD_ORG: ulidder@us.ibm.com
IBM_CLOUD_GROUP: Default
IBM_CLOUD_SPACE: dealershipC11
IBM_CLOUD_ORG: romana.leitgeb247@gmail.com
MANIFEST_NAME: manifest.yml
IBM_CLOUD_API: ${{secrets.IBM_CLOUD_API_KEY}}
CI: false
@@ -57,4 +57,4 @@ jobs:
- name: Deploy manifest file
run: ibmcloud cf push -f ./$MANIFEST_NAME
shell: bash
working-directory: server/backend
working-directory: server/backend
2 changes: 1 addition & 1 deletion functions/details/get-details.js
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ function getReviews(params) {
console.log(params.CLOUDANT_APIKEY);
let reviews = [];
const cloudant = Cloudant({ url: params.CLOUDANT_URL, plugins: { iamauth: { iamApiKey: params.CLOUDANT_APIKEY } } });
const db = cloudant.db.use('reviews')
const db = cloudant.db.use('reviews11')

return db.find({ selector: { dealership: 13 }}) ;
}
19,574 changes: 19,541 additions & 33 deletions server/frontend/package-lock.json

Large diffs are not rendered by default.

Binary file added server/frontend/public/car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added server/frontend/public/dealer.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 27 additions & 7 deletions server/frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -2,10 +2,20 @@ import './bootstrap.min.css';
import React from 'react';
import HomePage from './homepage.js';
import ContactUs from './contactus.js';
import Dealer from './dealer.js';
import Cars from './cars.js';

/*
Copy the Web Chat code from Watson Assitant and paste it here
*/
window.watsonAssistantChatOptions = {
integrationID: "2e1b4c90-b73b-4696-b458-28e4d93bda1c", // The ID of this integration.
region: "eu-gb", // The region your integration is hosted in.
serviceInstanceID: "71d62aa6-0a45-437b-b4b4-4d5988f135c1", // The ID of your service instance.
onLoad: function(instance) { instance.render(); }
};
setTimeout(function(){
const t=document.createElement('script');
t.src="https://web-chat.global.assistant.watson.appdomain.cloud/versions/" + (window.watsonAssistantChatOptions.clientVersion || 'latest') + "/WatsonAssistantChatEntry.js"
document.head.appendChild(t);
});

class App extends React.Component {

@@ -17,6 +27,14 @@ class App extends React.Component {
this.setState({pageshown:<HomePage/>});
}

setPageDealer = ()=> {
this.setState({pageshown:<Dealer/>});
}

setPageCars = ()=> {
this.setState({pageshown:<Cars/>});
}

setPageContactUs = ()=> {
this.setState({pageshown:<ContactUs/>});
}
@@ -30,10 +48,12 @@ class App extends React.Component {
<li class="nav-item active">
<a class="nav-link" href="#" onClick={this.setPageHome}>Home <span class="sr-only">(current)</span></a>
</li>
/*
Add more tabs and action items for the tabs to give the dealership website a real feel.
*/

<li class="nav-item">
<a class="nav-link" href="#" onClick={this.setPageCars}>Cars</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" onClick={this.setPageDealer}>Dealers</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" onClick={this.setPageContactUs}>Contact Us</a>
</li>
23 changes: 23 additions & 0 deletions server/frontend/src/cars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import './bootstrap.min.css';
import React from 'react';

class Cars extends React.Component {
render() {
return (
<div>
<div style={{display:"flex"}}>
<img src='/car.png' style={{width: "500px"}}/>
<div style={{margin:"100px"}}>
<span style={{margin:"60px"}}>
"Here you'll find all our cars on sale"
</span >
</div>

</div>

</div>
);
}
}

export default Cars;
2 changes: 1 addition & 1 deletion server/frontend/src/contactus.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ class ContactUs extends React.Component {
<img src='/contatus.jpeg' style={{width: "300px"}}/>
<div style={{margin:"100px"}}>
<span style={{margin:"60px"}}>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
"We're located by Union Square on the corner of 13th and Broadway"
</span >
</div>

23 changes: 23 additions & 0 deletions server/frontend/src/dealer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import './bootstrap.min.css';
import React from 'react';

class Dealer extends React.Component {
render() {
return (
<div>
<div style={{display:"flex"}}>
<img src='/dealer.jpeg' style={{width: "300px"}}/>
<div style={{margin:"100px"}}>
<span style={{margin:"60px"}}>
"Here you'll find all our dealerships soon"
</span >
</div>

</div>

</div>
);
}
}

export default Dealer;
9 changes: 6 additions & 3 deletions server/frontend/src/homepage.js
Original file line number Diff line number Diff line change
@@ -6,12 +6,15 @@ class HomePage extends React.Component {
return (
<div>
<div style={{display:"flex"}}>
<img src='/cardealership.jpeg' style={{width: "300px"}}/>
<figure class="figure">
<img src="/cardealership.jpeg" style={{width: "300px"}} class="figure-img img-fluid rounded" alt="Our dealership in New York"></img>
<figcaption class="figure-caption">Our Dealership in New York </figcaption>
</figure>
<div style={{margin:"100px"}}>
<span style={{margin:"60px"}}>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
We are proud to offer you <mark>the best car dealership</mark>in the USA!
</span >
</div>
</div>

</div>