@kinvolk/headlamp-plugin
Version:
The needed infrastructure for building Headlamp plugins.
74 lines (73 loc) • 2.73 kB
TypeScript
import type { Cluster } from '../lib/k8s/cluster';
export interface ConfigState {
/**
* Clusters is a map of cluster names to cluster objects.
* Null indicates that the clusters have not been loaded yet.
*/
clusters: {
[clusterName: string]: Cluster;
} | null;
/**
* Stateless Clusters is a map of cluster names to cluster objects.
* Null indicates that the clusters have not been loaded yet.
*/
statelessClusters: {
[clusterName: string]: Cluster;
} | null;
/**
* All Clusters is a map of cluster names to cluster objects.
* They are comination of clusters and statelessClusters.
* Null indicates that the clusters have not been loaded yet.
*/
allClusters: {
[clusterName: string]: Cluster;
} | null;
/**
* Whether dynamic clusters are enabled.
* When true, users can add and delete clusters dynamically.
*/
isDynamicClusterEnabled: boolean;
/**
* Whether users are allowed to remove clusters from their kubeconfig.
* When true, the UI will show options to delete kubeconfig-sourced clusters.
* Defaults to false to prevent accidental removal in company-deployed environments.
*/
allowKubeconfigChanges: boolean;
/**
* Settings is a map of settings names to settings values.
*/
settings: {
/**
* tableRowsPerPageOptions is the list of options for the number of rows per page in a table.
*/
tableRowsPerPageOptions: number[];
/**
* timezone is the timezone to use for displaying dates and times.
*/
timezone: string;
useEvict: boolean;
[key: string]: any;
};
}
export declare const defaultTableRowsPerPageOptions: number[];
export declare const initialState: ConfigState;
export declare const setConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
clusters: ConfigState["clusters"];
isDynamicClusterEnabled?: boolean;
allowKubeconfigChanges?: boolean;
}, "config/setConfig">, setAppSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<{
[key: string]: any;
/**
* tableRowsPerPageOptions is the list of options for the number of rows per page in a table.
*/
tableRowsPerPageOptions: number[];
/**
* timezone is the timezone to use for displaying dates and times.
*/
timezone: string;
useEvict: boolean;
}>, "config/setAppSettings">, setStatelessConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
statelessClusters: ConfigState["statelessClusters"];
}, "config/setStatelessConfig">;
declare const _default: import("redux").Reducer<ConfigState>;
export default _default;