mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
65c7a183d3
commit
89893b5c23
@ -228,22 +228,6 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
|
||||||
swapIconOrders(from: number, to: number) {
|
|
||||||
const clusters = this.enabledClustersList;
|
|
||||||
|
|
||||||
if (from < 0 || to < 0 || from >= clusters.length || to >= clusters.length || isNaN(from) || isNaN(to)) {
|
|
||||||
throw new Error(`invalid from<->to arguments`);
|
|
||||||
}
|
|
||||||
|
|
||||||
move.mutate(clusters, from, to);
|
|
||||||
|
|
||||||
for (const i in clusters) {
|
|
||||||
// This resets the iconOrder to the current display order
|
|
||||||
clusters[i].preferences.iconOrder = +i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hasClusters() {
|
hasClusters() {
|
||||||
return this.clusters.size > 0;
|
return this.clusters.size > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export abstract class ClusterFeature {
|
|||||||
*
|
*
|
||||||
* @param cluster the cluster that the feature is to be installed on
|
* @param cluster the cluster that the feature is to be installed on
|
||||||
*/
|
*/
|
||||||
abstract async install(cluster: KubernetesCluster): Promise<void>;
|
abstract install(cluster: KubernetesCluster): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to be implemented in the derived class, this method is typically called by Lens when a user has indicated that this feature is to be upgraded. The implementation
|
* to be implemented in the derived class, this method is typically called by Lens when a user has indicated that this feature is to be upgraded. The implementation
|
||||||
@ -53,7 +53,7 @@ export abstract class ClusterFeature {
|
|||||||
*
|
*
|
||||||
* @param cluster the cluster that the feature is to be upgraded on
|
* @param cluster the cluster that the feature is to be upgraded on
|
||||||
*/
|
*/
|
||||||
abstract async upgrade(cluster: KubernetesCluster): Promise<void>;
|
abstract upgrade(cluster: KubernetesCluster): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to be implemented in the derived class, this method is typically called by Lens when a user has indicated that this feature is to be uninstalled. The implementation
|
* to be implemented in the derived class, this method is typically called by Lens when a user has indicated that this feature is to be uninstalled. The implementation
|
||||||
@ -61,7 +61,7 @@ export abstract class ClusterFeature {
|
|||||||
*
|
*
|
||||||
* @param cluster the cluster that the feature is to be uninstalled from
|
* @param cluster the cluster that the feature is to be uninstalled from
|
||||||
*/
|
*/
|
||||||
abstract async uninstall(cluster: KubernetesCluster): Promise<void>;
|
abstract uninstall(cluster: KubernetesCluster): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to be implemented in the derived class, this method is called periodically by Lens to determine details about the feature's current status. The implementation
|
* to be implemented in the derived class, this method is called periodically by Lens to determine details about the feature's current status. The implementation
|
||||||
@ -73,7 +73,7 @@ export abstract class ClusterFeature {
|
|||||||
*
|
*
|
||||||
* @return a promise, resolved with the updated ClusterFeatureStatus
|
* @return a promise, resolved with the updated ClusterFeatureStatus
|
||||||
*/
|
*/
|
||||||
abstract async updateStatus(cluster: KubernetesCluster): Promise<ClusterFeatureStatus>;
|
abstract updateStatus(cluster: KubernetesCluster): Promise<ClusterFeatureStatus>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this is a helper method that conveniently applies kubernetes resources to the cluster.
|
* this is a helper method that conveniently applies kubernetes resources to the cluster.
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export class LensMainExtension extends LensExtension {
|
|||||||
catalogEntityRegistry.addSource(`${this.name}:${id}`, source);
|
catalogEntityRegistry.addSource(`${this.name}:${id}`, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
removeCatalogSorce(id: string) {
|
removeCatalogSource(id: string) {
|
||||||
catalogEntityRegistry.removeSource(`${this.name}:${id}`);
|
catalogEntityRegistry.removeSource(`${this.name}:${id}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
.LandingPage {
|
.CatalogPage {
|
||||||
--width: 100%;
|
--width: 100%;
|
||||||
--height: 100%;
|
--height: 100%;
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export class Catalog extends React.Component {
|
|||||||
if (this.catalogEntityStore.items.length === 0) {
|
if (this.catalogEntityStore.items.length === 0) {
|
||||||
Notifications.info(<><b>Welcome!</b><p>Get started by associating one or more clusters to Lens</p></>, {
|
Notifications.info(<><b>Welcome!</b><p>Get started by associating one or more clusters to Lens</p></>, {
|
||||||
timeout: 30_000,
|
timeout: 30_000,
|
||||||
id: "landing-welcome"
|
id: "catalog-welcome"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ export class Catalog extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageLayout className="LandingPage">
|
<PageLayout className="CatalogPage">
|
||||||
<ItemListLayout
|
<ItemListLayout
|
||||||
renderHeaderTitle="Catalog"
|
renderHeaderTitle="Catalog"
|
||||||
isClusterScoped
|
isClusterScoped
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user