mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4382] Use adf about and make it available in prod mode (#2361)
* use adf about and make it available in prod mode * fix * Fix unit test due about page refactoring * fix review * fix * [link-adf:develop] * fix pret Co-authored-by: Maurizio Vitale <maurizio.vitale@alfresco.com>
This commit is contained in:
@@ -1,50 +1,5 @@
|
||||
<aca-page-layout>
|
||||
<aca-page-layout-content [scrollable]="true">
|
||||
<div class="main-content">
|
||||
<article>
|
||||
<adf-about-github-link [application]="'application.name' | adfAppConfig" [url]="appRepoUrl" [version]="appVersion"> </adf-about-github-link>
|
||||
</article>
|
||||
|
||||
<article>
|
||||
<adf-about-github-link [application]="'ADF'" [url]="adfRepoUrl" [version]="adfVersion"> </adf-about-github-link>
|
||||
</article>
|
||||
|
||||
<ng-container *ngIf="extensions$ | async as extensions">
|
||||
<article *ngIf="extensions.length > 0">
|
||||
<header>{{ 'APP.ABOUT.PLUGINS.TITLE' | translate }}</header>
|
||||
<app-extension-list [data]="extensions"></app-extension-list>
|
||||
</article>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="repository">
|
||||
<article>
|
||||
<header>Alfresco Content Services</header>
|
||||
<p>
|
||||
{{ 'APP.ABOUT.VERSION' | translate }} {{ repository.edition }}
|
||||
{{ repository.version.display }}
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article *ngIf="licenseEntries">
|
||||
<header>{{ 'APP.ABOUT.LICENSE.TITLE' | translate }}</header>
|
||||
<app-license-list [data]="licenseEntries"></app-license-list>
|
||||
</article>
|
||||
|
||||
<article *ngIf="statusEntries">
|
||||
<header>{{ 'APP.ABOUT.STATUS.TITLE' | translate }}</header>
|
||||
<app-status-list [data]="statusEntries"></app-status-list>
|
||||
</article>
|
||||
|
||||
<article *ngIf="repository?.modules">
|
||||
<header>{{ 'APP.ABOUT.MODULES.TITLE' | translate }}</header>
|
||||
<app-module-list [data]="repository.modules"></app-module-list>
|
||||
</article>
|
||||
</ng-container>
|
||||
|
||||
<article *ngIf="dependencyEntries">
|
||||
<header>{{ 'APP.ABOUT.PACKAGES.TITLE' | translate }}</header>
|
||||
<app-package-list [data]="dependencyEntries"></app-package-list>
|
||||
</article>
|
||||
</div>
|
||||
<adf-about [dev]="dev" [pkg]="pkg"> </adf-about>
|
||||
</aca-page-layout-content>
|
||||
</aca-page-layout>
|
||||
|
@@ -1,25 +1,4 @@
|
||||
.app-about {
|
||||
.main-content {
|
||||
padding: 10px;
|
||||
|
||||
article {
|
||||
color: var(--theme-text-color);
|
||||
padding: 25px 0 25px 0;
|
||||
|
||||
& > header {
|
||||
line-height: 24px;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
}
|
||||
|
||||
article:first-of-type {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
article:last-of-type {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
}
|
||||
adf-about {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
@@ -23,75 +23,21 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { RepositoryInfo } from '@alfresco/js-api';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared';
|
||||
import { dependencies, version, name, commit } from 'package.json';
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||
import pkg from 'package.json';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about',
|
||||
selector: 'app-about-page',
|
||||
templateUrl: './about.component.html',
|
||||
styleUrls: ['./about.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'app-about' }
|
||||
styleUrls: ['./about.component.scss']
|
||||
})
|
||||
export class AboutComponent implements OnInit {
|
||||
repository: RepositoryInfo;
|
||||
extensions$: Observable<ExtensionRef[]>;
|
||||
dependencyEntries: Array<{ name: string; version: string }>;
|
||||
statusEntries: Array<{ property: string; value: string }>;
|
||||
licenseEntries: Array<{ property: string; value: string }>;
|
||||
adfRepoUrl = 'https://github.com/Alfresco/alfresco-ng2-components/commits';
|
||||
appRepoUrl = !!commit ? `https://github.com/Alfresco/${name}/commits/${commit}` : null;
|
||||
adfVersion = '';
|
||||
appVersion = version;
|
||||
export class AboutComponent {
|
||||
pkg: any;
|
||||
dev = false;
|
||||
|
||||
constructor(private contentApi: ContentApiService, appExtensions: AppExtensionService) {
|
||||
this.extensions$ = appExtensions.references$;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.dependencyEntries = Object.keys(dependencies).map((key) => {
|
||||
if (key === '@alfresco/adf-core') {
|
||||
this.adfVersion = dependencies[key].split('-')[0];
|
||||
const adfCurrentCommit = dependencies[key].split('-')[1] || '';
|
||||
|
||||
if (adfCurrentCommit) {
|
||||
this.adfRepoUrl = this.adfRepoUrl.concat('/', adfCurrentCommit);
|
||||
} else {
|
||||
this.adfRepoUrl = null;
|
||||
}
|
||||
}
|
||||
return {
|
||||
name: key,
|
||||
version: dependencies[key]
|
||||
};
|
||||
});
|
||||
|
||||
this.contentApi
|
||||
.getRepositoryInformation()
|
||||
.pipe(map((node) => node.entry.repository))
|
||||
.subscribe((repository) => {
|
||||
this.repository = repository;
|
||||
|
||||
this.statusEntries = Object.keys(repository.status).map((key) => {
|
||||
return {
|
||||
property: key,
|
||||
value: repository.status[key]
|
||||
};
|
||||
});
|
||||
|
||||
if (repository.license) {
|
||||
this.licenseEntries = Object.keys(repository.license).map((key) => {
|
||||
return {
|
||||
property: key,
|
||||
value: repository.license[key]
|
||||
};
|
||||
});
|
||||
}
|
||||
});
|
||||
constructor(@Inject(DEV_MODE_TOKEN) devMode) {
|
||||
this.dev = !devMode;
|
||||
this.pkg = pkg;
|
||||
}
|
||||
}
|
||||
|
@@ -23,23 +23,18 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { AboutComponent } from './about.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { SharedModule, PageLayoutModule } from '@alfresco/aca-shared';
|
||||
|
||||
import { PackageListComponent } from './package-list/package-list.component';
|
||||
import { ExtensionListComponent } from './extension-list/extension-list.component';
|
||||
import { StatusListComponent } from './status-list/status-list.component';
|
||||
import { ModuleListComponent } from './module-list/module-list.component';
|
||||
import { LicenseListComponent } from './license-list/license-list.component';
|
||||
import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
|
||||
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, CoreModule.forChild(), MatTableModule, SharedModule, PageLayoutModule],
|
||||
declarations: [AboutComponent, PackageListComponent, ExtensionListComponent, StatusListComponent, ModuleListComponent, LicenseListComponent],
|
||||
imports: [CommonModule, CoreModule.forChild(), SharedModule, PageLayoutModule],
|
||||
declarations: [AboutComponent],
|
||||
providers: [provideExtensionConfig(['about.plugin.json'])]
|
||||
})
|
||||
export class AcaAboutModule {
|
||||
@@ -48,4 +43,11 @@ export class AcaAboutModule {
|
||||
'app.about.component': AboutComponent
|
||||
});
|
||||
}
|
||||
|
||||
public static forRoot(devMode: any): ModuleWithProviders<AcaAboutModule> {
|
||||
return {
|
||||
ngModule: AcaAboutModule,
|
||||
providers: [{ provide: DEV_MODE_TOKEN, useValue: devMode }]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -23,10 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { AboutComponent } from './about.component';
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
describe('AboutComponent', () => {
|
||||
it('should be defined', () => {
|
||||
expect(AboutComponent).toBeDefined();
|
||||
});
|
||||
});
|
||||
export const DEV_MODE_TOKEN = new InjectionToken<any>('devMode');
|
@@ -1,11 +0,0 @@
|
||||
<mat-table [dataSource]="data">
|
||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<mat-header-cell *matHeaderCellDef>
|
||||
{{ column.header | translate }}
|
||||
</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ column.cell(row) }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
@@ -1,73 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
||||
import { ExtensionRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
selector: 'app-extension-list',
|
||||
templateUrl: './extension-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class ExtensionListComponent {
|
||||
columns = [
|
||||
{
|
||||
columnDef: 'id',
|
||||
header: 'APP.ABOUT.PLUGINS.ID',
|
||||
cell: (row: ExtensionRef) => `${row.$id}`
|
||||
},
|
||||
{
|
||||
columnDef: 'name',
|
||||
header: 'APP.ABOUT.PLUGINS.NAME',
|
||||
cell: (row: ExtensionRef) => `${row.$name}`
|
||||
},
|
||||
{
|
||||
columnDef: 'version',
|
||||
header: 'APP.ABOUT.PLUGINS.VERSION',
|
||||
cell: (row: ExtensionRef) => `${row.$version}`
|
||||
},
|
||||
{
|
||||
columnDef: 'vendor',
|
||||
header: 'APP.ABOUT.PLUGINS.VENDOR',
|
||||
cell: (row: ExtensionRef) => `${row.$vendor}`
|
||||
},
|
||||
{
|
||||
columnDef: 'license',
|
||||
header: 'APP.ABOUT.PLUGINS.LICENSE',
|
||||
cell: (row: ExtensionRef) => `${row.$license}`
|
||||
},
|
||||
{
|
||||
columnDef: 'runtime',
|
||||
header: 'APP.ABOUT.PLUGINS.RUNTIME',
|
||||
cell: (row: ExtensionRef) => `${row.$runtime}`
|
||||
}
|
||||
];
|
||||
|
||||
displayedColumns = this.columns.map((x) => x.columnDef);
|
||||
|
||||
@Input()
|
||||
data: Array<ExtensionRef> = [];
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
<mat-table [dataSource]="data">
|
||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<mat-header-cell *matHeaderCellDef>
|
||||
{{ column.header | translate }}
|
||||
</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ column.cell(row) }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
@@ -1,57 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface LicenseData {
|
||||
property: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-license-list',
|
||||
templateUrl: './license-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class LicenseListComponent {
|
||||
columns = [
|
||||
{
|
||||
columnDef: 'property',
|
||||
header: 'APP.ABOUT.LICENSE.PROPERTY',
|
||||
cell: (row: LicenseData) => `${row.property}`
|
||||
},
|
||||
{
|
||||
columnDef: 'value',
|
||||
header: 'APP.ABOUT.LICENSE.VALUE',
|
||||
cell: (row: LicenseData) => `${row.value}`
|
||||
}
|
||||
];
|
||||
|
||||
displayedColumns = this.columns.map((x) => x.columnDef);
|
||||
|
||||
@Input()
|
||||
data: Array<LicenseData> = [];
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
<mat-table [dataSource]="data">
|
||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<mat-header-cell *matHeaderCellDef>
|
||||
{{ column.header | translate }}
|
||||
</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ column.cell(row) }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
@@ -1,58 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
||||
import { ModuleInfo } from '@alfresco/js-api';
|
||||
|
||||
@Component({
|
||||
selector: 'app-module-list',
|
||||
templateUrl: './module-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class ModuleListComponent {
|
||||
columns = [
|
||||
{
|
||||
columnDef: 'id',
|
||||
header: 'APP.ABOUT.MODULES.ID',
|
||||
cell: (row: ModuleInfo) => `${row.id}`
|
||||
},
|
||||
{
|
||||
columnDef: 'title',
|
||||
header: 'APP.ABOUT.MODULES.NAME',
|
||||
cell: (row: ModuleInfo) => `${row.title}`
|
||||
},
|
||||
{
|
||||
columnDef: 'version',
|
||||
header: 'APP.ABOUT.MODULES.VERSION',
|
||||
cell: (row: ModuleInfo) => `${row.version}`
|
||||
}
|
||||
];
|
||||
|
||||
displayedColumns = this.columns.map((x) => x.columnDef);
|
||||
|
||||
@Input()
|
||||
data: Array<ModuleInfo> = [];
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
<mat-table [dataSource]="data">
|
||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<mat-header-cell *matHeaderCellDef>
|
||||
{{ column.header | translate }}
|
||||
</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ column.cell(row) }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
@@ -1,57 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
||||
|
||||
export interface PackageInfo {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-package-list',
|
||||
templateUrl: './package-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class PackageListComponent {
|
||||
columns = [
|
||||
{
|
||||
columnDef: 'title',
|
||||
header: 'APP.ABOUT.PACKAGES.NAME',
|
||||
cell: (row: PackageInfo) => `${row.name}`
|
||||
},
|
||||
{
|
||||
columnDef: 'version',
|
||||
header: 'APP.ABOUT.PACKAGES.VERSION',
|
||||
cell: (row: PackageInfo) => `${row.version}`
|
||||
}
|
||||
];
|
||||
|
||||
displayedColumns = this.columns.map((x) => x.columnDef);
|
||||
|
||||
@Input()
|
||||
data: Array<PackageInfo> = [];
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
<mat-table [dataSource]="data">
|
||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
||||
<mat-header-cell *matHeaderCellDef>
|
||||
{{ column.header | translate }}
|
||||
</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row">{{ column.cell(row) }}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
||||
</mat-table>
|
@@ -1,57 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
||||
|
||||
export interface StatusData {
|
||||
property: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-status-list',
|
||||
templateUrl: './status-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class StatusListComponent {
|
||||
columns = [
|
||||
{
|
||||
columnDef: 'property',
|
||||
header: 'APP.ABOUT.STATUS.PROPERTY',
|
||||
cell: (row: StatusData) => `${row.property}`
|
||||
},
|
||||
{
|
||||
columnDef: 'value',
|
||||
header: 'APP.ABOUT.STATUS.VALUE',
|
||||
cell: (row: StatusData) => `${row.value}`
|
||||
}
|
||||
];
|
||||
|
||||
displayedColumns = this.columns.map((x) => x.columnDef);
|
||||
|
||||
@Input()
|
||||
data: Array<StatusData> = [];
|
||||
}
|
@@ -23,10 +23,5 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from './lib/extension-list/extension-list.component';
|
||||
export * from './lib/license-list/license-list.component';
|
||||
export * from './lib/module-list/module-list.component';
|
||||
export * from './lib/package-list/package-list.component';
|
||||
export * from './lib/status-list/status-list.component';
|
||||
export * from './lib/about.component';
|
||||
export * from './lib/aca-about.module';
|
||||
|
Reference in New Issue
Block a user