Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Controllers/DynamicAnalysisController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function viewDynamicAnalysisFile(int $buildid, int $fileid): View
[
'build-id' => $buildid,
'dynamic-analysis-id' => $fileid,
'link' => url("queryTests.php?project={$this->project->Name}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1={$da?->name}&date={$this->date}"),
'link' => url("queryTests.php?project={$this->project->Name}&date={$this->date}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1={$da?->name}"),
],
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/cdash/app/Controller/Api/TestOverview.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function getResponse(): array
round(($test['failed'] / $total_runs) * 100, 2);
$test_response['timeoutpercent'] =
round(($test['timeout'] / $total_runs) * 100, 2);
$test_response['link'] = "queryTests.php?project={$this->project->Name}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1={$name}&date={$this->date}";
$test_response['link'] = "queryTests.php?project={$this->project->Name}&date={$this->date}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1={$name}";
$test_response['totalruns'] = $total_runs;
$test_response['prettytime'] = time_difference($test['time'], true, '', true);
$test_response['time'] = $test['time'];
Expand Down
2 changes: 1 addition & 1 deletion app/cdash/app/Controller/Api/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ public static function marshal($data, $buildid, $projectname, $projectshowtestti
'execTime' => time_difference($data['time'], true, '', true),
'execTimeFull' => (float) $data['time'],
'details' => $data['details'],
'summaryLink' => "queryTests.php?project={$projectname}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=" . urlencode($data['testname']) . "&date={$testdate}",
'summaryLink' => "queryTests.php?project={$projectname}&date={$testdate}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=" . urlencode($data['testname']),
'summary' => 'Summary', /* Default value later replaced by AJAX */
'detailsLink' => "tests/{$data['buildtestid']}",
];
Expand Down
5 changes: 5 additions & 0 deletions app/cdash/include/filterdataFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,11 @@ function get_filterurl()
$filterurl = htmlentities($_GET['filterstring'], ENT_QUOTES);
// ...but we need ampersands to pass through unescaped, so convert them back.
$filterurl = str_replace('&', '&', $filterurl);

// Remove &date= and &limit= from filterurl to avoid duplicates when next/prev links are built.
$filterurl = preg_replace('/&date=[^&]*/', '', $filterurl);
$filterurl = preg_replace('/&limit=[^&]*/', '', $filterurl);

return $filterurl;
}

Expand Down
6 changes: 6 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -13122,6 +13122,12 @@ parameters:
count: 1
path: app/cdash/include/filterdataFunctions.php

-
rawMessage: 'Parameter #3 $subject of function preg_replace expects array<float|int|string>|string, string|null given.'
identifier: argument.type
count: 1
path: app/cdash/include/filterdataFunctions.php

-
rawMessage: Unreachable statement - code above always terminates.
identifier: deadCode.unreachable
Expand Down
3 changes: 2 additions & 1 deletion resources/js/angular/services/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export function filtersSvc() {
var str = new String(window.location);
var idx = str.indexOf("&filtercount=", 0);
if (idx > 0) {
return str.substr(idx);
var filterstring = str.substr(idx);
return filterstring.replace(/&date=[^&]*/, "").replace(/&limit=[^&]*/, "");
}
else {
return "";
Expand Down
2 changes: 1 addition & 1 deletion resources/js/vue/components/BuildTestsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export default {
history: {
value: '',
text: 'History',
href: `${this.$baseURL}/queryTests.php?project=${this.projectName}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=${edge.node.name}&date=${DateTime.fromISO(this.buildTime).toISODate()}`,
href: `${this.$baseURL}/queryTests.php?project=${this.projectName}&date=${DateTime.fromISO(this.buildTime).toISODate()}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=${edge.node.name}`,
},
...this.pinnedMeasurements.reduce((acc, name) => ({
...acc,
Expand Down
2 changes: 1 addition & 1 deletion resources/js/vue/components/TestDetailsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<a
id="summary_link"
class="tw-link tw-link-hover"
:href="`${$baseURL}/queryTests.php?project=${build.project.name}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=${test.name}&date=${testingDay}`"
:href="`${$baseURL}/queryTests.php?project=${build.project.name}&date=${testingDay}&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=${test.name}`"
>
{{ test.name }}
</a>
Expand Down
2 changes: 1 addition & 1 deletion tests/Browser/Pages/TestDetailsPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function testTestHistoryLink(): void
$this->build->save();

$this->browse(function (Browser $browser) use ($test): void {
$url = url('queryTests.php') . '?project=' . $this->project->name . '&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=' . $test->testname . '&date=' . $this->build->starttime->toDateString();
$url = url('queryTests.php') . '?project=' . $this->project->name . '&date=' . $this->build->starttime->toDateString() . '&filtercount=1&showfilters=1&field1=testname&compare1=61&value1=' . $test->testname;

$browser->visit("/tests/{$test->id}")
->waitForLink($test->testname)
Expand Down