[AAE-10766] Remove js-api imports from core about module (#7947)

* [AAE-10766] Remove js-api imports from core about module

* [AAE-10766] Nest RepositoryInfo interface in about component

* Add inline ModuleInfo in RepositoryInfo interface

Co-authored-by: Popovics András <popovicsandras@users.noreply.github.com>

* [AAE-10766] Fixed github auto commit suggestion

* try fix the testing lib issues

Co-authored-by: Popovics András <popovicsandras@users.noreply.github.com>
Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
Diogo Bastos
2022-11-08 17:57:04 +00:00
committed by GitHub
parent d571943274
commit e67b2aaed4
5 changed files with 57 additions and 7 deletions

View File

@@ -19,7 +19,6 @@ import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
import { Observable } from 'rxjs';
import { AppConfigService } from '../app-config/app-config.service';
import { RepositoryInfo } from '@alfresco/js-api';
import { BpmProductVersionModel } from '../models/product-version.model';
import { AuthenticationService } from '../services/authentication.service';
@@ -28,6 +27,37 @@ import { LicenseData, PackageInfo, StatusData } from './interfaces';
import { ObjectUtils } from '../utils/object-utils';
import { StringUtils } from '../utils/string-utils';
interface RepositoryInfo {
status: {
isReadOnly: boolean;
isAuditEnabled: boolean;
isQuickShareEnabled: boolean;
isThumbnailGenerationEnabled: boolean;
isDirectAccessUrlEnabled: boolean;
};
edition: string;
version: {
display: string;
};
license?: {
issuedAt: Date;
expiresAt: Date;
remainingDays: number;
holder: string;
mode: string;
entitlements?: {
maxUsers?: number;
maxDocs?: number;
isClusterEnabled?: boolean;
isCryptodocEnabled?: boolean;
};
};
modules?: Array<{
title: string;
version: string;
}>;
}
@Component({
selector: 'adf-about',
templateUrl: './about.component.html',
@@ -92,7 +122,7 @@ export class AboutComponent implements OnInit {
setECMInfo() {
this.discovery.getEcmProductInfo().subscribe((repository) => {
this.repository = repository;
this.repository = repository as RepositoryInfo;
this.statusEntries = Object.keys(repository.status).map((key) => ({
property: key,