[ADF-487] added discovery information to about component (#2102)

* [ADF-487] - added discovery service to core

* [ADF-487]- added activiti about call

* [ADF-487] added discovery info into about component

* [ADF-487] removed wrong console log

* [ADF-487] fixed problem on index
This commit is contained in:
Vito
2017-07-19 08:05:07 -07:00
committed by Eugenio Romano
parent 45ee5eebec
commit 7ea82c0856
7 changed files with 484 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
.about-container {
padding: 10px;
}
.adf-table-version {
width: 60%;
text-align: center;
}

View File

@@ -10,6 +10,93 @@
Alfresco Content Services URL: <strong>{{ ecmHost }}</strong>
</div>
<h3>Product Versions</h3>
<div *ngIf="bpmVersion">
<h3>BPM</h3>
<label> Edition </label>
<p> {{ bpmVersion.edition }}</p>
<table border="2" class="adf-table-version">
<tr>
<th>Major Version</th>
<th>Revision Version</th>
<th>Minor Version</th>
<th>Type</th>
</tr>
<tr style="align-items: center">
<td>{{ bpmVersion.majorVersion }}</td>
<td>{{ bpmVersion.revisionVersion }}</td>
<td>{{ bpmVersion.minorVersion }}</td>
<td>{{ bpmVersion.type }}</td>
</tr>
</table>
</div>
<div *ngIf="ecmVersion">
<h3>ECM</h3>
<label> Edition </label>
<p> {{ ecmVersion.edition }}</p>
<label> Version </label>
<p> {{ ecmVersion.version.display }}</p>
<h4>License</h4>
<table border="2" class="adf-table-version">
<tr>
<th> Issued At </th>
<th> Expires At </th>
<th> Remaining Days </th>
<th> Holder </th>
<th> Mode </th>
<th> Is Cluster Enabled </th>
<th> Is Cryptodoc Enable </th>
</tr>
<tr style="align-items: center">
<td>{{ ecmVersion.license.issuedAt }}</td>
<td>{{ ecmVersion.license.expiresAt }}</td>
<td>{{ ecmVersion.license.remainingDays }}</td>
<td>{{ ecmVersion.license.holder }}</td>
<td>{{ ecmVersion.license.mode }}</td>
<td>{{ ecmVersion.license.isClusterEnabled }}</td>
<td>{{ ecmVersion.license.isCryptodocEnabled }}</td>
</tr>
</table>
<h4> Status</h4>
<table border="2" class="adf-table-version">
<tr>
<th> ReadOnly </th>
<th> Is Audit Enable </th>
<th> Is quick shared enable </th>
<th> Thumbnail Generation </th>
</tr>
<tr style="align-items: center">
<td>{{ ecmVersion.status.isReadOnly }}</td>
<td>{{ ecmVersion.status.isAuditEnabled }}</td>
<td>{{ ecmVersion.status.isQuickShareEnabled }}</td>
<td>{{ ecmVersion.status.isThumbnailGenerationEnabled }}</td>
</tr>
</table>
<h4>Modules</h4>
<table border="2" class="adf-table-version">
<tr>
<th> ID </th>
<th> Title </th>
<th> Description </th>
<th> Version </th>
<th> Install Date </th>
<th> Install State </th>
<th> Version Minor </th>
<th> Version Max </th>
</tr>
<tr *ngFor="let module of ecmVersion.modules" style="align-items: center">
<td>{{ module.id }}</td>
<td>{{ module.title }}</td>
<td>{{ module.description }}</td>
<td>{{ module.version }}</td>
<td>{{ module.installDate }}</td>
<td>{{ module.installState }}</td>
<td>{{ module.versionMin }}</td>
<td>{{ module.versionMax }}</td>
</tr>
</table>
</div>
<div *ngIf="githubUrlCommitAlpha">
<h3>Source code</h3>
<small>You are running the project based on the following commit:</small>

View File

@@ -17,7 +17,7 @@
import { Component, OnInit } from '@angular/core';
import { Http } from '@angular/http';
import { AppConfigService, LogService } from 'ng2-alfresco-core';
import { AlfrescoAuthenticationService, AppConfigService, BpmProductVersionModel, DiscoveryApiService, EcmProductVersionModel, LogService } from 'ng2-alfresco-core';
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
@Component({
@@ -42,10 +42,21 @@ export class AboutComponent implements OnInit {
constructor(private http: Http,
private appConfig: AppConfigService,
private logService: LogService) {
private authService: AlfrescoAuthenticationService,
private logService: LogService,
private discovery: DiscoveryApiService) {
}
ngOnInit() {
this.discovery.getEcmProductInfo().subscribe((ecmVers) => {
this.ecmVersion = ecmVers;
});
this.discovery.getBpmProductInfo().subscribe((bpmVers) => {
this.bpmVersion = bpmVers;
});
this.http.get('/versions.json').subscribe(response => {
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)');