Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projets-INFO4
19-20
8
app-pghm
Commits
0abd49f7
Commit
0abd49f7
authored
Jun 22, 2020
by
Thomas Frion
Browse files
Merge branch 'dev'
parents
bb0619a4
d1770802
Changes
159
Expand all
Hide whitespace changes
Inline
Side-by-side
GendLoc/CHANGELOG.md
deleted
100644 → 0
View file @
bb0619a4
# CHANGELOG
## 2020-03-26
*
Generation of the GendLoc application
*
Creation component
## 2020-04-06
*
Initialisation and reworking on the different components, files were deleted and modified
## 2020-04-27 & 2020-04-28
*
Routing between the already existing components done
*
Installation of the RxJS extension for the use of
`Observables`
in the application
*
Creation of the services folder
*
Creation of the
`auth.services.ts`
and
`auth-guard.service.ts`
files which are used for authentification purposes.
## 2020-04-29
*
Installation of Compodoc
*
Creation of the documentation pertaining to the GendLoc application
GendLoc/CHANGELOG.md
0 → 120000
View file @
0abd49f7
../CHANGELOG.md
\ No newline at end of file
GendLoc/documentation/classes/Api.html
0 → 100644
View file @
0abd49f7
<!doctype html>
<html
class=
"no-js"
lang=
""
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"x-ua-compatible"
content=
"ie=edge"
>
<title>
gend-loc documentation
</title>
<meta
name=
"description"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"../images/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"../styles/style.css"
>
</head>
<body>
<div
class=
"navbar navbar-default navbar-fixed-top visible-xs"
>
<a
href=
"../"
class=
"navbar-brand"
>
gend-loc documentation
</a>
<button
type=
"button"
class=
"btn btn-default btn-menu ion-ios-menu"
id=
"btn-menu"
></button>
</div>
<div
class=
"xs-menu menu"
id=
"mobile-menu"
>
<div
id=
"book-search-input"
role=
"search"
><input
type=
"text"
placeholder=
"Type to search"
></div>
<compodoc-menu></compodoc-menu>
</div>
<div
class=
"container-fluid main"
>
<div
class=
"row main"
>
<div
class=
"hidden-xs menu"
>
<compodoc-menu
mode=
"normal"
></compodoc-menu>
</div>
<!-- START CONTENT -->
<div
class=
"content class"
>
<div
class=
"content-data"
>
<ol
class=
"breadcrumb"
>
<li>
Classes
</li>
<li>
Api
</li>
</ol>
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
>
<a
href=
"#info"
role=
"tab"
id=
"info-tab"
data-toggle=
"tab"
data-link=
"info"
>
Info
</a>
</li>
<li
>
<a
href=
"#source"
role=
"tab"
id=
"source-tab"
data-toggle=
"tab"
data-link=
"source"
>
Source
</a>
</li>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-pane fade active in"
id=
"c-info"
>
<p
class=
"comment"
>
<h3>
File
</h3>
</p>
<p
class=
"comment"
>
<code>
src/app/pghm-api/api/api.interface.ts
</code>
</p>
<p
class=
"comment"
>
<h3>
Example
</h3>
</p>
<div
class=
"io-description"
>
</div>
<section>
<h3
id=
"index"
>
Index
</h3>
<table
class=
"table table-sm table-bordered index-table"
>
<tbody>
<tr>
<td
class=
"col-md-4"
>
<h6><b>
Properties
</b></h6>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<ul
class=
"index-list"
>
<li>
<span
class=
"modifier"
>
Protected
</span>
<a
href=
"#baseUrl"
>
baseUrl
</a>
</li>
<li>
<span
class=
"modifier"
>
Protected
</span>
<a
href=
"#defaultHeaders"
>
defaultHeaders
</a>
</li>
</ul>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<h6><b>
Methods
</b></h6>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<ul
class=
"index-list"
>
<li>
<span
class=
"modifier"
>
Protected
</span>
<span
class=
"modifier"
>
Async
</span>
<a
href=
"#authHeader"
>
authHeader
</a>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h3
id=
"constructor"
>
Constructor
</h3>
<table
class=
"table table-sm table-bordered"
>
<tbody>
<tr>
<td
class=
"col-md-4"
>
<code>
constructor(http:
<a
href=
"https://angular.io/api/common/http/HttpClient"
target=
"_blank"
>
HttpClient
</a>
, authGuard:
<a
href=
"../guards/AuthGuard.html"
>
AuthGuard
</a>
)
</code>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-line"
>
Defined in
<a
href=
""
data-line=
"48"
class=
"link-to-prism"
>
src/app/pghm-api/api/api.interface.ts:48
</a></div>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div>
<b>
Parameters :
</b>
<table
class=
"params"
>
<thead>
<tr>
<td>
Name
</td>
<td>
Type
</td>
<td>
Optional
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
http
</td>
<td>
<code><a
href=
"https://angular.io/api/common/http/HttpClient"
target=
"_blank"
>
HttpClient
</a></code>
</td>
<td>
No
</td>
</tr>
<tr>
<td>
authGuard
</td>
<td>
<code><a
href=
"../guards/AuthGuard.html"
target=
"_self"
>
AuthGuard
</a></code>
</td>
<td>
No
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h3
id=
"inputs"
>
Properties
</h3>
<table
class=
"table table-sm table-bordered"
>
<tbody>
<tr>
<td
class=
"col-md-4"
>
<a
name=
"baseUrl"
></a>
<span
class=
"name"
>
<b>
<span
class=
"modifier"
>
Protected
</span>
baseUrl
</b>
<a
href=
"#baseUrl"
><span
class=
"icon ion-ios-link"
></span></a>
</span>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<i>
Type :
</i>
<code><a
href=
"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string"
target=
"_blank"
>
string
</a></code>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<i>
Default value :
</i><code>
environment.pghmApi
</code>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-line"
>
Defined in
<a
href=
""
data-line=
"44"
class=
"link-to-prism"
>
src/app/pghm-api/api/api.interface.ts:44
</a></div>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-description"
><p>
Base url of the API. Ex:
<a
href=
"https://localhost:8000"
>
https://localhost:8000
</a>
</p>
</div>
</td>
</tr>
</tbody>
</table>
<table
class=
"table table-sm table-bordered"
>
<tbody>
<tr>
<td
class=
"col-md-4"
>
<a
name=
"defaultHeaders"
></a>
<span
class=
"name"
>
<b>
<span
class=
"modifier"
>
Protected
</span>
defaultHeaders
</b>
<a
href=
"#defaultHeaders"
><span
class=
"icon ion-ios-link"
></span></a>
</span>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<i>
Type :
</i>
<code><a
href=
"https://angular.io/api/common/http/HttpHeaders"
target=
"_blank"
>
HttpHeaders
</a></code>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-line"
>
Defined in
<a
href=
""
data-line=
"48"
class=
"link-to-prism"
>
src/app/pghm-api/api/api.interface.ts:48
</a></div>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-description"
><p>
The default HTTP header to use.
</p>
</div>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h3
id=
"methods"
>
Methods
</h3>
<table
class=
"table table-sm table-bordered"
>
<tbody>
<tr>
<td
class=
"col-md-4"
>
<a
name=
"authHeader"
></a>
<span
class=
"name"
>
<b>
<span
class=
"modifier"
>
Protected
</span>
<span
class=
"modifier"
>
Async
</span>
authHeader
</b>
<a
href=
"#authHeader"
><span
class=
"icon ion-ios-link"
></span></a>
</span>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<span
class=
"modifier-icon icon ion-ios-reset"
></span>
<code>
authHeader()
</code>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-line"
>
Defined in
<a
href=
""
data-line=
"60"
class=
"link-to-prism"
>
src/app/pghm-api/api/api.interface.ts:60
</a></div>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-description"
><p>
This method aims to get the JWT of the user and add it into the header
'
s request.
With out this JWT the user couldn
'
t use the API
</p>
</div>
<div
class=
"io-description"
>
<b>
Returns :
</b>
<code>
Promise
<
void
>
</code>
</div>
</td>
</tr>
</tbody>
</table>
</section>
</div>
<div
class=
"tab-pane fade tab-source-code"
id=
"c-source"
>
<pre
class=
"line-numbers compodoc-sourcecode"
><code
class=
"language-typescript"
>
import { HttpClient, HttpHeaders } from
'
@angular/common/http
'
;
import { AuthGuard } from
'
src/app/services/auth-guard.service
'
;
import { environment } from
'
src/environments/environment
'
;
/**
* IApiService defines the behavior of an API client
*/
export interface IApi {
/**
* Returns all registered any-type elements
* @param headers HttpHeaders a custom HTTP header
*/
all(headers?: HttpHeaders) : any ;
/**
* Returns one any-type element maching with selector
* @param selector The element (unique) which be used for filtering such as id.
* @param headers HttpHeaders a custom HTTP header
*/
one(selector: any, headers? : HttpHeaders) : any ;
/**
* Saves any update to an existing element or adds this element to the database.
* @param elem Element to save
* @param headers HttpHeaders a custom HTTP header
*/
save(elem: any, headers? : HttpHeaders) : any;
/**
* Removes an element
* @param elem Element to remove
* @param headers HttpHeaders a custom HTTP header
*/
remove(elem: any, headers? : HttpHeaders) : boolean ;
}
/**
* @class This abstract contains the properties common to different clients
*/
export abstract class Api{
/**
* Base url of the API. Ex: https://localhost:8000
*/
protected baseUrl : string
=
environment.pghmApi;
/**
* The default HTTP header to use.
*/
protected defaultHeaders : HttpHeaders;
constructor(protected http: HttpClient, protected authGuard : AuthGuard) {
this.defaultHeaders
=
new HttpHeaders({
'
Content-Type
'
:
'
application/json
'
,
});
}
/**
* This method aims to get the JWT of the user and add it into the header
'
s request.
* With out this JWT the user couldn
'
t use the API
*/
protected async authHeader() : Promise
<
void
>
{
this.defaultHeaders
=
this.defaultHeaders.set(
'
Authorization
'
,
'
Bearer
'
+ await this.authGuard.getToken());
}
}
</code></pre>
</div>
</div>
</div><div
class=
"search-results"
>
<div
class=
"has-results"
>
<h1
class=
"search-results-title"
><span
class=
'search-results-count'
></span>
result-matching "
<span
class=
'search-query'
></span>
"
</h1>
<ul
class=
"search-results-list"
></ul>
</div>
<div
class=
"no-results"
>
<h1
class=
"search-results-title"
>
No results matching "
<span
class=
'search-query'
></span>
"
</h1>
</div>
</div>
</div>
<!-- END CONTENT -->
</div>
</div>
<script>
var
COMPODOC_CURRENT_PAGE_DEPTH
=
1
;
var
COMPODOC_CURRENT_PAGE_CONTEXT
=
'
class
'
;
var
COMPODOC_CURRENT_PAGE_URL
=
'
Api.html
'
;
var
MAX_SEARCH_RESULTS
=
15
;
</script>
<script
src=
"../js/libs/custom-elements.min.js"
></script>
<script
src=
"../js/libs/lit-html.js"
></script>
<!-- Required to polyfill modern browsers as code is ES5 for IE... -->
<script
src=
"../js/libs/custom-elements-es5-adapter.js"
charset=
"utf-8"
defer
></script>
<script
src=
"../js/menu-wc.js"
defer
></script>
<script
src=
"../js/libs/bootstrap-native.js"
></script>
<script
src=
"../js/libs/es6-shim.min.js"
></script>
<script
src=
"../js/libs/EventDispatcher.js"
></script>
<script
src=
"../js/libs/promise.min.js"
></script>
<script
src=
"../js/libs/zepto.min.js"
></script>
<script
src=
"../js/compodoc.js"
></script>
<script
src=
"../js/tabs.js"
></script>
<script
src=
"../js/menu.js"
></script>
<script
src=
"../js/libs/clipboard.min.js"
></script>
<script
src=
"../js/libs/prism.js"
></script>
<script
src=
"../js/sourceCode.js"
></script>
<script
src=
"../js/search/search.js"
></script>
<script
src=
"../js/search/lunr.min.js"
></script>
<script
src=
"../js/search/search-lunr.js"
></script>
<script
src=
"../js/search/search_index.js"
></script>
<script
src=
"../js/lazy-load-graphs.js"
></script>
</body>
</html>
GendLoc/documentation/classes/ApiGeoJSON.html
0 → 100644
View file @
0abd49f7
This diff is collapsed.
Click to expand it.
GendLoc/documentation/classes/ApiService.html
View file @
0abd49f7
This diff is collapsed.
Click to expand it.
GendLoc/documentation/classes/Service.html
0 → 100644
View file @
0abd49f7
This diff is collapsed.
Click to expand it.
GendLoc/documentation/classes/Station.html
0 → 100644
View file @
0abd49f7
<!doctype html>
<html
class=
"no-js"
lang=
""
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"x-ua-compatible"
content=
"ie=edge"
>
<title>
gend-loc documentation
</title>
<meta
name=
"description"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"../images/favicon.ico"
>
<link
rel=
"stylesheet"
href=
"../styles/style.css"
>
</head>
<body>
<div
class=
"navbar navbar-default navbar-fixed-top visible-xs"
>
<a
href=
"../"
class=
"navbar-brand"
>
gend-loc documentation
</a>
<button
type=
"button"
class=
"btn btn-default btn-menu ion-ios-menu"
id=
"btn-menu"
></button>
</div>
<div
class=
"xs-menu menu"
id=
"mobile-menu"
>
<div
id=
"book-search-input"
role=
"search"
><input
type=
"text"
placeholder=
"Type to search"
></div>
<compodoc-menu></compodoc-menu>
</div>
<div
class=
"container-fluid main"
>
<div
class=
"row main"
>
<div
class=
"hidden-xs menu"
>
<compodoc-menu
mode=
"normal"
></compodoc-menu>
</div>
<!-- START CONTENT -->
<div
class=
"content class"
>
<div
class=
"content-data"
>
<ol
class=
"breadcrumb"
>
<li>
Classes
</li>
<li>
Station
</li>
</ol>
<ul
class=
"nav nav-tabs"
role=
"tablist"
>
<li
class=
"active"
>
<a
href=
"#info"
role=
"tab"
id=
"info-tab"
data-toggle=
"tab"
data-link=
"info"
>
Info
</a>
</li>
<li
>
<a
href=
"#source"
role=
"tab"
id=
"source-tab"
data-toggle=
"tab"
data-link=
"source"
>
Source
</a>
</li>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-pane fade active in"
id=
"c-info"
>
<p
class=
"comment"
>
<h3>
File
</h3>
</p>
<p
class=
"comment"
>
<code>
src/app/pghm-api/api/models/station.ts
</code>
</p>
<p
class=
"comment"
>
<h3>
Example
</h3>
</p>
<div
class=
"io-description"
>
</div>
<section>
<h3
id=
"index"
>
Index
</h3>
<table
class=
"table table-sm table-bordered index-table"
>
<tbody>
<tr>
<td
class=
"col-md-4"
>
<h6><b>
Properties
</b></h6>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<ul
class=
"index-list"
>
<li>
<a
href=
"#dept"
>
dept
</a>
</li>
<li>
<a
href=
"#location"
>
location
</a>
</li>
<li>
<a
href=
"#name"
>
name
</a>
</li>
<li>
<a
href=
"#webcams"
>
webcams
</a>
</li>
</ul>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<h6><b>
Methods
</b></h6>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<ul
class=
"index-list"
>
<li>
<span
class=
"modifier"
>
Public
</span>
<a
href=
"#getWebcam"
>
getWebcam
</a>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<h3
id=
"constructor"
>
Constructor
</h3>
<table
class=
"table table-sm table-bordered"
>
<tbody>
<tr>
<td
class=
"col-md-4"
>
<code>
constructor(contract:
<a
href=
"../interfaces/IStation.html"
>
IStation
</a>
)
</code>
</td>
</tr>
<tr>
<td
class=
"col-md-4"
>
<div
class=
"io-line"
>
Defined in
<a
href=
""
data-line=
"27"
class=
"link-to-prism"
>
src/app/pghm-api/api/models/station.ts:27
</a></div>