diff --git a/client/src/actions/ConfigurationsActions.ts b/client/src/actions/ConfigurationsActions.ts index d2284a2..2250882 100644 --- a/client/src/actions/ConfigurationsActions.ts +++ b/client/src/actions/ConfigurationsActions.ts @@ -7,7 +7,7 @@ import utils from '../utils'; interface IConfigurationsActions { loadConfiguration(): any; loadDashboard(id: string): any; - loadDashboardComplete(dashboard: IDashboardConfig): any; + loadDashboardComplete(dashboard: IDashboardConfig): { dashboard: IDashboardConfig }; createDashboard(dashboard: IDashboardConfig): any; loadTemplate(id: string): any; saveConfiguration(dashboard: IDashboardConfig): any; @@ -84,7 +84,7 @@ class ConfigurationsActions extends AbstractActions implements IConfigurationsAc }; } - loadDashboardComplete(dashboard: IDashboardConfig): any { + loadDashboardComplete(dashboard: IDashboardConfig): { dashboard: IDashboardConfig } { return { dashboard }; } diff --git a/client/src/components/generic/Scorecard/index.tsx b/client/src/components/generic/Scorecard/index.tsx index d8fd4dc..7291bb0 100644 --- a/client/src/components/generic/Scorecard/index.tsx +++ b/client/src/components/generic/Scorecard/index.tsx @@ -123,8 +123,9 @@ export default class Scorecard extends GenericComponent { return; } - let evt = typeof event !== 'undefined' && event || arguments[2]; - evt.preventDefault(); + let eventObject = typeof event !== 'undefined' && event || arguments[2]; + eventObject.preventDefault(); + var { title } = this.props || '' as any; var args = { ...value }; this.trigger(value.onClick, args); diff --git a/client/src/data-sources/plugins/ApplicationInsights/Query.ts b/client/src/data-sources/plugins/ApplicationInsights/Query.ts index d1deeee..e26d8e0 100644 --- a/client/src/data-sources/plugins/ApplicationInsights/Query.ts +++ b/client/src/data-sources/plugins/ApplicationInsights/Query.ts @@ -99,7 +99,7 @@ export default class ApplicationInsightsQuery extends DataSourcePlugin { request( @@ -132,7 +132,7 @@ export default class ApplicationInsightsQuery extends DataSourcePlugin { + let resultTables = tables.filter((aTable, idx) => { return idx < resultStatus.length && (resultStatus[idx].Kind === 'QueryResult' || resultStatus[idx].Kind === 'PrimaryResults'); }); @@ -216,7 +216,7 @@ export default class ApplicationInsightsQuery extends DataSourcePlugin { - var row = {}; + let row = {}; table.Columns.forEach((col, idx) => { row[col.ColumnName] = rowValues[idx]; diff --git a/client/src/data-sources/plugins/CosmosDB/Query.ts b/client/src/data-sources/plugins/CosmosDB/Query.ts index 9da6332..f3def68 100644 --- a/client/src/data-sources/plugins/CosmosDB/Query.ts +++ b/client/src/data-sources/plugins/CosmosDB/Query.ts @@ -33,8 +33,8 @@ export default class CosmosDBQuery extends DataSourcePlugin { */ dependenciesUpdated(dependencies: any) { let emptyDependency = false; - Object.keys(this._props.dependencies).forEach(k => { - if (typeof dependencies[k] === 'undefined') { emptyDependency = true; } + Object.keys(this._props.dependencies).forEach(dependencyKey => { + if (typeof dependencies[dependencyKey] === 'undefined') { emptyDependency = true; } }); // If one of the dependencies is not supplied, do not run the query diff --git a/client/src/utils/data-formats/formats/scorecard.ts b/client/src/utils/data-formats/formats/scorecard.ts index a4e7010..c9c4e8f 100644 --- a/client/src/utils/data-formats/formats/scorecard.ts +++ b/client/src/utils/data-formats/formats/scorecard.ts @@ -52,15 +52,15 @@ export function scorecard ( let checkValue = (values && values[0] && values[0][countField]) || 0; - let createValue = (value: any, heading: string, color: string, icon: string, sv?: any, sh?: string) => { + let createValue = (value: any, heading: string, color: string, icon: string, subValue?: any, subHeading?: string) => { let item = {}; const prefix = getPrefix(format); item[prefix + 'value'] = isFinite(value) ? utils.kmNumber(value, postfix) : '-'; item[prefix + 'heading'] = heading; item[prefix + 'color'] = color; item[prefix + 'icon'] = icon; - item[prefix + 'subvalue'] = isFinite(sv) ? sv : ''; - item[prefix + 'subheading'] = sh || ''; + item[prefix + 'subvalue'] = isFinite(subValue) ? subValue : ''; + item[prefix + 'subheading'] = subHeading || ''; return item; };