Unverified Commit ef15fc81 authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Bump node.js version to v16 (#3828)

parent b2225436
...@@ -17,7 +17,7 @@ ReactDOM.render( ...@@ -17,7 +17,7 @@ ReactDOM.render(
<Suspense <Suspense
fallback={ fallback={
<div className='loading'> <div className='loading'>
<img src={require('./static/img/loading.gif')} /> <img src='/loading.gif' />
</div> </div>
} }
> >
......
...@@ -133,6 +133,7 @@ const getFinal = (final?: MetricDataRecord[]): FinalType | undefined => { ...@@ -133,6 +133,7 @@ const getFinal = (final?: MetricDataRecord[]): FinalType | undefined => {
} else if (isArrayType(showDefault)) { } else if (isArrayType(showDefault)) {
// not support final type // not support final type
return undefined; return undefined;
// eslint-disable-next-line no-prototype-builtins
} else if (typeof showDefault === 'object' && showDefault.hasOwnProperty('default')) { } else if (typeof showDefault === 'object' && showDefault.hasOwnProperty('default')) {
return showDefault; return showDefault;
} }
...@@ -232,7 +233,7 @@ const downFile = (content: string, fileName: string): void => { ...@@ -232,7 +233,7 @@ const downFile = (content: string, fileName: string): void => {
} }
if (navigator.userAgent.indexOf('Firefox') > -1) { if (navigator.userAgent.indexOf('Firefox') > -1) {
const downTag = document.createElement('a'); const downTag = document.createElement('a');
downTag.addEventListener('click', function() { downTag.addEventListener('click', function () {
downTag.download = fileName; downTag.download = fileName;
downTag.href = URL.createObjectURL(file); downTag.href = URL.createObjectURL(file);
}); });
...@@ -270,10 +271,7 @@ function metricAccuracy(metric: MetricDataRecord): number { ...@@ -270,10 +271,7 @@ function metricAccuracy(metric: MetricDataRecord): number {
function formatAccuracy(accuracy: number): string { function formatAccuracy(accuracy: number): string {
// TODO: how to format NaN? // TODO: how to format NaN?
return accuracy return accuracy.toFixed(6).replace(/0+$/, '').replace(/\.$/, '');
.toFixed(6)
.replace(/0+$/, '')
.replace(/\.$/, '');
} }
function formatComplexTypeValue(value: any): string | number { function formatComplexTypeValue(value: any): string | number {
...@@ -297,7 +295,7 @@ function caclMonacoEditorHeight(height): number { ...@@ -297,7 +295,7 @@ function caclMonacoEditorHeight(height): number {
function copyAndSort<T>(items: T[], columnKey: string, isSortedDescending?: boolean): any { function copyAndSort<T>(items: T[], columnKey: string, isSortedDescending?: boolean): any {
const key = columnKey as keyof T; const key = columnKey as keyof T;
return items.slice(0).sort(function(a: T, b: T): any { return items.slice(0).sort(function (a: T, b: T): any {
if ( if (
a[key] === undefined || a[key] === undefined ||
Object.is(a[key], NaN) || Object.is(a[key], NaN) ||
......
...@@ -150,9 +150,9 @@ interface TrialJobInfo { ...@@ -150,9 +150,9 @@ interface TrialJobInfo {
stderrPath?: string; stderrPath?: string;
} }
interface ClusterItem { //interface ClusterItem {
command?: string; // command?: string;
} //}
interface ExperimentProfile { interface ExperimentProfile {
params: ExperimentConfig; params: ExperimentConfig;
......
...@@ -115,6 +115,7 @@ class Trial implements TableObj { ...@@ -115,6 +115,7 @@ class Trial implements TableObj {
return undefined; return undefined;
} else if ( } else if (
typeof parseMetrics(temp.data) === 'object' && typeof parseMetrics(temp.data) === 'object' &&
// eslint-disable-next-line no-prototype-builtins
parseMetrics(temp.data).hasOwnProperty('default') parseMetrics(temp.data).hasOwnProperty('default')
) { ) {
return parseMetrics(temp.data).default; return parseMetrics(temp.data).default;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment