Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion jsonDash/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python
FROM python3.13.1

WORKDIR /usr/src/app
COPY requirements.txt ./
Expand Down
15 changes: 12 additions & 3 deletions jsonDash/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
services:
keycloak:
image: quay.io/keycloak/keycloak
container_name: keycloak
command: start --hostname=http://localhost:8080 --http-enabled=true
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
ports:
- 8080:8080
grafana:
image: grafana/grafana
container_name: grafana
Expand All @@ -22,9 +31,9 @@ services:
env_file:
- .env
environment:
- POSTGRES_DB=lighttraffic_db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=DB_NAME
- POSTGRES_USER=DB_USER
- POSTGRES_PASSWORD=DB_PASSWORD
container_name: pgdb
volumes:
- pgdbdata:/var/lib/postgresql/data/
Expand Down
1 change: 0 additions & 1 deletion jsonDash/webHook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ class jsonNode(models.Model):

def __str__(self):
return f"{self.id} {self.column_key} {self.value} {self.parent_id}"

3 changes: 2 additions & 1 deletion jsonDash/webHook/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def retrieve(self, request, *args, **kwargs):
except IndexError:
logging.exception("Index out of range")
return Response(status=status.HTTP_404_NOT_FOUND)

def create(self, request, *args, **kwargs):
logging.info(f"{request},{request.data}")
data = request.data
Expand All @@ -52,6 +52,7 @@ def create(self, request, *args, **kwargs):
return Response(request, status=status.HTTP_201_CREATED)

def destroy(self, request, *args, **kwargs):

logging.info(f'{request},delete - id = {kwargs["pk"]}')
try:
data = jsonNode.objects.filter(id=kwargs['pk'])[0]
Expand Down