|
17 | 17 | use CDash\Database; |
18 | 18 | use CDash\Model\Build; |
19 | 19 | use CDash\Model\BuildConfigure; |
20 | | -use CDash\Model\BuildError; |
21 | 20 | use CDash\Model\BuildFailure; |
22 | 21 | use CDash\Model\BuildGroupRule; |
23 | 22 | use CDash\Model\BuildRelationship; |
24 | 23 | use CDash\ServiceContainer; |
25 | 24 | use Illuminate\Http\JsonResponse; |
26 | 25 | use Illuminate\Http\RedirectResponse; |
| 26 | +use Illuminate\Http\Request; |
27 | 27 | use Illuminate\Support\Carbon; |
28 | 28 | use Illuminate\Support\Facades\Auth; |
29 | 29 | use Illuminate\Support\Facades\DB; |
|
35 | 35 |
|
36 | 36 | final class BuildController extends AbstractBuildController |
37 | 37 | { |
| 38 | + public function errors(Request $request, int $build_id): View |
| 39 | + { |
| 40 | + $this->setBuildById($build_id); |
| 41 | + |
| 42 | + $params = [ |
| 43 | + 'build-id' => $this->build->Id, |
| 44 | + ]; |
| 45 | + |
| 46 | + $onlyNewErrors = $request->has('onlydeltap'); |
| 47 | + $onlyFixedErrors = $request->has('onlydeltan'); |
| 48 | + if ($onlyNewErrors || $onlyFixedErrors) { |
| 49 | + $previousBuildId = $this->build->GetPreviousBuildId(); |
| 50 | + if ($previousBuildId > 0) { |
| 51 | + $params['previous-build-id'] = $previousBuildId; |
| 52 | + } |
| 53 | + if ($onlyNewErrors) { |
| 54 | + $params['show-new-errors'] = true; |
| 55 | + } |
| 56 | + if ($onlyFixedErrors) { |
| 57 | + $params['show-fixed-errors'] = true; |
| 58 | + } |
| 59 | + } |
| 60 | + |
| 61 | + return $this->vue('build-errors-page', 'Build Errors', $params); |
| 62 | + } |
| 63 | + |
38 | 64 | public function commands(int $build_id): View |
39 | 65 | { |
40 | 66 | $this->setBuildById($build_id); |
@@ -1116,12 +1142,6 @@ public function manageBuildGroup(): View |
1116 | 1142 | return $this->angular_view('manageBuildGroup', 'Manage Build Groups'); |
1117 | 1143 | } |
1118 | 1144 |
|
1119 | | - public function viewBuildError(): View |
1120 | | - { |
1121 | | - $this->setBuildById(request()->integer('buildid')); |
1122 | | - return $this->angular_view('viewBuildError', 'Build Errors'); |
1123 | | - } |
1124 | | - |
1125 | 1145 | public function viewBuildGroup(): View |
1126 | 1146 | { |
1127 | 1147 | $this->setProjectByName(request()->input('project', '')); |
|
0 commit comments