mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-4229] [ADW-AGS] Move Governance plugin check script to ADF CLI (#6523)
* [ACA-4229] [ADW-AGS] Move Governance plugin check script to ADF CLI * * Added description
This commit is contained in:
26
lib/cli/scripts/plugins/governance-check-plugin.ts
Normal file
26
lib/cli/scripts/plugins/governance-check-plugin.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { PluginInterface } from './plugin-model';
|
||||
import { GovernanceHealth } from './governance-health';
|
||||
|
||||
export class GovernanceCheckPlugin {
|
||||
governanceHealth: GovernanceHealth;
|
||||
constructor(
|
||||
private pluginInfo: PluginInterface,
|
||||
private alfrescoJsApi: any
|
||||
) {
|
||||
this.governanceHealth = new GovernanceHealth(this.alfrescoJsApi);
|
||||
}
|
||||
|
||||
async checkRecordManagement() {
|
||||
let pluginStatus;
|
||||
|
||||
const isAvailable = await this.governanceHealth.isRecordManagementAvailable();
|
||||
if (!isAvailable) {
|
||||
await this.governanceHealth.createRecordManagementSite();
|
||||
pluginStatus = [{ PluginName: this.pluginInfo.name, Status: 'Active', RecordManagement: 'Created'}];
|
||||
console.table(pluginStatus);
|
||||
} else {
|
||||
pluginStatus = [{ PluginName: this.pluginInfo.name, Status: 'Active', RecordManagement: 'Available' }];
|
||||
console.table(pluginStatus);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user