Skip to content

Commit

Permalink
Revert "(chore) update libs + fix prettier"
Browse files Browse the repository at this point in the history
This reverts commit 627a639.
  • Loading branch information
annaMarchenkoJetBrains committed Feb 24, 2025
1 parent 627a639 commit a43c132
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 277 deletions.
2 changes: 1 addition & 1 deletion dashboard/new-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@types/sanitize-html": "^2.13.0",
"global-jsdom": "^26.0.0",
"jsdom": "^26.0.0",
"msw": "^2.7.1"
"msw": "^2.7.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,7 @@ const testModeConfigurator = createTestModeConfigurator(
const tableData = ref<TableRow[]>()
const fetchedData = ref<TableRow[]>()
combineLatest([
branchConfigurator1.createObservable(),
branchConfigurator2.createObservable(),
serverConfigurator.createObservable(),
machineConfigurator.createObservable(),
testModeConfigurator.createObservable(),
])
combineLatest([branchConfigurator1.createObservable(), branchConfigurator2.createObservable(), serverConfigurator.createObservable(), machineConfigurator.createObservable(), testModeConfigurator.createObservable()])
.pipe(
filter(() => {
const branch1SelectedValue = branchConfigurator1.selected.value
Expand All @@ -209,32 +203,31 @@ combineLatest([
branch1.value = Array.isArray(branch1SelectedValue) ? branch1SelectedValue[0] : branch1SelectedValue
branch2.value = Array.isArray(branch2SelectedValue) ? branch2SelectedValue[0] : branch2SelectedValue
combineLatest([
getAllMetricsFromBranch(machineConfigurator, branch1.value, metricsNames, testModeConfigurator),
getAllMetricsFromBranch(machineConfigurator, branch2.value, metricsNames, testModeConfigurator),
]).subscribe((data: Result[][]) => {
const firstBranchResults = data[0]
const secondBranchResults = data[1]
const tests = new Set<string>()
const table: TableRow[] = []
for (const r1 of firstBranchResults) {
const r2 = secondBranchResults.find((value) => {
return value.Project == r1.Project && value.MeasureName == r1.MeasureName
})
if (
r2 != undefined &&
(r1.Median != 0 || r2.Median != 0) && //don't add metrics that are zero
!/.*_\d+(#.*)?$/.test(r1.MeasureName) //don't add metrics like foo_1
) {
const difference = Number((((r2.Median - r1.Median) / r1.Median) * 100).toFixed(1))
tests.add(r1.Project)
table.push({ test: r1.Project, metric: r1.MeasureName, build1: r1.Median, build2: r2.Median, difference })
combineLatest([getAllMetricsFromBranch(machineConfigurator, branch1.value, metricsNames, testModeConfigurator), getAllMetricsFromBranch(machineConfigurator, branch2.value, metricsNames, testModeConfigurator)]).subscribe(
(data: Result[][]) => {
const firstBranchResults = data[0]
const secondBranchResults = data[1]
const tests = new Set<string>()
const table: TableRow[] = []
for (const r1 of firstBranchResults) {
const r2 = secondBranchResults.find((value) => {
return value.Project == r1.Project && value.MeasureName == r1.MeasureName
})
if (
r2 != undefined &&
(r1.Median != 0 || r2.Median != 0) && //don't add metrics that are zero
!/.*_\d+(#.*)?$/.test(r1.MeasureName) //don't add metrics like foo_1
) {
const difference = Number((((r2.Median - r1.Median) / r1.Median) * 100).toFixed(1))
tests.add(r1.Project)
table.push({ test: r1.Project, metric: r1.MeasureName, build1: r1.Median, build2: r2.Median, difference })
}
}
testConfigurator.initData([...tests])
fetchedData.value = table
tableData.value = table
}
testConfigurator.initData([...tests])
fetchedData.value = table
tableData.value = table
})
)
})
watch(
Expand Down Expand Up @@ -269,12 +262,7 @@ function getColorForBuild(build1: number, build2: number) {
]
}
function getAllMetricsFromBranch(
machineConfigurator: MachineConfigurator,
branch: string | null,
metricNames: string[],
testModeConfigurator: DimensionConfigurator
): Observable<Result[]> {
function getAllMetricsFromBranch(machineConfigurator: MachineConfigurator, branch: string | null, metricNames: string[], testModeConfigurator: DimensionConfigurator): Observable<Result[]> {
const params = {
branch,
table: dbName + "." + table,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
},
"devDependencies": {
"@primevue/auto-import-resolver": "^4.2.5",
"@tailwindcss/vite": "^4.0.8",
"@tailwindcss/vite": "^4.0.7",
"@typescript-eslint/eslint-plugin": "^8.24.1",
"@typescript-eslint/parser": "^8.24.1",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/compiler-sfc": "^3.5.13",
"@vue/eslint-config-typescript": "^14.4.0",
"eslint": "^9.21.0",
"eslint": "^9.20.1",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-vue": "^9.32.0",
"rollup": "^4.34.8",
"tailwindcss": "^4.0.8",
"tailwindcss": "^4.0.7",
"typescript": "^5.7.3",
"unplugin-vue-components": "^28.4.0",
"vite": "6.1.1",
"vite-plugin-static-copy": "^2.2.0",
"vue": "^3.5.13",
"vue-tsc": "^2.2.4"
"vue-tsc": "^2.2.2"
},
"pnpm": {
"peerDependencyRules": {
Expand All @@ -55,7 +55,7 @@
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-unicorn": "^57.0.0",
"isoworker": "^0.2.4",
"prettier": "^3.5.2",
"prettier": "^3.5.1",
"vitest": "^3.0.6"
}
}
Loading

0 comments on commit a43c132

Please # to comment.