Skip to content

Commit 1c10ef4

Browse files
Remove "View SubProjects Link" project config option (Kitware#3637)
The `showViewSubProjectsLink` isn't hooked up to anything anymore, and the feature itself has little value. A better thought out solution could be implemented in the future if there's sufficient interest. Interested users are encouraged to file an issue describing their use cases.
1 parent ae1a8a2 commit 1c10ef4

11 files changed

Lines changed: 19 additions & 42 deletions

File tree

app/Models/Project.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
* @property bool $showcoveragecode
4646
* @property bool $sharelabelfilters
4747
* @property bool $authenticatesubmissions
48-
* @property bool $viewsubprojectslink
4948
* @property ?string $ldapfilter
5049
* @property ?string $banner
5150
* @property ?string $logoUrl
@@ -95,7 +94,6 @@ class Project extends Model
9594
'showcoveragecode',
9695
'sharelabelfilters',
9796
'authenticatesubmissions',
98-
'viewsubprojectslink',
9997
'ldapfilter',
10098
'banner',
10199
'cmakeprojectroot',
@@ -115,7 +113,6 @@ class Project extends Model
115113
'showcoveragecode' => 'boolean',
116114
'sharelabelfilters' => 'boolean',
117115
'authenticatesubmissions' => 'boolean',
118-
'viewsubprojectslink' => 'boolean',
119116
];
120117

121118
public const PROJECT_ADMIN = 2;

app/cdash/app/Model/Project.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class Project
7070
public $EmailMaxChars = 255;
7171
public $DisplayLabels = 0;
7272
public $ShareLabelFilters = 0;
73-
public $ViewSubProjectsLink = 0;
7473
public $AuthenticateSubmissions = 0;
7574
public $ShowCoverageCode = 0;
7675
public $AutoremoveTimeframe = 0;
@@ -131,7 +130,6 @@ public function Save(): bool
131130
'emailredundantfailures' => filter_var($this->EmailRedundantFailures, FILTER_VALIDATE_BOOLEAN),
132131
'displaylabels' => filter_var($this->DisplayLabels, FILTER_VALIDATE_BOOLEAN),
133132
'sharelabelfilters' => filter_var($this->ShareLabelFilters, FILTER_VALIDATE_BOOLEAN),
134-
'viewsubprojectslink' => filter_var($this->ViewSubProjectsLink, FILTER_VALIDATE_BOOLEAN),
135133
'authenticatesubmissions' => filter_var($this->AuthenticateSubmissions, FILTER_VALIDATE_BOOLEAN),
136134
'showcoveragecode' => filter_var($this->ShowCoverageCode, FILTER_VALIDATE_BOOLEAN),
137135
'autoremovetimeframe' => (int) $this->AutoremoveTimeframe,
@@ -219,7 +217,6 @@ public function Fill(): void
219217
$this->EmailRedundantFailures = (int) $project->emailredundantfailures;
220218
$this->DisplayLabels = $project->displaylabels;
221219
$this->ShareLabelFilters = $project->sharelabelfilters;
222-
$this->ViewSubProjectsLink = $project->viewsubprojectslink;
223220
$this->AuthenticateSubmissions = $project->authenticatesubmissions;
224221
$this->ShowCoverageCode = $project->showcoveragecode;
225222
$this->AutoremoveTimeframe = $project->autoremovetimeframe;

app/cdash/tests/kwtest/kw_web_tester.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ public function createProject($input_settings, $update = false,
433433
'TestTimeStd' => 4,
434434
'TestTimeStdThreshold' => 1,
435435
'UploadQuota' => 1073741824,
436-
'ViewSubProjectsLink' => true,
437436
'WarningsFilter' => '',
438437
'ErrorsFilter' => '',
439438
];
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Support\Facades\DB;
5+
6+
return new class extends Migration {
7+
public function up(): void
8+
{
9+
DB::statement('ALTER TABLE project DROP COLUMN viewsubprojectslink');
10+
}
11+
12+
public function down(): void
13+
{
14+
}
15+
};

database/seeders/DatabaseSeeder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ private function createTrilinosProject(): void
4343
{
4444
$project = $this->makePublicProject('Trilinos');
4545
$project->description = 'Submission files donated by the Trilinos project.';
46-
$project->viewsubprojectslink = true;
4746
$project->save();
4847

4948
$files_to_submit = file_get_contents(app_path('/cdash/tests/data/ActualTrilinosSubmission/orderedFileList.txt'));

graphql/schema.graphql

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,6 @@ type Project {
318318
"Forward label filters from index.php to queryTests.php and viewTest.php."
319319
shareLabelFilters: Boolean! @rename(attribute: "sharelabelfilters")
320320

321-
"""
322-
If true and this Project uses SubProjects, show a per-SubProject breakdown by default. If false,
323-
CDash will show per-build results instead.
324-
"""
325-
showViewSubProjectsLink: Boolean! @rename(attribute: "viewsubprojectslink")
326-
327321
"Custom text displayed at the top of a project's dashboard."
328322
banner: String
329323

@@ -477,8 +471,6 @@ input UpdateProjectInput @validator {
477471

478472
shareLabelFilters: Boolean @rename(attribute: "sharelabelfilters")
479473

480-
showViewSubProjectsLink: Boolean @rename(attribute: "viewsubprojectslink")
481-
482474
banner: String
483475
}
484476

phpstan-baseline.neon

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10338,12 +10338,6 @@ parameters:
1033810338
count: 1
1033910339
path: app/cdash/app/Model/Project.php
1034010340

10341-
-
10342-
rawMessage: Property CDash\Model\Project::$ViewSubProjectsLink has no type specified.
10343-
identifier: missingType.property
10344-
count: 1
10345-
path: app/cdash/app/Model/Project.php
10346-
1034710341
-
1034810342
rawMessage: Property CDash\Model\Project::$WarningsFilter has no type specified.
1034910343
identifier: missingType.property
@@ -16147,19 +16141,19 @@ parameters:
1614716141
path: app/cdash/tests/kwtest/kw_web_tester.php
1614816142

1614916143
-
16150-
rawMessage: 'Method class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:803::__construct() has parameter $response with no type specified.'
16144+
rawMessage: 'Method class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:802::__construct() has parameter $response with no type specified.'
1615116145
identifier: missingType.parameter
1615216146
count: 1
1615316147
path: app/cdash/tests/kwtest/kw_web_tester.php
1615416148

1615516149
-
16156-
rawMessage: 'Method class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:803::getSent() has no return type specified.'
16150+
rawMessage: 'Method class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:802::getSent() has no return type specified.'
1615716151
identifier: missingType.return
1615816152
count: 1
1615916153
path: app/cdash/tests/kwtest/kw_web_tester.php
1616016154

1616116155
-
16162-
rawMessage: 'Method class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:803::read() has no return type specified.'
16156+
rawMessage: 'Method class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:802::read() has no return type specified.'
1616316157
identifier: missingType.return
1616416158
count: 1
1616516159
path: app/cdash/tests/kwtest/kw_web_tester.php
@@ -16387,7 +16381,7 @@ parameters:
1638716381
path: app/cdash/tests/kwtest/kw_web_tester.php
1638816382

1638916383
-
16390-
rawMessage: Property class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:803::$read has no type specified.
16384+
rawMessage: Property class@anonymous/app/cdash/tests/kwtest/kw_web_tester.php:802::$read has no type specified.
1639116385
identifier: missingType.property
1639216386
count: 1
1639316387
path: app/cdash/tests/kwtest/kw_web_tester.php

resources/js/vue/components/ProjectSettings/GeneralTab.vue

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,6 @@
148148
label="Display Labels"
149149
test-id="display-labels-input"
150150
/>
151-
152-
<CheckboxField
153-
v-model="form.showViewSubProjectsLink"
154-
:validation-error="validationErrors?.showViewSubProjectsLink?.[0]"
155-
label="Show View SubProjects Link"
156-
description="If this Project uses SubProjects, show a per-SubProject breakdown by default.
157-
If unchecked, CDash will show per-build results instead."
158-
test-id="view-subprojects-link-input"
159-
/>
160151
</FormSection>
161152

162153
<FormSection
@@ -552,7 +543,6 @@ export default {
552543
fileUploadLimit: 50,
553544
showCoverageCode: true,
554545
shareLabelFilters: false,
555-
showViewSubProjectsLink: true,
556546
banner: '',
557547
},
558548
validationErrors: {},
@@ -598,7 +588,6 @@ export default {
598588
fileUploadLimit
599589
showCoverageCode
600590
shareLabelFilters
601-
showViewSubProjectsLink
602591
banner
603592
}
604593
}

tests/Browser/Pages/ProjectSettingsPageTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ public static function canChangeGeneralTabFieldCases(): array
122122
['@banner-input', '', 'banner', null, 'string'],
123123
['@display-labels-input', true, 'displaylabels', true, 'checkbox'],
124124
['@display-labels-input', false, 'displaylabels', false, 'checkbox'],
125-
['@view-subprojects-link-input', true, 'viewsubprojectslink', true, 'checkbox'],
126-
['@view-subprojects-link-input', false, 'viewsubprojectslink', false, 'checkbox'],
127125
['@nightly-time-input', '23:01:01', 'nightlytime', '23:01:01', 'string'],
128126
['@autoremove-time-frame-input', 7, 'autoremovetimeframe', 7, 'string'],
129127
['@autoremove-max-builds-input', 100, 'autoremovemaxbuilds', 100, 'string'],

tests/Feature/GraphQL/Mutations/UpdateProjectTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ public static function fieldValues(): array
208208
['fileUploadLimit', 50, 'uploadquota', 53687091200],
209209
['showCoverageCode', false, 'showcoveragecode', false],
210210
['shareLabelFilters', false, 'sharelabelfilters', false],
211-
['showViewSubProjectsLink', false, 'viewsubprojectslink', false],
212211
['banner', 'new banner', 'banner', 'new banner'],
213212
];
214213
}

0 commit comments

Comments
 (0)