Commit c3a85d79 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch...

Merge branch '350357-relocate-runner-data-in-the-admin-runner-view-ip-address-table-column' into 'master'

Relocate runner IP Address to Runner column

See merge request gitlab-org/gitlab!83841
parents a663fb3d 74421bd2
......@@ -33,6 +33,9 @@ export default {
description() {
return this.runner.description;
},
ipAddress() {
return this.runner.ipAddress;
},
},
i18n: {
I18N_LOCKED_RUNNER_DESCRIPTION,
......@@ -53,10 +56,11 @@ export default {
:title="$options.i18n.I18N_LOCKED_RUNNER_DESCRIPTION"
name="lock"
/>
<tooltip-on-truncate class="gl-display-block" :title="description" truncate-target="child">
<div class="gl-text-truncate">
{{ description }}
</div>
<tooltip-on-truncate class="gl-display-block gl-text-truncate" :title="description">
{{ description }}
</tooltip-on-truncate>
<tooltip-on-truncate class="gl-display-block gl-text-truncate" :title="ipAddress">
{{ __('IP Address') }} <strong>{{ ipAddress }}</strong>
</tooltip-on-truncate>
</div>
</template>
......@@ -60,7 +60,6 @@ export default {
tableField({ key: 'status', label: s__('Runners|Status') }),
tableField({ key: 'summary', label: s__('Runners|Runner'), thClasses: ['gl-lg-w-25p'] }),
tableField({ key: 'version', label: __('Version') }),
tableField({ key: 'ipAddress', label: __('IP') }),
tableField({ key: 'jobCount', label: __('Jobs') }),
tableField({ key: 'tagList', label: __('Tags'), thClasses: ['gl-lg-w-25p'] }),
tableField({ key: 'contactedAt', label: __('Last contact') }),
......@@ -99,12 +98,6 @@ export default {
</tooltip-on-truncate>
</template>
<template #cell(ipAddress)="{ item: { ipAddress } }">
<tooltip-on-truncate class="gl-display-block gl-text-truncate" :title="ipAddress">
{{ ipAddress }}
</tooltip-on-truncate>
</template>
<template #cell(jobCount)="{ item: { jobCount } }">
{{ formatJobCount(jobCount) }}
</template>
......
......@@ -18659,9 +18659,6 @@ msgstr ""
msgid "INFO: Your SSH key is expiring soon. Please generate a new key."
msgstr ""
msgid "IP"
msgstr ""
msgid "IP Address"
msgstr ""
......
......@@ -5,6 +5,7 @@ import { INSTANCE_TYPE, PROJECT_TYPE } from '~/runner/constants';
const mockId = '1';
const mockShortSha = '2P6oDVDm';
const mockDescription = 'runner-1';
const mockIpAddress = '0.0.0.0';
describe('RunnerTypeCell', () => {
let wrapper;
......@@ -18,6 +19,7 @@ describe('RunnerTypeCell', () => {
id: `gid://gitlab/Ci::Runner/${mockId}`,
shortSha: mockShortSha,
description: mockDescription,
ipAddress: mockIpAddress,
runnerType: INSTANCE_TYPE,
...runner,
},
......@@ -59,6 +61,10 @@ describe('RunnerTypeCell', () => {
expect(wrapper.text()).toContain(mockDescription);
});
it('Displays the runner ip address', () => {
expect(wrapper.text()).toContain(mockIpAddress);
});
it('Displays a custom slot', () => {
const slotContent = 'My custom runner summary';
......
......@@ -47,7 +47,6 @@ describe('RunnerList', () => {
'Status',
'Runner',
'Version',
'IP',
'Jobs',
'Tags',
'Last contact',
......@@ -68,7 +67,7 @@ describe('RunnerList', () => {
});
it('Displays details of a runner', () => {
const { id, description, version, ipAddress, shortSha } = mockRunners[0];
const { id, description, version, shortSha } = mockRunners[0];
// Badges
expect(findCell({ fieldKey: 'status' }).text()).toMatchInterpolatedText(
......@@ -83,7 +82,6 @@ describe('RunnerList', () => {
// Other fields
expect(findCell({ fieldKey: 'version' }).text()).toBe(version);
expect(findCell({ fieldKey: 'ipAddress' }).text()).toBe(ipAddress);
expect(findCell({ fieldKey: 'jobCount' }).text()).toBe('0');
expect(findCell({ fieldKey: 'tagList' }).text()).toBe('');
expect(findCell({ fieldKey: 'contactedAt' }).text()).toEqual(expect.any(String));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment