PoC: first run

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-13 19:32:55 +03:00
1 parent 12472aab5b
commit 4e88715b8d
12 files changed
+116 -80

No files matched your search

+3 -3
View File
@@ -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
});
+1 -1
View File
@@ -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[] {