Skip to content

Commit

Permalink
Merge pull request #39 from DushanSenadheera/dev
Browse files Browse the repository at this point in the history
add code check pipeline
  • Loading branch information
DushanSenadheera committed May 9, 2024
2 parents d73805d + c50be8c commit f0a6484
Show file tree
Hide file tree
Showing 30 changed files with 1,904 additions and 29 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
schedule:
- cron: '18 23 * * 6'

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript', 'python' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Project ROVER - Travel Recommendation Platform
# Project ROVER - SaaS Travel Recommendation Platform

[![ci](https://github.com/DushanSenadheera/project_rover/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/DushanSenadheera/project_rover/actions/workflows/ci.yml)

Expand All @@ -21,7 +21,7 @@ Install the server & client dependencies in relevent directories
```bash
npm install
```
Run the application
Run the application locally
```bash
./localhost.sh
```
Expand All @@ -31,4 +31,4 @@ Run the application
./dockerComposer.sh
```
### ROVER API Documentation
[ROVER API Documentation](https://documenter.getpostman.com/view/28662859/2sA3BoaBaB#intro)
[ROVER API Documentation](https://documenter.getpostman.com/view/28662859/2sA3BoaBaB#intro)
7 changes: 4 additions & 3 deletions client/src/components/Card/Cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import axios from "axios";
import { Carousel } from "@mantine/carousel";
import { IconStar } from "@tabler/icons-react";
import classes from "./Card.module.scss";
import img from "../../../../model/data/assets/pool-area.jpg";

export default function Cards(props) {
const [data, setData] = useState([]);
Expand Down Expand Up @@ -36,13 +37,13 @@ export default function Cards(props) {
}}
>
<Carousel.Slide>
<Image src={item.img1} height={220} />
<Image src={img} height={220} />
</Carousel.Slide>
<Carousel.Slide>
<Image src={item.img2} height={220} />
<Image src={img} height={220} />
</Carousel.Slide>
<Carousel.Slide>
<Image src={item.img3} height={220} />
<Image src={img} height={220} />
</Carousel.Slide>
</Carousel>
</Card.Section>
Expand Down
7 changes: 4 additions & 3 deletions client/src/components/Eat/Eat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import axios from "axios";
import { Carousel } from "@mantine/carousel";
import { IconStar } from "@tabler/icons-react";
import classes from "./Eat.module.scss";
import img from "../../../../model/data/assets/pool-area.jpg";

export default function Eat(props) {
const [data, setData] = useState([]);
Expand Down Expand Up @@ -35,13 +36,13 @@ export default function Eat(props) {
}}
>
<Carousel.Slide>
<Image src={item.img1} height={220} />
<Image src={img} height={220} />
</Carousel.Slide>
<Carousel.Slide>
<Image src={item.img2} height={220} />
<Image src={img} height={220} />
</Carousel.Slide>
<Carousel.Slide>
<Image src={item.img3} height={220} />
<Image src={img} height={220} />
</Carousel.Slide>
</Carousel>
</Card.Section>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function Navbar() {
<h1 className={classes.logo}>R O V E R</h1>
<Group gap={5} visibleFrom="xs">
{items}
<Button variant="filled" color="var(--primary-color)" size="sm" radius="lg">Documentation</Button>
<a target='_blank' href="https://documenter.getpostman.com/view/28662859/2sA3BoaBaB#intro"><Button variant="filled" color="var(--primary-color)" size="sm" radius="lg">Documentation</Button></a>
</Group>
<Burger opened={opened} onClick={toggle} hiddenFrom="xs" size="sm" />
</Container>
Expand Down
3 changes: 3 additions & 0 deletions client/src/components/Plan/Plan.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Text, Title, TextInput, Button } from '@mantine/core';
import { Link } from 'react-router-dom';
import classes from './Plan.module.scss';
import { Fade } from "react-awesome-reveal";

export function Plan() {
return (
<div className={classes.wrapper} id='plan'>
<Fade direction="left">
<div className={classes.body}>
<Title className={classes.title}>Plan your trip now in a minute!</Title>
<Text c={'white'} fz="sm">
Expand All @@ -20,6 +22,7 @@ export function Plan() {
<Link to='/destination'><Button bg={'#1e1e1e'} className={classes.control}>Plan Now</Button></Link>
</div>
</div>
</Fade>
</div>
);
}
10 changes: 8 additions & 2 deletions client/src/pages/Results/Results.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 2rem;
gap: 1.5rem;
margin: 1rem;

}

.plan-details{
//add gap
gap: 1rem;
}
}

.stay{
margin-top: 2rem;
}
3 changes: 3 additions & 0 deletions client/src/pages/Results/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The Southern Province is also celebrated for its traditional dance forms, such a
<div className="plan">
<br />
<h1>Travel Plan</h1>
<p>May your journey be filled with enchanting sights, delightful discoveries, and moments that take your breath away. Enjoy every step of the way!</p>
<Accordion defaultValue={"Day 1"}>
{data.map((item, key) => (
<Accordion.Item key={key} value={`Day ${item.Day}`}>
Expand Down Expand Up @@ -90,13 +91,15 @@ The Southern Province is also celebrated for its traditional dance forms, such a
<br />
<div className="stay">
<h1>Stay</h1>
<p>Your accommodations are a sanctuary where comfort and elegance intertwine, offering a haven of tranquility during your travels</p>
<div className="stay-content">
<Cards location={result.destination} />
</div>
</div>
<br />
<div className="stay">
<h1>Eat</h1>
<p>Indulge in the culinary delights of this enchanting destination, where each meal is a symphony of flavors, a dance of spices, and a celebration of local culture</p>
<div className="stay-content">
<Eat location={result.destination} />
</div>
Expand Down
22 changes: 11 additions & 11 deletions model/data/accomadations.csv
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Name,Location,Price,Rating,Review,img1,img2,img3
Jetwing Saman Villas,Bentota,414,5,1394,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=0,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=0,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=0
Anantara Peace Haven Tangalle Resort,Tangalle,234,5,4434,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=1,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=1,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=1
CoCoBay Unawatuna,Unawatuna,183,4.5,1213,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=2,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=2,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=2
Shangri-La Hambantota,Hambanthota,170,4.5,2325,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=3,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=3,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=3
Cinnamon Bentota Beach,Bentota,179,5,1191,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=4,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=4,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=4
Jetwing Lighthouse,Galle,210,4.5,2612,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=5,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=5,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=5
Taj Bentota Resort & Spa,Bentota,183,4.5,3970,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=6,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=6,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=6
Le Grand Galle,Galle,173,4.5,1041,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=7,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=7,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=7
DoubleTree by Hilton Weerawila Rajawarna Resort,Weerawila,96,4.5,353,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=8,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=8,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=8
The Spice House Mirissa,Mirissa,70,5,795,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=9,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=9,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=9
Radisson Blu Resort Galle,Galle,125,4.5,2305,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/05/14/reception.jpg?w=1200&h=-1&s=10,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/5f/f9/c8/evening-pool-view.jpg?w=1200&h=-1&s=10,https://dynamic-media-cdn.tripadvisor.com/media/photo-o/0b/60/06/30/premier-ocean-view-room.jpg?w=1200&h=-1&s=10
Jetwing Saman Villas,Bentota,414,5,1394,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Anantara Peace Haven Tangalle Resort,Tangalle,234,5,4434,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
CoCoBay Unawatuna,Unawatuna,183,4.5,1213,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Shangri-La Hambantota,Hambanthota,170,4.5,2325,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Cinnamon Bentota Beach,Bentota,179,5,1191,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Jetwing Lighthouse,Galle,210,4.5,2612,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Taj Bentota Resort & Spa,Bentota,183,4.5,3970,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Le Grand Galle,Galle,173,4.5,1041,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
DoubleTree by Hilton Weerawila Rajawarna Resort,Weerawila,96,4.5,353,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
The Spice House Mirissa,Mirissa,70,5,795,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Radisson Blu Resort Galle,Galle,125,4.5,2305,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ,https://ibb.co/0hGtgXJ
Binary file added model/data/assets/pool-area.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions server/coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1715190519407" clover="3.2.0">
<project timestamp="1715190519407" name="All files">
<metrics statements="62" coveredstatements="35" conditionals="0" coveredconditionals="0" methods="11" coveredmethods="2" elements="73" coveredelements="37" complexity="0" loc="62" ncloc="62" packages="2" files="4" classes="4"/>
<package name="server">
<metrics statements="20" coveredstatements="20" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
<file name="index.js" path="D:\NSBM\Year 3\Semester 1\Final Year Project\Project\server\index.js">
<metrics statements="20" coveredstatements="20" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
<line num="1" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
<line num="4" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="7" count="1" type="stmt"/>
<line num="8" count="1" type="stmt"/>
<line num="9" count="1" type="stmt"/>
<line num="11" count="1" type="stmt"/>
<line num="12" count="1" type="stmt"/>
<line num="13" count="1" type="stmt"/>
<line num="14" count="1" type="stmt"/>
<line num="16" count="1" type="stmt"/>
<line num="17" count="1" type="stmt"/>
<line num="18" count="1" type="stmt"/>
<line num="20" count="1" type="stmt"/>
<line num="21" count="1" type="stmt"/>
<line num="24" count="1" type="stmt"/>
<line num="25" count="1" type="stmt"/>
<line num="28" count="1" type="stmt"/>
</file>
</package>
<package name="server.routes">
<metrics statements="42" coveredstatements="15" conditionals="0" coveredconditionals="0" methods="9" coveredmethods="0"/>
<file name="foodRoute.js" path="D:\NSBM\Year 3\Semester 1\Final Year Project\Project\server\routes\foodRoute.js">
<metrics statements="13" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="0"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="7" count="0" type="stmt"/>
<line num="11" count="0" type="stmt"/>
<line num="13" count="0" type="stmt"/>
<line num="14" count="0" type="stmt"/>
<line num="15" count="0" type="stmt"/>
<line num="18" count="0" type="stmt"/>
<line num="19" count="0" type="stmt"/>
<line num="21" count="0" type="stmt"/>
<line num="26" count="1" type="stmt"/>
</file>
<file name="locationRoute.js" path="D:\NSBM\Year 3\Semester 1\Final Year Project\Project\server\routes\locationRoute.js">
<metrics statements="16" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="0"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="7" count="0" type="stmt"/>
<line num="8" count="0" type="stmt"/>
<line num="9" count="0" type="stmt"/>
<line num="10" count="0" type="stmt"/>
<line num="14" count="0" type="stmt"/>
<line num="16" count="0" type="stmt"/>
<line num="17" count="0" type="stmt"/>
<line num="18" count="0" type="stmt"/>
<line num="21" count="0" type="stmt"/>
<line num="22" count="0" type="stmt"/>
<line num="24" count="0" type="stmt"/>
<line num="28" count="1" type="stmt"/>
</file>
<file name="stayRoute.js" path="D:\NSBM\Year 3\Semester 1\Final Year Project\Project\server\routes\stayRoute.js">
<metrics statements="13" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="0"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="7" count="0" type="stmt"/>
<line num="11" count="0" type="stmt"/>
<line num="13" count="0" type="stmt"/>
<line num="14" count="0" type="stmt"/>
<line num="15" count="0" type="stmt"/>
<line num="18" count="0" type="stmt"/>
<line num="19" count="0" type="stmt"/>
<line num="21" count="0" type="stmt"/>
<line num="25" count="1" type="stmt"/>
</file>
</package>
</project>
</coverage>
Loading

0 comments on commit f0a6484

Please sign in to comment.