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
04fa07be
Commit
04fa07be
authored
Feb 21, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add boilerplate works!
parent
ecc30837
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
app-routing.module.ts
reqtool/ReqmanAngular11/src/app/app-routing.module.ts
+1
-1
boilerplate-list.component.html
...mponents/boilerplate-list/boilerplate-list.component.html
+0
-1
boilerplate-list.component.ts
...components/boilerplate-list/boilerplate-list.component.ts
+2
-1
auth.service.ts
reqtool/ReqmanAngular11/src/app/services/auth.service.ts
+4
-2
boilerplate.service.ts
...l/ReqmanAngular11/src/app/services/boilerplate.service.ts
+1
-0
django.py
reqtool/reqman/api/reqman/settings/django.py
+7
-7
No files found.
reqtool/ReqmanAngular11/src/app/app-routing.module.ts
View file @
04fa07be
...
...
@@ -15,7 +15,7 @@ import { PrefixDetailsComponent } from './components/prefix-details/prefix-detai
import { AddPrefixComponent } from './components/add-prefix/add-prefix.component';*/
const
routes
:
Routes
=
[
{
path
:
'
'
,
redirectTo
:
'login'
,
pathMatch
:
'full'
},
{
path
:
''
,
redirectTo
:
'login'
,
pathMatch
:
'full'
},
{
path
:
'login'
,
component
:
LoginComponent
},
{
path
:
'signup'
,
component
:
SignupComponent
},
{
path
:
'boilerplates'
,
component
:
BoilerplateListComponent
,
canActivate
:
[
AuthGuard
]
},
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-list/boilerplate-list.component.html
View file @
04fa07be
...
...
@@ -60,7 +60,6 @@
<button class="btn btn-success" routerLink="/add-boilerplate">Add</button>
</div>-->
</div>
<table
mat-table
[
dataSource
]="
dataSource
"
class=
"mat-elevation-z8"
>
<!-- Position Column -->
...
...
reqtool/ReqmanAngular11/src/app/components/boilerplate-list/boilerplate-list.component.ts
View file @
04fa07be
...
...
@@ -26,7 +26,7 @@ export class BoilerplateListComponent implements OnInit {
currentIndex
=
-
1
;
title
=
''
;
displayedColumns
:
string
[]
=
[
'id'
,
'title'
,
'has_prefix'
,
'has_main'
,
'has_suffix'
];
dataSource
=
ELEMENT_DATA
;
dataSource
=
[{}];
//
ELEMENT_DATA;
constructor
(
private
boilerplateService
:
BoilerplateService
)
{
}
...
...
@@ -35,6 +35,7 @@ export class BoilerplateListComponent implements OnInit {
}
retrieveBoilerplates
():
void
{
this
.
dataSource
=
[{}];
this
.
boilerplateService
.
getAll
()
.
subscribe
(
data
=>
{
...
...
reqtool/ReqmanAngular11/src/app/services/auth.service.ts
View file @
04fa07be
...
...
@@ -38,7 +38,9 @@ export class AuthService {
this
.
apiRoot
.
concat
(
'login/'
),
{
email
,
password
}
).
pipe
(
tap
(
response
=>
this
.
setSession
(
response
)),
tap
(
response
=>
this
.
setSession
(
response
)),
tap
(
response
=>
console
.
log
(
response
)),
shareReplay
(),
);
}
...
...
@@ -99,7 +101,7 @@ export class AuthInterceptor implements HttpInterceptor {
if
(
token
)
{
const
cloned
=
req
.
clone
({
headers
:
req
.
headers
.
set
(
'Authorization'
,
'
JWT
'
.
concat
(
token
))
headers
:
req
.
headers
.
set
(
'Authorization'
,
'
Bearer
'
.
concat
(
token
))
});
return
next
.
handle
(
cloned
);
...
...
reqtool/ReqmanAngular11/src/app/services/boilerplate.service.ts
View file @
04fa07be
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Observable
}
from
'rxjs'
;
import
{
Boilerplate
}
from
'../models/boilerplate.model'
;
...
...
reqtool/reqman/api/reqman/settings/django.py
View file @
04fa07be
...
...
@@ -46,8 +46,8 @@ INSTALLED_APPS = [
"django.contrib.staticfiles"
,
# 3rd party apps
"rest_framework"
,
'corsheaders'
,
'rest_framework_jwt.blacklist'
,
"corsheaders"
,
"rest_framework_jwt.blacklist"
,
# our apps
"reqman.apps.common.apps.CommonConfig"
,
"reqman.apps.account.apps.AccountConfig"
,
...
...
@@ -55,7 +55,7 @@ INSTALLED_APPS = [
]
+
env
.
list
(
"REQMAN_DEV_INSTALLED_APPS"
,
default
=
[])
MIDDLEWARE
=
[
'corsheaders.middleware.CorsMiddleware'
,
"corsheaders.middleware.CorsMiddleware"
,
"django.middleware.security.SecurityMiddleware"
,
"django.contrib.sessions.middleware.SessionMiddleware"
,
"django.middleware.common.CommonMiddleware"
,
...
...
@@ -154,12 +154,12 @@ JWT_AUTH = {
'JWT_EXPIRATION_DELTA'
:
timedelta
(
days
=
2
),
}
CORS_ORIGIN_ALLOW_ALL
=
Tru
e
# If this is used then `CORS_ORIGIN_WHITELIST` will not have any effect
CORS_ORIGIN_ALLOW_ALL
=
Fals
e
# If this is used then `CORS_ORIGIN_WHITELIST` will not have any effect
CORS_ALLOW_CREDENTIALS
=
True
CORS_ORIGIN_WHITELIST
=
[
'http://155.207.131.19:8081'
,
]
# If this is used, then not need to use `CORS_ORIGIN_ALLOW_ALL = True`
#
CORS_ORIGIN_REGEX_WHITELIST = [
#
'http://155.207.131.19:8081',
#
]
CORS_ORIGIN_REGEX_WHITELIST
=
[
'http://155.207.131.19:8081'
,
]
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