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(
<Suspense
fallback={
<div className='loading'>
<img src={require('./static/img/loading.gif')} />
<img src='/loading.gif' />
</div>
}
>
......
......@@ -133,6 +133,7 @@ const getFinal = (final?: MetricDataRecord[]): FinalType | undefined => {
} else if (isArrayType(showDefault)) {
// not support final type
return undefined;
// eslint-disable-next-line no-prototype-builtins
} else if (typeof showDefault === 'object' && showDefault.hasOwnProperty('default')) {
return showDefault;
}
......@@ -232,7 +233,7 @@ const downFile = (content: string, fileName: string): void => {
}
if (navigator.userAgent.indexOf('Firefox') > -1) {
const downTag = document.createElement('a');
downTag.addEventListener('click', function() {
downTag.addEventListener('click', function () {
downTag.download = fileName;
downTag.href = URL.createObjectURL(file);
});
......@@ -270,10 +271,7 @@ function metricAccuracy(metric: MetricDataRecord): number {
function formatAccuracy(accuracy: number): string {
// TODO: how to format NaN?
return accuracy
.toFixed(6)
.replace(/0+$/, '')
.replace(/\.$/, '');
return accuracy.toFixed(6).replace(/0+$/, '').replace(/\.$/, '');
}
function formatComplexTypeValue(value: any): string | number {
......@@ -297,7 +295,7 @@ function caclMonacoEditorHeight(height): number {
function copyAndSort<T>(items: T[], columnKey: string, isSortedDescending?: boolean): any {
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 (
a[key] === undefined ||
Object.is(a[key], NaN) ||
......
......@@ -150,9 +150,9 @@ interface TrialJobInfo {
stderrPath?: string;
}
interface ClusterItem {
command?: string;
}
//interface ClusterItem {
// command?: string;
//}
interface ExperimentProfile {
params: ExperimentConfig;
......
......@@ -115,6 +115,7 @@ class Trial implements TableObj {
return undefined;
} else if (
typeof parseMetrics(temp.data) === 'object' &&
// eslint-disable-next-line no-prototype-builtins
parseMetrics(temp.data).hasOwnProperty('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