diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 309640f2d..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,62 +0,0 @@ -version: 2 - -jobs: - test: - working_directory: ~/alfresco-content-app - docker: - - image: circleci/node:8-browsers - steps: - - checkout - - restore_cache: - key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} - - run: npm install - - save_cache: - key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} - paths: - - "node_modules" - - run: xvfb-run -a npm run test:ci - lint: - working_directory: ~/alfresco-content-app - docker: - - image: circleci/node:8-browsers - steps: - - checkout - - restore_cache: - key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} - - run: npm install - - run: npm run lint - spellcheck: - working_directory: ~/alfresco-content-app - docker: - - image: circleci/node:8-browsers - steps: - - checkout - - restore_cache: - key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} - - run: npm install - - run: npm run spellcheck - build: - working_directory: ~/alfresco-content-app - docker: - - image: circleci/node:8-browsers - steps: - - checkout - - restore_cache: - key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} - - run: npm install - - run: npm run build - -workflows: - version: 2 - build_and_test: - jobs: - - test - - lint: - requires: - - test - - spellcheck: - requires: - - test - - build: - requires: - - test diff --git a/src/app/components/about/about.component.html b/src/app/components/about/about.component.html index 275a4720d..50d88c6de 100644 --- a/src/app/components/about/about.component.html +++ b/src/app/components/about/about.component.html @@ -8,118 +8,37 @@
{{ 'APP.ABOUT.PLUGINS.TITLE' | translate }}
-
- - - {{ 'APP.ABOUT.PLUGINS.ID' | translate }} - - {{ element.$id }} - - - - {{ - 'APP.ABOUT.PLUGINS.NAME' | translate - }} - {{ element.$name }} - - - - {{ - 'APP.ABOUT.PLUGINS.VERSION' | translate - }} - {{ - element.$version - }} - - - - {{ - 'APP.ABOUT.PLUGINS.VENDOR' | translate - }} - {{ - element.$vendor - }} - - - - {{ - 'APP.ABOUT.PLUGINS.LICENSE' | translate - }} - {{ - element.$license - }} - - - - {{ - 'APP.ABOUT.PLUGINS.RUNTIME' | translate - }} - {{ - element.$runtime - }} - - - - {{ - 'APP.ABOUT.PLUGINS.DESCRIPTION' | translate - }} - {{ - element.$description - }} - - - - - -
+
-
-
Alfresco Content Services
-

- {{ 'APP.ABOUT.VERSION' | translate }} {{ repository.edition }} - {{ repository.version.display }} -

-
+ +
+
Alfresco Content Services
+

+ {{ 'APP.ABOUT.VERSION' | translate }} {{ repository.edition }} + {{ repository.version.display }} +

+
-
-
{{ 'APP.ABOUT.LICENSE.TITLE' | translate }}
- -
+
+
{{ 'APP.ABOUT.LICENSE.TITLE' | translate }}
+ +
-
-
{{ 'APP.ABOUT.STATUS.TITLE' | translate }}
- -
+
+
{{ 'APP.ABOUT.STATUS.TITLE' | translate }}
+ +
-
-
{{ 'APP.ABOUT.MODULES.TITLE' | translate }}
- -
+
+
{{ 'APP.ABOUT.MODULES.TITLE' | translate }}
+ +
+
-
+
{{ 'APP.ABOUT.PACKAGES.TITLE' | translate }}
- - - {{ - 'APP.ABOUT.PACKAGES.NAME' | translate - }} - {{ element.name }} - - - - {{ - 'APP.ABOUT.PACKAGES.VERSION' | translate - }} - {{ element.version }} - - - - - +
diff --git a/src/app/components/about/about.component.ts b/src/app/components/about/about.component.ts index 67c99dbe6..63075faf7 100644 --- a/src/app/components/about/about.component.ts +++ b/src/app/components/about/about.component.ts @@ -23,7 +23,6 @@ * along with Alfresco. If not, see . */ -import { ObjectDataTableAdapter } from '@alfresco/adf-core'; import { ExtensionRef } from '@alfresco/adf-extensions'; import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { RepositoryInfo } from 'alfresco-js-api'; @@ -40,24 +39,11 @@ import { version, dependencies } from '../../../../package.json'; }) export class AboutComponent implements OnInit { repository: RepositoryInfo; - status: ObjectDataTableAdapter; - license: ObjectDataTableAdapter; - modules: ObjectDataTableAdapter; releaseVersion = version; - - extensionColumns: string[] = [ - '$id', - '$name', - '$version', - '$vendor', - '$license', - '$runtime', - '$description' - ]; extensions$: Observable; - - dependencyColumns: string[] = ['name', 'version']; - dependencyEntries: Array<{ name: string; version: string }> = []; + dependencyEntries: Array<{ name: string; version: string }>; + statusEntries: Array<{ property: string; value: string }>; + licenseEntries: Array<{ property: string; value: string }>; constructor( private contentApi: ContentApiService, @@ -80,109 +66,20 @@ export class AboutComponent implements OnInit { .subscribe(repository => { this.repository = repository; - this.modules = new ObjectDataTableAdapter(repository.modules, [ - { type: 'text', key: 'id', title: 'ID', sortable: true }, - { type: 'text', key: 'title', title: 'Title', sortable: true }, - { - type: 'text', - key: 'version', - title: 'Description', - sortable: true - }, - { - type: 'date', - key: 'installDate', - title: 'Install Date', - sortable: true - }, - { - type: 'text', - key: 'installState', - title: 'Install State', - sortable: true - }, - { - type: 'text', - key: 'versionMin', - title: 'Version Minor', - sortable: true - }, - { - type: 'text', - key: 'versionMax', - title: 'Version Max', - sortable: true - } - ]); - - this.status = new ObjectDataTableAdapter( - [repository.status], - [ - { - type: 'text', - key: 'isReadOnly', - title: 'Read Only', - sortable: true - }, - { - type: 'text', - key: 'isAuditEnabled', - title: 'Audit Enable', - sortable: true - }, - { - type: 'text', - key: 'isQuickShareEnabled', - title: 'Quick Shared Enable', - sortable: true - }, - { - type: 'text', - key: 'isThumbnailGenerationEnabled', - title: 'Thumbnail Generation', - sortable: true - } - ] - ); + this.statusEntries = Object.keys(repository.status).map(key => { + return { + property: key, + value: repository.status[key] + }; + }); if (repository.license) { - this.license = new ObjectDataTableAdapter( - [repository.license], - [ - { - type: 'date', - key: 'issuedAt', - title: 'Issued At', - sortable: true - }, - { - type: 'date', - key: 'expiresAt', - title: 'Expires At', - sortable: true - }, - { - type: 'text', - key: 'remainingDays', - title: 'Remaining Days', - sortable: true - }, - { type: 'text', key: 'holder', title: 'Holder', sortable: true }, - { type: 'text', key: 'mode', title: 'Type', sortable: true }, - { - type: 'text', - key: 'isClusterEnabled', - title: 'Cluster Enabled', - sortable: true - }, - { - type: 'text', - key: 'isCryptodocEnabled', - title: 'Cryptodoc Enable', - sortable: true - } - ] - ); + this.licenseEntries = Object.keys(repository.license).map(key => { + return { + property: key, + value: repository.license[key] + }; + }); } }); } diff --git a/src/app/components/about/about.module.ts b/src/app/components/about/about.module.ts index 78b4a1ee0..157b9174a 100644 --- a/src/app/components/about/about.module.ts +++ b/src/app/components/about/about.module.ts @@ -30,6 +30,11 @@ import { CommonModule } from '@angular/common'; import { CoreModule } from '@alfresco/adf-core'; import { AppLayoutModule } from '../layout/layout.module'; import { MatTableModule } from '@angular/material'; +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'; const routes: Routes = [ { @@ -49,6 +54,13 @@ const routes: Routes = [ AppLayoutModule, MatTableModule ], - declarations: [AboutComponent] + declarations: [ + AboutComponent, + PackageListComponent, + ExtensionListComponent, + StatusListComponent, + ModuleListComponent, + LicenseListComponent + ] }) export class AboutModule {} diff --git a/src/app/components/about/extension-list/extension-list.component.html b/src/app/components/about/extension-list/extension-list.component.html new file mode 100644 index 000000000..906e757a1 --- /dev/null +++ b/src/app/components/about/extension-list/extension-list.component.html @@ -0,0 +1,14 @@ + + + + {{ column.header | translate }} + + {{ column.cell(row) }} + + + + + diff --git a/src/app/components/about/extension-list/extension-list.component.ts b/src/app/components/about/extension-list/extension-list.component.ts new file mode 100644 index 000000000..05977060d --- /dev/null +++ b/src/app/components/about/extension-list/extension-list.component.ts @@ -0,0 +1,78 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 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 . + */ + +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 = []; +} diff --git a/src/app/components/about/license-list/license-list.component.html b/src/app/components/about/license-list/license-list.component.html new file mode 100644 index 000000000..906e757a1 --- /dev/null +++ b/src/app/components/about/license-list/license-list.component.html @@ -0,0 +1,14 @@ + + + + {{ column.header | translate }} + + {{ column.cell(row) }} + + + + + diff --git a/src/app/components/about/license-list/license-list.component.ts b/src/app/components/about/license-list/license-list.component.ts new file mode 100644 index 000000000..6a2157d60 --- /dev/null +++ b/src/app/components/about/license-list/license-list.component.ts @@ -0,0 +1,62 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 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 . + */ + +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 = []; +} diff --git a/src/app/components/about/module-list/module-list.component.html b/src/app/components/about/module-list/module-list.component.html new file mode 100644 index 000000000..906e757a1 --- /dev/null +++ b/src/app/components/about/module-list/module-list.component.html @@ -0,0 +1,14 @@ + + + + {{ column.header | translate }} + + {{ column.cell(row) }} + + + + + diff --git a/src/app/components/about/module-list/module-list.component.ts b/src/app/components/about/module-list/module-list.component.ts new file mode 100644 index 000000000..f4d5aa7cf --- /dev/null +++ b/src/app/components/about/module-list/module-list.component.ts @@ -0,0 +1,63 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 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 . + */ + +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 = []; +} diff --git a/src/app/components/about/package-list/package-list.component.html b/src/app/components/about/package-list/package-list.component.html new file mode 100644 index 000000000..906e757a1 --- /dev/null +++ b/src/app/components/about/package-list/package-list.component.html @@ -0,0 +1,14 @@ + + + + {{ column.header | translate }} + + {{ column.cell(row) }} + + + + + diff --git a/src/app/components/about/package-list/package-list.component.ts b/src/app/components/about/package-list/package-list.component.ts new file mode 100644 index 000000000..606df66f9 --- /dev/null +++ b/src/app/components/about/package-list/package-list.component.ts @@ -0,0 +1,62 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 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 . + */ + +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 = []; +} diff --git a/src/app/components/about/status-list/status-list.component.html b/src/app/components/about/status-list/status-list.component.html new file mode 100644 index 000000000..906e757a1 --- /dev/null +++ b/src/app/components/about/status-list/status-list.component.html @@ -0,0 +1,14 @@ + + + + {{ column.header | translate }} + + {{ column.cell(row) }} + + + + + diff --git a/src/app/components/about/status-list/status-list.component.ts b/src/app/components/about/status-list/status-list.component.ts new file mode 100644 index 000000000..0223b3d68 --- /dev/null +++ b/src/app/components/about/status-list/status-list.component.ts @@ -0,0 +1,62 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 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 . + */ + +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 = []; +} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index a211c9988..cffb1c53f 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -13,13 +13,20 @@ "DESCRIPTION": "Description" }, "LICENSE": { - "TITLE": "License" + "TITLE": "License", + "PROPERTY": "Property", + "VALUE": "Value" }, "STATUS": { - "TITLE": "Status" + "TITLE": "Status", + "PROPERTY": "Property", + "VALUE": "Value" }, "MODULES": { - "TITLE": "Modules" + "TITLE": "Modules", + "ID": "ID", + "NAME": "Name", + "VERSION": "Version" }, "PACKAGES": { "TITLE": "Packages",