Skip to content

Commit

Permalink
Correção da Sprint 5, Health Check e Links do Git Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
SwampTG committed Sep 14, 2021
2 parents 7046799 + 2046433 commit ae51381
Show file tree
Hide file tree
Showing 32 changed files with 173 additions and 50 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


<p align="center">
<img src="https://github.com/fga-eps-mds/2021-1-hospitalar/blob/main/assets/logo-2021.jpg"></img>
<img src="https://github.com/fga-eps-mds/2021-1-hospitalar/blob/main/docs/assets/logo-2021.jpg"></img>
</p>


Expand Down
4 changes: 2 additions & 2 deletions backend/backend/api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rest_framework import routers

from models.geracaoPdf.views import GeracaoPdfView
'''
Função que retorna um objeto que contém as urls do backend.
Para incluir uma nova url utilize router.register
Expand All @@ -11,5 +11,5 @@

def create_api():
router = routers.DefaultRouter()

router.register(r'geracao', GeracaoPdfView, 'geracaoPdf')
return router
5 changes: 3 additions & 2 deletions backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'rest_framework'
'rest_framework',
'models.geracaoPdf',
]

MIDDLEWARE = [
Expand Down Expand Up @@ -86,7 +87,7 @@
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': 'projeto-hospitalar'
'NAME': 'projeto-hospitalar',
}
}

Expand Down
Empty file.
12 changes: 12 additions & 0 deletions backend/models/geracaoPdf/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.contrib import admin

# Register your models here.
from django.contrib import admin
from .models import GeracaoPdf


class GeracaoPdfAdmin(admin.ModelAdmin):
list_display = ()


admin.site.register(GeracaoPdf, GeracaoPdfAdmin)
6 changes: 6 additions & 0 deletions backend/models/geracaoPdf/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class GeracaoPdfConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'models.geracaoPdf'
23 changes: 23 additions & 0 deletions backend/models/geracaoPdf/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.6 on 2021-09-13 23:11

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='GeracaoPdf',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('infosPdf', models.CharField(max_length=1000)),
('cabecalhoPdf', models.CharField(max_length=100)),
('textoEntradaPdf', models.TextField()),
],
),
]
25 changes: 25 additions & 0 deletions backend/models/geracaoPdf/migrations/0002_auto_20210914_0138.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 3.2.6 on 2021-09-14 04:38

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('geracaoPdf', '0001_initial'),
]

operations = [
migrations.RemoveField(
model_name='geracaopdf',
name='cabecalhoPdf',
),
migrations.RemoveField(
model_name='geracaopdf',
name='infosPdf',
),
migrations.RemoveField(
model_name='geracaopdf',
name='textoEntradaPdf',
),
]
Empty file.
7 changes: 7 additions & 0 deletions backend/models/geracaoPdf/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.db import models


class GeracaoPdf(models.Model):

def _str_(self):
return 'No fields'
8 changes: 8 additions & 0 deletions backend/models/geracaoPdf/serializers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from rest_framework import serializers
from .models import GeracaoPdf


class GeracaoPdfSerializer(serializers.ModelSerializer):
class Meta:
model = GeracaoPdf
fields = ()
3 changes: 3 additions & 0 deletions backend/models/geracaoPdf/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
32 changes: 32 additions & 0 deletions backend/models/geracaoPdf/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from reportlab.pdfgen import canvas
from rest_framework import viewsets
from django.http import HttpResponse
from .models import GeracaoPdf
from .serializers import GeracaoPdfSerializer
from rest_framework.decorators import action

# Create your views here.


class GeracaoPdfView(viewsets.ModelViewSet):

serializer_class = GeracaoPdfSerializer
queryset = GeracaoPdf.objects.all()

@action(methods=['get'], detail=False)
def generatePDF(self, request):
# Create the HttpResponse object with the appropriate PDF headers.
response = HttpResponse(content_type='application/pdf')
response['Content-Disposition'] = 'attachment; filename="somefilename.pdf"'

# Create the PDF object, using the response object as its "file."
p = canvas.Canvas(response)

# Draw things on the PDF. Here's where the PDF generation happens.
# See the ReportLab documentation for the full list of functionality.
p.drawString(100, 100, "Hello world.")

# Close the PDF object cleanly, and we're done.
p.showPage()
p.save()
return response
3 changes: 2 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ django-cors-headers==3.8.0
djongo==1.3.6
psycopg2-binary>=2.8
gunicorn==20.1.0
pymongo==3.12.0
pymongo==3.12.0
reportlab==3.6.1
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>

<p align="center">
<img src="https://github.com/fga-eps-mds/2021-1-hospitalar/blob/main/assets/logo-2021.jpg?raw=true"></img>
<img src="https://github.com/fga-eps-mds/2021-1-hospitalar/blob/main/docs/assets/logo-2021.jpg?raw=true"></img>
</p>

<br/>
Expand Down
24 changes: 12 additions & 12 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,43 +152,43 @@
<details>
<summary>Sprint 00 </summary>
<ul>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint0/abertura_sprint0">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint0/fechamento_sprint0">Fechamento</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint0/abertura_sprint0">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint0/fechamento_sprint0">Fechamento</a></li>
</ul>
</details>
<details>
<summary>Sprint 01 </summary>
<ul>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint1/abertura_sprint1">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint1/fechamento_sprint1">Fechamento</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint1/abertura_sprint1">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint1/fechamento_sprint1">Fechamento</a></li>
</ul>
</details>
<details>
<summary>Sprint 02 </summary>
<ul>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint2/abertura_sprint2">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint2/fechamento_sprint2">Fechamento</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint2/abertura_sprint2">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint2/fechamento_sprint2">Fechamento</a></li>
</ul>
</details>
<details>
<summary>Sprint 03 </summary>
<ul>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint3/abertura_sprint3">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint3/fechamento_sprint3">Fechamento</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint3/abertura_sprint3">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint3/fechamento_sprint3">Fechamento</a></li>
</ul>
</details>
<details>
<summary>Sprint 04 </summary>
<ul>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint4/abertura_sprint4">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint4/fechamento_sprint4">Fechamento</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint4/abertura_sprint4">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint4/fechamento_sprint4">Fechamento</a></li>
</ul>
</details>
<details>
<summary>Sprint 05 </summary>
<ul>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint5/abertura_sprint5">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time _C/sprint5/fechamento_sprint5">Fechamento</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint5/abertura_sprint5">Abertura</a></li>
<li> <a href="https://fga-eps-mds.github.io/2021-1-hospitalar/#/sprints/Time_C/sprint5/fechamento_sprint5">Fechamento</a></li>
</ul>
</details>
</details>
File renamed without changes
File renamed without changes
11 changes: 2 additions & 9 deletions docs/produto/Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<<<<<<< Updated upstream

FROM python:3
=======
FROM python:3.8
>>>>>>> Stashed changes
ADD . /code

RUN mkdir -p /code
Expand All @@ -11,17 +9,12 @@ WORKDIR /code

COPY requirements.txt ./
RUN pip install -r requirements.txt
<<<<<<< Updated upstream

ENV PYTHONUNBUFFERED=1
=======
>>>>>>> Stashed changes

CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

COPY . .

EXPOSE 8000
<<<<<<< Updated upstream
=======
EXPOSE 27017
>>>>>>> Stashed changes
11 changes: 5 additions & 6 deletions docs/produto/Docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'

services:
<<<<<<< Updated upstream

client:
build:
context: ./frontend
Expand All @@ -14,8 +14,7 @@ services:
- /app/node_modules
networks:
- frontend
=======
>>>>>>> Stashed changes

web:
build: .
volumes:
Expand All @@ -29,7 +28,7 @@ services:

mongo:
image: mongo
<<<<<<< Updated upstream

container_name: mongo
restart: always
environment:
Expand Down Expand Up @@ -59,7 +58,7 @@ services:



=======

restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
Expand All @@ -69,4 +68,4 @@ services:
ports:
- "27017:27017"

>>>>>>> Stashed changes

8 changes: 1 addition & 7 deletions docs/produto/Docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
Django==3.2.6
<<<<<<< Updated upstream
psycopg2-binary>=2.8
=======
>>>>>>> Stashed changes
gunicorn==20.1.0
pymongo==3.12.0
djongo==1.3.6
django-cors-headers==3.8.0
djangorestframework==3.12.4
<<<<<<< Updated upstream

=======
docker==5.0.0
>>>>>>> Stashed changes

2 changes: 1 addition & 1 deletion docs/produto/Identidade_Visual/IdentidadeVisual.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

No início do projeto a equipe veio tentando formular alguma ideia de logotipo que pudesse indicar um ambiente hospitalar dentro do sistema militar. Pesquisando mais afundo, conseguimos concluir que as patentes das posições hierárquicas eram uma boa forma de mostrar que o produto iria ser referente ao sistema militar, visto que muitas pessoas já as viram em algum momento, sendo assim de fácil reconhecimento. Logo após isso, precisávamos referenciar também o ambiente hospitalar, já que o produto iria atender aos profissionais que estão constantemente nesse meio também. Decidimos então formatar a patente para que no topo, ao invés de ter uma estrela, fosse colocada uma caixa de seleção com uma marcação de "Ok", para indicar uma das principais atividades exercidas, o checklist. Essas foram as decisões do time para que então chegasse no resultado apresentado abaixo.

![Logotipo](https://raw.githubusercontent.com/fga-eps-mds/2021-1-hospitalar/main/assets/logo-2021.jpg)
![Logotipo](https://raw.githubusercontent.com/fga-eps-mds/2021-1-hospitalar/main/docs/assets/logo-2021.jpg)


# Nome do Projeto
Expand Down
2 changes: 1 addition & 1 deletion docs/sprints/Time_A/sprint3/fechamento_sprint3_A.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

## Práticas ágeis

| ID | Nome de prática ágil | Sprint |
| ID | Nome de prática ágil | Sprint 03 |
| :-: | :----------------------------------------------------------------: | :-------: |
| 1 | Priorização do Backlog pelo PO | &#10004; |
| 2 | Desenvolvimento de processos e práticas facilitadas pelo SM | &#10004; |
Expand Down
2 changes: 1 addition & 1 deletion docs/sprints/Time_A/sprint4/fechamento_sprint4_A.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

## Práticas ágeis

| ID | Nome de prática ágil | Sprint |
| ID | Nome de prática ágil | Sprint 04 |
| :-: | :----------------------------------------------------------------: | :-------: |
| 1 | Priorização do Backlog pelo PO | &#10004; |
| 2 | Desenvolvimento de processos e práticas facilitadas pelo SM | &#10004; |
Expand Down
2 changes: 1 addition & 1 deletion docs/sprints/Time_A/sprint5/fechamento_sprint5_A.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

## Práticas ágeis

| ID | Nome de prática ágil | Sprint |
| ID | Nome de prática ágil | Sprint 05 |
| :-: | :----------------------------------------------------------------: | :-------: |
| 1 | Priorização do Backlog pelo PO | &#10004; |
| 2 | Desenvolvimento de processos e práticas facilitadas pelo SM | &#10004; |
Expand Down
2 changes: 1 addition & 1 deletion docs/sprints/Time_C/sprint0/abertura_sprint0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Abertura da Sprint (nº)
# Abertura da Sprint 0

## Histórico de revisão

Expand Down
2 changes: 1 addition & 1 deletion docs/sprints/Time_C/sprint0/fechamento_sprint0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Fechamento da Sprint (nº)
# Fechamento da Sprint 0

## Backlog da Sprint

Expand Down
Loading

0 comments on commit ae51381

Please sign in to comment.