Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-12 21:08:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-12 21:08:46 +0300
commit0ba11d8461a2b091d37bb6308d85e74f2b133803 (patch)
tree272034571557b979fdebb767cf4e12bdd3810d27 /app/assets/javascripts/runner
parent5ab111376fadee3c9cef3c84080743e917751bfa (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/runner')
-rw-r--r--app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue45
-rw-r--r--app/assets/javascripts/runner/components/runner_details.vue113
-rw-r--r--app/assets/javascripts/runner/constants.js1
-rw-r--r--app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue2
4 files changed, 79 insertions, 82 deletions
diff --git a/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue b/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue
index 06a8eb790fc..9fa4b521ebc 100644
--- a/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue
+++ b/app/assets/javascripts/runner/admin_runner_show/admin_runner_show_app.vue
@@ -1,5 +1,5 @@
<script>
-import { GlBadge, GlTab, GlTooltipDirective } from '@gitlab/ui';
+import { GlBadge, GlTabs, GlTab, GlTooltipDirective } from '@gitlab/ui';
import { createAlert, VARIANT_SUCCESS } from '~/flash';
import { TYPE_CI_RUNNER } from '~/graphql_shared/constants';
import { convertToGraphQLId } from '~/graphql_shared/utils';
@@ -11,7 +11,7 @@ import RunnerPauseButton from '../components/runner_pause_button.vue';
import RunnerHeader from '../components/runner_header.vue';
import RunnerDetails from '../components/runner_details.vue';
import RunnerJobs from '../components/runner_jobs.vue';
-import { I18N_FETCH_ERROR } from '../constants';
+import { I18N_DETAILS, I18N_FETCH_ERROR } from '../constants';
import runnerQuery from '../graphql/show/runner.query.graphql';
import { captureException } from '../sentry_utils';
import { saveAlertToLocalStorage } from '../local_storage_alert/save_alert_to_local_storage';
@@ -20,6 +20,7 @@ export default {
name: 'AdminRunnerShowApp',
components: {
GlBadge,
+ GlTabs,
GlTab,
RunnerDeleteButton,
RunnerEditButton,
@@ -84,6 +85,7 @@ export default {
redirectTo(this.runnersPath);
},
},
+ I18N_DETAILS,
};
</script>
<template>
@@ -96,24 +98,27 @@ export default {
</template>
</runner-header>
- <runner-details :runner="runner">
- <template #jobs-tab>
- <gl-tab>
- <template #title>
- {{ s__('Runners|Jobs') }}
- <gl-badge
- v-if="jobCount"
- data-testid="job-count-badge"
- class="gl-tab-counter-badge"
- size="sm"
- >
- {{ jobCount }}
- </gl-badge>
- </template>
+ <gl-tabs>
+ <gl-tab>
+ <template #title>{{ $options.I18N_DETAILS }}</template>
- <runner-jobs v-if="runner" :runner="runner" />
- </gl-tab>
- </template>
- </runner-details>
+ <runner-details v-if="runner" :runner="runner" />
+ </gl-tab>
+ <gl-tab>
+ <template #title>
+ {{ s__('Runners|Jobs') }}
+ <gl-badge
+ v-if="jobCount"
+ data-testid="job-count-badge"
+ class="gl-tab-counter-badge"
+ size="sm"
+ >
+ {{ jobCount }}
+ </gl-badge>
+ </template>
+
+ <runner-jobs v-if="runner" :runner="runner" />
+ </gl-tab>
+ </gl-tabs>
</div>
</template>
diff --git a/app/assets/javascripts/runner/components/runner_details.vue b/app/assets/javascripts/runner/components/runner_details.vue
index 3c03804a79f..60469d26dd5 100644
--- a/app/assets/javascripts/runner/components/runner_details.vue
+++ b/app/assets/javascripts/runner/components/runner_details.vue
@@ -1,5 +1,5 @@
<script>
-import { GlTabs, GlTab, GlIntersperse } from '@gitlab/ui';
+import { GlIntersperse } from '@gitlab/ui';
import { s__ } from '~/locale';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { timeIntervalInWords } from '~/lib/utils/datetime_utility';
@@ -11,8 +11,6 @@ import RunnerTags from './runner_tags.vue';
export default {
components: {
- GlTabs,
- GlTab,
GlIntersperse,
RunnerDetail,
RunnerMaintenanceNoteDetail: () =>
@@ -65,64 +63,57 @@ export default {
</script>
<template>
- <gl-tabs>
- <gl-tab>
- <template #title>{{ s__('Runners|Details') }}</template>
-
- <template v-if="runner">
- <runner-upgrade-status-alert class="gl-my-4" :runner="runner" />
- <div class="gl-pt-4">
- <dl class="gl-mb-0" data-testid="runner-details-list">
- <runner-detail :label="s__('Runners|Description')" :value="runner.description" />
- <runner-detail
- :label="s__('Runners|Last contact')"
- :empty-value="s__('Runners|Never contacted')"
- >
- <template #value>
- <time-ago v-if="runner.contactedAt" :time="runner.contactedAt" />
- </template>
- </runner-detail>
- <runner-detail :label="s__('Runners|Version')">
- <template v-if="runner.version" #value>
- {{ runner.version }}
- <runner-upgrade-status-badge size="sm" :runner="runner" />
- </template>
- </runner-detail>
- <runner-detail :label="s__('Runners|IP Address')" :value="runner.ipAddress" />
- <runner-detail :label="s__('Runners|Executor')" :value="runner.executorName" />
- <runner-detail :label="s__('Runners|Architecture')" :value="runner.architectureName" />
- <runner-detail :label="s__('Runners|Platform')" :value="runner.platformName" />
- <runner-detail :label="s__('Runners|Configuration')">
- <template #value>
- <gl-intersperse v-if="configTextProtected || configTextUntagged">
- <span v-if="configTextProtected">{{ configTextProtected }}</span>
- <span v-if="configTextUntagged">{{ configTextUntagged }}</span>
- </gl-intersperse>
- </template>
- </runner-detail>
- <runner-detail :label="s__('Runners|Maximum job timeout')" :value="maximumTimeout" />
- <runner-detail :label="s__('Runners|Tags')">
- <template #value>
- <runner-tags
- v-if="runner.tagList && runner.tagList.length"
- class="gl-vertical-align-middle"
- :tag-list="runner.tagList"
- size="sm"
- />
- </template>
- </runner-detail>
-
- <runner-maintenance-note-detail
- class="gl-pt-4 gl-border-t-gray-100 gl-border-t-1 gl-border-t-solid"
- :value="runner.maintenanceNoteHtml"
+ <div>
+ <runner-upgrade-status-alert class="gl-my-4" :runner="runner" />
+ <div class="gl-pt-4">
+ <dl class="gl-mb-0" data-testid="runner-details-list">
+ <runner-detail :label="s__('Runners|Description')" :value="runner.description" />
+ <runner-detail
+ :label="s__('Runners|Last contact')"
+ :empty-value="s__('Runners|Never contacted')"
+ >
+ <template #value>
+ <time-ago v-if="runner.contactedAt" :time="runner.contactedAt" />
+ </template>
+ </runner-detail>
+ <runner-detail :label="s__('Runners|Version')">
+ <template v-if="runner.version" #value>
+ {{ runner.version }}
+ <runner-upgrade-status-badge size="sm" :runner="runner" />
+ </template>
+ </runner-detail>
+ <runner-detail :label="s__('Runners|IP Address')" :value="runner.ipAddress" />
+ <runner-detail :label="s__('Runners|Executor')" :value="runner.executorName" />
+ <runner-detail :label="s__('Runners|Architecture')" :value="runner.architectureName" />
+ <runner-detail :label="s__('Runners|Platform')" :value="runner.platformName" />
+ <runner-detail :label="s__('Runners|Configuration')">
+ <template #value>
+ <gl-intersperse v-if="configTextProtected || configTextUntagged">
+ <span v-if="configTextProtected">{{ configTextProtected }}</span>
+ <span v-if="configTextUntagged">{{ configTextUntagged }}</span>
+ </gl-intersperse>
+ </template>
+ </runner-detail>
+ <runner-detail :label="s__('Runners|Maximum job timeout')" :value="maximumTimeout" />
+ <runner-detail :label="s__('Runners|Tags')">
+ <template #value>
+ <runner-tags
+ v-if="runner.tagList && runner.tagList.length"
+ class="gl-vertical-align-middle"
+ :tag-list="runner.tagList"
+ size="sm"
/>
- </dl>
- </div>
+ </template>
+ </runner-detail>
+
+ <runner-maintenance-note-detail
+ class="gl-pt-4 gl-border-t-gray-100 gl-border-t-1 gl-border-t-solid"
+ :value="runner.maintenanceNoteHtml"
+ />
+ </dl>
+ </div>
- <runner-groups v-if="isGroupRunner" :runner="runner" />
- <runner-projects v-if="isProjectRunner" :runner="runner" />
- </template>
- </gl-tab>
- <slot name="jobs-tab"></slot>
- </gl-tabs>
+ <runner-groups v-if="isGroupRunner" :runner="runner" />
+ <runner-projects v-if="isProjectRunner" :runner="runner" />
+ </div>
</template>
diff --git a/app/assets/javascripts/runner/constants.js b/app/assets/javascripts/runner/constants.js
index b9621c26b59..64541729701 100644
--- a/app/assets/javascripts/runner/constants.js
+++ b/app/assets/javascripts/runner/constants.js
@@ -81,6 +81,7 @@ export const I18N_LOCKED_RUNNER_DESCRIPTION = s__(
// Runner details
+export const I18N_DETAILS = s__('Runners|Details');
export const I18N_ASSIGNED_PROJECTS = s__('Runners|Assigned Projects (%{projectCount})');
export const I18N_NONE = __('None');
export const I18N_NO_JOBS_FOUND = s__('Runners|This runner has not run any jobs.');
diff --git a/app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue b/app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue
index ce5033d23f3..75138b1bd81 100644
--- a/app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue
+++ b/app/assets/javascripts/runner/group_runner_show/group_runner_show_app.vue
@@ -89,6 +89,6 @@ export default {
</template>
</runner-header>
- <runner-details :runner="runner" />
+ <runner-details v-if="runner" :runner="runner" />
</div>
</template>