Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit c1ef3b2b authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Pull request #48: UI domain administration update, fix pom schema location

Merge in EDELIVERY/smp from EDELIVERY-11646-smp-ui-improvements to development

* commit '8a7b3681':
  PR Updates
  UI domain administration update, fix pom schema location
parents 5690ec92 8a7b3681
No related branches found
No related tags found
No related merge requests found
Pipeline #120218 passed with warnings
Showing
with 89 additions and 68 deletions
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
......
......@@ -13,7 +13,7 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>eu.europa.ec.edelivery</groupId>
<artifactId>smp-modules</artifactId>
......@@ -113,8 +113,6 @@
<!-- plugins -->
<plugin.frontend-maven-plugin.version>1.15.0</plugin.frontend-maven-plugin.version>
<plugin.exec-maven-plugin.version>1.6.0</plugin.exec-maven-plugin.version>
<surefire.jvm.args></surefire.jvm.args>
<failsafe.jvm.args></failsafe.jvm.args>
<sonar.jacoco.remotePort>${jacocoRemotePort}</sonar.jacoco.remotePort>
<sonar.jacoco.remoteAddress>${jacocoRemoteAddress}</sonar.jacoco.remoteAddress>
......@@ -778,6 +776,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<!-- build directory for test logging -->
<buildDirectory>${project.build.directory}</buildDirectory>
</systemPropertyVariables>
<!-- make sure methods are always run in same order -->
<runOrder>alphabetical</runOrder>
<argLine>-ea ${argLine}</argLine>
......@@ -787,6 +789,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<!-- build directory for test logging -->
<buildDirectory>${project.build.directory}</buildDirectory>
</systemPropertyVariables>
<!-- ... fool Sonar to show test success for both unit and integration tests together by
instructing Failsafe to store its test reports to the same directory as Surefire instead of
the default failsafe-reports.
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>smp-modules</artifactId>
<groupId>eu.europa.ec.edelivery</groupId>
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......
......@@ -7,5 +7,6 @@
'alert-error': type === 'error'}"
>
<mat-icon *ngIf="icon" style="width:50px">{{icon}}</mat-icon>
<span>{{label}}</span>
<span *ngIf="label">{{label}}</span>
<span *ngIf="htmlContent" [innerHTML]="htmlContent"></span>
</div>
import { Component, Input } from '@angular/core';
import {Component, Input} from '@angular/core';
@Component({
selector: 'smp-warning-panel',
templateUrl: './smp-warning-panel.component.html',
})
export class SmpWarningPanelComponent {
@Input() padding:boolean = true;
@Input() label:string;
@Input() icon:string;
@Input() type:string = 'warning';
@Input() padding: boolean = true;
@Input() label: string;
@Input() htmlContent: string;
@Input() icon: string;
@Input() type: string = 'warning';
}
......@@ -14,5 +14,6 @@ export interface DomainRo extends SearchTableEntity {
visibility?:VisibilityEnum;
defaultResourceTypeIdentifier?:string;
resourceDefinitions?: string[]
adminMemberCount?: number;
}
......@@ -67,6 +67,10 @@ export class MembershipPanelComponent implements BeforeLeaveGuard {
return this._domain;
}
public get membershipCount(): number {
return this.resultsLength;
}
@Input() set domain(value: DomainRo) {
this._domain = value;
if (!!value) {
......
......@@ -91,9 +91,8 @@
<tr class="mat-row" *matNoDataRow>
<td *ngIf="inputDomainFilter.value;else noDataFound" class="mat-cell" colspan="2">No data matching the filter
"{{inputDomainFilter.value}}"
</td>
<td *ngIf="inputDomainFilter.value;else noDataFound" class="mat-cell" colspan="2"
>No data matching the filter "{{inputDomainFilter.value}}"</td>
<ng-template #noDataFound>
<td class="mat-cell" colspan="2">No data</td>
</ng-template>
......
......@@ -108,7 +108,7 @@ export class AdminDomainComponent implements OnInit, OnDestroy, AfterViewInit, B
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
// currenctly MatTab has only onTabChanged which is a bit to late. Register new listener to internal
// currently MatTab has only onTabChanged which is a bit to late. Register new listener to internal
// _handleClick handler
this.registerTabClick();
}
......@@ -272,7 +272,6 @@ export class AdminDomainComponent implements OnInit, OnDestroy, AfterViewInit, B
this.registerTabClick();
}
if (this.selected == domainSelected) {
return;
}
......@@ -286,8 +285,6 @@ export class AdminDomainComponent implements OnInit, OnDestroy, AfterViewInit, B
}
});
} else {
console.log("domain selected")
this.selected = domainSelected;
}
}
......
......@@ -5,9 +5,9 @@
<smp-warning-panel *ngIf="showWarning"
icon="warning"
type="warning"
[label]="showWarningMessage"></smp-warning-panel>
[htmlContent]="showWarningMessage"></smp-warning-panel>
<mat-form-field style="width:100%">
<mat-label>Domain Code</mat-label>
<mat-label>Domain Code [{{domainForm.controls['adminMemberCount'].value}}]</mat-label>
<input matInput
id="domainCode_id" #domainCode
matTooltip="The SMP's domain code. The code must be unique and is used in HTTP header 'Domain' or URL path sequence when retrieving/creating the resource using the webservice API"
......
......@@ -86,6 +86,7 @@ export class DomainPanelComponent implements BeforeLeaveGuard {
'domainCode': new FormControl({value: '', readonly: true}, [Validators.pattern(this.domainCodePattern),
this.notInList(this.currentDomains?.map(a => a.domainCode), this._domain?.domainCode)]),
'signatureKeyAlias': new FormControl({value: '', readonly: true}),
'adminMemberCount': new FormControl({value: '', readonly: true}),
'visibility': new FormControl({value: '', readonly: true}),
'defaultResourceTypeIdentifier': new FormControl({value: '', disabled: this.isNewDomain()}),
});
......@@ -106,6 +107,7 @@ export class DomainPanelComponent implements BeforeLeaveGuard {
if (!!value) {
this.domainForm.controls['domainCode'].setValue(this._domain.domainCode);
this.domainForm.controls['signatureKeyAlias'].setValue(this._domain.signatureKeyAlias);
this.domainForm.controls['adminMemberCount'].setValue(this._domain.adminMemberCount);
this.domainForm.controls['visibility'].setValue(this._domain.visibility);
this.domainForm.controls['defaultResourceTypeIdentifier'].setValue(this._domain.defaultResourceTypeIdentifier);
this.domainForm.enable();
......@@ -115,6 +117,7 @@ export class DomainPanelComponent implements BeforeLeaveGuard {
} else {
this.domainForm.controls['domainCode'].setValue("");
this.domainForm.controls['signatureKeyAlias'].setValue("");
this.domainForm.controls['adminMemberCount'].setValue("0");
this.domainForm.controls['visibility'].setValue(VisibilityEnum.Public);
this.domainForm.controls['defaultResourceTypeIdentifier'].setValue("");
this.domainForm.disable();
......@@ -137,12 +140,26 @@ export class DomainPanelComponent implements BeforeLeaveGuard {
return this.domiSMPResourceDefinitions.filter(resType => this._domain.resourceDefinitions.includes(resType.identifier))
}
get showWarning(){
return !!this._domain?.domainId && !this.domainResourceTypes?.length
get showWarning() {
return !!this._domain?.domainId && (!this.domainResourceTypes?.length
|| !this._domain.signatureKeyAlias
|| !this._domain.adminMemberCount
|| this._domain.adminMemberCount < 1)
}
get showWarningMessage(){
return "To complete domain configuration, please select at least one resource type from the Resource Types tab";
get showWarningMessage() {
let message = "To complete domain configuration, please: <ul>";
if (!this._domain.signatureKeyAlias) {
message += "<li>select the signature key to be used for signing the domain's responses!</li>";
}
if (!this.domainResourceTypes?.length) {
message += "<li>select at least one resource type from the Resource Types tab</li>";
}
if (!this._domain.adminMemberCount || this._domain.adminMemberCount < 1) {
message += "<li>add a domain member with 'ADMIN' role from the Members tab!</li>";
}
message += "</ul>";
return message;
}
get submitButtonEnabled(): boolean {
......
......@@ -2,7 +2,7 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......
......@@ -12,7 +12,7 @@
~ See the Licence for the specific language governing permissions and limitations under the Licence.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.europa.ec.edelivery</groupId>
......
......@@ -12,7 +12,7 @@
~ See the Licence for the specific language governing permissions and limitations under the Licence.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.europa.ec.edelivery</groupId>
......
......@@ -12,7 +12,7 @@
~ See the Licence for the specific language governing permissions and limitations under the Licence.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.europa.ec.edelivery</groupId>
......
......@@ -12,7 +12,7 @@
~ See the Licence for the specific language governing permissions and limitations under the Licence.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.europa.ec.edelivery</groupId>
......
......@@ -12,7 +12,7 @@
~ See the Licence for the specific language governing permissions and limitations under the Licence.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.europa.ec.edelivery</groupId>
......
......@@ -13,7 +13,7 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.europa.ec.edelivery</groupId>
......
......@@ -11,7 +11,8 @@
~ See the Licence for the specific language governing permissions and limitations under the Licence.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.europa.ec.edelivery</groupId>
......@@ -252,41 +253,35 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<runOrder>alphabetical</runOrder>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-ddl</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- ANT Task definition
Class generates ddl scripts
1. Parameter: comma separated hibernate database dialects
2. script version
3. export scripts.-->
<java classname="eu.europa.ec.edelivery.smp.data.dao.utils.SMPSchemaGenerator" fork="true" failonerror="true">
<arg value="org.hibernate.dialect.MySQL5InnoDBDialect,org.hibernate.dialect.Oracle10gDialect" />
<arg value="${project.version}" />
<arg value="${project.basedir}/../smp-webapp/src/main/smp-setup/database-scripts" />
<!-- reference to the passed-in classpath reference -->
<classpath refid="maven.compile.classpath" />
</java>
</target>
</configuration>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-ddl</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- ANT Task definition
Class generates ddl scripts
1. Parameter: comma separated hibernate database dialects
2. script version
3. export scripts.-->
<java classname="eu.europa.ec.edelivery.smp.data.dao.utils.SMPSchemaGenerator"
fork="true" failonerror="true">
<arg value="org.hibernate.dialect.MySQL5InnoDBDialect,org.hibernate.dialect.Oracle10gDialect"/>
<arg value="${project.version}"/>
<arg value="${project.basedir}/../smp-webapp/src/main/smp-setup/database-scripts"/>
<!-- reference to the passed-in classpath reference -->
<classpath refid="maven.compile.classpath"/>
</java>
</target>
</configuration>
</execution>
</executions>
</plugin>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment