import { V1DaemonSet, V1Pod, V1ReplicaSet, V1StatefulSet } from "@kubernetes/client-node"; import { ObservableArray } from "azure-devops-ui/Core/Observable"; import { IHeaderCommandBarItem } from "azure-devops-ui/HeaderCommandBar"; import { Filter } from "azure-devops-ui/Utilities/Filter"; import * as React from "react"; import { IImageService, IKubeService, ITelemetryService, KubeImage, ResourceErrorType } from "../../Contracts/Contracts"; import { IImageDetails } from "../../Contracts/Types"; import { IServiceItem, IVssComponentProperties } from "../Types"; import "./KubeSummary.scss"; interface IKubernetesContainerState { namespace?: string; selectedPivotKey?: string; selectedItem?: V1ReplicaSet | V1DaemonSet | V1StatefulSet | V1Pod | IServiceItem | IImageDetails; showSelectedItem?: boolean; selectedItemType?: string; selectedItemUid?: string; selectedItemProperties?: { [key: string]: any; }; resourceSize: number; workloadsFilter: Filter; svcFilter: Filter; resourceErrorType?: ResourceErrorType; zeroDeploymentsFound?: boolean; } export interface IKubeSummaryProps extends IVssComponentProperties { /** * Header title of the kube summary page */ title: string; /** * Instance of IKubeService which would be used to query information */ kubeService: IKubeService; /** * Instance of IImageService. This is optional */ imageService?: IImageService; /** * Namespace of the kubernetes objects being displayed */ namespace?: string; /** * Namespaces available for the cluster */ namespaces?: string[]; /** * Cluster name of the kubernetes objects being displayed */ clusterName?: string; /** * Instance of ITelemetryService */ telemetryService?: ITelemetryService; /** * URL to the cluster of the kubernetes object being displayed */ clusterUrl?: string; /** * Callback to be invoked to go back from KubeSummary * If provided, a back button will be added to header */ onTitleBackClick?: () => void; /** * Callback to notify when the view tree structure has changed */ onViewChanged?: (viewTree: { id: string; displayName: string; url: string; }[]) => void; /** * command items to be displayed in the header of the summary page */ summaryPageHeaderCommandItems?: (props?: any) => IHeaderCommandBarItem[] | ObservableArray; getResourceErrorType?: () => Promise | ResourceErrorType; getResourceErrorActionComponent?: (props?: any) => React.ReactNode; getImageLocation?: (image: KubeImage) => string | undefined; getContentReaderComponent?: (props?: any) => React.ReactNode; } export declare class KubeSummary extends React.Component { constructor(props: IKubeSummaryProps); render(): React.ReactNode; componentDidMount(): void; componentDidUpdate(prevProps: IKubeSummaryProps, prevState: IKubernetesContainerState): void; componentWillUnmount(): void; private _getResourceErrorType; private _updateStateFromHistory; private _onHistoryChanged; private _setNamespaceOnDeploymentsFetched; private _onZeroDeploymentsFound; private _onWorkloadsFilterApplied; private _onSvcFilterApplied; private _onDataFound; private _getMainContent; private _getHeaderDescriptionComponent; private _getHeaderClusterNameComponent; private _getPageContent; private _getResourceErrorComponent; private _getMainPivot; private _getSelectedItemPodsView; private _getWorkloadPodsViewComponent; private _getPodDetailsComponent; private _selectTab; private _onSelectionStoreChanged; private _setSelectedKeyPodsViewMap; private _setSelectionStateFalse; private _populateObjectFinder; private static _getFilteredFirstObject; private _getFilterHeaderBar; private _getZeroData; private _initializeFactorySettings; private _namespaceSelection; private _selectedItemViewMap; private _objectFinder; private _selectionStore; private _workloadsActionCreator; private _workloadsStore; private _podsStore; private _servicesStore; private _historyService; private _historyUnlisten; private _selectionActionCreator; } export {};