2022-04-04 11:22:00 +05:30
|
|
|
<script>
|
2022-10-11 01:57:18 +05:30
|
|
|
import { GlIntersperse, GlLink } from '@gitlab/ui';
|
|
|
|
import { helpPagePath } from '~/helpers/help_page_helper';
|
2022-04-04 11:22:00 +05:30
|
|
|
import { s__ } from '~/locale';
|
2022-10-11 01:57:18 +05:30
|
|
|
import HelpPopover from '~/vue_shared/components/help_popover.vue';
|
2022-04-04 11:22:00 +05:30
|
|
|
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
|
|
|
|
import { timeIntervalInWords } from '~/lib/utils/datetime_utility';
|
|
|
|
import { ACCESS_LEVEL_REF_PROTECTED, GROUP_TYPE, PROJECT_TYPE } from '../constants';
|
|
|
|
import RunnerDetail from './runner_detail.vue';
|
|
|
|
import RunnerGroups from './runner_groups.vue';
|
|
|
|
import RunnerProjects from './runner_projects.vue';
|
|
|
|
import RunnerTags from './runner_tags.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
GlIntersperse,
|
2022-10-11 01:57:18 +05:30
|
|
|
GlLink,
|
|
|
|
HelpPopover,
|
2022-04-04 11:22:00 +05:30
|
|
|
RunnerDetail,
|
2022-07-23 23:45:48 +05:30
|
|
|
RunnerMaintenanceNoteDetail: () =>
|
2023-01-13 00:05:48 +05:30
|
|
|
import('ee_component/ci/runner/components/runner_maintenance_note_detail.vue'),
|
2022-04-04 11:22:00 +05:30
|
|
|
RunnerGroups,
|
|
|
|
RunnerProjects,
|
2022-08-13 15:12:31 +05:30
|
|
|
RunnerUpgradeStatusBadge: () =>
|
2023-01-13 00:05:48 +05:30
|
|
|
import('ee_component/ci/runner/components/runner_upgrade_status_badge.vue'),
|
2022-08-13 15:12:31 +05:30
|
|
|
RunnerUpgradeStatusAlert: () =>
|
2023-01-13 00:05:48 +05:30
|
|
|
import('ee_component/ci/runner/components/runner_upgrade_status_alert.vue'),
|
2022-04-04 11:22:00 +05:30
|
|
|
RunnerTags,
|
|
|
|
TimeAgo,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
runner: {
|
|
|
|
type: Object,
|
|
|
|
required: false,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
maximumTimeout() {
|
|
|
|
const { maximumTimeout } = this.runner;
|
|
|
|
if (typeof maximumTimeout !== 'number') {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
return timeIntervalInWords(maximumTimeout);
|
|
|
|
},
|
|
|
|
configTextProtected() {
|
|
|
|
if (this.runner.accessLevel === ACCESS_LEVEL_REF_PROTECTED) {
|
|
|
|
return s__('Runners|Protected');
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
configTextUntagged() {
|
|
|
|
if (this.runner.runUntagged) {
|
|
|
|
return s__('Runners|Runs untagged jobs');
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
},
|
2022-08-27 11:52:29 +05:30
|
|
|
tagList() {
|
|
|
|
return this.runner.tagList || [];
|
|
|
|
},
|
2022-04-04 11:22:00 +05:30
|
|
|
isGroupRunner() {
|
|
|
|
return this.runner?.runnerType === GROUP_TYPE;
|
|
|
|
},
|
|
|
|
isProjectRunner() {
|
|
|
|
return this.runner?.runnerType === PROJECT_TYPE;
|
|
|
|
},
|
2022-10-11 01:57:18 +05:30
|
|
|
tokenExpirationHelpPopoverOptions() {
|
|
|
|
return {
|
|
|
|
title: s__('Runners|Runner authentication token expiration'),
|
|
|
|
};
|
|
|
|
},
|
|
|
|
tokenExpirationHelpUrl() {
|
|
|
|
return helpPagePath('ci/runners/configure_runners', {
|
|
|
|
anchor: 'authentication-token-security',
|
|
|
|
});
|
|
|
|
},
|
2022-04-04 11:22:00 +05:30
|
|
|
},
|
|
|
|
ACCESS_LEVEL_REF_PROTECTED,
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-08-13 15:12:31 +05:30
|
|
|
<div>
|
|
|
|
<runner-upgrade-status-alert class="gl-my-4" :runner="runner" />
|
|
|
|
<div class="gl-pt-4">
|
2022-08-27 11:52:29 +05:30
|
|
|
<dl
|
|
|
|
class="gl-mb-0 gl-display-grid runner-details-grid-template"
|
|
|
|
data-testid="runner-details-list"
|
|
|
|
>
|
2022-08-13 15:12:31 +05:30
|
|
|
<runner-detail :label="s__('Runners|Description')" :value="runner.description" />
|
|
|
|
<runner-detail
|
|
|
|
:label="s__('Runners|Last contact')"
|
|
|
|
:empty-value="s__('Runners|Never contacted')"
|
|
|
|
>
|
2022-08-27 11:52:29 +05:30
|
|
|
<template v-if="runner.contactedAt" #value>
|
|
|
|
<time-ago :time="runner.contactedAt" />
|
2022-08-13 15:12:31 +05:30
|
|
|
</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')">
|
2022-08-27 11:52:29 +05:30
|
|
|
<template v-if="configTextProtected || configTextUntagged" #value>
|
|
|
|
<gl-intersperse>
|
2022-08-13 15:12:31 +05:30
|
|
|
<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" />
|
2022-11-25 23:54:43 +05:30
|
|
|
<runner-detail :empty-value="s__('Runners|Never expires')">
|
2022-10-11 01:57:18 +05:30
|
|
|
<template #label>
|
|
|
|
{{ s__('Runners|Token expiry') }}
|
|
|
|
<help-popover :options="tokenExpirationHelpPopoverOptions">
|
|
|
|
<p>
|
|
|
|
{{
|
|
|
|
s__(
|
|
|
|
'Runners|Runner authentication tokens will expire based on a set interval. They will automatically rotate once expired.',
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
</p>
|
|
|
|
<p class="gl-mb-0">
|
|
|
|
<gl-link
|
|
|
|
:href="tokenExpirationHelpUrl"
|
|
|
|
target="_blank"
|
|
|
|
class="gl-reset-font-size"
|
|
|
|
>{{ __('Learn more') }}</gl-link
|
|
|
|
>
|
|
|
|
</p>
|
|
|
|
</help-popover>
|
|
|
|
</template>
|
|
|
|
<template v-if="runner.tokenExpiresAt" #value>
|
|
|
|
<time-ago :time="runner.tokenExpiresAt" />
|
|
|
|
</template>
|
|
|
|
</runner-detail>
|
2022-08-13 15:12:31 +05:30
|
|
|
<runner-detail :label="s__('Runners|Tags')">
|
2022-08-27 11:52:29 +05:30
|
|
|
<template v-if="tagList.length" #value>
|
|
|
|
<runner-tags class="gl-vertical-align-middle" :tag-list="tagList" size="sm" />
|
2022-08-13 15:12:31 +05:30
|
|
|
</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>
|
2022-04-04 11:22:00 +05:30
|
|
|
|
2022-08-13 15:12:31 +05:30
|
|
|
<runner-groups v-if="isGroupRunner" :runner="runner" />
|
|
|
|
<runner-projects v-if="isProjectRunner" :runner="runner" />
|
|
|
|
</div>
|
2022-04-04 11:22:00 +05:30
|
|
|
</template>
|