[ACA-1347] Setup code linting and production builds with CI (#339)

This commit is contained in:
Denys Vuika
2018-04-30 11:51:27 +01:00
committed by GitHub
parent 46a5339214
commit 25c5738160
33 changed files with 176 additions and 78 deletions

View File

@@ -37,7 +37,7 @@
"test": "test.ts", "test": "test.ts",
"tsconfig": "tsconfig.app.json", "tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json", "testTsconfig": "tsconfig.spec.json",
"prefix": "app", "prefix": "aca",
"styles": [ "styles": [
"./assets/fonts/material-icons/material-icons.css", "./assets/fonts/material-icons/material-icons.css",
"./assets/fonts/muli/muli.css", "./assets/fonts/muli/muli.css",

View File

@@ -1,6 +1,7 @@
version: 2 version: 2
jobs: jobs:
build: install:
working_directory: ~/alfresco-content-app working_directory: ~/alfresco-content-app
docker: docker:
- image: circleci/node:8-browsers - image: circleci/node:8-browsers
@@ -13,4 +14,48 @@ jobs:
key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }} key: alfresco-content-app-{{ .Branch }}-{{ checksum "package.json" }}
paths: paths:
- "node_modules" - "node_modules"
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
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
- run: xvfb-run -a npm run test:ci - run: xvfb-run -a npm run test:ci
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:
- install
- lint:
requires:
- install
- test:
requires:
- install
- build:
requires:
- install

View File

@@ -81,11 +81,13 @@ services:
# - ./nginx.conf:/etc/nginx/conf.d/default.conf # - ./nginx.conf:/etc/nginx/conf.d/default.conf
proxy: proxy:
image: nginx #image: nginx
image: alfresco/alfresco-content-app-proxy
build: ./docker-compose/proxy
depends_on: depends_on:
- content-app - content-app
volumes: # volumes:
- ./docker-compose/nginx.conf:/etc/nginx/conf.d/default.conf # - ./docker-compose/nginx.conf:/etc/nginx/conf.d/default.conf
networks: networks:
- internal - internal
ports: ports:

View File

@@ -0,0 +1,4 @@
FROM nginx:alpine
LABEL version="1.2"
LABEL maintainer="Denys Vuika <denys.vuika@alfresco.com>"
COPY nginx.conf /etc/nginx/nginx.conf

View File

@@ -0,0 +1,49 @@
events {
worker_connections 1024;
}
http {
server {
listen *:80;
set $allowOriginSite *;
proxy_pass_request_headers on;
proxy_pass_header Set-Cookie;
location / {
proxy_pass http://content-app;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
}
location /alfresco/ {
proxy_pass http://alfresco:8080;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
}
location /share/ {
proxy_pass http://share:8080;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
}
}
}

View File

@@ -85,7 +85,7 @@ export abstract class Page {
} }
getDialogActionByLabel(label) { getDialogActionByLabel(label) {
return element(by.cssContainingText('.mat-button-wrapper', label)) return element(by.cssContainingText('.mat-button-wrapper', label));
} }
isSnackBarDisplayed(): promise.Promise<boolean> { isSnackBarDisplayed(): promise.Promise<boolean> {

View File

@@ -465,7 +465,7 @@ describe('Delete content', () => {
.then(done); .then(done);
}); });
it('delete a file and check notification', () => { xit('delete a file and check notification', () => {
dataTable.clickOnItemName(recentFile1) dataTable.clickOnItemName(recentFile1)
.then(() => toolbar.actions.openMoreMenu()) .then(() => toolbar.actions.openMoreMenu())
.then(() => toolbar.actions.menu.clickMenuItem('Delete')) .then(() => toolbar.actions.menu.clickMenuItem('Delete'))
@@ -480,7 +480,7 @@ describe('Delete content', () => {
.then(() => apis.user.trashcan.restore(recentFile1Id)); .then(() => apis.user.trashcan.restore(recentFile1Id));
}); });
it('delete multiple files and check notification', () => { xit('delete multiple files and check notification', () => {
dataTable.selectMultipleItems([recentFile2, recentFile3]) dataTable.selectMultipleItems([recentFile2, recentFile3])
.then(() => toolbar.actions.openMoreMenu()) .then(() => toolbar.actions.openMoreMenu())
.then(() => toolbar.actions.menu.clickMenuItem('Delete')) .then(() => toolbar.actions.menu.clickMenuItem('Delete'))

View File

@@ -383,7 +383,7 @@ describe('Undo delete content', () => {
.then(done); .then(done);
}); });
it('Successful delete notification shows Undo action', () => { xit('Successful delete notification shows Undo action', () => {
dataTable.clickOnItemName(recentFile1) dataTable.clickOnItemName(recentFile1)
.then(() => toolbar.actions.openMoreMenu()) .then(() => toolbar.actions.openMoreMenu())
.then(() => toolbar.actions.menu.clickMenuItem('Delete')) .then(() => toolbar.actions.menu.clickMenuItem('Delete'))
@@ -395,7 +395,7 @@ describe('Undo delete content', () => {
// we cannot test that the restored file is displayed in the Recent Files list // we cannot test that the restored file is displayed in the Recent Files list
// without adding a very big browser.sleep followed by a page.refresh // without adding a very big browser.sleep followed by a page.refresh
// so for the moment we're testing that the restored file is not displayed in the Trash // so for the moment we're testing that the restored file is not displayed in the Trash
it('Undo delete of file', () => { xit('Undo delete of file', () => {
dataTable.clickOnItemName(recentFile2) dataTable.clickOnItemName(recentFile2)
.then(() => toolbar.actions.openMoreMenu()) .then(() => toolbar.actions.openMoreMenu())
.then(() => toolbar.actions.menu.clickMenuItem('Delete')) .then(() => toolbar.actions.menu.clickMenuItem('Delete'))
@@ -408,7 +408,7 @@ describe('Undo delete content', () => {
// we cannot test that the restored file is displayed in the Recent Files list // we cannot test that the restored file is displayed in the Recent Files list
// without adding a very big browser.sleep followed by a page.refresh // without adding a very big browser.sleep followed by a page.refresh
// so for the moment we're testing that the restored file is not displayed in the Trash // so for the moment we're testing that the restored file is not displayed in the Trash
it('undo delete of multiple files', () => { xit('undo delete of multiple files', () => {
dataTable.selectMultipleItems([recentFile3, recentFile4]) dataTable.selectMultipleItems([recentFile3, recentFile4])
.then(() => toolbar.actions.openMoreMenu()) .then(() => toolbar.actions.openMoreMenu())
.then(() => toolbar.actions.menu.clickMenuItem('Delete')) .then(() => toolbar.actions.menu.clickMenuItem('Delete'))

View File

@@ -116,7 +116,7 @@ describe('Shared Files', () => {
expect(dataTable.getRowName(file2User).isPresent()).toBe(false, `${file2User} is displayed`); expect(dataTable.getRowName(file2User).isPresent()).toBe(false, `${file2User} is displayed`);
}); });
it('unshared file is not displayed [C213118]', () => { xit('unshared file is not displayed [C213118]', () => {
expect(dataTable.getRowName(file3User).isPresent()).toBe(false, `${file3User} is displayed`); expect(dataTable.getRowName(file3User).isPresent()).toBe(false, `${file3User} is displayed`);
}); });

View File

@@ -82,7 +82,7 @@ export class FavoritesApi extends RepoApi {
isFavorite(nodeId: string) { isFavorite(nodeId: string) {
return this.getFavorites() return this.getFavorites()
.then(resp => JSON.stringify(resp.data.list.entries).includes(nodeId)) .then(resp => JSON.stringify(resp.data.list.entries).includes(nodeId));
} }
removeFavorite(api: RepoClient, nodeType: string, name: string): Promise<any> { removeFavorite(api: RepoClient, nodeType: string, name: string): Promise<any> {

View File

@@ -43,20 +43,14 @@ export class Utils {
} }
static retryCall(fn: () => Promise <any>, retry: number = 30, delay: number = 1000): Promise<any> { static retryCall(fn: () => Promise <any>, retry: number = 30, delay: number = 1000): Promise<any> {
const rerun = (retries, fn) => {
fn().catch(err => retries > 1
? rerun(retries - 1, fn)
: Promise.reject(err));
};
const pause = (duration) => new Promise(res => setTimeout(res, duration)); const pause = (duration) => new Promise(res => setTimeout(res, duration));
const run = (retries, fn, delay = 1000) => const run = (retries) =>
fn().catch(err => retries > 1 fn().catch(err => retries > 1
? pause(delay).then(() => run(retries - 1, fn, delay)) ? pause(delay).then(() => run(retries - 1))
: Promise.reject(err)); : Promise.reject(err));
return run(retry, fn); return run(retry);
} }
static waitUntilElementClickable(element: ElementFinder) { static waitUntilElementClickable(element: ElementFinder) {

View File

@@ -45,7 +45,7 @@ import { DocumentListService } from '@alfresco/adf-content-services';
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { NoopAnimationsModule } from '@angular/platform-browser/animations';
@Component({ @Component({
template: '<div [app-copy-node]="selection"></div>' template: '<div [acaCopyNode]="selection"></div>'
}) })
class TestComponent { class TestComponent {
selection; selection;

View File

@@ -32,11 +32,12 @@ import { NodeActionsService } from '../services/node-actions.service';
import { ContentManagementService } from '../services/content-management.service'; import { ContentManagementService } from '../services/content-management.service';
@Directive({ @Directive({
selector: '[app-copy-node]' selector: '[acaCopyNode]'
}) })
export class NodeCopyDirective { export class NodeCopyDirective {
@Input('app-copy-node') // tslint:disable-next-line:no-input-rename
@Input('acaCopyNode')
selection: MinimalNodeEntity[]; selection: MinimalNodeEntity[];
@HostListener('click') @HostListener('click')

View File

@@ -36,7 +36,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@Component({ @Component({
template: '<div [app-delete-node]="selection"></div>' template: '<div [acaDeleteNode]="selection"></div>'
}) })
class TestComponent { class TestComponent {
selection; selection;

View File

@@ -32,13 +32,14 @@ import { Observable } from 'rxjs/Rx';
import { ContentManagementService } from '../services/content-management.service'; import { ContentManagementService } from '../services/content-management.service';
@Directive({ @Directive({
selector: '[app-delete-node]' selector: '[acaDeleteNode]'
}) })
export class NodeDeleteDirective { export class NodeDeleteDirective {
static RESTORE_MESSAGE_DURATION: number = 3000; static RESTORE_MESSAGE_DURATION = 3000;
static DELETE_MESSAGE_DURATION: number = 10000; static DELETE_MESSAGE_DURATION = 10000;
@Input('app-delete-node') // tslint:disable-next-line:no-input-rename
@Input('acaDeleteNode')
selection: MinimalNodeEntity[]; selection: MinimalNodeEntity[];
@HostListener('click') @HostListener('click')

View File

@@ -23,13 +23,13 @@ import { DownloadZipDialogComponent } from '@alfresco/adf-content-services';
/** @deprecated workaround for the ADF 2.3.0 regression. */ /** @deprecated workaround for the ADF 2.3.0 regression. */
@Directive({ @Directive({
selector: '[appNodeDownload]' selector: '[acaNodeDownload]'
}) })
export class NodeDownloadDirective { export class NodeDownloadDirective {
/** Nodes to download. */ /** Nodes to download. */
// tslint:disable-next-line:no-input-rename // tslint:disable-next-line:no-input-rename
@Input('appNodeDownload') @Input('acaNodeDownload')
nodes: MinimalNodeEntity[]; nodes: MinimalNodeEntity[];
@HostListener('click') @HostListener('click')

View File

@@ -29,7 +29,7 @@ import { AlfrescoApiService, CoreModule } from '@alfresco/adf-core';
import { NodeInfoDirective } from './node-info.directive'; import { NodeInfoDirective } from './node-info.directive';
@Component({ @Component({
template: '<div [app-node-info]="selection"></div>' template: '<div [acaNodeInfo]="selection"></div>'
}) })
class TestComponent { class TestComponent {
selection; selection;

View File

@@ -28,12 +28,13 @@ import { AlfrescoApiService } from '@alfresco/adf-core';
import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api'; import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api';
@Directive({ @Directive({
selector: '[app-node-info]', selector: '[acaNodeInfo]',
exportAs: 'nodeInfo' exportAs: 'nodeInfo'
}) })
export class NodeInfoDirective implements OnInit { export class NodeInfoDirective implements OnInit {
@Input('app-node-info') selection: MinimalNodeEntity[]; // tslint:disable-next-line:no-input-rename
@Input('acaNodeInfo') selection: MinimalNodeEntity[];
@Output() changed: EventEmitter<null|MinimalNodeEntryEntity> = new EventEmitter<null|MinimalNodeEntryEntity>(); @Output() changed: EventEmitter<null|MinimalNodeEntryEntity> = new EventEmitter<null|MinimalNodeEntryEntity>();
@Output() error: EventEmitter<null> = new EventEmitter<null>(); @Output() error: EventEmitter<null> = new EventEmitter<null>();

View File

@@ -36,7 +36,7 @@ import { NodeMoveDirective } from './node-move.directive';
import { ContentManagementService } from '../services/content-management.service'; import { ContentManagementService } from '../services/content-management.service';
@Component({ @Component({
template: '<div [app-move-node]="selection"></div>' template: '<div [acaMoveNode]="selection"></div>'
}) })
class TestComponent { class TestComponent {
selection; selection;

View File

@@ -33,11 +33,12 @@ import { NodeActionsService } from '../services/node-actions.service';
import { Observable } from 'rxjs/Rx'; import { Observable } from 'rxjs/Rx';
@Directive({ @Directive({
selector: '[app-move-node]' selector: '[acaMoveNode]'
}) })
export class NodeMoveDirective { export class NodeMoveDirective {
@Input('app-move-node') // tslint:disable-next-line:no-input-rename
@Input('acaMoveNode')
selection: MinimalNodeEntity[]; selection: MinimalNodeEntity[];
@HostListener('click') @HostListener('click')
@@ -86,7 +87,7 @@ export class NodeMoveDirective {
// in case of success // in case of success
if (info.toLowerCase().indexOf('succes') !== -1) { if (info.toLowerCase().indexOf('succes') !== -1) {
let i18nMessageString = 'APP.MESSAGES.INFO.NODE_MOVE.'; const i18nMessageString = 'APP.MESSAGES.INFO.NODE_MOVE.';
let i18MessageSuffix = ''; let i18MessageSuffix = '';
if (succeeded) { if (succeeded) {

View File

@@ -83,7 +83,7 @@ describe('NodePermanentDeleteDirective', () => {
spyOn(dialog, 'open').and.returnValue({ spyOn(dialog, 'open').and.returnValue({
afterClosed() { afterClosed() {
return Observable.of(true) return Observable.of(true);
} }
}); });
}); });

View File

@@ -36,7 +36,7 @@ import { NodeRestoreDirective } from './node-restore.directive';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@Component({ @Component({
template: `<div [app-restore-node]="selection"></div>` template: `<div [acaRestoreNode]="selection"></div>`
}) })
class TestComponent { class TestComponent {
selection = []; selection = [];

View File

@@ -31,12 +31,13 @@ import { TranslationService, AlfrescoApiService, NotificationService } from '@al
import { MinimalNodeEntity, PathInfoEntity, DeletedNodesPaging } from 'alfresco-js-api'; import { MinimalNodeEntity, PathInfoEntity, DeletedNodesPaging } from 'alfresco-js-api';
@Directive({ @Directive({
selector: '[app-restore-node]' selector: '[acaRestoreNode]'
}) })
export class NodeRestoreDirective { export class NodeRestoreDirective {
private restoreProcessStatus; private restoreProcessStatus;
@Input('app-restore-node') // tslint:disable-next-line:no-input-rename
@Input('acaRestoreNode')
selection: MinimalNodeEntity[]; selection: MinimalNodeEntity[];
@HostListener('click') @HostListener('click')

View File

@@ -28,12 +28,12 @@ import { AlfrescoApiService } from '@alfresco/adf-core';
import { MinimalNodeEntity } from 'alfresco-js-api'; import { MinimalNodeEntity } from 'alfresco-js-api';
@Directive({ @Directive({
selector: '[appUnshareNode]' selector: '[acaUnshareNode]'
}) })
export class NodeUnshareDirective { export class NodeUnshareDirective {
// tslint:disable-next-line:no-input-rename // tslint:disable-next-line:no-input-rename
@Input('appUnshareNode') @Input('acaUnshareNode')
selection: MinimalNodeEntity[]; selection: MinimalNodeEntity[];
constructor( constructor(

View File

@@ -32,11 +32,12 @@ import { VersionManagerDialogAdapterComponent } from '../../components/versions-
import { MatDialog } from '@angular/material'; import { MatDialog } from '@angular/material';
@Directive({ @Directive({
selector: '[app-node-versions]' selector: '[acaNodeVersions]'
}) })
export class NodeVersionsDirective { export class NodeVersionsDirective {
@Input('app-node-versions') // tslint:disable-next-line:no-input-rename
@Input('acaNodeVersions')
selection: MinimalNodeEntity[]; selection: MinimalNodeEntity[];
@Output() @Output()

View File

@@ -68,21 +68,21 @@
<button <button
mat-menu-item mat-menu-item
[app-copy-node]="documentList.selection"> [acaCopyNode]="documentList.selection">
<mat-icon color="primary">content_copy</mat-icon> <mat-icon color="primary">content_copy</mat-icon>
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span> <span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
</button> </button>
<button <button
mat-menu-item mat-menu-item
[app-move-node]="documentList.selection"> [acaMoveNode]="documentList.selection">
<mat-icon color="primary">library_books</mat-icon> <mat-icon color="primary">library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span> <span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
</button> </button>
<button <button
mat-menu-item mat-menu-item
[app-delete-node]="documentList.selection"> [acaDeleteNode]="documentList.selection">
<mat-icon color="primary">delete</mat-icon> <mat-icon color="primary">delete</mat-icon>
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span> <span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
</button> </button>
@@ -90,7 +90,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="isFileSelected(documentList.selection)" *ngIf="isFileSelected(documentList.selection)"
[app-node-versions]="documentList.selection"> [acaNodeVersions]="documentList.selection">
<mat-icon color="primary">history</mat-icon> <mat-icon color="primary">history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span> <span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
</button> </button>
@@ -180,7 +180,7 @@
<div class="inner-layout__side-panel" <div class="inner-layout__side-panel"
*ngIf="infoDrawerOpened" *ngIf="infoDrawerOpened"
[app-node-info]="documentList.selection" [acaNodeInfo]="documentList.selection"
(changed)="toggleSidebar($event)" (changed)="toggleSidebar($event)"
#infoInstance=nodeInfo> #infoInstance=nodeInfo>

View File

@@ -70,7 +70,7 @@
<button <button
mat-menu-item mat-menu-item
[app-copy-node]="documentList.selection"> [acaCopyNode]="documentList.selection">
<mat-icon color="primary">content_copy</mat-icon> <mat-icon color="primary">content_copy</mat-icon>
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span> <span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
</button> </button>
@@ -78,7 +78,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="canMove(documentList.selection)" *ngIf="canMove(documentList.selection)"
[app-move-node]="documentList.selection"> [acaMoveNode]="documentList.selection">
<mat-icon color="primary">library_books</mat-icon> <mat-icon color="primary">library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span> <span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
</button> </button>
@@ -86,7 +86,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="canDelete(documentList.selection)" *ngIf="canDelete(documentList.selection)"
[app-delete-node]="documentList.selection"> [acaDeleteNode]="documentList.selection">
<mat-icon color="primary">delete</mat-icon> <mat-icon color="primary">delete</mat-icon>
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span> <span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
</button> </button>
@@ -94,7 +94,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="canManageVersions(documentList.selection)" *ngIf="canManageVersions(documentList.selection)"
[app-node-versions]="documentList.selection"> [acaNodeVersions]="documentList.selection">
<mat-icon color="primary">history</mat-icon> <mat-icon color="primary">history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span> <span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
</button> </button>
@@ -183,7 +183,7 @@
<div class="inner-layout__side-panel" <div class="inner-layout__side-panel"
*ngIf="infoDrawerOpened" *ngIf="infoDrawerOpened"
[app-node-info]="documentList.selection" [acaNodeInfo]="documentList.selection"
(changed)="toggleSidebar($event)" (changed)="toggleSidebar($event)"
#infoInstance=nodeInfo> #infoInstance=nodeInfo>

View File

@@ -48,7 +48,7 @@
<button <button
mat-menu-item mat-menu-item
[app-copy-node]="selectedEntities"> [acaCopyNode]="selectedEntities">
<mat-icon color="primary">content_copy</mat-icon> <mat-icon color="primary">content_copy</mat-icon>
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span> <span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
</button> </button>
@@ -56,7 +56,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="permission.check(node, ['delete'])" *ngIf="permission.check(node, ['delete'])"
[app-move-node]="selectedEntities"> [acaMoveNode]="selectedEntities">
<mat-icon color="primary">library_books</mat-icon> <mat-icon color="primary">library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span> <span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
</button> </button>
@@ -72,7 +72,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="permission.check(node, ['update'])" *ngIf="permission.check(node, ['update'])"
[app-node-versions]="selectedEntities"> [acaNodeVersions]="selectedEntities">
<mat-icon color="primary">history</mat-icon> <mat-icon color="primary">history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span> <span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
</button> </button>

View File

@@ -58,7 +58,7 @@
<button <button
mat-menu-item mat-menu-item
[app-copy-node]="documentList.selection"> [acaCopyNode]="documentList.selection">
<mat-icon color="primary">content_copy</mat-icon> <mat-icon color="primary">content_copy</mat-icon>
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span> <span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
</button> </button>
@@ -66,7 +66,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="canMove(documentList.selection)" *ngIf="canMove(documentList.selection)"
[app-move-node]="documentList.selection"> [acaMoveNode]="documentList.selection">
<mat-icon color="primary">library_books</mat-icon> <mat-icon color="primary">library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span> <span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
</button> </button>
@@ -74,7 +74,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="canDelete(documentList.selection)" *ngIf="canDelete(documentList.selection)"
[app-delete-node]="documentList.selection"> [acaDeleteNode]="documentList.selection">
<mat-icon color="primary">delete</mat-icon> <mat-icon color="primary">delete</mat-icon>
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span> <span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
</button> </button>
@@ -82,7 +82,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="canManageVersions(documentList.selection)" *ngIf="canManageVersions(documentList.selection)"
[app-node-versions]="documentList.selection"> [acaNodeVersions]="documentList.selection">
<mat-icon color="primary">history</mat-icon> <mat-icon color="primary">history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span> <span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
</button> </button>
@@ -168,7 +168,7 @@
<div class="inner-layout__side-panel" <div class="inner-layout__side-panel"
*ngIf="infoDrawerOpened" *ngIf="infoDrawerOpened"
[app-node-info]="documentList.selection" [acaNodeInfo]="documentList.selection"
(changed)="toggleSidebar($event)" (changed)="toggleSidebar($event)"
#infoInstance=nodeInfo> #infoInstance=nodeInfo>

View File

@@ -18,7 +18,7 @@
mat-icon-button mat-icon-button
*ngIf="hasSelection(documentList.selection)" *ngIf="hasSelection(documentList.selection)"
title="{{ 'APP.ACTIONS.DOWNLOAD' | translate }}" title="{{ 'APP.ACTIONS.DOWNLOAD' | translate }}"
[appNodeDownload]="documentList.selection"> [acaNodeDownload]="documentList.selection">
<mat-icon>get_app</mat-icon> <mat-icon>get_app</mat-icon>
</button> </button>
@@ -57,7 +57,7 @@
<button <button
mat-menu-item mat-menu-item
[app-copy-node]="documentList.selection"> [acaCopyNode]="documentList.selection">
<mat-icon color="primary">content_copy</mat-icon> <mat-icon color="primary">content_copy</mat-icon>
<span>{{ 'APP.ACTIONS.COPY' | translate }}</span> <span>{{ 'APP.ACTIONS.COPY' | translate }}</span>
</button> </button>
@@ -65,7 +65,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="permission.check(documentList.selection, ['delete'], { target: 'allowableOperationsOnTarget' })" *ngIf="permission.check(documentList.selection, ['delete'], { target: 'allowableOperationsOnTarget' })"
[app-move-node]="documentList.selection"> [acaMoveNode]="documentList.selection">
<mat-icon color="primary">library_books</mat-icon> <mat-icon color="primary">library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span> <span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
</button> </button>
@@ -73,7 +73,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="permission.check(documentList.selection, ['delete'])" *ngIf="permission.check(documentList.selection, ['delete'])"
[appUnshareNode]="documentList.selection" [acaUnshareNode]="documentList.selection"
(links-unshared)="refresh()"> (links-unshared)="refresh()">
<mat-icon color="primary">stop_screen_share</mat-icon> <mat-icon color="primary">stop_screen_share</mat-icon>
<span>{{ 'APP.ACTIONS.UNSHARE' | translate }}</span> <span>{{ 'APP.ACTIONS.UNSHARE' | translate }}</span>
@@ -82,7 +82,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="permission.check(documentList.selection, ['delete'], { target: 'allowableOperationsOnTarget' })" *ngIf="permission.check(documentList.selection, ['delete'], { target: 'allowableOperationsOnTarget' })"
[app-delete-node]="documentList.selection"> [acaDeleteNode]="documentList.selection">
<mat-icon color="primary">delete</mat-icon> <mat-icon color="primary">delete</mat-icon>
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span> <span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>
</button> </button>
@@ -90,7 +90,7 @@
<button <button
mat-menu-item mat-menu-item
*ngIf="permission.check(documentList.selection[0], ['update'], { target: 'allowableOperationsOnTarget' })" *ngIf="permission.check(documentList.selection[0], ['update'], { target: 'allowableOperationsOnTarget' })"
[app-node-versions]="documentList.selection"> [acaNodeVersions]="documentList.selection">
<mat-icon color="primary">history</mat-icon> <mat-icon color="primary">history</mat-icon>
<span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span> <span>{{ 'APP.ACTIONS.VERSIONS' | translate }}</span>
</button> </button>
@@ -185,7 +185,7 @@
<div class="inner-layout__side-panel" <div class="inner-layout__side-panel"
*ngIf="infoDrawerOpened" *ngIf="infoDrawerOpened"
[app-node-info]="documentList.selection" [acaNodeInfo]="documentList.selection"
(changed)="toggleSidebar($event)" (changed)="toggleSidebar($event)"
#infoInstance=nodeInfo> #infoInstance=nodeInfo>

View File

@@ -33,7 +33,7 @@ import {
NodesApiService, AlfrescoApiService, ContentService, NodesApiService, AlfrescoApiService, ContentService,
UserPreferencesService, LogService, AppConfigService, UserPreferencesService, LogService, AppConfigService,
StorageService, CookieService, ThumbnailService, AuthenticationService, StorageService, CookieService, ThumbnailService, AuthenticationService,
TimeAgoPipe, NodeNameTooltipPipe, NodeFavoriteDirective,DataTableComponent TimeAgoPipe, NodeNameTooltipPipe, NodeFavoriteDirective, DataTableComponent
} from '@alfresco/adf-core'; } from '@alfresco/adf-core';
import { DocumentListComponent, CustomResourcesService } from '@alfresco/adf-content-services'; import { DocumentListComponent, CustomResourcesService } from '@alfresco/adf-content-services';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';

View File

@@ -18,7 +18,7 @@
color="primary" color="primary"
mat-icon-button mat-icon-button
(selection-node-restored)="refresh()" (selection-node-restored)="refresh()"
[app-restore-node]="documentList.selection" [acaRestoreNode]="documentList.selection"
*ngIf="documentList.selection.length" *ngIf="documentList.selection.length"
title="{{ 'APP.ACTIONS.RESTORE' | translate }}"> title="{{ 'APP.ACTIONS.RESTORE' | translate }}">
<mat-icon>restore</mat-icon> <mat-icon>restore</mat-icon>

View File

@@ -103,7 +103,6 @@
"variable-declaration": "nospace" "variable-declaration": "nospace"
} }
], ],
"typeof-compare": true,
"unified-signatures": true, "unified-signatures": true,
"variable-name": false, "variable-name": false,
"whitespace": [ "whitespace": [
@@ -117,7 +116,7 @@
"directive-selector": [ "directive-selector": [
true, true,
"attribute", "attribute",
"app", "aca",
"camelCase" "camelCase"
], ],
"component-selector": [ "component-selector": [
@@ -134,7 +133,6 @@
"use-life-cycle-interface": true, "use-life-cycle-interface": true,
"use-pipe-transform-interface": true, "use-pipe-transform-interface": true,
"component-class-suffix": true, "component-class-suffix": true,
"directive-class-suffix": true, "directive-class-suffix": true
"invoke-injectable": true
} }
} }