logitude-dashboard-library 3.1.113 → 3.1.115

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.
@@ -5,6 +5,8 @@ export declare class WidgetLoadLogger {
5
5
  private Widget;
6
6
  constructor(widget: ReactWidgetPM, isPreviewMode: boolean | null | undefined);
7
7
  log(loadDataResponse: AxiosResponse<any, any>): void;
8
+ private canCreateLog;
8
9
  private getLoadTime;
9
10
  private isNumber;
11
+ private isClickHouse;
10
12
  }
@@ -492,6 +492,7 @@ $dark-grey: #717585;
492
492
  display: flex;
493
493
  place-content: flex-start;
494
494
  align-items: flex-start;
495
+ padding-top: 1px; // for widget header bottom border
495
496
  }
496
497
 
497
498
  .filter-label {
@@ -1229,7 +1230,7 @@ $dark-grey: #717585;
1229
1230
  }
1230
1231
 
1231
1232
  .border-bottom-light-white {
1232
- border-bottom: 1px solid #e0e0e0;
1233
+ border-bottom: 1px solid #d0d0d0;
1233
1234
  }
1234
1235
 
1235
1236
  .padding-left-12 {
package/dist/index.js CHANGED
@@ -980,7 +980,7 @@ var WidgetLoadLogger = /*#__PURE__*/function () {
980
980
  var _proto = WidgetLoadLogger.prototype;
981
981
 
982
982
  _proto.log = function log(loadDataResponse) {
983
- if (this.StartTime && this.Widget && loadDataResponse) {
983
+ if (this.canCreateLog(loadDataResponse)) {
984
984
  var totalExecutionTime = new Date().getTime() - this.StartTime;
985
985
  var widgetLoadLogService = new WidgetLoadLogService();
986
986
  var widgetLoadLog = {
@@ -988,7 +988,8 @@ var WidgetLoadLogger = /*#__PURE__*/function () {
988
988
  WidgetId: this.Widget.Id,
989
989
  DashboardId: this.Widget.DashboardId,
990
990
  LoadTime: this.getLoadTime(loadDataResponse),
991
- TotalExecutionTime: totalExecutionTime
991
+ TotalExecutionTime: totalExecutionTime,
992
+ IsClickHouse: this.isClickHouse(loadDataResponse)
992
993
  };
993
994
  widgetLoadLogService.create(widgetLoadLog).then(function (_response) {}, function (_error) {});
994
995
  }
@@ -997,6 +998,10 @@ var WidgetLoadLogger = /*#__PURE__*/function () {
997
998
  this.Widget = null;
998
999
  };
999
1000
 
1001
+ _proto.canCreateLog = function canCreateLog(loadDataResponse) {
1002
+ return this.StartTime !== null && this.StartTime !== undefined && this.Widget !== null && this.Widget !== undefined && this.Widget.Id !== null && this.Widget.Id !== undefined && this.Widget.Id !== "" && this.Widget.DashboardId !== null && this.Widget.DashboardId !== undefined && this.Widget.DashboardId !== "" && this.Widget.Tenant !== null && this.Widget.Tenant !== undefined && loadDataResponse !== null && loadDataResponse !== undefined;
1003
+ };
1004
+
1000
1005
  _proto.getLoadTime = function getLoadTime(loadDataResponse) {
1001
1006
  var loadTimeHeaderKey = "load-time";
1002
1007
  var loadTimeHeader = loadDataResponse && loadDataResponse.headers && loadDataResponse.headers[loadTimeHeaderKey] ? loadDataResponse.headers[loadTimeHeaderKey] : "";
@@ -1007,6 +1012,12 @@ var WidgetLoadLogger = /*#__PURE__*/function () {
1007
1012
  return value !== null && value !== undefined && value !== "" && !isNaN(Number(value.toString()));
1008
1013
  };
1009
1014
 
1015
+ _proto.isClickHouse = function isClickHouse(loadDataResponse) {
1016
+ var clickHouseHeaderKey = "click-house";
1017
+ var clickHouseHeader = loadDataResponse && loadDataResponse.headers && loadDataResponse.headers[clickHouseHeaderKey] ? loadDataResponse.headers[clickHouseHeaderKey] : null;
1018
+ return clickHouseHeader === "true";
1019
+ };
1020
+
1010
1021
  return WidgetLoadLogger;
1011
1022
  }();
1012
1023