mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
12472aab5b
commit
4e88715b8d
12 files changed
+116
-80
No files matched your search
@@ -70,7 +70,7 @@ export class BaseStore<T = any> extends Singleton {
|
||||
...confOptions,
|
||||
});
|
||||
const jsonModel = this.storeConfig.store;
|
||||
logger.info(`[STORE]: loaded from ${this.storeConfig.path}`);
|
||||
logger.info(`💿 Store loaded from ${this.storeConfig.path}`);
|
||||
this.fromStore(jsonModel);
|
||||
this.isLoaded = true;
|
||||
}
|
||||
@@ -92,14 +92,14 @@ export class BaseStore<T = any> extends Singleton {
|
||||
|
||||
protected onConfigChange(data: T, oldValue: Partial<T>) {
|
||||
if (!isEqual(this.toJSON(), data)) {
|
||||
logger.debug(`[STORE]: received update from ${this.name}`, { data, oldValue });
|
||||
logger.debug(`💿 Store received update from ${this.name}`, { data, oldValue });
|
||||
this.fromStore(data);
|
||||
}
|
||||
}
|
||||
|
||||
protected onModelChange(model: T) {
|
||||
if (!isEqual(this.storeModel, model)) {
|
||||
logger.debug(`[STORE]: saving ${this.name} from runtime`, {
|
||||
logger.debug(`💿 Store ${this.name} is saving updates from app runtime`, {
|
||||
data: model,
|
||||
oldValue: this.storeModel
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
||||
@observable clusters = observable.map<ClusterId, Cluster>();
|
||||
|
||||
@computed get activeCluster(): Cluster {
|
||||
return this.clusters.get(this.activeClusterId);
|
||||
return this.getById(this.activeClusterId);
|
||||
}
|
||||
|
||||
@computed get clustersList(): Cluster[] {
|
||||
|
||||
Reference in new issue
Block a user