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
4392d977
Commit
4392d977
authored
Apr 14, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui updates and new pipeline to add a requirement
parent
e5d4a803
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
42 additions
and
26 deletions
+42
-26
add-boilerplate.component.ts
...p/components/add-boilerplate/add-boilerplate.component.ts
+1
-1
add-groupboil.component.html
...app/components/add-groupboil/add-groupboil.component.html
+13
-2
add-groupboil.component.ts
...c/app/components/add-groupboil/add-groupboil.component.ts
+3
-0
boilerplate-details.component.html
...ts/boilerplate-details/boilerplate-details.component.html
+1
-1
boilerplate-details.component.ts
...ents/boilerplate-details/boilerplate-details.component.ts
+1
-11
groupboil.component.html
...r11/src/app/components/groupboil/groupboil.component.html
+9
-6
groupboil.component.scss
...r11/src/app/components/groupboil/groupboil.component.scss
+6
-1
groupboil.component.ts
...lar11/src/app/components/groupboil/groupboil.component.ts
+3
-1
boilerplate.model.ts
reqtool/ReqmanAngular11/src/app/models/boilerplate.model.ts
+1
-0
boilerplate.service.ts
...l/ReqmanAngular11/src/app/services/boilerplate.service.ts
+1
-1
requirements.py
...ool/reqman/api/reqman/apps/reqtool/models/requirements.py
+1
-0
requirements.py
.../reqman/apps/reqtool/rest_api/serializers/requirements.py
+1
-1
main_req_views.py
.../api/reqman/apps/reqtool/rest_api/views/main_req_views.py
+1
-1
No files found.
reqtool/ReqmanAngular11/src/app/components/add-boilerplate/add-boilerplate.component.ts
View file @
4392d977
...
...
@@ -43,7 +43,7 @@ export class AddBoilerplateComponent implements OnInit {
response
=>
{
this
.
notifier
.
notify
(
"success"
,(
JSON
.
stringify
(
response
)));
this
.
submitted
=
true
;
this
.
router
.
navigate
([
'/groupboilerplates/'
+
this
.
route
.
snapshot
.
params
.
gb
+
'/boilerplates
'
]);
this
.
router
.
navigate
([
'/groupboilerplates/'
+
this
.
route
.
snapshot
.
params
.
gb
+
'/boilerplates
/details/'
+
response
.
id
]);
},
error
=>
{
console
.
log
(
error
);
...
...
reqtool/ReqmanAngular11/src/app/components/add-groupboil/add-groupboil.component.html
View file @
4392d977
...
...
@@ -17,9 +17,20 @@
[(
ngModel
)]="
groupboilerplate
.
title_bgroup
"
name=
"title_bgroup"
/>
</div>
<div
class=
"form-group"
>
<label
for=
"description"
>
Description of project
</label>
<textarea
type=
"text"
class=
"form-control"
id=
"description"
required
[(
ngModel
)]="
groupboilerplate
.
description
"
name=
"description"
></textarea>
</div>
<button
(
click
)="
saveBoilerplate
()"
class=
"btn btn-success"
>
Submit
</button>
</div>
</div>
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/components/add-groupboil/add-groupboil.component.ts
View file @
4392d977
...
...
@@ -13,6 +13,7 @@ export class AddGroupboilComponent implements OnInit {
groupboilerplate
:
GroupBoilerplate
=
{
title_bgroup
:
""
,
description
:
""
,
};
submitted
=
false
;
private
readonly
notifier
:
NotifierService
;
...
...
@@ -26,6 +27,7 @@ export class AddGroupboilComponent implements OnInit {
saveBoilerplate
():
void
{
const
data
=
{
title_bgroup
:
this
.
groupboilerplate
.
title_bgroup
,
description
:
this
.
groupboilerplate
.
description
,
};
this
.
boilerplatelService
.
creategroupboil
(
data
)
...
...
@@ -45,6 +47,7 @@ export class AddGroupboilComponent implements OnInit {
this
.
submitted
=
false
;
this
.
groupboilerplate
=
{
title_bgroup
:
""
,
description
:
""
,
};
}
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-details/boilerplate-details.component.html
View file @
4392d977
...
...
@@ -68,7 +68,7 @@
value=
" Update Boilerplate"
(
click
)="
updateBoilerplate
()"
/>
</div>
<div
fxFlex
fxLayout
fxHide
.
xs
fxLayoutAlign=
"
start
"
>
<div
fxFlex
fxLayout
fxHide
.
xs
fxLayoutAlign=
"
end
"
>
<input
class=
"btn btn-warning"
type=
"button"
value=
"Delete Boilerplate"
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-details/boilerplate-details.component.ts
View file @
4392d977
...
...
@@ -75,7 +75,7 @@ export class BoilerplateDetailsComponent implements OnInit {
.
subscribe
(
response
=>
{
this
.
notifier
.
notify
(
"success"
,(
JSON
.
stringify
(
"Requirement "
+
this
.
currentboilerplate
.
title
+
" updated"
)));
this
.
router
.
navigate
([
'/groupboilerplates/'
+
this
.
route
.
snapshot
.
params
.
gb
+
'/boilerplates'
]);
//
this.router.navigate(['/groupboilerplates/'+this.route.snapshot.params.gb+'/boilerplates']);
},
error
=>
{
this
.
notifier
.
notify
(
"warning"
,(
JSON
.
stringify
(
error
)));
...
...
@@ -107,16 +107,6 @@ export class BoilerplateDetailsComponent implements OnInit {
console
.
log
(
error
);
});
}
checkeven
(
i
:
any
):
any
{
if
(
i
%
2
==
0
){
return
true
}
return
false
}
checkthree
(
i
:
any
):
any
{
if
(
i
%
3
==
0
){
return
true
}
return
false
}
checklen
(
i
:
any
):
any
{
if
(
i
.
length
>
1
){
return
true
}
...
...
reqtool/ReqmanAngular11/src/app/components/groupboil/groupboil.component.html
View file @
4392d977
...
...
@@ -34,23 +34,26 @@
</div>
</div>
<div
*
ngFor=
"let gb of grouboilerplates| filter:title"
>
<mat-card
class=
"example-card"
>
<a
routerLink=
"/groupboilerplates/{{gb.id}}/boilerplates"
>
<div
class=
"content"
>
<div
fxLayout=
"row wrap"
>
<div
fxFlex=
"20%"
*
ngFor=
"let gb of grouboilerplates| filter:title"
>
<mat-card
class=
"example-card"
routerLink=
"/groupboilerplates/{{gb.id}}/boilerplates"
>
<mat-card-header>
<div
mat-card-avatar
class=
"example-header-image"
></div>
<mat-card-title>
Project
{{gb.title_bgroup}}
</mat-card-title>
<mat-card-title>
{{gb.title_bgroup}}
</mat-card-title>
<mat-card-subtitle></mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<p>
Project Description
{{gb.description}}
</p>
</mat-card-content>
</a>
<mat-card-actions>
<button
class=
"btn btn-info"
mat-button
>
EDIT
</button>
<button
class=
"btn btn-warning"
(
click
)="
deleteGroupBoilerplate
(
gb
)"
mat-button
>
DELETE
</button>
</mat-card-actions>
</mat-card>
</div>
</div>
</div>
reqtool/ReqmanAngular11/src/app/components/groupboil/groupboil.component.scss
View file @
4392d977
.example-card
{
max-width
:
auto
;
width
:
350px
;
height
:
250px
;
margin-right
:
5px
;
}
.mat-card-content
{
height
:
100px
;
}
.example-header-image
{
background-size
:
cover
;
...
...
reqtool/ReqmanAngular11/src/app/components/groupboil/groupboil.component.ts
View file @
4392d977
...
...
@@ -10,6 +10,7 @@ import { BoilerplateService } from 'src/app/services/boilerplate.service';
export
class
GroupboilComponent
implements
OnInit
{
grouboilerplates
?:
GroupBoilerplate
[];
title
=
''
;
constructor
(
private
boilerplateService
:
BoilerplateService
)
{
}
...
...
@@ -20,8 +21,9 @@ export class GroupboilComponent implements OnInit {
retrievegroupBoilerplates
():
void
{
this
.
boilerplateService
.
getAllgroupboil
()
.
subscribe
(
data
=>
{
console
.
log
(
data
);
data
=>
{
this
.
grouboilerplates
=
data
;
console
.
log
(
data
);
},
error
=>
{
console
.
log
(
error
);
...
...
reqtool/ReqmanAngular11/src/app/models/boilerplate.model.ts
View file @
4392d977
...
...
@@ -18,6 +18,7 @@ export class BoilerplateData {
export
class
GroupBoilerplate
{
id
?:
any
;
title_bgroup
?:
string
;
description
?:
string
;
}
export
class
InferenceResults
{
...
...
reqtool/ReqmanAngular11/src/app/services/boilerplate.service.ts
View file @
4392d977
...
...
@@ -21,7 +21,7 @@ export class BoilerplateService {
return
this
.
http
.
post
(
baseUrlgb
,
data
);
}
getAllgroupboil
():
Observable
<
Boilerplate
[]
>
{
getAllgroupboil
():
Observable
<
any
>
{
return
this
.
http
.
get
<
[
GroupBoilerplate
]
>
(
baseUrlgb
);
}
...
...
reqtool/reqman/api/reqman/apps/reqtool/models/requirements.py
View file @
4392d977
...
...
@@ -74,6 +74,7 @@ def create_infer_result(instance):
class
BoilerplateGroup
(
models
.
Model
):
boilerplate_owner
=
models
.
ForeignKey
(
User
,
related_name
=
'boilerplate_group_owner'
,
on_delete
=
models
.
CASCADE
)
title_bgroup
=
models
.
CharField
(
max_length
=
30
,
unique
=
True
)
description
=
models
.
CharField
(
max_length
=
500
)
def
save
(
self
,
**
kwargs
):
super
(
BoilerplateGroup
,
self
)
.
save
(
**
kwargs
)
...
...
reqtool/reqman/api/reqman/apps/reqtool/rest_api/serializers/requirements.py
View file @
4392d977
...
...
@@ -35,4 +35,4 @@ class BoilerplateGroupSerializer(serializers.ModelSerializer):
boilerplate_owner
=
serializers
.
ReadOnlyField
(
source
=
'owner.username'
)
class
Meta
:
model
=
BoilerplateGroup
fields
=
(
'id'
,
'boilerplate_owner'
,
'title_bgroup'
)
fields
=
(
'id'
,
'boilerplate_owner'
,
'title_bgroup'
,
'description'
)
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/main_req_views.py
View file @
4392d977
...
...
@@ -76,12 +76,12 @@ class MainDetailsAPIView(RetrieveUpdateDestroyAPIView):
ev_instance
=
instance
[
'verb'
]
.
rsplit
(
':'
,
1
)
eo_instance
=
instance
[
'flow_function_interface_item_system_state_stateset'
]
.
rsplit
(
':'
,
1
)
mn
=
(
es_instance
[
len
(
es_instance
)
-
1
]
+
' '
+
instance
[
'shall'
]
+
' '
+
ev_instance
[
len
(
ev_instance
)
-
1
]
+
' '
+
eo_instance
[
len
(
eo_instance
)
-
1
])
BoilerplateData
.
objects
.
filter
(
owner_data
=
instance
[
'boilerplate_of_main'
]
.
owner
,
boilerplate_data_id
=
instance
[
'boilerplate_of_main'
])
.
update
(
main_data
=
mn
)
curmain_choices
=
inference
.
getclassofmain
(
instance
)
#instance['main_choices'] = curmain_choices[0]
if
curmain_choices
[
0
]
==
'ERROR'
:
raise
APIException
(
"Main choices not in [M1-M16]"
)
else
:
BoilerplateData
.
objects
.
filter
(
owner_data
=
instance
[
'boilerplate_of_main'
]
.
owner
,
boilerplate_data_id
=
instance
[
'boilerplate_of_main'
])
.
update
(
main_data
=
mn
)
instance
=
serializer
.
save
(
main_choices
=
curmain_choices
[
0
])
...
...
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