Skip to content

Commit

Permalink
Change router app names to enum
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiaolulu committed Apr 28, 2024
1 parent bb4672a commit ba6f549
Show file tree
Hide file tree
Showing 16 changed files with 126 additions and 12 deletions.
Empty file removed backend/api/emus/GconfigEnum.py
Empty file.
14 changes: 14 additions & 0 deletions backend/api/emus/RouterConfigEnum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class RouterConfigEnum:

CASE = "case"
DATABASE = "database"
ENV = "env"
FUNCTION = "function"
HTTP = "http"
NOTICE = "notice"
PLAN = "plan"
PROJECT = "project"
REPORT = "report"
STATISTICS = "statistics"
TREE = "tree"
USER = "user"
3 changes: 2 additions & 1 deletion backend/api/routers/case.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.https import (
SaveOrUpdateCaseView,
DelCaseView,
Expand All @@ -20,5 +21,5 @@
]


app_name = "case"
app_name = RouterConfigEnum.CASE
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/database.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.setting import (
DataSourceListViewSet,
DataSourceDestroyViewSet,
Expand All @@ -20,5 +21,5 @@
]


app_name = "database"
app_name = RouterConfigEnum.DATABASE
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/env.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.setting import (
TestEnvironmentListViewSet,
TestEnvironmentDestroyViewSet,
Expand All @@ -18,5 +19,5 @@
]


app_name = "env"
app_name = RouterConfigEnum.ENV
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/function.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.setting import (
FunctionsListViewSet,
DebugFunctionApiView,
Expand All @@ -18,5 +19,5 @@
]


app_name = "function"
app_name = RouterConfigEnum.FUNCTION
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/http.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.https import (
ApiFastView,
DelApiView,
Expand All @@ -26,5 +27,5 @@
]


app_name = "http"
app_name = RouterConfigEnum.HTTP
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/notice.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.setting import (
NoticeListViewSet,
NoticeDestroyViewSet,
Expand All @@ -18,5 +19,5 @@
]


app_name = "notice"
app_name = RouterConfigEnum.NOTICE
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/plan.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.plan import (
SaveOrUpdatePlanView,
UpdatePlanStateView,
Expand All @@ -22,5 +23,5 @@
]


app_name = "plan"
app_name = RouterConfigEnum.PLAN
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/project.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.project import (
ProjectListViewSet,
ProjectDestroyViewSet,
Expand All @@ -24,5 +25,5 @@
]


app_name = "project"
app_name = RouterConfigEnum.PROJECT
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/report.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.report import (
ReportDetailView,
ReportListViewSet
Expand All @@ -14,5 +15,5 @@
]


app_name = "report"
app_name = RouterConfigEnum.REPORT
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/statistics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.dashboard import StatisticsView


Expand All @@ -10,5 +11,5 @@
]


app_name = "statistics"
app_name = RouterConfigEnum.STATISTICS
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/tree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.https import (
TreeView
)
Expand All @@ -12,5 +13,5 @@
]


app_name = "tree"
app_name = RouterConfigEnum.TREE
urlpatterns = app_urls + router.urls
3 changes: 2 additions & 1 deletion backend/api/routers/user.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.urls import path
from rest_framework.routers import DefaultRouter
from api.emus.RouterConfigEnum import RouterConfigEnum
from api.service.user import (
CustomJsonWebToken,
UserListViewSet
Expand All @@ -14,5 +15,5 @@
]


app_name = "user"
app_name = RouterConfigEnum.USER
urlpatterns = app_urls + router.urls
80 changes: 80 additions & 0 deletions backend/logs/EasyPost.log
Original file line number Diff line number Diff line change
Expand Up @@ -8652,3 +8652,83 @@ Quit the server with CTRL-BREAK.
\/_____/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_____/ \/_____/ \/_/

2024-04-28 13:57:48 [django-main-thread]-[runserver.inner_run:124]-[INFO]:Daphne running, listening on %s:%s
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:02:51 [django-main-thread]-[runserver.log_action:171]-[INFO]:HTTP %(method)s %(path)s %(status)s [%(time_taken).2f, %(client)s]
2024-04-28 14:06:27 [django-main-thread]-[runserver.inner_run:91]-[INFO]:Performing system checks...


2024-04-28 14:06:27 [MainThread]-[base.start:181]-[INFO]:Scheduler started
2024-04-28 14:06:27 [APScheduler]-[base._process_jobs:954]-[DEBUG]:Looking for jobs to run
2024-04-28 14:06:27 [APScheduler]-[base._process_jobs:1030]-[DEBUG]:No jobs; waiting until a job is added
2024-04-28 14:06:27 [django-main-thread]-[runserver.inner_run:97]-[INFO]:April 28, 2024 - 14:06:27
2024-04-28 14:06:27 [django-main-thread]-[runserver.inner_run:98]-[INFO]:Django version 5.0.4, using settings 'config.settings'
Starting ASGI/Daphne version 4.1.2 development server at http://localhost:8000/
Quit the server with CTRL-BREAK.

______ ______ ______ __ __ ______ ______ ______ ______
/\ ___\ /\ __ \ /\ ___\ /\ \_\ \ /\ == \ /\ __ \ /\ ___\ /\__ _\
\ \ __\ \ \ __ \ \ \___ \ \ \____ \ \ \ _-/ \ \ \/\ \ \ \___ \ \/_/\ \/
\ \_____\ \ \_\ \_\ \/\_____\ \/\_____\ \ \_\ \ \_____\ \/\_____\ \ \_\
\/_____/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_____/ \/_____/ \/_/

2024-04-28 14:06:27 [django-main-thread]-[runserver.inner_run:124]-[INFO]:Daphne running, listening on %s:%s
2024-04-28 14:06:33 [django-main-thread]-[runserver.inner_run:91]-[INFO]:Performing system checks...


2024-04-28 14:06:34 [MainThread]-[base.start:181]-[INFO]:Scheduler started
2024-04-28 14:06:34 [APScheduler]-[base._process_jobs:954]-[DEBUG]:Looking for jobs to run
2024-04-28 14:06:34 [APScheduler]-[base._process_jobs:1030]-[DEBUG]:No jobs; waiting until a job is added
2024-04-28 14:06:34 [django-main-thread]-[runserver.inner_run:97]-[INFO]:April 28, 2024 - 14:06:34
2024-04-28 14:06:34 [django-main-thread]-[runserver.inner_run:98]-[INFO]:Django version 5.0.4, using settings 'config.settings'
Starting ASGI/Daphne version 4.1.2 development server at http://localhost:8000/
Quit the server with CTRL-BREAK.

______ ______ ______ __ __ ______ ______ ______ ______
/\ ___\ /\ __ \ /\ ___\ /\ \_\ \ /\ == \ /\ __ \ /\ ___\ /\__ _\
\ \ __\ \ \ __ \ \ \___ \ \ \____ \ \ \ _-/ \ \ \/\ \ \ \___ \ \/_/\ \/
\ \_____\ \ \_\ \_\ \/\_____\ \/\_____\ \ \_\ \ \_____\ \/\_____\ \ \_\
\/_____/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_____/ \/_____/ \/_/

2024-04-28 14:06:34 [django-main-thread]-[runserver.inner_run:124]-[INFO]:Daphne running, listening on %s:%s
2024-04-28 14:13:25 [django-main-thread]-[runserver.inner_run:91]-[INFO]:Performing system checks...


2024-04-28 14:13:25 [MainThread]-[base.start:181]-[INFO]:Scheduler started
2024-04-28 14:13:25 [APScheduler]-[base._process_jobs:954]-[DEBUG]:Looking for jobs to run
2024-04-28 14:13:25 [APScheduler]-[base._process_jobs:1030]-[DEBUG]:No jobs; waiting until a job is added
2024-04-28 14:13:26 [django-main-thread]-[runserver.inner_run:97]-[INFO]:April 28, 2024 - 14:13:26
2024-04-28 14:13:26 [django-main-thread]-[runserver.inner_run:98]-[INFO]:Django version 5.0.4, using settings 'config.settings'
Starting ASGI/Daphne version 4.1.2 development server at http://localhost:8000/
Quit the server with CTRL-BREAK.

______ ______ ______ __ __ ______ ______ ______ ______
/\ ___\ /\ __ \ /\ ___\ /\ \_\ \ /\ == \ /\ __ \ /\ ___\ /\__ _\
\ \ __\ \ \ __ \ \ \___ \ \ \____ \ \ \ _-/ \ \ \/\ \ \ \___ \ \/_/\ \/
\ \_____\ \ \_\ \_\ \/\_____\ \/\_____\ \ \_\ \ \_____\ \/\_____\ \ \_\
\/_____/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_____/ \/_____/ \/_/

2024-04-28 14:13:26 [django-main-thread]-[runserver.inner_run:124]-[INFO]:Daphne running, listening on %s:%s
2024-04-28 14:17:52 [django-main-thread]-[runserver.inner_run:91]-[INFO]:Performing system checks...


2024-04-28 14:17:53 [MainThread]-[base.start:181]-[INFO]:Scheduler started
2024-04-28 14:17:53 [APScheduler]-[base._process_jobs:954]-[DEBUG]:Looking for jobs to run
2024-04-28 14:17:53 [APScheduler]-[base._process_jobs:1030]-[DEBUG]:No jobs; waiting until a job is added
2024-04-28 14:17:53 [django-main-thread]-[runserver.inner_run:97]-[INFO]:April 28, 2024 - 14:17:53
2024-04-28 14:17:53 [django-main-thread]-[runserver.inner_run:98]-[INFO]:Django version 5.0.4, using settings 'config.settings'
Starting ASGI/Daphne version 4.1.2 development server at http://localhost:8000/
Quit the server with CTRL-BREAK.

______ ______ ______ __ __ ______ ______ ______ ______
/\ ___\ /\ __ \ /\ ___\ /\ \_\ \ /\ == \ /\ __ \ /\ ___\ /\__ _\
\ \ __\ \ \ __ \ \ \___ \ \ \____ \ \ \ _-/ \ \ \/\ \ \ \___ \ \/_/\ \/
\ \_____\ \ \_\ \_\ \/\_____\ \/\_____\ \ \_\ \ \_____\ \/\_____\ \ \_\
\/_____/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_____/ \/_____/ \/_/

2024-04-28 14:17:53 [django-main-thread]-[runserver.inner_run:124]-[INFO]:Daphne running, listening on %s:%s
8 changes: 8 additions & 0 deletions backend/logs/EasyPost_collect.log
Original file line number Diff line number Diff line change
Expand Up @@ -7201,3 +7201,11 @@ WARNING [2024-04-28 13:53:10,707] [69a533215b9740e4be748f42ed738e30] django.req
WARNING [2024-04-28 13:53:14,412] [ddd00d3c1d0c4ae3b58bfd989d649519] django.request: Not Found: /media/avatar/default.png
INFO [2024-04-28 13:57:46,209] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\config\asgi.py changed, reloading.
INFO [2024-04-28 13:57:47,364] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-04-28 14:06:26,058] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\emus\__init__.py changed, reloading.
INFO [2024-04-28 14:06:27,005] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-04-28 14:06:32,583] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\emus\__init__.py changed, reloading.
INFO [2024-04-28 14:06:33,564] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-04-28 14:13:24,366] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\routers\database.py changed, reloading.
INFO [2024-04-28 14:13:25,374] [none] django.utils.autoreload: Watching for file changes with StatReloader
INFO [2024-04-28 14:17:51,596] [none] django.utils.autoreload: C:\Users\86135\Desktop\EasyPost\backend\api\routers\report.py changed, reloading.
INFO [2024-04-28 14:17:52,599] [none] django.utils.autoreload: Watching for file changes with StatReloader

0 comments on commit ba6f549

Please sign in to comment.