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

Articuno booth angular #16

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ad64835
Update Dockerfile
alvarodelaflor Oct 21, 2019
40b9598
Local settings for travis
josperdom1 Nov 14, 2019
399d4ad
Travis local settings configuration
josperdom1 Nov 14, 2019
74b8a49
Travis testing
josperdom1 Nov 14, 2019
c8280f4
Update travis.yml
josperdom1 Nov 14, 2019
6dc9f20
Commit format
MartinOrdonoCaro Nov 14, 2019
c0749e9
commit module explanation
MartinOrdonoCaro Nov 15, 2019
1193f74
commit module explanation
MartinOrdonoCaro Nov 15, 2019
34a70fa
chore: gitignore .DS_Store
macarro Dec 1, 2019
7b9814e
Merge pull request #9 from egc-articuno/articuno-booth-migmackle
macarro Dec 2, 2019
a98b0f2
fear(booth): Angular project
josperdom1 Dec 2, 2019
ae62ac4
fix(booth): commit template added
josperdom1 Dec 2, 2019
f558daa
Merge branch 'articuno-booth' of github.com:egc-articuno/decide into …
josperdom1 Dec 2, 2019
10e4b0d
feat(booth): Add Telegram Bot submodule
Dec 3, 2019
c1965cb
Merge pull request #11 from egc-articuno/articuno-booth
josperdom1 Dec 3, 2019
a2792eb
chore(decide): Full complete integration
josperdom1 Dec 3, 2019
6345a25
fix(booth): Node modules erased
josperdom1 Dec 3, 2019
d126c32
fix(mixnet): Test excluded to pass heroku
josperdom1 Dec 3, 2019
fd7bcc3
Merge branch 'develop' into articuno-booth-angular
josperdom1 Dec 3, 2019
50a37f3
feat(base): Minimal homepage
manueljesus Dec 4, 2019
5889a27
Merge branch 'feat-homepage' of github.com:egc-articuno/decide into a…
josperdom1 Dec 4, 2019
52a3e14
feat(booth): Voting list on Angular
josperdom1 Dec 4, 2019
54f82d6
refactor(booth): Angular routing
josperdom1 Dec 11, 2019
801f61a
Fix(Booth): Fixed json error in Admin login
josperdom1 Dec 18, 2019
eccff4c
feat(booth): Voting form module creation
josperdom1 Dec 26, 2019
b780fb8
feat(booth): Login to Decide and token retrieval
Dec 26, 2019
3dc7f78
Merge branch 'articuno-booth-angular' of github.com:egc-articuno/deci…
josperdom1 Dec 26, 2019
828d49f
fix(booth): Deleted useless services
josperdom1 Dec 26, 2019
e89e145
feat(booth): TOken and Id retrieving
josperdom1 Dec 26, 2019
097e344
feat(booth): Async login
josperdom1 Dec 30, 2019
47aee78
feat(booth): Voting form init
josperdom1 Jan 2, 2020
d0dde28
feat(booth): Voting form working
josperdom1 Jan 3, 2020
016a4e4
feat(booth): Global variables
josperdom1 Jan 3, 2020
6d5f92a
feat(booth): In angular UI, show modules conditionally
macarro Jan 4, 2020
3f6ae5a
fix(booth): conditional showing
josperdom1 Jan 4, 2020
896896c
Merge branch 'articuno-booth-angular' of github.com:egc-articuno/deci…
josperdom1 Jan 4, 2020
9114da1
test(Booth): Angular Model testing
josperdom1 Jan 9, 2020
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,9 @@ ENV/
.mypy_cache/

.vagrant

# macOS
.DS_Store

#node_modules for angular app
node_modules/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "decide-telegram-bot"]
path = decide-telegram-bot
url = https://github.com/javdc/decide-telegram-bot.git
15 changes: 15 additions & 0 deletions .gitresource/commit_template
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#<type>(<module>): <subject>
#
#<body>
#
#<footer> -> #Refenrenced_Issue
#
# Types:
#
# -feat (new feature)
# -fix (bug fix)
# -docs (changes to documentation)
# -style (formatting, missing semi colons, etc; no code change)
# -refactor (refactoring production code)
# -test (adding missing tests, refactoring tests; no production -code change)
# -chore (updating grunt tasks etc; no production code change)
30 changes: 17 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
dist: xenial

services:
- postgresql
- postgresql
addons:
postgresql: "9.4"
postgresql: '9.4'
before_script:
- psql -U postgres -c "create user decide password 'decide'"
- psql -U postgres -c "create database test_decide owner decide"
- psql -U postgres -c "ALTER USER decide CREATEDB"
- psql -U postgres -c "create user decide password 'decide'"
- psql -U postgres -c "create database test_decide owner decide"
- psql -U postgres -c "ALTER USER decide CREATEDB"
language: python
python:
- "3.6"
- '3.6'
install:
- pip install -r requirements.txt
- pip install codacy-coverage
- pip install -r requirements.txt
script:
- cd decide
- coverage run --branch --source=. ./manage.py test --keepdb --with-xunit
- coverage xml
- python-codacy-coverage -r coverage.xml
- cd decide
- cp travis_local_settings.py local_settings.py
- python ./manage.py test --keepdb
- rm local_settings.py
deploy:
provider: heroku
app: decide-articuno
strategy: git
api_key:
secure: i37CCiL2uqlVu0nzMO8REdQpimP8TcFNrGQPA5TuypVPZeQkWDVLmBkVEXSmenEUWU3GwpySAZEDckbVQqQqGwXk0m1XGOMAXQUaf9xI1a0GX5tKZaW6GSeeiHkgON48W29xTdy9ypA+CG3vlUug2nux/nKkPTcj9KJzTPPpXCh3VqNMd3rUsX7c7YG/ETQLUesMxYZUN7oin3WmJr9NxpBblLAkvfxvF8g+YhhHdolttp4Dvdbg/JaJMt5lCEtUefCcTwK4itzlhCtg3/lyFWgLcdDiT5nSSLa9B3ni5E6D1yxR9ptNaqxA9p75ixB+JVmU16UmsHOJVy4AR+L4EWrlluZVgjgnm6ese3S1HZD2XEMGKRHNIi1ocXgktU2z2TtvLDmkUU5ieSPgpGLvx8CY0qxueND/LagAH+12fNKTQ73jRbAwih3yrOgdCwJqlfYs972uGToJJwWbeHAr5GcuPHESuqMKWwgA8S96TxNuY1i/CaqNmoGyweUAiqgDZyxGdAqzc/h6nX5v/wVpHHO3kb4BsLbEFFDauox6ZRdEfkP12ewlhYPTr1bs5OfaC1uo6BAfK8PVkUYR5vA2+x1tmLS3zMFmDGzWDL/L4qzhRHMB/ZacgfQvDFbPaa4KX7x6IQSbYmBcclsHLgBEu4Pe5MsxAJT812k10AfS+nQ=
4 changes: 4 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
% prepara el repositorio para su despliegue.
release: sh -c 'cd decide && python manage.py migrate'
% especifica el comando para lanzar Decide
web: sh -c 'cd decide && gunicorn --graceful-timeout=900 --timeout 900 decide.wsgi --log-file -'
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,40 @@ votación, por lo que prima la simplicidad por encima de la eficiencia
cuando sea posible. Por lo tanto se asumen algunas carencias para permitir
que sea entendible y extensible.

Formato de los Commits
---------------------------------
<type>(<module>): <subject>

<body>

<footer>

Posibles valores de type:
- feat (new feature).
- fix (bug fix).
- docs (changes to documentation).
- style (formatting, missing semi colons, etc; no code change).
- refactor (refactoring production code).
- test (adding missing tests, refactoring tests; no production -code change).
- chore (updating grunt tasks etc; no production code change).

En module se incluíran todos los modulos a los que afecte directamente el commit separados por comas.
Posibles valores de module:
- auth -> Autenticación.
- census -> Censo.
- voting -> Votación.
- booth -> Cabina de votación.
- store -> Almacenamiento de votos (cifrados).
- mixnet -> Recuento / MixNet.
- postproc -> Post-procesado.
- visual -> Visualización de resultados.

En body se inluirá una descipción breve con información útil.

En footer se referirá a las issues creadas en los tableros de github (si procede).
Por ejemplo: Closes #234, ó Fix #321.

Todos los commits deben estar escritos enteramente en inglés.

Subsistemas, apps y proyecto base
---------------------------------
Expand Down
1 change: 1 addition & 0 deletions decide-telegram-bot
Submodule decide-telegram-bot added at d43a60
2 changes: 2 additions & 0 deletions decide/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions decide/.idea/decide.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions decide/.idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions decide/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions decide/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions decide/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 49 additions & 1 deletion decide/base/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,61 @@
<html>
<head>
<meta charset="utf-8" />
<!-- materialize.css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<title>{% block title %}Decide!{% endblock %}</title>
{% block extrahead %}{% endblock %}
</head>
<body>

<div class="navbar-fixed">

<!-- Navbar dropdown menu-->
<ul id="navbar-dropdown" class="dropdown-content">
<li><a href="/admin">Administrator dashboard</a></li>
</ul>

<nav>
<div class="nav-wrapper blue-grey darken-4">
<a href="#" class="brand-logo center">Decide!</a>
<ul id="nav-mobile" class="right active blue-grey darken-3">
<li><a class="dropdown-trigger center " data-target="navbar-dropdown" style="width: 15em !important">Menu<i class="material-icons right">arrow_drop_down</i></a></li>
</ul>
</div>
</nav>

<script>
$(document).ready(function(){
$('.modal').modal();
$(".dropdown-trigger").dropdown({
coverTrigger: false
});
});
</script>

</div>


{% block content %}
{% endblock %}

{% block extrabody %}{% endblock %}
</body>


<div class="footer">
<footer class="page-footer blue-grey darken-4" style="position:fixed;bottom:0;left:0;width:100%;">
<div class="right-align footer-copyright blue-grey darken-4">
<div class="container">
<span><a class="grey-text text-lighten-4" target="_blank" href="https://github.com/egc-articuno/decide/">© 2019-2020 Decide-Articuno</a> - AGPLv3.0</span>
</div>
</div>
</footer>
</div>

<!-- Materialize JavaScript. Keep at the end of body for optimized loading-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions decide/base/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends 'base.html' %}
8 changes: 7 additions & 1 deletion decide/base/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
from django.shortcuts import render

# Create your views here.

def base(request):
return render(request, 'base.html')


def index(request):
return render(request, 'index.html')
13 changes: 13 additions & 0 deletions decide/booth/angular/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
46 changes: 46 additions & 0 deletions decide/booth/angular/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
27 changes: 27 additions & 0 deletions decide/booth/angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Angular

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.18.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
Loading