@hestia-earth/ui-components 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5952,20 +5952,23 @@
5952
5952
  }
5953
5953
  NodeLogsModelsComponent.prototype.ngOnInit = function () {
5954
5954
  return __awaiter(this, void 0, void 0, function () {
5955
- var logsString, groupedLogs, logs, nodeType, config, models, _b, engineModels, _c, _d;
5956
- return __generator(this, function (_e) {
5957
- switch (_e.label) {
5955
+ var _b, groupedLogs, logs, nodeType, config, models, _c, engineModels, _d, _e;
5956
+ return __generator(this, function (_f) {
5957
+ switch (_f.label) {
5958
5958
  case 0:
5959
5959
  this.logsUrl = this.nodeService.nodeLogsUrl(this.node);
5960
- return [4 /*yield*/, this.nodeService.getLog(this.node).toPromise()];
5960
+ // save as local variable to avoid "reserved yield keyword" issue
5961
+ _b = this;
5962
+ return [4 /*yield*/, this.getLogs()];
5961
5963
  case 1:
5962
- logsString = _e.sent();
5963
- groupedLogs = groupLogsByModel(logsString);
5964
+ // save as local variable to avoid "reserved yield keyword" issue
5965
+ _b.logs = _f.sent();
5966
+ groupedLogs = groupLogsByModel(this.logs);
5964
5967
  logs = this.logsKey ? groupedLogs[this.logsKey] : groupedLogs;
5965
5968
  nodeType = this.node['@type'] || this.node.type;
5966
5969
  return [4 /*yield*/, this.engineService.ochestratorConfig(nodeType)];
5967
5970
  case 2:
5968
- config = _e.sent();
5971
+ config = _f.sent();
5969
5972
  return [4 /*yield*/, this.searchService.search({
5970
5973
  fields: ['@type', '@id', 'name'],
5971
5974
  limit: 1000,
@@ -5979,28 +5982,28 @@
5979
5982
  }
5980
5983
  })];
5981
5984
  case 3:
5982
- models = (_e.sent()).results;
5983
- _b = this;
5985
+ models = (_f.sent()).results;
5986
+ _c = this;
5984
5987
  return [4 /*yield*/, rxjs.from(models).pipe(operators.filter(function (v) { return !!v; }), operators.distinct(function (v) { return v['@id']; }), operators.reduce(function (prev, curr) {
5985
5988
  var _b;
5986
5989
  return (Object.assign(Object.assign({}, prev), (_b = {}, _b[curr['@id']] = curr, _b)));
5987
5990
  }, {})).toPromise()];
5988
5991
  case 4:
5989
- _b.methodsById = _e.sent();
5992
+ _c.methodsById = _f.sent();
5990
5993
  if (!this.includeAllModels) return [3 /*break*/, 6];
5991
5994
  return [4 /*yield*/, this.engineService.models()];
5992
5995
  case 5:
5993
- _c = _e.sent();
5996
+ _d = _f.sent();
5994
5997
  return [3 /*break*/, 7];
5995
5998
  case 6:
5996
- _c = [];
5997
- _e.label = 7;
5999
+ _d = [];
6000
+ _f.label = 7;
5998
6001
  case 7:
5999
- engineModels = _c;
6000
- _d = this;
6002
+ engineModels = _d;
6003
+ _e = this;
6001
6004
  return [4 /*yield*/, computeTerms(this.originalValues, this.recalculatedValues, this.terms, this.filterTermTypes)];
6002
6005
  case 8:
6003
- _d.allTerms = _e.sent();
6006
+ _e.allTerms = _f.sent();
6004
6007
  this.allBlankNodes = this.allTerms.flatMap(groupLogsByTerm(nodeType, logs, engineModels, config, this.originalValues, this.recalculatedValues, this.nodeKey));
6005
6008
  this.methodModelsCount = modelCount(this.allBlankNodes);
6006
6009
  this.rowsCount = this.allBlankNodes.reduce(function (prev, curr) { return prev + 1 + curr.subValues.length + curr.keys.length; }, 0);
@@ -6011,6 +6014,9 @@
6011
6014
  });
6012
6015
  });
6013
6016
  };
6017
+ NodeLogsModelsComponent.prototype.getLogs = function () {
6018
+ return this.nodeService.getLog(this.node).toPromise();
6019
+ };
6014
6020
  NodeLogsModelsComponent.prototype.suggestByTerm = function (term) {
6015
6021
  return rxjs.from(this.allTerms).pipe(operators.map(function (v) { return v.name; }), operators.filter(function (v) { return v.toLowerCase().includes(term.toLowerCase()); }), operators.toArray());
6016
6022
  };