Skip to content
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

Mailing list pages #11

Open
wants to merge 106 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
fd51257
Update - Event add frontend done
pptx704 Jun 12, 2022
090287c
blank project
FK12344321 Jun 14, 2022
473ebb0
Basic functionality
FK12344321 Jun 15, 2022
eef3467
Implemented Mailing list
FK12344321 Jun 16, 2022
de0c2f3
Patch - Changed pop-up color to tinted green and made all frontend de…
pptx704 Jun 18, 2022
3765740
Backend implementation
FK12344321 Jun 18, 2022
3f0d4f0
added button description and link to import mailing list
Snapman7 Jun 21, 2022
dafea19
Delete src/backend/TimetableAPI directory
FK12344321 Jun 21, 2022
2c97a3e
replaced all var on let
Snapman7 Jun 22, 2022
be88284
replaced all var on let and added events POST method
Snapman7 Jun 22, 2022
9afbc60
fixed details button
Snapman7 Jun 22, 2022
62d37c8
Finished the implementation of the project
FK12344321 Jun 22, 2022
e682f7e
Merge branch 'back_development' of https://github.com/InnoSWP/Crossli…
FK12344321 Jun 22, 2022
f0efe81
Bug fixes on script.js
pptx704 Jun 22, 2022
9ac9afb
Merge branch 'main' into EventFrontend
pptx704 Jun 22, 2022
ef9f272
added POST mailing list
Jun 23, 2022
f0058c8
updated POST mailing list
Jun 23, 2022
db76a30
Implemented view controller in backend
FK12344321 Jun 23, 2022
6aa34be
dockerize the project
FK12344321 Jun 23, 2022
9c91ab7
Dockerize the whole project
FK12344321 Jun 23, 2022
e8efbbc
merged with main
FK12344321 Jun 23, 2022
22d14b6
created separate pages for editing mailing lists and events
Jun 23, 2022
32a891a
set up the service
Jun 23, 2022
855615e
Finished dockerization
FK12344321 Jun 23, 2022
62834d3
Merge branch 'back_development' into EventFrontend
Jun 23, 2022
02d1242
added pages for mailing list methods
Jun 23, 2022
a7ced7d
added api methods
Jun 24, 2022
b3070b6
Merge branch 'back_development' of https://github.com/InnoSWP/Crossli…
Jun 24, 2022
4905b54
added methods for mailing lists
Jun 24, 2022
925d23b
commit
Jun 25, 2022
cfa59ee
fixed some bugs in docker-compose
FK12344321 Jun 25, 2022
5866fe9
merged back_debelopment
Jun 25, 2022
6dd71cc
updated mailing list methods
Jun 25, 2022
0aba80c
completed to write all the mailing lists' methods
Jun 25, 2022
fedb12b
edited all html and js files, because should be id-class-value.
Snapman7 Jun 25, 2022
3053067
edited all html and js files, because should be id-class-value.
Snapman7 Jun 25, 2022
b6d9b20
Deleted .idea
Snapman7 Jun 25, 2022
894349e
added .idea to gitignore
Snapman7 Jun 25, 2022
d5dc654
replaced all " by '
Snapman7 Jun 25, 2022
da59746
edited file for linter
Snapman7 Jun 25, 2022
f0962ef
edited files for linter
Snapman7 Jun 25, 2022
20e20e1
edited files for linter AND erased in in edit_mailing_list.js in 87 \
Snapman7 Jun 25, 2022
c0fa4d4
implemented method "fetching"
Snapman7 Jun 25, 2022
9331651
implemented method "fetching"
Snapman7 Jun 25, 2022
9afdc72
fixed some bugs
Snapman7 Jun 25, 2022
9d30fa2
undo commented function and set left text align
Jun 25, 2022
19dd181
add tests
FK12344321 Jun 25, 2022
09526e3
update linter
FK12344321 Jun 25, 2022
2060698
fixed tests
FK12344321 Jun 25, 2022
62ec261
Update linter.yml
FK12344321 Jun 25, 2022
5507c2f
Update linter.yml
FK12344321 Jun 25, 2022
52bbe4a
Merge branch 'back_development' of https://github.com/InnoSWP/Crossli…
FK12344321 Jun 25, 2022
ffeac97
Delete MailingListMySQLRepositoryTest.java
FK12344321 Jun 25, 2022
1b0bd18
Create mvn
FK12344321 Jun 25, 2022
8219810
Update and rename mvn to mvn.yml
FK12344321 Jun 25, 2022
4874089
Update TimetableLinkApiApplicationTests.java
FK12344321 Jun 25, 2022
b1f7c44
Update mvn.yml
FK12344321 Jun 25, 2022
891fbff
edited ids for code style
Snapman7 Jun 27, 2022
556b526
Added headers to edit_mailing_list.html and post_mailing_list.html
Snapman7 Jun 27, 2022
9ff2663
test
Jun 27, 2022
a8f97d1
added method to mailing list and methods for events. DEMO
Jun 28, 2022
676bba6
normal tests
FK12344321 Jun 28, 2022
719cc9c
pulled changes
FK12344321 Jun 28, 2022
c0ee153
customized "Create mailing list", "Edit mailing list" and "edit event…
Snapman7 Jun 28, 2022
354bca0
all date inputs edited on "date" + "time" type
Snapman7 Jun 28, 2022
6534ef9
removed center alignment and fixed headers
Jun 28, 2022
3e8b0cc
Added License.txt with MIT license and updated README.md
Snapman7 Jun 29, 2022
a047994
pain
Jun 29, 2022
64c8751
Merge remote-tracking branch 'origin/EventFrontend' into EventFrontend
Jun 29, 2022
af36a33
new tests
FK12344321 Jun 29, 2022
4e017ec
test
Jun 29, 2022
8c4495d
edited time slots and edit mailing list
Jun 29, 2022
7680b9f
Small bugfix. Nothing useful
pptx704 Jun 30, 2022
9c740d7
Patch: Shows created events on calendar. Edit functionality still to …
pptx704 Jun 30, 2022
4d83def
eventId is returned as Json
FK12344321 Jun 30, 2022
8506dd3
edited design & changed edit mail list logic
Jun 30, 2022
f03db72
set disable/unable btn
Jun 30, 2022
97f687c
Merge branch 'back_development' of D:\Codes\crosslink with conflicts.
Jun 30, 2022
842f1b1
completed some parts of the Readme, and also added a demo image.
Snapman7 Jul 1, 2022
80b828a
did demo index
Jul 1, 2022
3246e7a
Merge remote-tracking branch 'origin/EventFrontend' into EventFrontend
Jul 1, 2022
7a6d985
test
Jul 1, 2022
2da87d9
Add more tests
FK12344321 Jul 2, 2022
2f219fa
merged EventFrontend
FK12344321 Jul 2, 2022
aa85cc4
merged
Jul 2, 2022
2d5286c
Delete src/backend/TimetableLinkAPI/data/demo #jdbc:h2: directory
kornienko-dev Jul 2, 2022
cffe345
Merge branch 'backend_development' of https://github.com/InnoSWP/Cros…
Jul 2, 2022
031b42e
Fixed README.md
Snapman7 Jul 2, 2022
553ee90
started implementing authentication
FK12344321 Jul 2, 2022
545d767
Merge branch 'backend_development' of https://github.com/InnoSWP/Cros…
FK12344321 Jul 2, 2022
5b682b3
Fixed README.md
Snapman7 Jul 2, 2022
7f58c73
Merge remote-tracking branch 'origin/backend_development' into EventF…
Jul 2, 2022
746a106
Implemented Autherization
FK12344321 Jul 2, 2022
acd063a
Merge remote-tracking branch 'origin/backend_development' into EventF…
Jul 2, 2022
3579ae3
test
Jul 2, 2022
a6a0fbf
Merge remote-tracking branch 'origin/EventFrontend' into EventFrontend
Jul 3, 2022
23f4860
saw BATMAN
Jul 3, 2022
0034f5d
Docker fix
pptx704 Jul 4, 2022
06ce2e3
test
Jul 4, 2022
cf5885b
Event edit
pptx704 Jul 4, 2022
c23a9ba
Merge remote-tracking branch 'origin/EventFrontend' into EventFrontend
Jul 4, 2022
8e62bea
Edit event on calendar
pptx704 Jul 4, 2022
ef82dff
test
Jul 4, 2022
72f4bfc
Edit event on calendar
pptx704 Jul 4, 2022
837eb19
Event edit on calendar
pptx704 Jul 4, 2022
a79573a
Merge
pptx704 Jul 4, 2022
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
18 changes: 17 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name: Lint Code Base
#############################
on:
push:
branches-ignore: [master, main]
branches-ignore: [master, main, back_development]
# Remove the line above to run when pushing to master
pull_request:
branches: [master, main]
Expand All @@ -35,6 +35,22 @@ jobs:
# Load all steps #
##################
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Build with Maven
run: |
cd src/backend/TimetableLinkAPI
mvn --batch-mode --update-snapshots package
- name: Run the Maven verify phase
run: |
#cd src/backend/TimetableLinkAPI
mvn --batch-mode --update-snapshots verify


##########################
# Checkout the code base #
##########################
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/mvn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Java CI

on:
push:
branches-ignore: [master, main, back_development]
# Remove the line above to run when pushing to master
pull_request:
branches: [master, main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Build with Maven
run: |
cd src/backend/TimetableLinkAPI
mvn --batch-mode --update-snapshots package
- name: Run the Maven verify phase
run: |
cd src/backend/TimetableLinkAPI
mvn --batch-mode --update-snapshots verify
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

#IntelliJ IDEA
.idea
21 changes: 21 additions & 0 deletions License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2022] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
59 changes: 38 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,46 @@
# Brief Intro
[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)

Project repo to link Moodle, MS Exchange, DoE updates and University Events in one centralized system.
# Cross Link for University Innopolis schedules

---

This application is a combination of all `Innopolis University` timetables. With it, DoE will create events that will be sent to the calendars of students and teachers of the university. Moreover, this application combines all the events created on `Moodle and MS Exchange` and also sends them to the `Outlook calendars` of students and teachers.

![Create Mailing list](images/CreateList.png)

## Why this important?

In `University Innopolis` there a lot of links that have some events on them(e.g. `Moodle, Outlook, MS Exchange`). So, our application unite all these timetables and send them to `Outlook Calendar`, because every participant of University Innopolis has Outlook account.

## How to use?

our application is based on the site, so just open the site and log in.
[Event adder](https://degrassi-minister-88544.herokuapp.com/index.html)

![Edit events](images/EditEvent.png)

![Edit events Outlook](images/EditEvent2.png)

## Features

There's some features in our application :
1. `Adding events` to students' and teachers' calendars.
2. `Edit and Delete` already created `events`
3. `Import list of emails` from Outlook.
4. `Create list of emails` on our site.
5. `Edit and Delete` already created `mailing lists`.

## Tools

For frontend developing we used html, css and js. For backend developing of our site we used spring, docker, maven.

![Edit mailing list](images/EditList.png)

![Edit mailing list](images/EditList2.png)

## Important Links

- [Usecase Diagram](https://drive.google.com/file/d/1nr23I5055SIXLq0PMvGGDPZAzz01xiW4/view?usp=sharing)
- [User Story](https://docs.google.com/spreadsheets/d/12BQN_QRp9IU6oKfjrk3xJsV7YisZib4y3s285RwqUo4/edit?usp=sharing)
- [Product Backlog](https://docs.google.com/document/d/1eF4ok6R33ai33qpmHXXPxxG4ZWCH8k8phtmZDnNVtxg/edit?usp=sharing)
- [API Design](https://app.swaggerhub.com/apis/Timetable2/timetable/1.0.0)
- [Mock Server](https://www.postman.com/orange-astronaut-888988/workspace/timetable-api/collection/21222264-0d7b6da3-1e13-4bd9-af09-11720e694a00?ctx=documentation)

## Developer Guide

### Branching Rules
- Keep branch names relevant to the sprint task (i.e. LoginFeature, EventFrontend)
- Maintain separate branch for separate tasks

### Commits
- Commit message format - `[Commit Type] - [Brief]`
Commit types
- Patch
- Feature
- Minor Change
- Keep commit to their respective branch (i.e. `Patch - Fixed frontend taskbar responsiveness` should not be commited to `LoginFeature` branch)

## Pushing
- Pushing to master is forbidden, branches would be merged later
- To be accepted for a merge, code should either pass unittest (if applicable) or be checked for bugs by at least one other developer
Binary file added images/CreateList.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 images/EditEvent.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 images/EditEvent2.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 images/EditList.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 images/EditList2.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 modified src/backend/TimetableLinkAPI/.DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions src/backend/TimetableLinkAPI/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM maven as builder
WORKDIR /usr/src/app
COPY pom.xml .
RUN mvn -B -e -C -T 1C org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline
COPY . .
RUN mvn package

FROM openjdk:17
EXPOSE 8080
COPY --from=builder /usr/src/app/target/*.jar ./
ENTRYPOINT ["java", "-jar", "/spring-boot-docker.jar"]
1 change: 1 addition & 0 deletions src/backend/TimetableLinkAPI/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: java $JAVA_OPTS -Dserver.port=$PORT -jar target/*.jar
26 changes: 21 additions & 5 deletions src/backend/TimetableLinkAPI/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
version: '3'

services:
server:
container_name: timetable_server
build: .
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:mysql://db:3306/timetable"
}'
ports:
- "8080:8080"
depends_on:
- db
restart: on-failure


db:
container_name: timetable_db
image: mysql:8.0
platform: linux/x86_64
restart: always
command: --init-file /data/application/init.sql
volumes:
- ./init.sql:/data/application/init.sql
# command: --init-file /data/application/schema.sql
# volumes:
# - ./schema.sql:/data/application/schema.sql
environment:
- MYSQL_DATABASE=timetable
- MYSQL_ROOT_PASSWORD=pass
ports:
- '3306:3306'
- "3306:3306"



13 changes: 0 additions & 13 deletions src/backend/TimetableLinkAPI/index.html

This file was deleted.

50 changes: 44 additions & 6 deletions src/backend/TimetableLinkAPI/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,62 @@
<version>5.3.20</version>
</dependency>

<!-- https://mvnrepository.com/artifact/junit/junit -->
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.0-M1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>

</dependencies>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.23.1</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.6.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jdbc</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- <version>2.3.3.RELEASE</version>-->
<!-- </dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${project.parent.version}</version>
</plugin>
</plugins>
<finalName>spring-boot-docker</finalName>
</build>

</project>
Binary file modified src/backend/TimetableLinkAPI/src/main/.DS_Store
Binary file not shown.
39 changes: 18 additions & 21 deletions src/backend/TimetableLinkAPI/src/main/java/com/timetable/App.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.timetable;

//import com.timetable.jdbc.SpringJdbcConfig;
import com.timetable.authentication.AuthenticationConfig;
import com.timetable.authentication.AuthenticationRepository;
import com.timetable.authentication.RequestAuthenticationCheck;
import com.timetable.jdbc.SpringJdbcConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -11,31 +14,25 @@
import org.springframework.context.annotation.PropertySource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.web.servlet.config.annotation.*;

import javax.sql.DataSource;
import org.springframework.web.context.request.WebRequestInterceptor;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@SpringBootApplication
@Import({SpringJdbcConfig.class})
//@EnableWebMvc
public class App {
@Import({SpringJdbcConfig.class, AuthenticationConfig.class})
public class App extends WebMvcConfigurerAdapter {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}

// @Override
// public void addViewControllers(ViewControllerRegistry registry) {
// registry.addViewController("/").setViewName("forward:/index.html");
// }
//
// @Bean
// public WebMvcConfigurer corsConfigurer() {
// return new WebMvcConfigurerAdapter() {
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// registry.addMapping("/**")
// .allowedMethods("HEAD", "GET", "PUT", "POST", "DELETE", "PATCH");
// }
// };
// }
@Autowired
private RequestAuthenticationCheck authenticationInterceptor;


@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authenticationInterceptor);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.timetable.authentication;

import com.timetable.jdbc.SpringJdbcConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
@ComponentScan
public class AuthenticationConfig extends WebMvcConfigurerAdapter {

private final RequestAuthenticationCheck authenticationInterceptor;

@Autowired
public AuthenticationConfig(RequestAuthenticationCheck authenticationInterceptor) {
this.authenticationInterceptor = authenticationInterceptor;
}


@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authenticationInterceptor);
}
}
Loading