@alauda-fe/common
Version:
Alauda frontend team common codes.
51 lines (50 loc) • 1.98 kB
TypeScript
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { K8sApiService } from '../../../api/k8s-api.service';
import { ProjectService } from '../../../business/resource-select/project.service';
import { KubernetesResource, ValueOf, Project, ProductEntry } from '../../../core/public-api';
import { TranslateKey } from '../../../translate/types';
import * as i0 from "@angular/core";
export interface Production extends KubernetesResource {
kind: 'Production';
spec: {
group: 'production' | 'others';
index: number;
logoURL?: string;
title: TranslateKey;
version?: string;
description?: string;
openInBlank?: boolean;
homepage: string;
};
}
export interface NamespaceIdentity {
cluster: string;
name: string;
}
export declare const ProductEntryName: {
readonly ACP: "acp";
readonly DevOps: "devops";
readonly ASM: "asm";
readonly AML: "aml";
readonly AAM: "e-aam";
readonly SECURITY: "security";
readonly PLATFORM: "platform";
readonly PROJECT: "project";
readonly DATA_SERVICES: "dataservices";
readonly CEC: "cec";
};
export type ProductEntryName = ValueOf<typeof ProductEntryName>;
export declare class CommonLayoutContextService {
private readonly k8sApi;
private readonly httpClient;
private readonly projectService;
constructor(k8sApi: K8sApiService, httpClient: HttpClient, projectService: ProjectService);
getProjects(): Observable<Project[]>;
getProducts(): Observable<ProductEntry[]>;
getProduct(name: string): Observable<ProductEntry>;
getProjectClusters(_projectName: string): Observable<KubernetesResource[]>;
getClusterNamespaces(_projectName: string, _clusterName: string): Observable<KubernetesResource[]>;
static ɵfac: i0.ɵɵFactoryDeclaration<CommonLayoutContextService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CommonLayoutContextService>;
}