-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1 of Predictive modeling page #98
base: main
Are you sure you want to change the base?
Conversation
…realistic targets for the different metrics being tracked.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
private makeEventListenersPassive() { | ||
const elements = document.querySelectorAll('.highcharts-container'); | ||
elements.forEach(element => { | ||
element.addEventListener('touchstart', () => {}, { passive: true }); |
Check failure
Code scanning / ESLint
Disallow empty functions Error
Copilot Autofix AI 3 days ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
console.log('6. Updated gridObject from form:', this.gridObject); | ||
} | ||
|
||
private convertMetricStateToString(metricState: MetricState): { [key: string]: string } { |
Check failure
Code scanning / ESLint
Require or disallow the `Record` type Error
} | ||
|
||
private convertMetricStateToString(metricState: MetricState): { [key: string]: string } { | ||
const result: { [key: string]: string } = {}; |
Check failure
Code scanning / ESLint
Require or disallow the `Record` type Error
private convertMetricStateToString(metricState: MetricState): { [key: string]: string } { | ||
const result: { [key: string]: string } = {}; | ||
for (const key in metricState) { | ||
if (metricState.hasOwnProperty(key)) { |
Check failure
Code scanning / ESLint
Disallow calling some `Object.prototype` methods directly on objects Error
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 3 days ago
To fix the problem, we should avoid calling hasOwnProperty
directly on the object. Instead, we can use Object.prototype.hasOwnProperty.call
to safely check if the property exists on the object. This approach ensures that we are always calling the method from Object.prototype
, avoiding any potential issues with shadowing.
We need to update the line where hasOwnProperty
is called directly on the object and replace it with Object.prototype.hasOwnProperty.call
.
-
Copy modified line R248
@@ -247,3 +247,3 @@ | ||
for (const key in metricState) { | ||
if (metricState.hasOwnProperty(key)) { | ||
if (Object.prototype.hasOwnProperty.call(metricState, key)) { | ||
result[key] = this.decimalPipe.transform(metricState[key], '1.0-0') || '0'; |
return result; | ||
} | ||
|
||
private convertMetricStateToNumber(metricState: { [key: string]: string }): MetricState { |
Check failure
Code scanning / ESLint
Require or disallow the `Record` type Error
productivityBoost: 0 | ||
}; | ||
for (const key in metricState) { | ||
if (metricState.hasOwnProperty(key)) { |
Check failure
Code scanning / ESLint
Disallow calling some `Object.prototype` methods directly on objects Error
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 3 days ago
To fix the problem, we should avoid directly calling Object.prototype.hasOwnProperty
on the object. Instead, we can use Object.prototype.hasOwnProperty.call
to safely check if the object has the specified property. This approach ensures that we are calling the method from Object.prototype
and not from the object itself, thus avoiding any potential issues with overridden properties.
We need to update the code in the convertMetricStateToString
and convertMetricStateToNumber
methods to use Object.prototype.hasOwnProperty.call
instead of directly calling hasOwnProperty
.
-
Copy modified line R248 -
Copy modified line R273
@@ -247,3 +247,3 @@ | ||
for (const key in metricState) { | ||
if (metricState.hasOwnProperty(key)) { | ||
if (Object.prototype.hasOwnProperty.call(metricState, key)) { | ||
result[key] = this.decimalPipe.transform(metricState[key], '1.0-0') || '0'; | ||
@@ -272,3 +272,3 @@ | ||
for (const key in metricState) { | ||
if (metricState.hasOwnProperty(key)) { | ||
if (Object.prototype.hasOwnProperty.call(metricState, key)) { | ||
const value = parseFloat(metricState[key].replace(/,/g, '').replace(/[^0-9.-]+/g, '')); |
import { Directive, ElementRef, HostListener } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[matThousandSeparator]' |
Check failure
Code scanning / ESLint
Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-06 and https://angular.dev/style-guide#style-02-08. Error
selector: '[matThousandSeparator]' | ||
}) | ||
export class ThousandSeparatorDirective { | ||
private regex: RegExp = new RegExp(/^\d+$/); |
Check failure
Code scanning / ESLint
Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean Error
The fields, calculations and tool tips are in place....needs formatting an connection to the database.