Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
Requirement Formalization Tool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Thodoris Nestoridis
Requirement Formalization Tool
Commits
b5b3130b
Commit
b5b3130b
authored
Feb 25, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add urls for angular
parent
51e5a9c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
0 deletions
+118
-0
urls.py
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
+18
-0
main_req_views.py
.../api/reqman/apps/reqtool/rest_api/views/main_req_views.py
+68
-0
suffix_req_views.py
...pi/reqman/apps/reqtool/rest_api/views/suffix_req_views.py
+32
-0
No files found.
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
View file @
b5b3130b
...
...
@@ -29,4 +29,22 @@ urlpatterns = [
path
(
'prefix/choices/sysfunitem/'
,
requirements_views
.
FunItemSysChoicesViewSet
.
as_view
(),
name
=
'sysfunitem'
),
path
(
'prefix/choices/staflowfunitem/'
,
requirements_views
.
StaFlowFunItemChoicesViewSet
.
as_view
(),
name
=
'staflowfunitem'
),
#MAIN CHOICES DATA
path
(
'main/choices/subject/'
,
main_req_views
.
SysFunIntChoicesViewSet
.
as_view
(),
name
=
'mainsubject'
),
path
(
'main/choices/stateitem/'
,
main_req_views
.
StatItemChoicesViewSet
.
as_view
(),
name
=
'mainstateitem'
),
path
(
'main/choices/statevalue/'
,
main_req_views
.
StatevalueChoicesViewSet
.
as_view
(),
name
=
'mainstatevalue'
),
path
(
'main/choices/shall/'
,
main_req_views
.
ShallChoicesViewSet
.
as_view
(),
name
=
'mainshall'
),
path
(
'main/choices/verb/'
,
main_req_views
.
VerbChoicesViewSet
.
as_view
(),
name
=
'mainverb'
),
path
(
'main/choices/quantifier/'
,
main_req_views
.
QuantChoicesViewSet
.
as_view
(),
name
=
'mainquantifier'
),
path
(
'main/choices/numunit/'
,
main_req_views
.
NumUnitChoicesViewSet
.
as_view
(),
name
=
'mainnumunit'
),
path
(
'main/choices/fifuintsysstatset/'
,
main_req_views
.
FlFuIntItSysStatSetChoicesViewSet
.
as_view
(),
name
=
'mainfifuintsysstatset'
),
path
(
'main/choices/stsysconset/'
,
main_req_views
.
StaSysConSetChoicesViewSet
.
as_view
(),
name
=
'mainstsysconset'
),
#SUFFIX CHOICES DATA
path
(
'suffix/choices/suffix/'
,
suffix_req_views
.
SuffixChoicesViewSet
.
as_view
(),
name
=
'suffixsuffix'
),
path
(
'suffix/choices/numunits/'
,
suffix_req_views
.
NumChoicesViewSet
.
as_view
(),
name
=
'suffixnum'
),
path
(
'suffix/choices/timeunits/'
,
suffix_req_views
.
TimeChoicesViewSet
.
as_view
(),
name
=
'suffixtime'
),
path
(
'suffix/choices/flow/'
,
suffix_req_views
.
FlowChoicesViewSet
.
as_view
(),
name
=
'suffixflow'
),
]
\ No newline at end of file
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/main_req_views.py
View file @
b5b3130b
...
...
@@ -11,6 +11,13 @@ from reqman.apps.reqtool.rest_api.serializers.main_req import MainSerializer
from
reqman.apps.permissions
import
IsOwnerOrReadOnly
from
reqman.apps.reqtool.rest_api.services
import
fuseki
from
rest_framework.response
import
Response
from
rest_framework.views
import
APIView
from
reqman.apps.reqtool.models.main_req
import
SYSTEM_CHOICES
,
FUNCTION_CHOICES
,
INTERFACE_CHOICES
,
STATE_CHOICES
,
ITEM_CHOICES
from
reqman.apps.reqtool.models.main_req
import
STATE_VALUE_CHOICES
,
SHALL_CHOICES
,
VERB_CHOICES
,
QUANTIFIER_CHOICES
,
NUMBER_UNITS_CHOICES
from
reqman.apps.reqtool.models.main_req
import
FLOW_CHOICES
,
CONNECTION_CHOICES
class
MainListAPIView
(
ListAPIView
):
"""
API view to retrieve list of posts or create new
...
...
@@ -61,3 +68,64 @@ class MainDetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
SysFunIntChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
SYSTEM_CHOICES
+
FUNCTION_CHOICES
+
INTERFACE_CHOICES
)
return
response
class
StatItemChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
STATE_CHOICES
+
ITEM_CHOICES
)
return
response
class
StatevalueChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
STATE_VALUE_CHOICES
)
return
response
class
ShallChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
SHALL_CHOICES
)
return
response
class
VerbChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
VERB_CHOICES
)
return
response
class
QuantChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
QUANTIFIER_CHOICES
)
return
response
class
NumUnitChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
NUMBER_UNITS_CHOICES
)
return
response
class
FlFuIntItSysStatSetChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
FLOW_CHOICES
+
FUNCTION_CHOICES
+
INTERFACE_CHOICES
+
ITEM_CHOICES
+
SYSTEM_CHOICES
+
STATE_CHOICES
+
STATE_SET_CHOICES
)
return
response
class
StaSysConSetChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
STATE_VALUE_CHOICES
+
SYSTEM_CHOICES
+
CONNECTION_CHOICES
+
STATE_SET_CHOICES
)
return
response
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/suffix_req_views.py
View file @
b5b3130b
...
...
@@ -11,6 +11,12 @@ from reqman.apps.reqtool.rest_api.serializers.suffix_req import SuffixSerializer
from
reqman.apps.permissions
import
IsOwnerOrReadOnly
from
reqman.apps.reqtool.rest_api.services
import
fuseki
from
rest_framework.response
import
Response
from
rest_framework.views
import
APIView
from
reqman.apps.reqtool.models.suffix_req
import
S_CHOICES
,
NUMBER_UNITS_CHOICES
,
TIME_UNITS_CHOICES
,
FLOW_CHOICES
class
SuffixListAPIView
(
ListAPIView
):
"""
API view to retrieve list of posts or create new
...
...
@@ -61,4 +67,30 @@ class SuffixDetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
SuffixChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
S_CHOICES
)
return
response
class
NumChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
NUMBER_UNITS_CHOICES
)
return
response
class
TimeChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
TIME_UNITS_CHOICES
)
return
response
class
FlowChoicesViewSet
(
APIView
):
def
get
(
self
,
request
):
response
=
Response
(
FLOW_CHOICES
)
return
response
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