Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
eef24a7c
Commit
eef24a7c
authored
Sep 30, 2019
by
Gladys Forte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issues
parent
d89788b2
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
137 deletions
+87
-137
app/applicationlayer/cms/form/header/serializers.py
app/applicationlayer/cms/form/header/serializers.py
+1
-1
app/applicationlayer/cms/form/header/views.py
app/applicationlayer/cms/form/header/views.py
+8
-0
app/applicationlayer/cms/urls_cms.py
app/applicationlayer/cms/urls_cms.py
+0
-3
app/applicationlayer/management/notification/views.py
app/applicationlayer/management/notification/views.py
+49
-48
app/applicationlayer/urls.py
app/applicationlayer/urls.py
+2
-0
app/helper/email_service/sender.py
app/helper/email_service/sender.py
+2
-2
env.template.ini
env.template.ini
+1
-1
requirements/RMSv2.postman_collection.json
requirements/RMSv2.postman_collection.json
+24
-82
No files found.
app/applicationlayer/cms/form/header/serializers.py
View file @
eef24a7c
...
...
@@ -45,7 +45,7 @@ class ChangeRequestFormHeaderSerializer(
else
:
approver
=
'No'
ret
[
'action'
]
=
approver
ret
[
'action
_required
'
]
=
approver
requested_to_user
=
{
"id"
:
instance
.
requested_to_user
.
id
,
...
...
app/applicationlayer/cms/form/header/views.py
View file @
eef24a7c
...
...
@@ -1026,6 +1026,14 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
enums
.
CREnum
.
SUBMIT
.
value
)
min_level
=
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
form_code
=
form_code
)
.
aggregate
(
Min
(
'level'
))
min_level
=
min_level
.
get
(
'level__min'
)
next_approver_email
(
form_code
,
min_level
)
serializer
=
self
.
get_serializer
(
instance
)
message
=
status_message_response
(
...
...
app/applicationlayer/cms/urls_cms.py
View file @
eef24a7c
...
...
@@ -3,7 +3,6 @@ from rest_framework import routers
from
django.conf.urls
import
url
from
rest_framework.urlpatterns
import
format_suffix_patterns
from
app.applicationlayer.management.notification.views
import
NotificationsViewset
from
app.applicationlayer.cms.form
import
views
as
crform_views
from
app.applicationlayer.cms.allowed_company
import
views
as
allowed
...
...
@@ -36,8 +35,6 @@ from app.applicationlayer.cms.form.download import views as dl
router
=
routers
.
DefaultRouter
()
router
.
register
(
r'notifications'
,
NotificationsViewset
)
router
.
register
(
r'template'
,
header
.
ChangeRequestTemplatesViewset
)
router
.
register
(
r'template-approvers'
,
approver
.
ChangeRequestTemplateApproversViewset
)
router
.
register
(
r'template-attachments'
,
attachment
.
ChangeRequestTemplateAttachmentsViewset
)
...
...
app/applicationlayer/management/notification/views.py
View file @
eef24a7c
...
...
@@ -29,7 +29,7 @@ class NotificationsViewset(meviewsets.ModelViewSet):
pagination_class
=
CustomPagination
def
list
(
self
,
request
,
*
args
,
**
kwargs
):
try
:
#
try:
req
=
self
.
request
account_no
=
req
.
query_params
.
get
(
'account_no'
)
app
=
req
.
query_params
.
get
(
'app'
)
...
...
@@ -62,6 +62,7 @@ class NotificationsViewset(meviewsets.ModelViewSet):
)
return
Response
(
message
)
serializer
=
self
.
get_serializer
(
queryset
,
many
=
True
)
page
=
self
.
paginate_queryset
(
queryset
)
if
page
is
not
None
:
...
...
@@ -76,12 +77,12 @@ class NotificationsViewset(meviewsets.ModelViewSet):
return
self
.
get_paginated_response
(
message
)
except
Exception
as
e
:
message
=
status_message_response
(
500
,
'failed'
,
'Request was not able to process'
+
str
(
e
),
[])
return
Response
(
message
,
status
=
status
.
HTTP_500_INTERNAL_SERVER_ERROR
)
#
except Exception as e:
#
message = status_message_response(
# 500, 'failed',
#
'Request was not able to process' + str(e), [])
#
return Response(message,
#
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
# comment
@
action
(
methods
=
[
"PATCH"
],
detail
=
True
)
...
...
app/applicationlayer/urls.py
View file @
eef24a7c
...
...
@@ -8,6 +8,7 @@ from app.applicationlayer.management.department.views import DepartmentViewSet
from
app.applicationlayer.management.module.views
import
ModuleViewSet
from
app.applicationlayer.management.account.views
import
UserViewSet
from
app.businesslayer.company.views
import
AdminCompanyViewSet
from
app.applicationlayer.management.notification.views
import
NotificationsViewset
router
=
routers
.
DefaultRouter
()
...
...
@@ -17,6 +18,7 @@ router.register(r'companies', CompanyViewSet)
router
.
register
(
r'departments'
,
DepartmentViewSet
)
router
.
register
(
r'modules'
,
ModuleViewSet
)
router
.
register
(
r'users'
,
UserViewSet
)
router
.
register
(
r'notifications'
,
NotificationsViewset
)
urlpatterns
=
(
path
(
''
,
include
(
router
.
urls
)),
...
...
app/helper/email_service/sender.py
View file @
eef24a7c
...
...
@@ -485,7 +485,7 @@ def admin_changepassword(args):
def
routing_table_actions
(
args
):
name
=
args
[
0
]
action_by
=
args
[
1
]
routing_level
=
args
[
2
]
routing_level
=
str
(
args
[
2
])
status
=
args
[
3
]
cr_number
=
args
[
4
]
cr_name
=
args
[
5
]
...
...
env.template.ini
View file @
eef24a7c
...
...
@@ -40,7 +40,7 @@ FRONT_END_URL = http://devweb.rmsv2.oneberrysystem.com
AUTH_ACCESSS_TOKEN_TIMEOUT
=
USER_DEFAULT_PASSWORD =
CATCH_EMAIL
=
gladys@tirsolutions.com
CR_LINK
=
http://devweb.rms
.oneberrysystem.com
/cms/change-request/form/view
CR_LINK
=
http://devweb.rms
v2.oneberrysystem.com/
/cms/change-request/form/view
REALTIMESERVER_IP
=
127.0.0.1:8000
[LOCAL]
...
...
requirements/RMSv2.postman_collection.json
View file @
eef24a7c
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment