Skip to content

Commit 39656cc

Browse files
Rename commands page to "instrumentation" (#3663)
The distinction between the build commands page (which exclusively displays instrumentation data) and the build targets page (which is currently only useful if instrumentation data was submitted, but is intended to be used without instrumentation in the future) is currently unclear to users. This PR renames the build commands page to build "instrumentation".
1 parent 7e8bfef commit 39656cc

6 files changed

Lines changed: 9 additions & 8 deletions

File tree

app/Http/Controllers/BuildController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ public function build(Request $request, int $build_id): View
5959
return $this->vue('build-build-page', 'Build', $params);
6060
}
6161

62-
public function commands(int $build_id): View
62+
public function instrumentation(int $build_id): View
6363
{
6464
$this->setBuildById($build_id);
6565

6666
$filters = json_decode(request()->query('filters')) ?? ['all' => []];
6767

68-
return $this->vue('build-commands-page', 'Commands', [
68+
return $this->vue('build-instrumentation-page', 'Instrumentation', [
6969
'build-id' => $this->build->Id,
7070
'initial-filters' => $filters,
7171
]);

resources/js/vue/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const app = Vue.createApp({
2828
UsersPage: Vue.defineAsyncComponent(() => import('./components/UsersPage.vue')),
2929
BuildFilesPage: Vue.defineAsyncComponent(() => import('./components/BuildFilesPage.vue')),
3030
BuildTargetsPage: Vue.defineAsyncComponent(() => import('./components/BuildTargetsPage.vue')),
31-
BuildCommandsPage: Vue.defineAsyncComponent(() => import('./components/BuildCommandsPage.vue')),
31+
BuildInstrumentationPage: Vue.defineAsyncComponent(() => import('./components/BuildInstrumentationPage.vue')),
3232
BuildBuildPage: Vue.defineAsyncComponent(() => import('./components/BuildBuildPage.vue')),
3333
CoverageFilePage: Vue.defineAsyncComponent(() => import('./components/CoverageFilePage.vue')),
3434
BuildCoveragePage: Vue.defineAsyncComponent(() => import('./components/BuildCoveragePage.vue')),
File renamed without changes.

resources/js/vue/components/shared/BuildSidebar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@
8181
data-test="sidebar-notes"
8282
/>
8383
<build-sidebar-item
84-
:href="`${$baseURL}/builds/${buildId}/commands`"
84+
:href="`${$baseURL}/builds/${buildId}/instrumentation`"
8585
title="Instrumentation"
8686
:icon="FA.faGaugeHigh"
8787
:selected="activeTab === 'instrumentation'"
88-
:disabled="commandsDisabled"
88+
:disabled="instrumentationDisabled"
8989
data-test="sidebar-instrumentation"
9090
/>
9191
<build-sidebar-item
@@ -255,7 +255,7 @@ export default {
255255
notesDisabled() {
256256
return !this.build || !this.build.notes || this.build.notes.pageInfo.total === 0;
257257
},
258-
commandsDisabled() {
258+
instrumentationDisabled() {
259259
return !this.build || !this.build.commands || this.build.commands.pageInfo.total === 0;
260260
},
261261
targetsDisabled() {

routes/web.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@
131131
Route::get('/builds/{build_id}/targets', 'BuildController@targets')
132132
->whereNumber('build_id');
133133

134-
Route::get('/builds/{build_id}/commands', 'BuildController@commands')
134+
Route::get('/builds/{build_id}/instrumentation', 'BuildController@instrumentation')
135135
->whereNumber('build_id');
136+
Route::permanentRedirect('/build/{build_id}/commands', url('/builds/{build_id}/instrumentation'));
136137

137138
Route::get('/builds/{build_id}/files', 'BuildController@files')
138139
->whereNumber('build_id');

tests/Browser/Pages/BuildSidebarComponentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public function testInstrumentationItem(): void
355355
'workingdirectory' => Str::uuid()->toString(),
356356
]);
357357

358-
$this->assertNotDisabled($browser, "/builds/{$build->id}", '@sidebar-instrumentation', "/builds/{$build->id}/commands");
358+
$this->assertNotDisabled($browser, "/builds/{$build->id}", '@sidebar-instrumentation', "/builds/{$build->id}/instrumentation");
359359
});
360360
}
361361

0 commit comments

Comments
 (0)