|
|
@@ -15,11 +15,17 @@ export class AdjusterService {
|
|
|
: 'https://publish.lesprojekt.cz/nodejs/';
|
|
|
this.factors = factors;
|
|
|
this.clusters = [];
|
|
|
+ this._clusteringInProcess = true;
|
|
|
this.init();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Sends a request to polirural-attractiveness-service
|
|
|
+ * and applies the returned values
|
|
|
+ */
|
|
|
apply() {
|
|
|
const f = () => {
|
|
|
+ this._clusteringInProcess = true;
|
|
|
this.$http({
|
|
|
method: 'get',
|
|
|
url: this.serviceBaseUrl + 'clusters',
|
|
|
@@ -67,6 +73,7 @@ export class AdjusterService {
|
|
|
}
|
|
|
}
|
|
|
this.clusters = clusters;
|
|
|
+ this._clusteringInProcess = false;
|
|
|
this.$rootScope.$broadcast('clusters_loaded');
|
|
|
});
|
|
|
};
|
|
|
@@ -94,4 +101,11 @@ export class AdjusterService {
|
|
|
this.apply();
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @returns {boolean} true if clustering is in process, false otherwise
|
|
|
+ */
|
|
|
+ isClusteringInProcess() {
|
|
|
+ return this._clusteringInProcess;
|
|
|
+ }
|
|
|
}
|