diff --git a/webui/react/package-lock.json b/webui/react/package-lock.json index 1a434e052e1..c69a49e6e4b 100644 --- a/webui/react/package-lock.json +++ b/webui/react/package-lock.json @@ -18,7 +18,7 @@ "fp-ts": "^2.16.5", "fuse.js": "^7.0.0", "hermes-parallel-coordinates": "^0.6.17", - "hew": "npm:@hpe.com/hew@^0.6.43", + "hew": "npm:@hpe.com/hew@^0.6.44", "humanize-duration": "^3.28.0", "immutable": "^4.3.0", "io-ts": "^2.2.21", @@ -1952,9 +1952,10 @@ } }, "node_modules/@linaria/react/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2038,9 +2039,10 @@ } }, "node_modules/@linaria/utils/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3452,10 +3454,11 @@ "dev": true }, "node_modules/@types/unist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", - "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==", - "dev": true + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" }, "node_modules/@types/uuid": { "version": "9.0.8", @@ -3532,15 +3535,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.9.0.tgz", - "integrity": "sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.9.0", - "@typescript-eslint/types": "7.9.0", - "@typescript-eslint/typescript-estree": "7.9.0", - "@typescript-eslint/visitor-keys": "7.9.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" }, "engines": { @@ -3559,11 +3563,30 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.9.0.tgz", - "integrity": "sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || >=20.0.0" }, @@ -3573,13 +3596,14 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz", - "integrity": "sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.9.0", - "@typescript-eslint/visitor-keys": "7.9.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3601,12 +3625,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz", - "integrity": "sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -3622,15 +3647,17 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/@typescript-eslint/parser/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3783,10 +3810,11 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3952,10 +3980,11 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4167,10 +4196,11 @@ } }, "node_modules/@vitest/runner/node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", "dev": true, + "license": "MIT", "engines": { "node": ">=12.20" }, @@ -5790,9 +5820,10 @@ "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -7028,10 +7059,11 @@ } }, "node_modules/espree/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -7392,6 +7424,13 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", + "dev": true, + "license": "MIT" + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -8170,9 +8209,9 @@ }, "node_modules/hew": { "name": "@hpe.com/hew", - "version": "0.6.43", - "resolved": "https://registry.npmjs.org/@hpe.com/hew/-/hew-0.6.43.tgz", - "integrity": "sha512-FTFULE7q77nTvcfrgOMv2IQhvmkDr2QOo7UXuE9R8aXuxt6FkQa8El40bFCIj08S6c8efbC+Rmu5ymLSEhqwuQ==", + "version": "0.6.44", + "resolved": "https://registry.npmjs.org/@hpe.com/hew/-/hew-0.6.44.tgz", + "integrity": "sha512-o0y9lJkiI1lixduICstNumBZYGEc4cvQg1FK658AKP0uB84rwIP960vebKgIJEho1jlz47fxdESMPtRUrwss+A==", "dependencies": { "@ant-design/icons": "^5.0.1", "@glideapps/glide-data-grid": "^6.0.3", @@ -9382,10 +9421,11 @@ } }, "node_modules/jsdom/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -10527,10 +10567,11 @@ } }, "node_modules/mlly/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -11079,10 +11120,11 @@ } }, "node_modules/parse-entities/node_modules/@types/unist": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", - "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", - "dev": true + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "dev": true, + "license": "MIT" }, "node_modules/parse-json": { "version": "5.2.0", @@ -12948,10 +12990,11 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -14045,15 +14088,16 @@ } }, "node_modules/table/node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.4.1" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -15204,11 +15248,28 @@ } } }, + "node_modules/vitest/node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/vitest/node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, "engines": { "node": ">=0.4.0" } diff --git a/webui/react/package.json b/webui/react/package.json index cd044336f46..f3adbff3371 100644 --- a/webui/react/package.json +++ b/webui/react/package.json @@ -42,7 +42,7 @@ "fp-ts": "^2.16.5", "fuse.js": "^7.0.0", "hermes-parallel-coordinates": "^0.6.17", - "hew": "npm:@hpe.com/hew@^0.6.43", + "hew": "npm:@hpe.com/hew@^0.6.44", "humanize-duration": "^3.28.0", "immutable": "^4.3.0", "io-ts": "^2.2.21", diff --git a/webui/react/src/components/RunActionDropdown.tsx b/webui/react/src/components/RunActionDropdown.tsx index 707b3ad7edf..a553e9d0181 100644 --- a/webui/react/src/components/RunActionDropdown.tsx +++ b/webui/react/src/components/RunActionDropdown.tsx @@ -78,7 +78,7 @@ const RunActionDropdown: React.FC = ({ const cellCopyData = useMemo(() => { if (cell && 'displayData' in cell && isString(cell.displayData)) return cell.displayData; - if (cell?.copyData) return cell.copyData; + if (cell?.copyData && cell.copyData !== '-') return cell.copyData; return undefined; }, [cell]); diff --git a/webui/react/src/pages/FlatRuns/columns.ts b/webui/react/src/pages/FlatRuns/columns.ts index 551c9c0ca0d..58b13379346 100644 --- a/webui/react/src/pages/FlatRuns/columns.ts +++ b/webui/react/src/pages/FlatRuns/columns.ts @@ -1,4 +1,9 @@ -import { CellClickedEventArgs, GridCellKind, Theme as GTheme } from '@glideapps/glide-data-grid'; +import { + CellClickedEventArgs, + GridCell, + GridCellKind, + Theme as GTheme, +} from '@glideapps/glide-data-grid'; import { getColor, getInitials } from 'hew/Avatar'; import { ColumnDef, @@ -99,6 +104,13 @@ function getCellStateFromExperimentState(expState: RunState) { } } +const EMPTY_CELL: GridCell = { + allowOverlay: false, + copyData: '-', + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, +} as const; + interface Params { appTheme: Theme; columnWidths: Record; @@ -117,7 +129,7 @@ export const getColumnDefs = ({ renderer: (record: FlatRun) => ({ allowOverlay: false, data: Number(record.checkpointCount), - displayData: String(record.checkpointCount), + displayData: record.checkpointCount.toString(), kind: GridCellKind.Number, }), title: 'Checkpoints', @@ -129,7 +141,7 @@ export const getColumnDefs = ({ isNumerical: true, renderer: (record: FlatRun) => ({ allowOverlay: false, - copyData: record.checkpointSize ? humanReadableBytes(record.checkpointSize) : '', + copyData: humanReadableBytes(record.checkpointSize), data: { kind: TEXT_CELL }, kind: GridCellKind.Custom, }), @@ -140,36 +152,40 @@ export const getColumnDefs = ({ duration: { id: 'duration', isNumerical: true, - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: record.duration - ? durationInEnglish( - (record.endTime ? new Date(record.endTime) : new Date()).getTime() - - new Date(record.startTime).getTime(), - { - conjunction: ' ', - delimiter: ' ', - largest: 2, - serialComma: false, - unitMeasures: { ...DURATION_UNIT_MEASURES, ms: 1000 }, - }, - ) - : '', - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - }), + renderer: (record: FlatRun) => + record.duration !== undefined + ? { + allowOverlay: false, + copyData: durationInEnglish( + (record.endTime ? new Date(record.endTime) : new Date()).getTime() - + new Date(record.startTime).getTime(), + { + conjunction: ' ', + delimiter: ' ', + largest: 2, + serialComma: false, + unitMeasures: { ...DURATION_UNIT_MEASURES, ms: 1000 }, + }, + ), + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL, title: 'Duration', tooltip: () => undefined, width: columnWidths.duration ?? defaultColumnWidths.duration ?? MIN_COLUMN_WIDTH, }, experimentDescription: { id: 'experimentDescription', - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: String(record.experiment?.description), - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - }), + renderer: (record: FlatRun) => + record.experiment?.description !== undefined + ? { + allowOverlay: false, + copyData: record.experiment.description, + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL, title: 'Search Description', tooltip: () => undefined, width: @@ -211,32 +227,35 @@ export const getColumnDefs = ({ }, experimentName: { id: 'experimentName', - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: String(record.experiment?.name), - cursor: 'pointer', - data: { - kind: LINK_CELL, - link: record.experiment?.id - ? { - href: paths.experimentDetails(record.experiment?.id), - title: String(record.experiment?.name), - unmanaged: record.experiment.unmanaged, - } - : undefined, - navigateOn: 'click', - onClick: (e: CellClickedEventArgs) => { - if (record.experiment) { - handlePath(e as unknown as AnyMouseEvent, { - path: paths.experimentDetails(record.experiment.id), - }); + renderer: (record: FlatRun) => + record.experiment?.name !== undefined + ? { + allowOverlay: false, + copyData: record.experiment.name, + cursor: 'pointer', + data: { + kind: LINK_CELL, + link: record.experiment?.id + ? { + href: paths.experimentDetails(record.experiment?.id), + title: record.experiment.name, + unmanaged: record.experiment.unmanaged, + } + : undefined, + navigateOn: 'click', + onClick: (e: CellClickedEventArgs) => { + if (record.experiment) { + handlePath(e as unknown as AnyMouseEvent, { + path: paths.experimentDetails(record.experiment.id), + }); + } + }, + underlineOffset: 6, + }, + kind: GridCellKind.Custom, + readonly: true, } - }, - underlineOffset: 6, - }, - kind: GridCellKind.Custom, - readonly: true, - }), + : EMPTY_CELL, title: 'Search Name', tooltip: () => undefined, width: columnWidths.experimentName ?? defaultColumnWidths.experimentName ?? MIN_COLUMN_WIDTH, @@ -244,12 +263,15 @@ export const getColumnDefs = ({ // TODO: should this change to search? externalExperimentId: { id: 'externalExperimentId', - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: record.experiment?.externalExperimentId ?? '', - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - }), + renderer: (record: FlatRun) => + record.experiment?.externalExperimentId !== undefined + ? { + allowOverlay: false, + copyData: record.experiment.externalExperimentId, + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL, title: 'External Experiment ID', tooltip: () => undefined, width: @@ -259,47 +281,48 @@ export const getColumnDefs = ({ }, externalRunId: { id: 'externalRunId', - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: String(record.externalRunId ?? ''), - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - }), + renderer: (record: FlatRun) => + record.externalRunId !== undefined + ? { + allowOverlay: false, + copyData: record.externalRunId, + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL, title: 'External Run ID', tooltip: () => undefined, width: columnWidths.externalRunId ?? defaultColumnWidths.externalRunId ?? MIN_COLUMN_WIDTH, }, forkedFrom: { id: 'forkedFrom', - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: String(record.experiment?.forkedFrom ?? ''), - cursor: record.experiment?.forkedFrom ? 'pointer' : undefined, - data: { - kind: LINK_CELL, - link: - record.experiment?.forkedFrom !== undefined - ? { - href: record.experiment?.forkedFrom - ? paths.experimentDetails(record.experiment?.forkedFrom) - : undefined, - title: String(record.experiment?.forkedFrom ?? ''), - } - : undefined, - navigateOn: 'click', - onClick: (e: CellClickedEventArgs) => { - const forkedFrom = record.experiment?.forkedFrom; - if (forkedFrom !== undefined) { - handlePath(e as unknown as AnyMouseEvent, { - path: paths.experimentDetails(forkedFrom), - }); + renderer: (record: FlatRun) => + record.experiment?.forkedFrom !== undefined + ? { + allowOverlay: false, + copyData: record.experiment.forkedFrom.toString(), + cursor: 'pointer', + data: { + kind: LINK_CELL, + link: { + href: paths.experimentDetails(record.experiment.forkedFrom), + title: record.experiment.forkedFrom, + }, + navigateOn: 'click', + onClick: (e: CellClickedEventArgs) => { + const forkedFrom = record.experiment?.forkedFrom; + if (forkedFrom !== undefined) { + handlePath(e as unknown as AnyMouseEvent, { + path: paths.experimentDetails(forkedFrom), + }); + } + }, + underlineOffset: 6, + }, + kind: GridCellKind.Custom, + readonly: true, } - }, - underlineOffset: 6, - }, - kind: GridCellKind.Custom, - readonly: true, - }), + : EMPTY_CELL, title: 'Forked From', tooltip: () => undefined, width: columnWidths.forkedFrom ?? defaultColumnWidths.forkedFrom ?? MIN_COLUMN_WIDTH, @@ -380,12 +403,15 @@ export const getColumnDefs = ({ }, resourcePool: { id: 'resourcePool', - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: String(record.experiment?.resourcePool), - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - }), + renderer: (record: FlatRun) => + record.experiment?.resourcePool + ? { + allowOverlay: false, + copyData: record.experiment.resourcePool, + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL, title: 'Resource Pool', tooltip: () => undefined, width: columnWidths.resourcePool ?? defaultColumnWidths.resourcePool ?? MIN_COLUMN_WIDTH, @@ -394,13 +420,14 @@ export const getColumnDefs = ({ id: 'searcherMetric', isNumerical: false, renderer: (record: FlatRun) => { - const sMetric = record.experiment?.searcherMetric ?? ''; - return { - allowOverlay: false, - copyData: sMetric, - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - }; + return record.experiment?.searcherMetric + ? { + allowOverlay: false, + copyData: record.experiment.searcherMetric, + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL; }, title: 'Searcher Metric', tooltip: () => undefined, @@ -408,12 +435,15 @@ export const getColumnDefs = ({ }, searcherType: { id: 'searcherType', - renderer: (record: FlatRun) => ({ - allowOverlay: false, - copyData: String(record.experiment?.searcherType), - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - }), + renderer: (record: FlatRun) => + record.experiment?.searcherType !== undefined + ? { + allowOverlay: false, + copyData: record.experiment.searcherType, + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL, title: 'Searcher', tooltip: () => undefined, width: columnWidths.searcherType ?? defaultColumnWidths.searcherType ?? MIN_COLUMN_WIDTH, @@ -451,17 +481,20 @@ export const getColumnDefs = ({ }, tags: { id: 'tags', - renderer: (record: FlatRun) => ({ - allowOverlay: true, - copyData: record.labels?.join(', ') ?? '', - data: { - kind: TAGS_CELL, - possibleTags: [], - readonly: true, - tags: record.labels, - }, - kind: GridCellKind.Custom, - }), + renderer: (record: FlatRun) => + record.labels !== undefined + ? { + allowOverlay: true, + copyData: record.labels.join(', '), + data: { + kind: TAGS_CELL, + possibleTags: [], + readonly: true, + tags: record.labels, + }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL, title: 'Tags', tooltip: () => undefined, width: columnWidths.tags ?? defaultColumnWidths.tags ?? MIN_COLUMN_WIDTH, @@ -473,17 +506,19 @@ export const getColumnDefs = ({ _: () => undefined, Loaded: (users) => getDisplayName(users?.find((u) => u.id === record.userId)), }); - return { - allowOverlay: true, - copyData: String(displayName), - data: { - image: undefined, - initials: getInitials(displayName), - kind: USER_AVATAR_CELL, - tint: getColor(displayName, themeIsDark), - }, - kind: GridCellKind.Custom, - }; + return displayName !== undefined + ? { + allowOverlay: true, + copyData: displayName, + data: { + image: undefined, + initials: getInitials(displayName), + kind: USER_AVATAR_CELL, + tint: getColor(displayName, themeIsDark), + }, + kind: GridCellKind.Custom, + } + : EMPTY_CELL; }, title: 'User', tooltip: (record: FlatRun) => { @@ -515,17 +550,15 @@ export const searcherMetricsValColumn = ( textDark: 'white', }; } - return { - allowOverlay: false, - copyData: sMetricValue - ? typeof sMetricValue === 'number' - ? humanReadableNumber(sMetricValue) - : sMetricValue - : '', - data: { kind: TEXT_CELL }, - kind: GridCellKind.Custom, - themeOverride: theme, - }; + return sMetricValue !== undefined + ? { + allowOverlay: false, + copyData: humanReadableNumber(sMetricValue), + data: { kind: TEXT_CELL }, + kind: GridCellKind.Custom, + themeOverride: theme, + } + : EMPTY_CELL; }, title: 'Searcher Metric Value', tooltip: () => undefined,