From 322a7bd5a8b45a290097b2123dff92e8343ab5a3 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Wed, 27 Feb 2019 17:08:50 -0800 Subject: [PATCH] VISTA compatibility issues (#2291) * Build config changes necessary to work with VISTA * Fixes to TelemetryTableRow to address bug in VISTA * Fixed sass-fast-loader version to avoid https://github.com/yibn2008/fast-sass-loader/issues/47 * Reverted default theme --- index.html | 2 +- package.json | 2 +- src/adapter/runs/LegacyTelemetryProvider.js | 2 +- src/plugins/telemetryTable/TelemetryTableRow.js | 2 +- src/ui/router/ApplicationRouter.js | 2 +- webpack.config.js | 15 +++++++++++++-- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 5109e7f638..dfb03952fb 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@ - + diff --git a/package.json b/package.json index a0b367dc96..cf40ef32df 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "eventemitter3": "^1.2.0", "exports-loader": "^0.7.0", "express": "^4.13.1", - "fast-sass-loader": "^1.4.5", + "fast-sass-loader": "1.4.6", "file-loader": "^1.1.11", "file-saver": "^1.3.8", "git-rev-sync": "^1.4.0", diff --git a/src/adapter/runs/LegacyTelemetryProvider.js b/src/adapter/runs/LegacyTelemetryProvider.js index 29f5869ccb..16699a8145 100644 --- a/src/adapter/runs/LegacyTelemetryProvider.js +++ b/src/adapter/runs/LegacyTelemetryProvider.js @@ -158,7 +158,7 @@ define([ return { evaluate: function (datum, property) { - return limitEvaluator.evaluate(datum, property.key); + return limitEvaluator.evaluate(datum, property && property.key); } }; }; diff --git a/src/plugins/telemetryTable/TelemetryTableRow.js b/src/plugins/telemetryTable/TelemetryTableRow.js index c173a23e13..6cb6c22d3d 100644 --- a/src/plugins/telemetryTable/TelemetryTableRow.js +++ b/src/plugins/telemetryTable/TelemetryTableRow.js @@ -44,7 +44,7 @@ define([], function () { getRowLimitClass() { if (!this.rowLimitClass) { - let limitEvaluation = this.limitEvaluator.evaluate(this.datum); + let limitEvaluation = this.limitEvaluator.evaluate(this.datum); this.rowLimitClass = limitEvaluation && limitEvaluation.cssClass; } return this.rowLimitClass; diff --git a/src/ui/router/ApplicationRouter.js b/src/ui/router/ApplicationRouter.js index c3f0f4fd87..b7290c38cc 100644 --- a/src/ui/router/ApplicationRouter.js +++ b/src/ui/router/ApplicationRouter.js @@ -9,7 +9,7 @@ const EventEmitter = require('EventEmitter'); function paramsToObject(searchParams) { let params = {}; - for ([key, value] of searchParams.entries()) { + for (let [key, value] of searchParams.entries()) { if (params[key]) { if (!Array.isArray(params[key])) { params[key] = [params[key]]; diff --git a/webpack.config.js b/webpack.config.js index 15ea1c3a44..44072de562 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -83,8 +83,19 @@ const webpackConfig = { loader: 'file-loader', options: { name: '[name].[ext]', - useRelativePath: true, - outputPath: 'assets/' + outputPath(url, resourcePath, context) { + if (/\.(jpg|jpeg|png|svg)$/.test(url)) { + return `images/${url}` + } + if (/\.ico$/.test(url)) { + return `icons/${url}` + } + if (/\.(woff2?|eot|ttf)$/.test(url)) { + return `fonts/${url}` + } else { + return `${url}`; + } + } } }, {