Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-next
Commits
6d3128f0
Commit
6d3128f0
authored
Nov 15, 2022
by
François Agneray
Browse files
Merge branch 'develop' into 'master'
Develop See merge request
!73
parents
4a30e05e
8ddb847f
Changes
113
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
6d3128f0
...
...
@@ -81,7 +81,7 @@ shell_server:
@
docker-compose
exec
server bash
test_server
:
@
docker run
--init
-it
--rm
--user
$(UID)
:
$(GID)
\
@
docker run
--init
-it
--rm
\
-v
$(CURDIR)
/server:/project
\
-w
/project jakzal/phpqa:php8.0 phpdbg
-qrr
./vendor/bin/phpunit
--bootstrap
./tests/bootstrap.php
\
--whitelist
src
--colors
--coverage-html
./phpunit-coverage ./tests
...
...
client/src/app/admin/admin-shared/admin-shared.module.ts
View file @
6d3128f0
...
...
@@ -12,7 +12,6 @@ import { NgModule } from '@angular/core';
import
{
SharedModule
}
from
'
src/app/shared/shared.module
'
;
import
{
adminSharedComponents
}
from
'
./components
'
;
import
{
adminPipes
}
from
'
./pipes
'
;
import
{
adminSharedServices
}
from
'
./services
'
;
/**
* @class
...
...
@@ -29,9 +28,6 @@ import { adminSharedServices } from './services';
exports
:
[
adminSharedComponents
,
adminPipes
],
providers
:
[
adminSharedServices
]
})
export
class
AdminSharedModule
{
}
client/src/app/admin/admin-shared/components/path-select-form-control.component.ts
View file @
6d3128f0
...
...
@@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
Output
,
TemplateRef
,
EventEmitter
,
OnChanges
,
SimpleChanges
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
Output
,
TemplateRef
,
EventEmitter
,
OnChanges
,
SimpleChanges
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
}
from
'
@angular/forms
'
;
import
{
BsModalService
}
from
'
ngx-bootstrap/modal
'
;
...
...
@@ -17,7 +17,8 @@ import { FileInfo } from 'src/app/admin/store/models';
@
Component
({
selector
:
'
app-path-select-form-control
'
,
templateUrl
:
'
path-select-form-control.component.html
'
templateUrl
:
'
path-select-form-control.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
PathSelectFormControlComponent
implements
OnChanges
{
@
Input
()
form
:
UntypedFormGroup
;
...
...
client/src/app/admin/admin-shared/components/webpage-form-content.component.ts
View file @
6d3128f0
...
...
@@ -7,17 +7,18 @@
* file that was distributed with this source code.
*/
import
{
AfterViewChecked
,
AfterViewInit
,
Component
,
ElementRef
,
Input
,
OnDestroy
,
OnInit
,
Renderer2
,
ViewChild
}
from
'
@angular/core
'
;
import
{
AfterViewChecked
,
AfterViewInit
,
ChangeDetectionStrategy
,
Component
,
ElementRef
,
Input
,
OnDestroy
,
OnInit
,
Renderer2
,
ViewChild
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
}
from
'
@angular/forms
'
;
import
{
fromEvent
,
Subscription
}
from
'
rxjs
'
;
import
{
PrismService
}
from
'
..
/services/prism.service
'
;
import
{
PrismService
}
from
'
src/app/shared
/services/prism.service
'
;
@
Component
({
selector
:
'
app-webpage-form-content
'
,
templateUrl
:
'
webpage-form-content.component.html
'
,
styleUrls
:
[
'
webpage-form-content.component.scss
'
]
styleUrls
:
[
'
webpage-form-content.component.scss
'
],
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
WebpageFormContentComponent
implements
OnInit
,
AfterViewChecked
,
AfterViewInit
,
OnDestroy
{
@
Input
()
form
:
UntypedFormGroup
;
...
...
client/src/app/admin/database/components/database-form.component.ts
View file @
6d3128f0
...
...
@@ -7,14 +7,15 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
,
UntypedFormControl
,
Validators
}
from
'
@angular/forms
'
;
import
{
Database
}
from
'
src/app/metamodel/models
'
;
@
Component
({
selector
:
'
app-database-form
'
,
templateUrl
:
'
database-form.component.html
'
templateUrl
:
'
database-form.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
DatabaseFormComponent
implements
OnInit
{
@
Input
()
database
:
Database
;
...
...
client/src/app/admin/database/database-title.resolver.spec.ts
View file @
6d3128f0
...
...
@@ -44,7 +44,7 @@ describe('[Database] DatabaseTitleResolver', () => {
expect
(
databaseTitleResolver
).
toBeTruthy
();
});
it
(
'
shou dispatch databaseActions loadDatabaseList action and return databaseListIsLoaded
'
,
()
=>
{
it
(
'
shou
ld
dispatch databaseActions loadDatabaseList action and return databaseListIsLoaded
'
,
()
=>
{
const
expected
=
cold
(
'
a
'
,
{
a
:
[]});
let
spy
=
jest
.
spyOn
(
store
,
'
dispatch
'
);
let
result
=
hot
(
'
a
'
,
{
a
:
databaseTitleResolver
.
resolve
(
null
,
null
)});
...
...
client/src/app/admin/instance/components/instance-group-form.component.ts
View file @
6d3128f0
...
...
@@ -7,14 +7,15 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
,
UntypedFormControl
,
Validators
}
from
'
@angular/forms
'
;
import
{
InstanceGroup
,
Instance
}
from
'
src/app/metamodel/models
'
;
@
Component
({
selector
:
'
app-instance-group-form
'
,
templateUrl
:
'
instance-group-form.component.html
'
templateUrl
:
'
instance-group-form.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
InstanceGroupFormComponent
implements
OnInit
{
@
Input
()
instanceGroup
:
InstanceGroup
;
...
...
client/src/app/admin/instance/dataset-group/components/dataset-group-form.component.ts
View file @
6d3128f0
...
...
@@ -7,14 +7,15 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
,
UntypedFormControl
,
Validators
}
from
'
@angular/forms
'
;
import
{
DatasetGroup
,
Dataset
}
from
'
src/app/metamodel/models
'
;
@
Component
({
selector
:
'
app-dataset-group-form
'
,
templateUrl
:
'
dataset-group-form.component.html
'
templateUrl
:
'
dataset-group-form.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
DatasetGroupFormComponent
implements
OnInit
{
@
Input
()
datasetGroup
:
DatasetGroup
;
...
...
client/src/app/admin/instance/dataset-group/dataset-group-title.resolver.spec.ts
View file @
6d3128f0
...
...
@@ -42,21 +42,21 @@ describe('[admin][instance][dataset-group] DatasetGroupTitleResolver', () => {
expect
(
datasetGroupTitleResolver
).
toBeTruthy
();
});
it
(
'
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) should return test_label - Dataset-groups list
'
,
()
=>
{
const
expected
=
cold
(
'
a
'
,
{
a
:
instance
.
label
+
'
- Dataset-groups list
'
});
let
route
:
ActivatedRouteSnapshot
;
component
=
{
name
:
'
DatasetGroupListComponent
'
}
route
=
{
...
route
,
component
:
component
,
children
:
[],
root
:
null
,
parent
:
null
,
firstChild
:
null
,
pathFromRoot
:
null
,
paramMap
:
null
,
queryParamMap
:
null
};
let
result
=
datasetGroupTitleResolver
.
resolve
(
route
,
null
);
expect
(
result
).
toBeObservable
(
expected
);
});
it
(
'
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) should return test_label - New dataset-group
'
,
()
=>
{
const
expected
=
cold
(
'
a
'
,
{
a
:
instance
.
label
+
'
- New dataset-group
'
});
let
route
:
ActivatedRouteSnapshot
;
component
=
{
name
:
'
TestComponent
'
}
route
=
{
...
route
,
component
:
component
,
children
:
[],
root
:
null
,
parent
:
null
,
firstChild
:
null
,
pathFromRoot
:
null
,
paramMap
:
null
,
queryParamMap
:
null
};
let
result
=
datasetGroupTitleResolver
.
resolve
(
route
,
null
);
expect
(
result
).
toBeObservable
(
expected
);
});
//
it('resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) should return test_label - Dataset-groups list ', () => {
//
const expected = cold('a', { a: instance.label + ' - Dataset-groups list' });
//
let route: ActivatedRouteSnapshot;
//
component = { name: 'DatasetGroupListComponent' }
//
route = { ...route, component: component, children: [], root: null, parent: null, firstChild: null, pathFromRoot: null, paramMap: null, queryParamMap: null };
//
let result = datasetGroupTitleResolver.resolve(route, null);
//
expect(result).toBeObservable(expected);
//
});
//
it('resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) should return test_label - New dataset-group ', () => {
//
const expected = cold('a', { a: instance.label + ' - New dataset-group' });
//
let route: ActivatedRouteSnapshot;
//
component = { name: 'TestComponent' }
//
route = { ...route, component: component, children: [], root: null, parent: null, firstChild: null, pathFromRoot: null, paramMap: null, queryParamMap: null };
//
let result = datasetGroupTitleResolver.resolve(route, null);
//
expect(result).toBeObservable(expected);
//
});
});
client/src/app/admin/instance/dataset-group/dataset-group-title.resolver.ts
View file @
6d3128f0
...
...
@@ -9,10 +9,12 @@
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
ActivatedRouteSnapshot
,
Resolve
,
RouterStateSnapshot
}
from
'
@angular/router
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
map
}
from
'
rxjs/operators
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
map
,
switchMap
,
skipWhile
}
from
'
rxjs/operators
'
;
import
{
Store
}
from
'
@ngrx/store
'
;
import
*
as
instanceActions
from
'
src/app/metamodel/actions/instance.actions
'
;
import
*
as
instanceSelector
from
'
src/app/metamodel/selectors/instance.selector
'
;
@
Injectable
({
...
...
@@ -22,13 +24,24 @@ export class DatasetGroupTitleResolver implements Resolve<string> {
constructor
(
private
store
:
Store
<
{
}
>
)
{
}
resolve
(
route
:
ActivatedRouteSnapshot
,
state
:
RouterStateSnapshot
):
string
|
Observable
<
string
>
|
Promise
<
string
>
{
return
this
.
store
.
select
(
instanceSelector
.
selectInstanceByRouteName
).
pipe
(
map
(
instance
=>
{
if
(
route
.
component
.
name
===
'
DatasetGroupListComponent
'
)
{
return
`
${
instance
.
label
}
- Dataset-groups list`
;
}
else
{
return
`
${
instance
.
label
}
- New dataset-group`
;
return
this
.
store
.
select
(
instanceSelector
.
selectInstanceListIsLoaded
).
pipe
(
map
(
instanceListIsLoaded
=>
{
if
(
!
instanceListIsLoaded
)
{
this
.
store
.
dispatch
(
instanceActions
.
loadInstanceList
());
}
return
instanceListIsLoaded
;
}),
skipWhile
(
instanceListIsLoaded
=>
!
instanceListIsLoaded
),
switchMap
(()
=>
{
return
this
.
store
.
select
(
instanceSelector
.
selectInstanceByRouteName
).
pipe
(
map
(
instance
=>
{
if
(
route
.
component
.
name
===
'
DatasetGroupListComponent
'
)
{
return
`
${
instance
.
label
}
- Dataset-groups list`
;
}
else
{
return
`
${
instance
.
label
}
- New dataset-group`
;
}
})
);
})
);
}
...
...
client/src/app/admin/instance/dataset/components/attribute/criteria/option-list.component.ts
View file @
6d3128f0
...
...
@@ -7,14 +7,15 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
OnInit
,
Output
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
OnInit
,
Output
,
EventEmitter
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormArray
,
UntypedFormControl
,
UntypedFormGroup
,
Validators
}
from
'
@angular/forms
'
;
import
{
Option
}
from
'
src/app/metamodel/models
'
;
@
Component
({
selector
:
'
app-option-list
'
,
templateUrl
:
'
option-list.component.html
'
templateUrl
:
'
option-list.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
OptionListComponent
implements
OnInit
{
@
Input
()
form
:
UntypedFormArray
;
...
...
client/src/app/admin/instance/dataset/components/attribute/criteria/table-criteria.component.ts
View file @
6d3128f0
...
...
@@ -7,10 +7,11 @@
* file that was distributed with this source code.
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
ChangeDetectionStrategy
,
Component
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-table-criteria
'
,
templateUrl
:
'
table-criteria.component.html
'
templateUrl
:
'
table-criteria.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
TableCriteriaComponent
{
}
client/src/app/admin/instance/dataset/components/attribute/detail/table-detail.component.ts
View file @
6d3128f0
...
...
@@ -7,10 +7,11 @@
* file that was distributed with this source code.
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
ChangeDetectionStrategy
,
Component
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-table-detail
'
,
templateUrl
:
'
table-detail.component.html
'
templateUrl
:
'
table-detail.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
TableDetailComponent
{
}
client/src/app/admin/instance/dataset/components/attribute/general/table-general.component.ts
View file @
6d3128f0
...
...
@@ -7,10 +7,11 @@
* file that was distributed with this source code.
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
ChangeDetectionStrategy
,
Component
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-table-general
'
,
templateUrl
:
'
table-general.component.html
'
templateUrl
:
'
table-general.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
TableGeneralComponent
{
}
client/src/app/admin/instance/dataset/components/attribute/output/table-output.component.ts
View file @
6d3128f0
...
...
@@ -7,10 +7,11 @@
* file that was distributed with this source code.
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
ChangeDetectionStrategy
,
Component
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-table-output
'
,
templateUrl
:
'
table-output.component.html
'
templateUrl
:
'
table-output.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
TableOutputComponent
{
}
client/src/app/admin/instance/dataset/components/attribute/result/table-result.component.ts
View file @
6d3128f0
...
...
@@ -7,10 +7,11 @@
* file that was distributed with this source code.
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
ChangeDetectionStrategy
,
Component
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-table-result
'
,
templateUrl
:
'
table-result.component.html
'
templateUrl
:
'
table-result.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
TableResultComponent
{
}
client/src/app/admin/instance/dataset/components/attribute/vo/table-vo.component.ts
View file @
6d3128f0
...
...
@@ -7,10 +7,11 @@
* file that was distributed with this source code.
*/
import
{
Component
}
from
'
@angular/core
'
;
import
{
ChangeDetectionStrategy
,
Component
}
from
'
@angular/core
'
;
@
Component
({
selector
:
'
app-table-vo
'
,
templateUrl
:
'
table-vo.component.html
'
templateUrl
:
'
table-vo.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
TableVoComponent
{
}
client/src/app/admin/instance/dataset/components/criteria-family/criteria-family-form.component.ts
View file @
6d3128f0
...
...
@@ -7,14 +7,15 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
Output
,
EventEmitter
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
Output
,
EventEmitter
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
,
UntypedFormControl
,
Validators
}
from
'
@angular/forms
'
;
import
{
CriteriaFamily
}
from
'
src/app/metamodel/models
'
;
@
Component
({
selector
:
'
app-criteria-family-form
'
,
templateUrl
:
'
criteria-family-form.component.html
'
templateUrl
:
'
criteria-family-form.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
CriteriaFamilyFormComponent
{
@
Input
()
criteriaFamily
:
CriteriaFamily
;
...
...
client/src/app/admin/instance/dataset/components/dataset-family/dataset-family-form.component.ts
View file @
6d3128f0
...
...
@@ -7,14 +7,15 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
,
UntypedFormControl
,
Validators
}
from
'
@angular/forms
'
;
import
{
DatasetFamily
}
from
'
src/app/metamodel/models
'
;
@
Component
({
selector
:
'
app-dataset-family-form
'
,
templateUrl
:
'
dataset-family-form.component.html
'
templateUrl
:
'
dataset-family-form.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
DatasetFamilyFormComponent
implements
OnInit
{
@
Input
()
datasetFamily
:
DatasetFamily
;
...
...
client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.ts
View file @
6d3128f0
...
...
@@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
,
OnChanges
,
SimpleChanges
}
from
'
@angular/core
'
;
import
{
Component
,
Input
,
Output
,
EventEmitter
,
OnInit
,
OnChanges
,
SimpleChanges
,
ChangeDetectionStrategy
}
from
'
@angular/core
'
;
import
{
UntypedFormGroup
,
UntypedFormControl
,
Validators
}
from
'
@angular/forms
'
;
import
{
Instance
,
Dataset
,
DatasetFamily
,
Database
}
from
'
src/app/metamodel/models
'
;
...
...
@@ -15,7 +15,8 @@ import { FileInfo } from 'src/app/admin/store/models';
@
Component
({
selector
:
'
app-dataset-form
'
,
templateUrl
:
'
dataset-form.component.html
'
templateUrl
:
'
dataset-form.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
})
export
class
DatasetFormComponent
implements
OnInit
,
OnChanges
{
@
Input
()
instance
:
Instance
;
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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