Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
support_lens
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
harshavardhan.c
support_lens
Commits
93b0c18b
Commit
93b0c18b
authored
Jan 05, 2021
by
harshavardhan.c
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new services for support lens dashboard
parent
1c975cab
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
367 additions
and
65 deletions
+367
-65
scripts/config/app_constants.py
scripts/config/app_constants.py
+128
-13
scripts/core/handler/resolver_setup_handler.py
scripts/core/handler/resolver_setup_handler.py
+2
-2
scripts/core/handler/supportcase_setup_handler.py
scripts/core/handler/supportcase_setup_handler.py
+195
-44
scripts/core/services/supportcase_setup_configuration.py
scripts/core/services/supportcase_setup_configuration.py
+42
-6
No files found.
scripts/config/app_constants.py
View file @
93b0c18b
...
...
@@ -16,9 +16,12 @@ class Endpoints:
save_support_case
=
base_url
+
"/support_case/create"
fetch_support_case
=
base_url
+
"/support_case/fetch"
delete_support_case
=
base_url
+
"/support_case/delete"
delete_case_details
=
base_url
+
"/support_case/delete"
resolve_case_details
=
base_url
+
"/support_case/resolve"
close_case_details
=
base_url
+
"/support_case/close"
edit_support_case
=
base_url
+
"/support_case/edit"
get_support_case_table_details
=
base_url
+
"/support_case/fetch_table"
get_dashboard_details
=
base_url
+
"/support_case/get_dashboard_details"
class
DBMapping
:
...
...
@@ -39,7 +42,12 @@ class DBMapping:
class
CaseStatus
:
OPEN
=
"open"
DELETE
=
"delete"
DELETED
=
"deleted"
CLOSED
=
"closed"
REPLIED
=
"replied"
RESOLVED
=
"resolved"
RE_ASSIGNED
=
"re_assigned"
ASSIGNED
=
"assigned"
class
StatusMessages
:
...
...
@@ -58,6 +66,8 @@ class StatusMessages:
SUPPORTCASE_SAVE
=
"Failed to save support case details"
SUPPORTCASE_FETCH
=
"Failed to fetch support case details"
SUPPORTCASE_DASHBOARD
=
"Failed to fetch dashboard details"
SUPPORTCASE
=
"Failed to update case details"
class
StaticJsons
:
...
...
@@ -95,8 +105,8 @@ class StaticJsons:
]
SUPPORTLENS_FETCHTABLE_HEADERCONTENT
=
[
{
"value"
:
"case_
number
"
,
"label"
:
"
c
ase Number"
,
"value"
:
"case_
id
"
,
"label"
:
"
C
ase Number"
,
"enable_column_search"
:
True
,
"header_type"
:
"text"
},
...
...
@@ -107,18 +117,19 @@ class StaticJsons:
"header_type"
:
"text"
},
{
"value"
:
"
customer_project_id
"
,
"value"
:
"
ProjectName
"
,
"label"
:
"Customer Project ID"
,
"enable_column_search"
:
True
,
"header_type"
:
"text"
},
{
"value"
:
"status"
,
"label"
:
"Status"
,
"enable_column_search"
:
True
,
"header_type"
:
"select"
,
"options"
:
[]
},
# {
# "value": "status",
# "label": "Status",
# "enable_column_search": True,
# "header_type": "select",
# "options": [],
# "hidden": True
# },
{
"value"
:
"created_by"
,
"label"
:
"Created By"
,
...
...
@@ -127,7 +138,7 @@ class StaticJsons:
"options"
:
[]
},
{
"value"
:
"last_updated"
,
"value"
:
"last_updated
_on
"
,
"label"
:
"Last Updated"
,
"enable_column_search"
:
True
,
"header_type"
:
"date_range"
...
...
@@ -159,6 +170,110 @@ class StaticJsons:
]
}
SUPPORTLENS_HEADER_CONTENT
=
{
"support_lens_table_header_content"
:
[
{
"key"
:
"open"
,
"label"
:
"Open"
,
"svgName"
:
'open.svg'
,
"count"
:
0
,
"className"
:
"w-20"
,
},
{
"key"
:
"replied"
,
"label"
:
"Replied"
,
"count"
:
0
,
"svgName"
:
'replied-yet-to-assign.svg'
,
"className"
:
"w-20"
,
},
{
"key"
:
"assigned"
,
"label"
:
"Assigned"
,
"count"
:
0
,
"svgName"
:
'assigned.svg'
,
"className"
:
"w-20"
,
},
{
"key"
:
"re_assigned"
,
"label"
:
"Re-Assigned"
,
"count"
:
0
,
"svgName"
:
're-assigned.svg'
,
"className"
:
"w-20"
,
},
{
"key"
:
"resolved"
,
"label"
:
"Resolved"
,
"count"
:
0
,
"svgName"
:
'resolved.svg'
,
"className"
:
"w-20"
,
},
{
"key"
:
"deleted"
,
"label"
:
"Deleted"
,
"count"
:
0
,
"svgName"
:
'deleted.svg'
,
"className"
:
"w-20 mr-1"
,
},
{
"key"
:
"closed"
,
"label"
:
"Closed"
,
"count"
:
0
,
"svgName"
:
'closed.svg'
,
"className"
:
"w-20 mr-1"
,
}
],
"support_lens_dashboard_header_content"
:
[
{
"key"
:
"open"
,
"label"
:
"OPEN CASES"
,
"count"
:
0
,
"valueColor"
:
"#484848"
,
"iconStyle"
:
{
"color"
:
'#F44336'
},
"svgName"
:
'open.svg'
},
{
"key"
:
"replied"
,
"label"
:
"REPLIED/ YET TO ASSIGN"
,
"count"
:
0
,
"valueColor"
:
"#484848"
,
"iconStyle"
:
{
'color'
:
'#FFC107'
},
"svgName"
:
'replied-yet-to-assign.svg'
},
{
"key"
:
"assigned"
,
"label"
:
"ASSIGNED CASES"
,
"count"
:
0
,
"valueColor"
:
"#484848"
,
"iconStyle"
:
{
'color'
:
'#03A9F4'
},
"svgName"
:
'assigned.svg'
},
{
"key"
:
"re_assigned"
,
"label"
:
"RE-ASSIGNED CASES"
,
"count"
:
0
,
"valueColor"
:
"#484848"
,
"iconStyle"
:
{
'color'
:
'#3F51B5'
},
"svgName"
:
're-assigned.svg'
},
{
"key"
:
"resolved"
,
"label"
:
"RESOLVED CASES"
,
"count"
:
0
,
"valueColor"
:
"#484848"
,
"iconStyle"
:
{
'color'
:
'#4CAF50'
},
"svgName"
:
'resolved.svg'
}
],
"support_lens_chart_header_content"
:
[
{
"count"
:
0
,
"name"
:
'OPEN CASES'
,
"itemStyle"
:
{
"color"
:
'#EF5350'
},
"key"
:
"open"
},
{
"count"
:
0
,
"name"
:
'REPLIED/ YET TO ASSIGN'
,
"itemStyle"
:
{
"color"
:
'#FFCA28'
},
"key"
:
"replied"
},
{
"count"
:
0
,
"name"
:
'ASSIGNED CASES'
,
"itemStyle"
:
{
"color"
:
'#29B6F6'
},
"key"
:
"assigned"
},
{
"count"
:
0
,
"name"
:
'RE-ASSIGNED CASES'
,
"itemStyle"
:
{
"color"
:
'#5C6BC0'
},
"key"
:
"re_assigned"
},
{
"count"
:
0
,
"name"
:
'RESOLVED CASES'
,
"itemStyle"
:
{
"color"
:
'#66BB6A'
},
"key"
:
"resolved"
},
]
}
class
MongoEncryptionConstants
:
...
...
scripts/core/handler/resolver_setup_handler.py
View file @
93b0c18b
...
...
@@ -118,7 +118,7 @@ class ResolverSetupHandler:
collection_name
=
DBMapping
.
resolver_configuration
,
set_json
=
record
,
query
=
query_json
)
final_json
=
dict
(
status
=
StatusMessages
.
SUCCESS
,
message
=
"
Category
saved Successfully"
)
final_json
=
dict
(
status
=
StatusMessages
.
SUCCESS
,
message
=
"
Resolver data
saved Successfully"
)
except
Exception
as
e
:
logger
.
debug
(
"Exception occurred while saving category data"
+
str
(
e
))
return
final_json
...
...
@@ -165,7 +165,7 @@ class ResolverSetupHandler:
self
.
mongo_obj
.
delete_one_record
(
db_name
=
DBMapping
.
support_lens_configuration
,
collection_name
=
DBMapping
.
resolver_configuration
,
query_json
=
query_json
)
final_json
=
dict
(
status
=
StatusMessages
.
SUCCESS
,
message
=
"Resolve
d
deleted Successfully"
)
final_json
=
dict
(
status
=
StatusMessages
.
SUCCESS
,
message
=
"Resolve
r data
deleted Successfully"
)
except
Exception
as
e
:
logger
.
debug
(
"Exception occurred while deleting Resolver data"
+
str
(
e
))
return
final_json
...
...
scripts/core/handler/supportcase_setup_handler.py
View file @
93b0c18b
This diff is collapsed.
Click to expand it.
scripts/core/services/supportcase_setup_configuration.py
View file @
93b0c18b
...
...
@@ -35,24 +35,47 @@ def fetch_support_case_details():
return
final_json
@
supportcase_setup_configuration
.
route
(
Endpoints
.
delete_
support_case
,
methods
=
[
'POST'
])
@
supportcase_setup_configuration
.
route
(
Endpoints
.
delete_
case_details
,
methods
=
[
'POST'
])
@
apply_encryption
def
delete_
support_
case_details
():
final_json
=
{
"status"
:
StatusMessages
.
FAILED
,
"message"
:
StatusMessages
.
SUPPORTCASE
_SAVE
}
def
delete_case_details
():
final_json
=
{
"status"
:
StatusMessages
.
FAILED
,
"message"
:
StatusMessages
.
SUPPORTCASE
}
try
:
input_data
=
request
.
data
# input_data = request.get_json()
final_json
=
handler_obj
.
delete_case_details
(
input_data
)
final_json
=
handler_obj
.
delete_
support_
case_details
(
input_data
)
except
Exception
as
e
:
logger
.
exception
(
"Exception ->
%
s"
%
str
(
e
))
return
final_json
@
supportcase_setup_configuration
.
route
(
Endpoints
.
resolve_case_details
,
methods
=
[
'POST'
])
@
apply_encryption
def
resolve_case_details
():
final_json
=
{
"status"
:
StatusMessages
.
FAILED
,
"message"
:
StatusMessages
.
SUPPORTCASE
}
try
:
input_data
=
request
.
data
# input_data = request.get_json()
final_json
=
handler_obj
.
resolve_support_case_details
(
input_data
)
except
Exception
as
e
:
logger
.
exception
(
"Exception ->
%
s"
%
str
(
e
))
return
final_json
@
supportcase_setup_configuration
.
route
(
Endpoints
.
close_case_details
,
methods
=
[
'POST'
])
@
apply_encryption
def
close_case_details
():
final_json
=
{
"status"
:
StatusMessages
.
FAILED
,
"message"
:
StatusMessages
.
SUPPORTCASE
}
try
:
input_data
=
request
.
data
# input_data = request.get_json()
final_json
=
handler_obj
.
close_case_details
(
input_data
)
except
Exception
as
e
:
logger
.
exception
(
"Exception ->
%
s"
%
str
(
e
))
return
final_json
@
supportcase_setup_configuration
.
route
(
Endpoints
.
get_support_case_table_details
,
methods
=
[
'POST'
])
@
apply_encryption
def
get_support_case_table_details
():
final_json
=
{
"status"
:
StatusMessages
.
FAILED
,
"message"
:
StatusMessages
.
SUPPORTCASE_
SAVE
}
final_json
=
{
"status"
:
StatusMessages
.
FAILED
,
"message"
:
StatusMessages
.
SUPPORTCASE_
FETCH
}
try
:
input_data
=
request
.
data
# input_data = request.get_json()
...
...
@@ -60,3 +83,16 @@ def get_support_case_table_details():
except
Exception
as
e
:
logger
.
exception
(
"Exception ->
%
s"
%
str
(
e
))
return
final_json
@
supportcase_setup_configuration
.
route
(
Endpoints
.
get_dashboard_details
,
methods
=
[
'POST'
])
@
apply_encryption
def
get_dashboard_details
():
final_json
=
{
"status"
:
StatusMessages
.
FAILED
,
"message"
:
StatusMessages
.
SUPPORTCASE_DASHBOARD
}
try
:
input_data
=
request
.
data
# input_data = request.get_json()
final_json
=
handler_obj
.
get_dashboard_details
(
input_data
)
except
Exception
as
e
:
logger
.
exception
(
"Exception ->
%
s"
%
str
(
e
))
return
final_json
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