license updates
This commit is contained in:
parent
4c34602f77
commit
e01fce424f
@ -19,9 +19,10 @@ export enum AppConfigKey {
|
|||||||
BACKEND_APP_VERSION = 'BACKEND_APP_VERSION',
|
BACKEND_APP_VERSION = 'BACKEND_APP_VERSION',
|
||||||
FRONTEND_APP_VERSION = 'FRONTEND_APP_VERSION',
|
FRONTEND_APP_VERSION = 'FRONTEND_APP_VERSION',
|
||||||
EULA_URL = 'EULA_URL',
|
EULA_URL = 'EULA_URL',
|
||||||
LICENSEE = 'LICENSEE',
|
LICENSE_CUSTOMER = 'LICENSE_CUSTOMER',
|
||||||
LICENSING_START = 'LICENSING_START',
|
LICENSE_START = 'LICENSING_START',
|
||||||
LICENSING_END = 'LICENSING_END'
|
LICENSE_END = 'LICENSING_END',
|
||||||
|
LICENSE_PAGE_COUNT = 'LICENSE_PAGE_COUNT'
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@ -37,7 +38,7 @@ export class AppConfigService {
|
|||||||
tap((config) => {
|
tap((config) => {
|
||||||
console.log('[REDACTION] Started with config: ', config);
|
console.log('[REDACTION] Started with config: ', config);
|
||||||
this._config = config;
|
this._config = config;
|
||||||
this._config["FRONTEND_APP_VERSION"] = version;
|
this._config['FRONTEND_APP_VERSION'] = version;
|
||||||
this._titleService.setTitle(this.getConfig(AppConfigKey.APP_NAME, 'DDA-R'));
|
this._titleService.setTitle(this.getConfig(AppConfigKey.APP_NAME, 'DDA-R'));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@ -52,12 +52,17 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div translate="license-info-screen.licensed-to"></div>
|
<div translate="license-info-screen.licensed-to"></div>
|
||||||
<div>{{ appConfigService.getConfig('LICENSEE', '-') }}</div>
|
<div>{{ appConfigService.getConfig('LICENSE_CUSTOMER', '-') }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div translate="license-info-screen.licensing-period"></div>
|
<div translate="license-info-screen.licensing-period"></div>
|
||||||
<div>{{ appConfigService.getConfig('LICENSING_START', '-') }} / {{ appConfigService.getConfig('LICENSING_END', '-') }}</div>
|
<div>{{ appConfigService.getConfig('LICENSE_START', '-') }} / {{ appConfigService.getConfig('LICENSE_END', '-') }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div>{{ 'license-info-screen.licensed-page-count' | translate }}</div>
|
||||||
|
<div>{{ totalLicensedNumberOfPages }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -74,11 +79,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div translate="license-info-screen.current-analyzed"></div>
|
<div translate="license-info-screen.current-analyzed"></div>
|
||||||
<div>
|
<div>{{ currentInfo.numberOfAnalyzedPages }} ({{ analysisPercentageOfLicense | number: '1.0-2' }}%)</div>
|
||||||
{{ currentInfo.numberOfAnalyzedPages }} ({{
|
|
||||||
(currentInfo.numberOfAnalyzedPages / totalInfo.numberOfAnalyzedPages) * 100 | number: '1.0-2'
|
|
||||||
}}%)
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" *ngIf="!!unlicensedInfo">
|
<div class="row" *ngIf="!!unlicensedInfo">
|
||||||
|
|||||||
@ -13,6 +13,8 @@ export class LicenseInformationScreenComponent {
|
|||||||
public currentInfo: LicenseReport = {};
|
public currentInfo: LicenseReport = {};
|
||||||
public totalInfo: LicenseReport = {};
|
public totalInfo: LicenseReport = {};
|
||||||
public unlicensedInfo: LicenseReport = {};
|
public unlicensedInfo: LicenseReport = {};
|
||||||
|
public totalLicensedNumberOfPages: number = 0;
|
||||||
|
public analysisPercentageOfLicense: number = 100;
|
||||||
public viewReady = false;
|
public viewReady = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ -20,6 +22,7 @@ export class LicenseInformationScreenComponent {
|
|||||||
private readonly _licenseReportController: LicenseReportControllerService,
|
private readonly _licenseReportController: LicenseReportControllerService,
|
||||||
public readonly appConfigService: AppConfigService
|
public readonly appConfigService: AppConfigService
|
||||||
) {
|
) {
|
||||||
|
this.totalLicensedNumberOfPages = this.appConfigService.getConfig('LICENSE_PAGE_COUNT', 0);
|
||||||
const startDate = moment(this.appConfigService.getConfig('LICENSING_START'), 'DD-MM-YYYY');
|
const startDate = moment(this.appConfigService.getConfig('LICENSING_START'), 'DD-MM-YYYY');
|
||||||
const endDate = moment(this.appConfigService.getConfig('LICENSING_END'), 'DD-MM-YYYY');
|
const endDate = moment(this.appConfigService.getConfig('LICENSING_END'), 'DD-MM-YYYY');
|
||||||
const currentConfig = {
|
const currentConfig = {
|
||||||
@ -38,6 +41,8 @@ export class LicenseInformationScreenComponent {
|
|||||||
Promise.all(promises).then((reports) => {
|
Promise.all(promises).then((reports) => {
|
||||||
[this.currentInfo, this.totalInfo, this.unlicensedInfo] = reports;
|
[this.currentInfo, this.totalInfo, this.unlicensedInfo] = reports;
|
||||||
this.viewReady = true;
|
this.viewReady = true;
|
||||||
|
this.analysisPercentageOfLicense =
|
||||||
|
this.totalLicensedNumberOfPages > 0 ? (this.currentInfo.numberOfAnalyzedPages / this.totalLicensedNumberOfPages) * 100 : 100;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"BACKEND_APP_VERSION": "4.4.40",
|
"BACKEND_APP_VERSION": "4.4.40",
|
||||||
"FRONTEND_APP_VERSION": "1.0",
|
"FRONTEND_APP_VERSION": "1.0",
|
||||||
"EULA_URL": "EULA_URL",
|
"EULA_URL": "EULA_URL",
|
||||||
"LICENSEE": "Redaction License",
|
"LICENSE_CUSTOMER": "Development License",
|
||||||
"LICENSING_START": "01-01-2021",
|
"LICENSE_START": "01-01-2021",
|
||||||
"LICENSING_END": "31-12-2021"
|
"LICENSE_END": "31-12-2021",
|
||||||
|
"LICENSE_PAGE_COUNT": 1000000
|
||||||
}
|
}
|
||||||
|
|||||||
@ -757,6 +757,7 @@
|
|||||||
"analyzed-pages": "Analyzed Pages",
|
"analyzed-pages": "Analyzed Pages",
|
||||||
"usage-details": "Usage Details",
|
"usage-details": "Usage Details",
|
||||||
"total-analyzed": "Total Analyzed Pages Since {{date}}",
|
"total-analyzed": "Total Analyzed Pages Since {{date}}",
|
||||||
|
"licensed-page-count": "Number of licensed pages",
|
||||||
"current-analyzed": "Analyzed Pages in Current Licensing Period",
|
"current-analyzed": "Analyzed Pages in Current Licensing Period",
|
||||||
"unlicensed-analyzed": "Unlicensed Analyzed Pages"
|
"unlicensed-analyzed": "Unlicensed Analyzed Pages"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,12 +9,21 @@ ADMIN_CONTACT_URL="${ADMIN_CONTACT_URL:-}"
|
|||||||
AUTO_READ_TIME="${AUTO_READ_TIME:-1.5}"
|
AUTO_READ_TIME="${AUTO_READ_TIME:-1.5}"
|
||||||
MAX_FILE_SIZE_MB="${MAX_FILE_SIZE_MB:-50}"
|
MAX_FILE_SIZE_MB="${MAX_FILE_SIZE_MB:-50}"
|
||||||
|
|
||||||
|
LICENSING_START="${LICENSING_START:-01-01-2021}"
|
||||||
|
LICENSING_END="${LICENSING_END:-31-12-2021}"
|
||||||
|
LICENSE_PAGE_COUNT="${LICENSE_PAGE_COUNT:-1000000}"
|
||||||
|
LICENSE_CUSTOMER="${LICENSE_CUSTOMER:-Developement License}"
|
||||||
|
|
||||||
|
|
||||||
echo '{
|
echo '{
|
||||||
"OAUTH_CLIENT_ID":"'"$OAUTH_CLIENT_ID"'",
|
"OAUTH_CLIENT_ID":"'"$OAUTH_CLIENT_ID"'",
|
||||||
"OAUTH_URL":"'"$OAUTH_URL"'",
|
"OAUTH_URL":"'"$OAUTH_URL"'",
|
||||||
"ADMIN_CONTACT_NAME":"'"$ADMIN_CONTACT_NAME"'",
|
"ADMIN_CONTACT_NAME":"'"$ADMIN_CONTACT_NAME"'",
|
||||||
"ADMIN_CONTACT_URL":"'"$ADMIN_CONTACT_URL"'",
|
"ADMIN_CONTACT_URL":"'"$ADMIN_CONTACT_URL"'",
|
||||||
|
"LICENSING_START":"'"$LICENSING_START"'",
|
||||||
|
"LICENSING_END":"'"$LICENSING_END"'",
|
||||||
|
"LICENSE_PAGE_COUNT":'"$LICENSE_PAGE_COUNT"',
|
||||||
|
"LICENSE_CUSTOMER":"'"$LICENSE_CUSTOMER"'",
|
||||||
"APP_NAME":"'"$APP_NAME"'",
|
"APP_NAME":"'"$APP_NAME"'",
|
||||||
"AUTO_READ_TIME":'"$AUTO_READ_TIME"',
|
"AUTO_READ_TIME":'"$AUTO_READ_TIME"',
|
||||||
"MAX_FILE_SIZE_MB":'"$MAX_FILE_SIZE_MB"',
|
"MAX_FILE_SIZE_MB":'"$MAX_FILE_SIZE_MB"',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user