Commit 090977c2 authored by Tom Quirk's avatar Tom Quirk

Move jira_issues_list_root to new name

The naming of this file is not representative
of what it does. This commit renames all related
names to be more meaningful.
parent 717304f1
...@@ -11,7 +11,7 @@ import { n__ } from '~/locale'; ...@@ -11,7 +11,7 @@ import { n__ } from '~/locale';
import getIssuesListDetailsQuery from '../queries/get_issues_list_details.query.graphql'; import getIssuesListDetailsQuery from '../queries/get_issues_list_details.query.graphql';
export default { export default {
name: 'JiraIssuesList', name: 'JiraIssuesImportStatus',
components: { components: {
GlAlert, GlAlert,
GlLabel, GlLabel,
...@@ -89,13 +89,13 @@ export default { ...@@ -89,13 +89,13 @@ export default {
</script> </script>
<template> <template>
<div class="issuable-list-root"> <div class="gl-my-5">
<gl-alert v-if="jiraImport.shouldShowInProgressAlert" @dismiss="hideInProgressAlert"> <gl-alert v-if="jiraImport.shouldShowInProgressAlert" @dismiss="hideInProgressAlert">
{{ __('Import in progress. Refresh page to see newly added issues.') }} {{ __('Import in progress. Refresh page to see newly added issues.') }}
</gl-alert> </gl-alert>
<gl-alert <gl-alert
v-if="jiraImport.shouldShowFinishedAlert" v-else-if="jiraImport.shouldShowFinishedAlert"
variant="success" variant="success"
@dismiss="hideFinishedAlert" @dismiss="hideFinishedAlert"
> >
......
...@@ -3,10 +3,10 @@ import VueApollo from 'vue-apollo'; ...@@ -3,10 +3,10 @@ import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql'; import createDefaultClient from '~/lib/graphql';
import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import IssuablesListApp from './components/issuables_list_app.vue'; import IssuablesListApp from './components/issuables_list_app.vue';
import JiraIssuesListRoot from './components/jira_issues_list_root.vue'; import JiraIssuesImportStatusRoot from './components/jira_issues_import_status_app.vue';
function mountJiraIssuesListApp() { function mountJiraIssuesListApp() {
const el = document.querySelector('.js-projects-issues-root'); const el = document.querySelector('.js-jira-issues-import-status');
if (!el) { if (!el) {
return false; return false;
...@@ -23,7 +23,7 @@ function mountJiraIssuesListApp() { ...@@ -23,7 +23,7 @@ function mountJiraIssuesListApp() {
el, el,
apolloProvider, apolloProvider,
render(createComponent) { render(createComponent) {
return createComponent(JiraIssuesListRoot, { return createComponent(JiraIssuesImportStatusRoot, {
props: { props: {
canEdit: parseBoolean(el.dataset.canEdit), canEdit: parseBoolean(el.dataset.canEdit),
isJiraConfigured: parseBoolean(el.dataset.isJiraConfigured), isJiraConfigured: parseBoolean(el.dataset.isJiraConfigured),
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
= content_for :meta_tags do = content_for :meta_tags do
= auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} issues") = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} issues")
.js-projects-issues-root{ data: { can_edit: can?(current_user, :admin_project, @project).to_s, .js-jira-issues-import-status{ data: { can_edit: can?(current_user, :admin_project, @project).to_s,
is_jira_configured: @project.jira_service.present?.to_s, is_jira_configured: @project.jira_service.present?.to_s,
issues_path: project_issues_path(@project), issues_path: project_issues_path(@project),
project_path: @project.full_path } } project_path: @project.full_path } }
......
@import '../../../../../app/assets/stylesheets/page_bundles/issues_list'; @import '../../../../../app/assets/stylesheets/page_bundles/issues_list';
.issuable-list-root {
.gl-label-link {
text-decoration: none;
&:hover {
color: inherit;
}
}
}
.svg-container.jira-logo-container { .svg-container.jira-logo-container {
svg { svg {
vertical-align: text-bottom; vertical-align: text-bottom;
......
import { GlAlert, GlLabel } from '@gitlab/ui'; import { GlAlert, GlLabel } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import JiraIssuesListRoot from '~/issues_list/components/jira_issues_list_root.vue'; import JiraIssuesImportStatus from '~/issues_list/components/jira_issues_import_status_app.vue';
describe('JiraIssuesListRoot', () => { describe('JiraIssuesImportStatus', () => {
const issuesPath = 'gitlab-org/gitlab-test/-/issues'; const issuesPath = 'gitlab-org/gitlab-test/-/issues';
const label = { const label = {
color: '#333', color: '#333',
...@@ -19,7 +19,7 @@ describe('JiraIssuesListRoot', () => { ...@@ -19,7 +19,7 @@ describe('JiraIssuesListRoot', () => {
shouldShowFinishedAlert = false, shouldShowFinishedAlert = false,
shouldShowInProgressAlert = false, shouldShowInProgressAlert = false,
} = {}) => } = {}) =>
shallowMount(JiraIssuesListRoot, { shallowMount(JiraIssuesImportStatus, {
propsData: { propsData: {
canEdit: true, canEdit: true,
isJiraConfigured: true, isJiraConfigured: true,
......
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