UNPKG

@alauda-fe/common

Version:

Alauda frontend team common codes.

32 lines (31 loc) 1.23 kB
/** * @packageDocumentation * @module utils */ import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { KubernetesResource } from '../types/k8s/core'; import * as i0 from "@angular/core"; export type ModulePluginPhase = 'Running' | 'Processing' | 'Deleting' | 'Failed' | 'Upgrading' | 'Unknown'; export interface ModulePluginInstallStatus { cluster: string; name: string; phase: ModulePluginPhase; version: string; } export interface ModulePluginView extends KubernetesResource { status: { modulePluginExist: boolean; installed: ModulePluginInstallStatus[]; }; } export declare const modulePluginIsRunning: (pluginView: ModulePluginView, cluster: string) => boolean; export declare class PluginUtilService { private readonly httpClient; constructor(httpClient: HttpClient); isOperatorEnabled(operator: string, cluster: string): Observable<boolean>; isModulePluginEnabled(plugin: string, cluster: string): Observable<boolean>; getModulePluginsViews(): Observable<ModulePluginView[]>; static ɵfac: i0.ɵɵFactoryDeclaration<PluginUtilService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<PluginUtilService>; }