Commit 23c45929 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '19819-rename-runner-app-to-admin-runner-app' into 'master'

Rename "runner list" app to "admin runners"

See merge request gitlab-org/gitlab!66375
parents b4bbfc72 45727000
...@@ -2,7 +2,7 @@ import AdminRunnersFilteredSearchTokenKeys from '~/filtered_search/admin_runners ...@@ -2,7 +2,7 @@ import AdminRunnersFilteredSearchTokenKeys from '~/filtered_search/admin_runners
import { FILTERED_SEARCH } from '~/pages/constants'; import { FILTERED_SEARCH } from '~/pages/constants';
import initFilteredSearch from '~/pages/search/init_filtered_search'; import initFilteredSearch from '~/pages/search/init_filtered_search';
import { initInstallRunner } from '~/pages/shared/mount_runner_instructions'; import { initInstallRunner } from '~/pages/shared/mount_runner_instructions';
import { initRunnerList } from '~/runner/runner_list'; import { initAdminRunners } from '~/runner/admin_runners';
initFilteredSearch({ initFilteredSearch({
page: FILTERED_SEARCH.ADMIN_RUNNERS, page: FILTERED_SEARCH.ADMIN_RUNNERS,
...@@ -13,5 +13,5 @@ initFilteredSearch({ ...@@ -13,5 +13,5 @@ initFilteredSearch({
initInstallRunner(); initInstallRunner();
if (gon.features?.runnerListViewVueUi) { if (gon.features?.runnerListViewVueUi) {
initRunnerList(); initAdminRunners();
} }
...@@ -9,15 +9,15 @@ import RunnerPagination from '../components/runner_pagination.vue'; ...@@ -9,15 +9,15 @@ import RunnerPagination from '../components/runner_pagination.vue';
import RunnerTypeHelp from '../components/runner_type_help.vue'; import RunnerTypeHelp from '../components/runner_type_help.vue';
import { INSTANCE_TYPE, I18N_FETCH_ERROR } from '../constants'; import { INSTANCE_TYPE, I18N_FETCH_ERROR } from '../constants';
import getRunnersQuery from '../graphql/get_runners.query.graphql'; import getRunnersQuery from '../graphql/get_runners.query.graphql';
import { captureException } from '../sentry_utils';
import { import {
fromUrlQueryToSearch, fromUrlQueryToSearch,
fromSearchToUrl, fromSearchToUrl,
fromSearchToVariables, fromSearchToVariables,
} from './runner_search_utils'; } from '../runner_search_utils';
import { captureException } from '../sentry_utils';
export default { export default {
name: 'RunnerListApp', name: 'AdminRunnersApp',
components: { components: {
RunnerFilteredSearchBar, RunnerFilteredSearchBar,
RunnerList, RunnerList,
......
import Vue from 'vue'; import Vue from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql'; import createDefaultClient from '~/lib/graphql';
import RunnerDetailsApp from './runner_list_app.vue'; import AdminRunnersApp from './admin_runners_app.vue';
Vue.use(VueApollo); Vue.use(VueApollo);
export const initRunnerList = (selector = '#js-runner-list') => { export const initAdminRunners = (selector = '#js-admin-runners') => {
const el = document.querySelector(selector); const el = document.querySelector(selector);
if (!el) { if (!el) {
...@@ -32,7 +32,7 @@ export const initRunnerList = (selector = '#js-runner-list') => { ...@@ -32,7 +32,7 @@ export const initRunnerList = (selector = '#js-runner-list') => {
runnerInstallHelpPage, runnerInstallHelpPage,
}, },
render(h) { render(h) {
return h(RunnerDetailsApp, { return h(AdminRunnersApp, {
props: { props: {
activeRunnersCount: parseInt(activeRunnersCount, 10), activeRunnersCount: parseInt(activeRunnersCount, 10),
registrationToken, registrationToken,
......
...@@ -16,7 +16,7 @@ import { ...@@ -16,7 +16,7 @@ import {
PARAM_KEY_BEFORE, PARAM_KEY_BEFORE,
DEFAULT_SORT, DEFAULT_SORT,
RUNNER_PAGE_SIZE, RUNNER_PAGE_SIZE,
} from '../constants'; } from './constants';
const getPaginationFromParams = (params) => { const getPaginationFromParams = (params) => {
const page = parseInt(params[PARAM_KEY_PAGE], 10); const page = parseInt(params[PARAM_KEY_PAGE], 10);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- page_title _('Runners') - page_title _('Runners')
- if Feature.enabled?(:runner_list_view_vue_ui, current_user, default_enabled: :yaml) - if Feature.enabled?(:runner_list_view_vue_ui, current_user, default_enabled: :yaml)
#js-runner-list{ data: { registration_token: Gitlab::CurrentSettings.runners_registration_token, runner_install_help_page: 'https://docs.gitlab.com/runner/install/', active_runners_count: @active_runners_count } } #js-admin-runners{ data: { registration_token: Gitlab::CurrentSettings.runners_registration_token, runner_install_help_page: 'https://docs.gitlab.com/runner/install/', active_runners_count: @active_runners_count } }
- else - else
.row .row
.col-sm-6 .col-sm-6
......
...@@ -6,6 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises'; ...@@ -6,6 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { updateHistory } from '~/lib/utils/url_utility'; import { updateHistory } from '~/lib/utils/url_utility';
import AdminRunnersApp from '~/runner/admin_runners/admin_runners_app.vue';
import RunnerFilteredSearchBar from '~/runner/components/runner_filtered_search_bar.vue'; import RunnerFilteredSearchBar from '~/runner/components/runner_filtered_search_bar.vue';
import RunnerList from '~/runner/components/runner_list.vue'; import RunnerList from '~/runner/components/runner_list.vue';
import RunnerManualSetupHelp from '~/runner/components/runner_manual_setup_help.vue'; import RunnerManualSetupHelp from '~/runner/components/runner_manual_setup_help.vue';
...@@ -22,7 +23,6 @@ import { ...@@ -22,7 +23,6 @@ import {
RUNNER_PAGE_SIZE, RUNNER_PAGE_SIZE,
} from '~/runner/constants'; } from '~/runner/constants';
import getRunnersQuery from '~/runner/graphql/get_runners.query.graphql'; import getRunnersQuery from '~/runner/graphql/get_runners.query.graphql';
import RunnerListApp from '~/runner/runner_list/runner_list_app.vue';
import { captureException } from '~/runner/sentry_utils'; import { captureException } from '~/runner/sentry_utils';
import { runnersData, runnersDataPaginated } from '../mock_data'; import { runnersData, runnersDataPaginated } from '../mock_data';
...@@ -40,7 +40,7 @@ jest.mock('~/lib/utils/url_utility', () => ({ ...@@ -40,7 +40,7 @@ jest.mock('~/lib/utils/url_utility', () => ({
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(VueApollo); localVue.use(VueApollo);
describe('RunnerListApp', () => { describe('AdminRunnersApp', () => {
let wrapper; let wrapper;
let mockRunnersQuery; let mockRunnersQuery;
let originalLocation; let originalLocation;
...@@ -54,7 +54,7 @@ describe('RunnerListApp', () => { ...@@ -54,7 +54,7 @@ describe('RunnerListApp', () => {
const createComponentWithApollo = ({ props = {}, mountFn = shallowMount } = {}) => { const createComponentWithApollo = ({ props = {}, mountFn = shallowMount } = {}) => {
const handlers = [[getRunnersQuery, mockRunnersQuery]]; const handlers = [[getRunnersQuery, mockRunnersQuery]];
wrapper = mountFn(RunnerListApp, { wrapper = mountFn(AdminRunnersApp, {
localVue, localVue,
apolloProvider: createMockApollo(handlers), apolloProvider: createMockApollo(handlers),
propsData: { propsData: {
...@@ -197,7 +197,7 @@ describe('RunnerListApp', () => { ...@@ -197,7 +197,7 @@ describe('RunnerListApp', () => {
it('error is reported to sentry', async () => { it('error is reported to sentry', async () => {
expect(captureException).toHaveBeenCalledWith({ expect(captureException).toHaveBeenCalledWith({
error: new Error('Network error: Error!'), error: new Error('Network error: Error!'),
component: 'RunnerListApp', component: 'AdminRunnersApp',
}); });
}); });
......
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
fromUrlQueryToSearch, fromUrlQueryToSearch,
fromSearchToUrl, fromSearchToUrl,
fromSearchToVariables, fromSearchToVariables,
} from '~/runner/runner_list/runner_search_utils'; } from '~/runner/runner_search_utils';
describe('search_params.js', () => { describe('search_params.js', () => {
const examples = [ const examples = [
......
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