Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
21_22-J 38
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
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 38
21_22-J 38
Commits
ea51e324
Commit
ea51e324
authored
Feb 21, 2022
by
W.D.R.P. Sandeepa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new route
parent
dd1d750c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
6 deletions
+30
-6
API/app.py
API/app.py
+8
-4
API/model/colorModel.py
API/model/colorModel.py
+22
-2
frontend/src/assets/type/navo1.png
frontend/src/assets/type/navo1.png
+0
-0
frontend/src/assets/type/navo2.png
frontend/src/assets/type/navo2.png
+0
-0
frontend/src/assets/type/navo3.png
frontend/src/assets/type/navo3.png
+0
-0
frontend/src/assets/type/pro.png
frontend/src/assets/type/pro.png
+0
-0
No files found.
API/app.py
View file @
ea51e324
from
flask
import
Flask
,
redirect
,
url_for
,
render_template
,
request
,
jsonify
,
make_response
import
random
import
os
from
API.model.colorModel
import
get_color_activities
,
get_color_activity_result
from
API.model.colorModel
import
get_color_activities
1
,
get_color_activities2
,
get_color_activity_result
from
API.model.readModel
import
get_reading_activities
from
API.routers.router
import
funtion_one
from
backend.IT18218640.keyword_spotting_service
import
Keyword_Spotting_service
...
...
@@ -16,9 +16,13 @@ def home():
# Color Function Route (IT18218640)
@
app
.
route
(
"/getColorActivities"
)
def
getColorActivities
():
return
get_color_activities
()
\
@
app
.
route
(
"/getColorActivities1"
)
def
getColorActivities1
():
return
get_color_activities1
()
@
app
.
route
(
"/getColorActivities2"
)
def
getColorActivities2
():
return
get_color_activities2
()
@
app
.
route
(
"/getColorActivitiesResult"
)
def
getColorActivitiesResult
():
...
...
API/model/colorModel.py
View file @
ea51e324
...
...
@@ -2,10 +2,30 @@ from flask import jsonify
from
API.db.dbConnection
import
get_all_data
def
get_color_activities
():
def
get_color_activities
1
():
data_dic
=
[]
qry
=
'SELECT * FROM coloractivities'
qry
=
'SELECT * FROM coloractivities WHERE idactivityType = 1'
result
=
get_all_data
(
qry
)
for
row
in
result
:
ob
=
{
"idcolorActivities"
:
row
[
0
],
"name"
:
row
[
1
],
"file"
:
row
[
2
],
"des"
:
row
[
3
],
"color"
:
row
[
4
],
}
data_dic
.
append
(
ob
)
return
jsonify
(
data_dic
)
def
get_color_activities2
():
data_dic
=
[]
qry
=
'SELECT * FROM coloractivities WHERE idactivityType = 2'
result
=
get_all_data
(
qry
)
...
...
frontend/src/assets/type/navo1.png
0 → 100644
View file @
ea51e324
180 KB
frontend/src/assets/type/navo2.png
0 → 100644
View file @
ea51e324
142 KB
frontend/src/assets/type/navo3.png
0 → 100644
View file @
ea51e324
246 KB
frontend/src/assets/type/pro.png
0 → 100644
View file @
ea51e324
34.5 KB
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