@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
131 lines • 6.71 kB
TypeScript
import { OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ApplicationRemotePlugins, IApplication } from '@c8y/client';
import { ActionControl, AlertService, ApplicationPlugin, BulkActionControl, Column, DataGridComponent, DisplayOptions, GainsightService, HeaderActionControl, Pagination, PluginsService, BottomDrawerService } from '@c8y/ngx-components';
import { EcosystemService } from '@c8y/ngx-components/ecosystem/shared';
import { BsModalService } from 'ngx-bootstrap/modal';
import { BehaviorSubject, Observable } from 'rxjs';
import * as i0 from "@angular/core";
export declare class ApplicationPluginsComponent implements OnInit, OnDestroy {
private activatedRoute;
private ecosystemService;
private bsModalService;
private pluginsService;
private alertService;
private gainsightService;
private bottomDrawerService;
PRODUCT_EXPERIENCE: {
readonly APPLICATIONS: {
readonly EVENTS: {
readonly AVAILABILITY: "availability";
readonly APPLICATION_CARD: "applicationCard";
readonly APPLICATION_PROPERTIES: "applicationProperties";
readonly DEPLOY_APPLICATION: "deployApplication";
readonly DUPLICATE_APPLICATION: "duplicateApplication";
readonly INSTALLED_PLUGINS: "installedPlugins";
readonly PACKAGE_PLUGINS: "packagePlugins";
readonly PACKAGE_VERSIONS: "packageVersions";
readonly FILTER_LIST: "filterList";
};
readonly COMPONENTS: {
readonly APPLICATION_CARD: "application-card";
readonly APPLICATION_PLUGINS: "application-plugins";
readonly APPLICATION_PROPERTIES: "application-properties";
readonly DEPLOY_APPLICATION: "deploy-application";
readonly DUPLICATE_APPLICATION_PROPERTIES: "duplicate-application-properties";
readonly PLUGIN_LIST: "plugin-list";
readonly PACKAGE_VERSIONS: "package-versions-list";
readonly UPDATE_PLUGIN_OF_APP: "update-plugin-of-app";
readonly LIST_FILTERS: "list-filters";
readonly PACKAGE_DETAILS: "package-details";
};
readonly ACTIONS: {
readonly AVAILABILITY_CHANGE: "availabilityChange";
readonly CANCEL: "cancel";
readonly CLONE: "clone";
readonly CHANGE_PLUGIN_VERSION: "changePluginVersion";
readonly DELETE: "delete";
readonly DOWNLOAD: "download";
readonly DEPLOY_APPLICATION: "deployApplication";
readonly EDIT: "edit";
readonly INSTALL_PLUGIN: "installPlugin";
readonly INSTALL_PLUGINS: "installPlugins";
readonly UNINSTALL_PLUGIN: "uninstallPlugin";
readonly SELECT_VERSION: "selectVersion";
readonly SET_AS_LATEST: "setAsLatest";
readonly UPDATE_AVAILABLE: "updateAvailable";
readonly UPLOAD: "upload";
readonly SET_FILTER_TERM: "setFilterTerm";
readonly SET_PREDEFINED_FILTERS: "setPredefinedFilters";
readonly RESET_FILTER: "resetFilter";
readonly INSTALL_PLUGINS_INITIATED: "installPluginsInitiated";
readonly DEPLOY_APPLICATION_INITIATED: "deployApplicationInitiated";
};
readonly RESULTS: {
readonly DEPLOYED: "deployed";
readonly DUPLICATED: "duplicated";
readonly PLUGIN_INSTALLED: "pluginInstalled";
readonly PLUGIN_REMOVED: "pluginRemoved";
readonly PLUGIN_VERSION_CHANGED: "pluginVersionChanged";
readonly SERVER_FAILURE: "serverFailure";
readonly SUCCESS: "success";
};
};
};
CURRENT_LOCATION: string;
appId: string | number;
dataGrid: DataGridComponent;
remotePlugins$: BehaviorSubject<ApplicationRemotePlugins>;
allAvailablePlugins$: BehaviorSubject<ApplicationPlugin[]>;
selfPlugins$: BehaviorSubject<ApplicationPlugin[]>;
installedPlugins$: Observable<ApplicationPlugin[]>;
orphanedPlugins$: Observable<ApplicationPlugin[]>;
isStandard$: Observable<boolean>;
app: IApplication;
isLoading: boolean;
title: string;
loadMoreItemsLabel: string;
loadingItemsLabel: string;
actionControls: ActionControl[];
bulkActionControls: BulkActionControl[];
headerActionControls: HeaderActionControl[];
noResultsMessage: "No plugins to display.";
noDataMessage: "No plugins installed.";
noResultsSubtitle: "Refine your search terms or check your spelling.";
noDataSubtitle: "This application doesn't have any plugin. Click below to install.";
pagination: Pagination;
displayOptions: DisplayOptions;
columns: Column[];
private destroy$;
constructor(activatedRoute: ActivatedRoute, ecosystemService: EcosystemService, bsModalService: BsModalService, pluginsService: PluginsService, alertService: AlertService, gainsightService: GainsightService, bottomDrawerService: BottomDrawerService);
ngOnInit(): void;
loadData(): Promise<void>;
resetToDefault(): Promise<void>;
installPlugins(): Promise<void>;
removePlugins(plugins: string[]): Promise<void>;
cleanupOrphanedPlugins(plugins: ApplicationPlugin[]): Promise<void>;
getActionControls(): ActionControl[];
showPluginReadme(plugin: ApplicationPlugin): void;
getBulkActionControls(): BulkActionControl[];
updatePlugin(app: IApplication, plugin: ApplicationPlugin, downgrade?: boolean): Promise<void>;
refresh(): void;
ngOnDestroy(): void;
private addInstallButtonToHeaderActionControls;
private handleRemotesInstallation;
private emitRemotes;
private getApplicationMO;
private getApplicationMFExports;
private getApplicationMFRemotes;
private getAllApplicationsMFExports;
private getAllSelfMFExports;
private getInstallModalInitState;
private getOrphanedPlugins;
private splitOrphanedPluginsIntoOrphanedAndRevokedPlugins;
private getInstalledPlugins;
private extractDetails;
private getStringMatchingRegex;
private triggerPluginEvent;
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationPluginsComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ApplicationPluginsComponent, "c8y-app-plugins", never, { "appId": { "alias": "appId"; "required": false; }; }, {}, never, never, true, never>;
}
//# sourceMappingURL=application-plugins.component.d.ts.map