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
12732872
Commit
12732872
authored
Mar 12, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui update
parent
feaaa807
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
107 additions
and
30 deletions
+107
-30
app-routing.module.ts
reqtool/ReqmanAngular11/src/app/app-routing.module.ts
+2
-2
add-boilerplate.component.html
...components/add-boilerplate/add-boilerplate.component.html
+7
-0
add-groupboil.component.html
...app/components/add-groupboil/add-groupboil.component.html
+6
-0
boilerplate-details.component.html
...ts/boilerplate-details/boilerplate-details.component.html
+7
-0
boilerplate-details.component.ts
...ents/boilerplate-details/boilerplate-details.component.ts
+1
-1
boilerplate-list.component.html
...mponents/boilerplate-list/boilerplate-list.component.html
+17
-12
groupboil.component.html
...r11/src/app/components/groupboil/groupboil.component.html
+22
-8
groupboil.component.scss
...r11/src/app/components/groupboil/groupboil.component.scss
+7
-0
groupboil.component.ts
...lar11/src/app/components/groupboil/groupboil.component.ts
+14
-0
header.component.html
...Angular11/src/app/navigation/header/header.component.html
+2
-2
boilerplate.service.ts
...l/ReqmanAngular11/src/app/services/boilerplate.service.ts
+4
-0
urls.py
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
+1
-1
requirements_views.py
.../reqman/apps/reqtool/rest_api/views/requirements_views.py
+17
-4
No files found.
reqtool/ReqmanAngular11/src/app/app-routing.module.ts
View file @
12732872
...
...
@@ -22,9 +22,9 @@ const routes: Routes = [
{
path
:
'signup'
,
component
:
SignupComponent
},
{
path
:
'groupboilerplates'
,
component
:
GroupboilComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'groupboilerplates/:gb/boilerplates'
,
component
:
BoilerplateListComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'groupboilerplates/:gb/boilerplates/:id'
,
component
:
BoilerplateDetailsComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'groupboilerplates/:gb/boilerplates/
details/
:id'
,
component
:
BoilerplateDetailsComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'groupboilerplates/:gb/boilerplates/add-boilerplate'
,
component
:
AddBoilerplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'add-groupboil'
,
component
:
AddGroupboilComponent
,
canActivate
:
[
AuthGuard
]
}
{
path
:
'
groupboilerplates/
add-groupboil'
,
component
:
AddGroupboilComponent
,
canActivate
:
[
AuthGuard
]
}
/*{ path: '', redirectTo: 'tutorials', pathMatch: 'full' },
{ path: 'prefix', component: PrefixListComponent },
{ path: 'prefix/:id', component: PrefixDetailsComponent },
...
...
reqtool/ReqmanAngular11/src/app/components/add-boilerplate/add-boilerplate.component.html
View file @
12732872
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
routerLink=
"../../../"
>
Projects
</a></li>
<li
class=
"breadcrumb-item"
><a
routerLink=
"../"
>
Boilerplate List
</a></li>
<li
class=
"breadcrumb-item"
aria-current=
"page"
>
Add Boilerplate
</li>
</ol>
</nav>
<div>
<div
class=
"submit-form"
>
...
...
reqtool/ReqmanAngular11/src/app/components/add-groupboil/add-groupboil.component.html
View file @
12732872
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
routerLink=
"../"
>
Projects
</a></li>
<li
class=
"breadcrumb-item"
aria-current=
"page"
>
Add Project
</li>
</ol>
</nav>
<div>
<div
class=
"submit-form"
>
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-details/boilerplate-details.component.html
View file @
12732872
<app-prefix-list></app-prefix-list>
<app-main-list></app-main-list>
<app-suffix-list></app-suffix-list>
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
routerLink=
"../../../../"
>
Projects
</a></li>
<li
class=
"breadcrumb-item"
><a
routerLink=
"../../"
>
Boilerplate List
</a></li>
<li
class=
"breadcrumb-item"
aria-current=
"page"
>
Edit Boilerplate
</li>
</ol>
</nav>
<div>
<div
*
ngIf=
"currentboilerplate.id"
class=
"edit-form"
>
<h4>
Boilerplate
</h4>
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-details/boilerplate-details.component.ts
View file @
12732872
...
...
@@ -61,7 +61,7 @@ export class BoilerplateDetailsComponent implements OnInit {
.
subscribe
(
response
=>
{
console
.
log
(
response
);
this
.
router
.
navigate
([
'/boilerplates'
]);
this
.
router
.
navigate
([
'/
groupboilerplates/'
+
this
.
route
.
snapshot
.
params
.
gb
+
'/
boilerplates'
]);
},
error
=>
{
console
.
log
(
error
);
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-list/boilerplate-list.component.html
View file @
12732872
<
div
>
<div
>
<input
type=
"button"
value=
"Add Boilepate"
(
click
)="
GetRoute
()"
/
>
</div
>
</
di
v>
<
nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
routerLink=
"../../"
>
Projects
</a></li
>
<li
class=
"breadcrumb-item"
aria-current=
"page"
>
Boilerplate List
</li
>
</ol>
</
na
v>
<div
class=
"list row"
>
<div
class=
"col-md-8"
>
<div
class=
"input-group mb-3"
>
...
...
@@ -16,19 +16,24 @@
/>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-
outline-second
ary"
class=
"btn btn-
prim
ary"
type=
"button"
(
click
)="
SearchTitle
()"
>
Search
>
Search
</button>
</div>
</div>
<div
fxFlex
fxLayout
fxHide
.
xs
fxLayoutAlign=
"end"
>
<ul
fxLayout
fxLayoutGap=
"15px"
class=
"navigation-items"
>
<div>
<input
class=
"btn btn-success"
type=
"button"
value=
"Add Boilepate"
routerLink=
"add-boilerplate"
/>
</div>
</ul>
</div>
</div>
</div>
<table
mat-table
[
dataSource
]="
newdataSource
"
class=
"mat-elevation-z8"
>
<!-- Position Column -->
<ng-container
matColumnDef=
"id"
>
<th
mat-header-cell
*
matHeaderCellDef
>
No.
</th>
...
...
@@ -60,7 +65,7 @@
<ng-container
matColumnDef=
"action"
>
<th
mat-header-cell
*
matHeaderCellDef
>
Action
</th>
<td
mat-cell
*
matCellDef=
"let element"
class=
"action-link"
>
<a
class=
"b
adge badge-warning"
routerLink=
"
{{element.id}}"
>
Edit
</a>
<a
class=
"b
tn btn-info"
routerLink=
"details/
{{element.id}}"
>
Edit
</a>
</td>
</ng-container>
...
...
reqtool/ReqmanAngular11/src/app/components/groupboil/groupboil.component.html
View file @
12732872
<p>
groupboil works!
</p>
<div>
<a
routerLink=
"/add-groupboil"
>
Add Boilepate
</a>
</div>
<li
*
ngFor=
"let gb of grouboilerplates"
>
<a
class=
"badge badge-warning"
routerLink=
"/groupboilerplates/{{gb.id}}/boilerplates"
>
"{{gb.title_bgroup}}"
</a>
<span
class=
"badge"
>
{{gb.id}}
</span>
</li>
<input
class=
"btn btn-success"
type=
"button"
value=
"Add New project"
routerLink=
"add-groupboil"
/>
</div>
<div
*
ngFor=
"let gb of grouboilerplates"
>
<mat-card
class=
"example-card"
>
<a
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-subtitle></mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<p>
Project 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>
reqtool/ReqmanAngular11/src/app/components/groupboil/groupboil.component.scss
View file @
12732872
.example-card
{
max-width
:
400px
;
}
.example-header-image
{
background-size
:
cover
;
}
\ No newline at end of file
reqtool/ReqmanAngular11/src/app/components/groupboil/groupboil.component.ts
View file @
12732872
...
...
@@ -28,4 +28,18 @@ export class GroupboilComponent implements OnInit {
}
deleteGroupBoilerplate
(
id
:
any
):
void
{
if
(
confirm
(
"Αre you sure you want to delete this Project?"
))
{
this
.
boilerplateService
.
deletegroupboil
(
id
.
id
)
.
subscribe
(
response
=>
{
console
.
log
(
response
);
this
.
retrievegroupBoilerplates
();
},
error
=>
{
console
.
log
(
error
);
});
}
}
}
reqtool/ReqmanAngular11/src/app/navigation/header/header.component.html
View file @
12732872
...
...
@@ -5,7 +5,7 @@
</button>
</div>
<div>
<a
routerLink=
"/
boilerplates"
>
Boilerplate
s
</a>
<a
routerLink=
"/
groupboilerplates"
>
Project
s
</a>
</div>
<div
fxFlex
fxLayout
fxHide
.
xs
fxLayoutAlign=
"end"
>
<ul
fxLayout
fxLayoutGap=
"15px"
class=
"navigation-items"
>
...
...
@@ -14,4 +14,4 @@
</div>
</ul>
</div>
</mat-toolbar>
\ No newline at end of file
</mat-toolbar>
reqtool/ReqmanAngular11/src/app/services/boilerplate.service.ts
View file @
12732872
...
...
@@ -23,6 +23,10 @@ export class BoilerplateService {
return
this
.
http
.
get
<
[
GroupBoilerplate
]
>
(
baseUrlgb
);
}
deletegroupboil
(
id
:
any
):
Observable
<
any
>
{
return
this
.
http
.
delete
(
`
${
baseUrlgb
}${
id
}
`
);
}
getAll
(
gb
:
any
):
Observable
<
Boilerplate
[]
>
{
//console.log(baseUrlgb + gb + baseUrl)
return
this
.
http
.
get
<
Boilerplate
[]
>
(
baseUrlgb
+
gb
+
baseUrl
);
...
...
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
View file @
12732872
...
...
@@ -8,7 +8,7 @@ urlpatterns = [
path
(
'users/'
,
user_views
.
UserList
.
as_view
(),
name
=
'api-user-list'
),
path
(
'users/<uuid:pk>/'
,
user_views
.
UserDetail
.
as_view
(),
name
=
'api-post-details'
),
path
(
'groupboilerplates/'
,
requirements_views
.
BoilerplateGroupCreateAPIView
.
as_view
(),
name
=
'api-groupboilerplates-create'
),
path
(
'groupboilerplates/<int:pk>/'
,
requirements_views
.
BoilerplateGroup
List
.
as_view
(),
name
=
'api-groupboilerplates-list'
),
path
(
'groupboilerplates/<int:pk>/'
,
requirements_views
.
BoilerplateGroup
DetailsAPIView
.
as_view
(),
name
=
'api-groupboilerplates-list'
),
path
(
'groupboilerplates/<int:groupboil>/boilerplates/'
,
requirements_views
.
BoilerplateListCreateAPIView
.
as_view
(),
name
=
'api-requirements-list'
),
path
(
'groupboilerplates/<int:groupboil>/boilerplates/<int:pk>/'
,
requirements_views
.
BoilerplateDetailsAPIView
.
as_view
(),
name
=
'api-requirements-details'
),
...
...
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/requirements_views.py
View file @
12732872
...
...
@@ -18,7 +18,6 @@ from reqman.apps.reqtool.models.requirements import BoilerplateData
from
django.shortcuts
import
get_object_or_404
##
class
BoilerplateGroupCreateAPIView
(
ListCreateAPIView
):
"""
API view to retrieve list of posts or create new
...
...
@@ -41,10 +40,24 @@ class BoilerplateGroupList(ListAPIView):
"""
permission_classes
=
[
permissions
.
IsAuthenticatedOrReadOnly
]
serializer_class
=
BoilerplateGroupSerializer
queryset
=
Boilerplate
.
objects
.
all
()
queryset
=
BoilerplateGroup
.
objects
.
all
()
class
BoilerplateGroupDetailsAPIView
(
RetrieveUpdateDestroyAPIView
):
"""
API view to retrieve, update or delete post
"""
permission_classes
=
[
permissions
.
IsAuthenticatedOrReadOnly
]
serializer_class
=
BoilerplateGroupSerializer
queryset
=
BoilerplateGroup
.
objects
.
all
()
#Custom actions when PUT
def
perform_update
(
self
,
serializer
):
instance
=
serializer
.
save
()
###
#Custom actions when DELETE
def
perform_destroy
(
self
,
instance
):
instance
.
delete
()
class
BoilerplateListCreateAPIView
(
ListCreateAPIView
):
...
...
@@ -80,7 +93,7 @@ class BoilerplateList(ListAPIView):
def
get_queryset
(
self
):
group_gb
=
self
.
kwargs
[
'groupboil'
]
title
=
self
.
kwargs
[
'title_1'
]
#
print(title)
print
(
title
)
queryset_title
=
Boilerplate
.
objects
.
filter
(
title
=
title
,
group_of_boilerplate
=
group_gb
)
return
queryset_title
...
...
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