Commit 349d0668 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix more eslint rules

parent e2b759a2
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
// Avoid the potential for the real-time data to say APPLICATION_INSTALLABLE but // Avoid the potential for the real-time data to say APPLICATION_INSTALLABLE but
// we already made a request to install and are just waiting for the real-time // we already made a request to install and are just waiting for the real-time
// to sync up. // to sync up.
return (this.status !== APPLICATION_INSTALLABLE && this.status !== APPLICATION_ERROR) || return (this.status !== APPLICATION_INSTALLABLE
&& this.status !== APPLICATION_ERROR) ||
this.requestStatus === REQUEST_LOADING || this.requestStatus === REQUEST_LOADING ||
this.requestStatus === REQUEST_SUCCESS; this.requestStatus === REQUEST_SUCCESS;
}, },
...@@ -83,7 +84,8 @@ ...@@ -83,7 +84,8 @@
this.status === APPLICATION_ERROR this.status === APPLICATION_ERROR
) { ) {
label = s__('ClusterIntegration|Install'); label = s__('ClusterIntegration|Install');
} else if (this.status === APPLICATION_SCHEDULED || this.status === APPLICATION_INSTALLING) { } else if (this.status === APPLICATION_SCHEDULED ||
this.status === APPLICATION_INSTALLING) {
label = s__('ClusterIntegration|Installing'); label = s__('ClusterIntegration|Installing');
} else if (this.status === APPLICATION_INSTALLED) { } else if (this.status === APPLICATION_INSTALLED) {
label = s__('ClusterIntegration|Installed'); label = s__('ClusterIntegration|Installed');
...@@ -92,7 +94,8 @@ ...@@ -92,7 +94,8 @@
return label; return label;
}, },
hasError() { hasError() {
return this.status === APPLICATION_ERROR || this.requestStatus === REQUEST_FAILURE; return this.status === APPLICATION_ERROR ||
this.requestStatus === REQUEST_FAILURE;
}, },
generalErrorDescription() { generalErrorDescription() {
return sprintf( return sprintf(
......
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
{{ __('Introducing Cycle Analytics') }} {{ __('Introducing Cycle Analytics') }}
</h4> </h4>
<p> <p>
{{ __('Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.') }} {{ __(`Cycle Analytics gives an overview
of how much time it takes to go from idea to production in your project.`) }}
</p> </p>
<p> <p>
<a <a
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
{{ s__("Environments|You don't have any environments right now.") }} {{ s__("Environments|You don't have any environments right now.") }}
</h2> </h2>
<p class="blank-state-text"> <p class="blank-state-text">
{{ s__("Environments|Environments are places where code gets deployed, such as staging or production.") }} {{ s__(`Environments|Environments are places where
code gets deployed, such as staging or production.`) }}
<br /> <br />
<a :href="helpPath"> <a :href="helpPath">
{{ s__("Environments|Read more about environments") }} {{ s__("Environments|Read more about environments") }}
......
...@@ -30,20 +30,16 @@ export default { ...@@ -30,20 +30,16 @@ export default {
default: false, default: false,
}, },
}, },
computed: {
shouldRenderFolderContent() {
return this.model.isFolder &&
this.model.isOpen &&
this.model.children &&
this.model.children.length > 0;
},
},
methods: { methods: {
folderUrl(model) { folderUrl(model) {
return `${window.location.pathname}/folders/${model.folderName}`; return `${window.location.pathname}/folders/${model.folderName}`;
}, },
shouldRenderFolderContent(env) {
return env.isFolder &&
env.isOpen &&
env.children &&
env.children.length > 0;
},
}, },
}; };
</script> </script>
...@@ -99,7 +95,7 @@ export default { ...@@ -99,7 +95,7 @@ export default {
/> />
<template <template
v-if="shouldRenderFolderContent" v-if="shouldRenderFolderContent(model)"
> >
<div <div
v-if="model.isLoadingFolderContent" v-if="model.isLoadingFolderContent"
...@@ -110,11 +106,11 @@ export default { ...@@ -110,11 +106,11 @@ export default {
<template v-else> <template v-else>
<div <div
is="environment-item" is="environment-item"
v-for="children in model.children" v-for="(children, index) in model.children"
:model="children" :model="children"
:can-create-deployment="canCreateDeployment" :can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment" :can-read-environment="canReadEnvironment"
:key="i" :key="index"
/> />
<div :key="i"> <div :key="i">
......
...@@ -88,7 +88,8 @@ export default { ...@@ -88,7 +88,8 @@ export default {
:item="group" :item="group"
/> />
<div <div
class="folder-toggle-wrap"> class="folder-toggle-wrap"
>
<item-caret <item-caret
:is-group-open="group.isOpen" :is-group-open="group.isOpen"
/> />
...@@ -113,13 +114,14 @@ export default { ...@@ -113,13 +114,14 @@ export default {
<identicon <identicon
v-else v-else
size-class="s24" size-class="s24"
:entity-id=group.id :entity-id="group.id"
:entity-name="group.name" :entity-name="group.name"
/> />
</a> </a>
</div> </div>
<div <div
class="title namespace-title"> class="title namespace-title"
>
<a <a
v-tooltip v-tooltip
:href="group.relativePath" :href="group.relativePath"
...@@ -135,7 +137,7 @@ export default { ...@@ -135,7 +137,7 @@ export default {
v-if="group.permission" v-if="group.permission"
class="user-access-role" class="user-access-role"
> >
{{group.permission}} {{ group.permission }}
</span> </span>
</div> </div>
<div <div
......
<script> <script>
import { mapState, mapGetters } from 'vuex'; import { mapState, mapGetters } from 'vuex';
import ideSidebar from './ide_side_bar.vue'; import ideSidebar from './ide_side_bar.vue';
import ideContextbar from './ide_context_bar.vue'; import ideContextbar from './ide_context_bar.vue';
import repoTabs from './repo_tabs.vue'; import repoTabs from './repo_tabs.vue';
import repoFileButtons from './repo_file_buttons.vue'; import repoFileButtons from './repo_file_buttons.vue';
import ideStatusBar from './ide_status_bar.vue'; import ideStatusBar from './ide_status_bar.vue';
import repoPreview from './repo_preview.vue'; import repoPreview from './repo_preview.vue';
import repoEditor from './repo_editor.vue'; import repoEditor from './repo_editor.vue';
export default { export default {
components: {
ideSidebar,
ideContextbar,
repoTabs,
repoFileButtons,
ideStatusBar,
repoEditor,
repoPreview,
},
props: { props: {
emptyStateSvgPath: { emptyStateSvgPath: {
type: String, type: String,
...@@ -25,15 +34,6 @@ export default { ...@@ -25,15 +34,6 @@ export default {
'activeFile', 'activeFile',
]), ]),
}, },
components: {
ideSidebar,
ideContextbar,
repoTabs,
repoFileButtons,
ideStatusBar,
repoEditor,
repoPreview,
},
mounted() { mounted() {
const returnValue = 'Are you sure you want to lose unsaved changes?'; const returnValue = 'Are you sure you want to lose unsaved changes?';
window.onbeforeunload = (e) => { window.onbeforeunload = (e) => {
...@@ -45,35 +45,38 @@ export default { ...@@ -45,35 +45,38 @@ export default {
return returnValue; return returnValue;
}; };
}, },
}; };
</script> </script>
<template> <template>
<div <div
class="ide-view" class="ide-view"
> >
<ide-sidebar/> <ide-sidebar />
<div <div
class="multi-file-edit-pane" class="multi-file-edit-pane"
> >
<template <template
v-if="activeFile"> v-if="activeFile"
>
<repo-tabs/> <repo-tabs/>
<component <component
class="multi-file-edit-pane-content" class="multi-file-edit-pane-content"
:is="currentBlobView" :is="currentBlobView"
/> />
<repo-file-buttons/> <repo-file-buttons />
<ide-status-bar <ide-status-bar
:file="selectedFile"/> :file="selectedFile"
/>
</template> </template>
<template <template
v-else> v-else
>
<div class="ide-empty-state"> <div class="ide-empty-state">
<div class="row js-empty-state"> <div class="row js-empty-state">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="svg-content svg-250"> <div class="svg-content svg-250">
<img :src="emptyStateSvgPath"> <img :src="emptyStateSvgPath" />
</div> </div>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
...@@ -82,7 +85,8 @@ export default { ...@@ -82,7 +85,8 @@ export default {
Welcome to the GitLab IDE Welcome to the GitLab IDE
</h4> </h4>
<p> <p>
You can select a file in the left sidebar to begin editing and use the right sidebar to commit your changes. You can select a file in the left sidebar to begin
editing and use the right sidebar to commit your changes.
</p> </p>
</div> </div>
</div> </div>
......
...@@ -44,21 +44,24 @@ export default { ...@@ -44,21 +44,24 @@ export default {
</script> </script>
<template> <template>
<div> <div>
<div class="ide-file-list"> <div class="ide-file-list">
<table class="table"> <table class="table">
<tbody <tbody
v-if="treeId"> v-if="treeId"
>
<repo-previous-directory <repo-previous-directory
v-if="hasPreviousDirectory" v-if="hasPreviousDirectory"
/> />
<template v-if="showLoading">
<div <div
class="multi-file-loading-container" class="multi-file-loading-container"
v-if="showLoading"
v-for="n in 3" v-for="n in 3"
:key="n"> :key="n"
<skeleton-loading-container/> >
<skeleton-loading-container />
</div> </div>
</template>
<repo-file <repo-file
v-for="file in fetchedList" v-for="file in fetchedList"
:key="file.key" :key="file.key"
...@@ -67,5 +70,5 @@ export default { ...@@ -67,5 +70,5 @@ export default {
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import projectTree from './ide_project_tree.vue'; import projectTree from './ide_project_tree.vue';
import icon from '../../vue_shared/components/icon.vue'; import icon from '../../vue_shared/components/icon.vue';
import panelResizer from '../../vue_shared/components/panel_resizer.vue'; import panelResizer from '../../vue_shared/components/panel_resizer.vue';
import skeletonLoadingContainer from '../../vue_shared/components/skeleton_loading_container.vue'; import skeletonLoadingContainer from '../../vue_shared/components/skeleton_loading_container.vue';
export default { export default {
components: { components: {
projectTree, projectTree,
icon, icon,
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
this.setResizingStatus(false); this.setResizingStatus(false);
}, },
}, },
}; };
</script> </script>
<template> <template>
...@@ -69,13 +69,15 @@ export default { ...@@ -69,13 +69,15 @@ export default {
:style="panelStyle" :style="panelStyle"
> >
<div class="multi-file-commit-panel-inner"> <div class="multi-file-commit-panel-inner">
<template v-if="showLoading">
<div <div
class="multi-file-loading-container" class="multi-file-loading-container"
v-if="showLoading"
v-for="n in 3" v-for="n in 3"
:key="n"> :key="n"
<skeleton-loading-container/> >
<skeleton-loading-container />
</div> </div>
</template>
<project-tree <project-tree
v-for="project in projects" v-for="project in projects"
:key="project.id" :key="project.id"
......
...@@ -111,7 +111,8 @@ export default { ...@@ -111,7 +111,8 @@ export default {
:primary-button-label="__('Create new branch')" :primary-button-label="__('Create new branch')"
kind="primary" kind="primary"
:title="__('Branch has changed')" :title="__('Branch has changed')"
:text="__('This branch has changed since you started editing. Would you like to create a new branch?')" :text="__(`This branch has changed since
you started editing. Would you like to create a new branch?`)"
@cancel="showNewBranchModal = false" @cancel="showNewBranchModal = false"
@submit="makeCommit(true)" @submit="makeCommit(true)"
/> />
......
...@@ -60,6 +60,11 @@ ...@@ -60,6 +60,11 @@
}; };
}, },
}, },
updated() {
if (this.file.type === 'blob' && this.file.active) {
this.$el.scrollIntoView();
}
},
methods: { methods: {
clickFile(row) { clickFile(row) {
// Manual Action if a tree is selected/opened // Manual Action if a tree is selected/opened
...@@ -72,11 +77,6 @@ ...@@ -72,11 +77,6 @@
this.$router.push(`/project${row.url}`); this.$router.push(`/project${row.url}`);
}, },
}, },
updated() {
if (this.file.type === 'blob' && this.file.active) {
this.$el.scrollIntoView();
}
},
}; };
</script> </script>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
return !this.isLoading && Object.keys(this.job).length; return !this.isLoading && Object.keys(this.job).length;
}, },
jobStarted() { jobStarted() {
return this.job.started; return this.job.started !== undefined;
}, },
}, },
watch: { watch: {
......
...@@ -17,6 +17,15 @@ ...@@ -17,6 +17,15 @@
const d3 = { scaleLinear, scaleTime, axisLeft, axisBottom, max, extent, select }; const d3 = { scaleLinear, scaleTime, axisLeft, axisBottom, max, extent, select };
export default { export default {
components: {
GraphLegend,
GraphFlag,
GraphDeployment,
GraphPath,
},
mixins: [MonitoringMixin],
props: { props: {
graphData: { graphData: {
type: Object, type: Object,
...@@ -45,8 +54,6 @@ ...@@ -45,8 +54,6 @@
}, },
}, },
mixins: [MonitoringMixin],
data() { data() {
return { return {
baseGraphHeight: 450, baseGraphHeight: 450,
...@@ -74,13 +81,6 @@ ...@@ -74,13 +81,6 @@
}; };
}, },
components: {
GraphLegend,
GraphFlag,
GraphDeployment,
GraphPath,
},
computed: { computed: {
outerViewBox() { outerViewBox() {
return `0 0 ${this.baseGraphWidth} ${this.baseGraphHeight}`; return `0 0 ${this.baseGraphWidth} ${this.baseGraphHeight}`;
...@@ -105,6 +105,26 @@ ...@@ -105,6 +105,26 @@
}, },
}, },
watch: {
updateAspectRatio() {
if (this.updateAspectRatio) {
this.graphHeight = 450;
this.graphWidth = 600;
this.measurements = measurements.large;
this.draw();
eventHub.$emit('toggleAspectRatio');
}
},
hoverData() {
this.positionFlag();
},
},
mounted() {
this.draw();
},
methods: { methods: {
draw() { draw() {
const breakpointSize = bp.getBreakpointSize(); const breakpointSize = bp.getBreakpointSize();
...@@ -197,26 +217,6 @@ ...@@ -197,26 +217,6 @@
}); // This will select all of the ticks once they're rendered }); // This will select all of the ticks once they're rendered
}, },
}, },
watch: {
updateAspectRatio() {
if (this.updateAspectRatio) {
this.graphHeight = 450;
this.graphWidth = 600;
this.measurements = measurements.large;
this.draw();
eventHub.$emit('toggleAspectRatio');
}
},
hoverData() {
this.positionFlag();
},
},
mounted() {
this.draw();
},
}; };
</script> </script>
...@@ -224,24 +224,27 @@ ...@@ -224,24 +224,27 @@
<div <div
class="prometheus-graph" class="prometheus-graph"
@mouseover="showFlagContent = true" @mouseover="showFlagContent = true"
@mouseleave="showFlagContent = false"> @mouseleave="showFlagContent = false"
>
<h5 class="text-center graph-title"> <h5 class="text-center graph-title">
{{graphData.title}} {{ graphData.title }}
</h5> </h5>
<div <div
class="prometheus-svg-container" class="prometheus-svg-container"
:style="paddingBottomRootSvg"> :style="paddingBottomRootSvg"
>
<svg <svg
:viewBox="outerViewBox" :viewBox="outerViewBox"
ref="baseSvg"> ref="baseSvg"
>
<g <g
class="x-axis" class="x-axis"
:transform="axisTransform"> :transform="axisTransform"
</g> />
<g <g
class="y-axis" class="y-axis"
transform="translate(70, 20)"> transform="translate(70, 20)"
</g> />
<graph-legend <graph-legend
:graph-width="graphWidth" :graph-width="graphWidth"
:graph-height="graphHeight" :graph-height="graphHeight"
...@@ -256,7 +259,8 @@ ...@@ -256,7 +259,8 @@
<svg <svg
class="graph-data" class="graph-data"
:viewBox="innerViewBox" :viewBox="innerViewBox"
ref="graphData"> ref="graphData"
>
<graph-path <graph-path
v-for="(path, index) in timeSeries" v-for="(path, index) in timeSeries"
:key="index" :key="index"
...@@ -277,8 +281,8 @@ ...@@ -277,8 +281,8 @@
:height="(graphHeight - 100)" :height="(graphHeight - 100)"
transform="translate(-5, 20)" transform="translate(-5, 20)"
ref="graphOverlay" ref="graphOverlay"
@mousemove="handleMouseOverGraph($event)"> @mousemove="handleMouseOverGraph($event)"
</rect> />
</svg> </svg>
</svg> </svg>
<graph-flag <graph-flag
......
...@@ -39,33 +39,35 @@ ...@@ -39,33 +39,35 @@
y="0" y="0"
:height="calculatedHeight" :height="calculatedHeight"
width="3" width="3"
fill="url(#shadow-gradient)"> fill="url(#shadow-gradient)"
</rect> />
<line <line
class="deployment-line" class="deployment-line"
x1="0" x1="0"
y1="0" y1="0"
x2="0" x2="0"
:y2="calculatedHeight" :y2="calculatedHeight"
stroke="#000"> stroke="#000"
</line> />
</g> </g>
<svg <svg
height="0" height="0"
width="0"> width="0"
>
<defs> <defs>
<linearGradient <linearGradient
id="shadow-gradient"> id="shadow-gradient"
>
<stop <stop
offset="0%" offset="0%"
stop-color="#000" stop-color="#000"
stop-opacity="0.4"> stop-opacity="0.4"
</stop> />
<stop <stop
offset="100%" offset="100%"
stop-color="#000" stop-color="#000"
stop-opacity="0"> stop-opacity="0"
</stop> />
</linearGradient> </linearGradient>
</defs> </defs>
</svg> </svg>
......
<script> <script>
import { dateFormat, timeFormat } from '../../utils/date_time_formatters'; import { dateFormat, timeFormat } from '../../utils/date_time_formatters';
import { formatRelevantDigits } from '../../../lib/utils/number_utils'; import { formatRelevantDigits } from '../../../lib/utils/number_utils';
import Icon from '../../../vue_shared/components/icon.vue'; import icon from '../../../vue_shared/components/icon.vue';
export default { export default {
components: {
icon,
},
props: { props: {
currentXCoordinate: { currentXCoordinate: {
type: Number, type: Number,
...@@ -52,10 +55,6 @@ ...@@ -52,10 +55,6 @@
}, },
}, },
components: {
Icon,
},
computed: { computed: {
formatTime() { formatTime() {
return this.deploymentFlagData ? return this.deploymentFlagData ?
...@@ -137,33 +136,34 @@ ...@@ -137,33 +136,34 @@
> >
<div class="arrow"></div> <div class="arrow"></div>
<div class="popover-title"> <div class="popover-title">
<h5 v-if="this.deploymentFlagData"> <h5 v-if="deploymentFlagData">
Deployed Deployed
</h5> </h5>
{{formatDate}} at {{ formatDate }} at
<strong>{{formatTime}}</strong> <strong>{{ formatTime }}</strong>
</div> </div>
<div <div
v-if="this.deploymentFlagData" v-if="deploymentFlagData"
class="popover-content deploy-meta-content" class="popover-content deploy-meta-content"
> >
<div> <div>
<icon <icon
name="commit" name="commit"
:size="12"> :size="12"
</icon> />
<a :href="deploymentFlagData.commitUrl"> <a :href="deploymentFlagData.commitUrl">
{{deploymentFlagData.sha.slice(0, 8)}} {{ deploymentFlagData.sha.slice(0, 8) }}
</a> </a>
</div> </div>
<div <div
v-if="deploymentFlagData.tag"> v-if="deploymentFlagData.tag"
>
<icon <icon
name="label" name="label"
:size="12"> :size="12"
</icon> />
<a :href="deploymentFlagData.tagUrl"> <a :href="deploymentFlagData.tagUrl">
{{deploymentFlagData.ref}} {{ deploymentFlagData.ref }}
</a> </a>
</div> </div>
</div> </div>
...@@ -174,7 +174,10 @@ ...@@ -174,7 +174,10 @@
:key="index" :key="index"
> >
<td> <td>
<svg width="15" height="6"> <svg
width="15"
height="6"
>
<line <line
:stroke="series.lineColor" :stroke="series.lineColor"
:stroke-dasharray="strokeDashArray(series.lineStyle)" :stroke-dasharray="strokeDashArray(series.lineStyle)"
...@@ -182,13 +185,13 @@ ...@@ -182,13 +185,13 @@
x1="0" x1="0"
x2="15" x2="15"
y1="2" y1="2"
y2="2"> y2="2"
</line> />
</svg> </svg>
</td> </td>
<td>{{seriesMetricLabel(index, series)}}</td> <td>{{ seriesMetricLabel(index, series) }}</td>
<td> <td>
<strong>{{seriesMetricValue(series)}}</strong> <strong>{{ seriesMetricValue(series) }}</strong>
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -291,7 +291,8 @@ Please check your network connection and try again.`; ...@@ -291,7 +291,8 @@ Please check your network connection and try again.`;
<textarea <textarea
id="note-body" id="note-body"
name="note[note]" name="note[note]"
class="note-textarea js-vue-comment-form js-gfm-input js-autosize markdown-area js-vue-textarea" class="note-textarea js-vue-comment-form
js-gfm-input js-autosize markdown-area js-vue-textarea"
data-supports-quick-actions="true" data-supports-quick-actions="true"
aria-label="Description" aria-label="Description"
v-model="note" v-model="note"
...@@ -304,7 +305,8 @@ Please check your network connection and try again.`; ...@@ -304,7 +305,8 @@ Please check your network connection and try again.`;
</textarea> </textarea>
</markdown-field> </markdown-field>
<div class="note-form-actions"> <div class="note-form-actions">
<div class="pull-left btn-group append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"> <div class="pull-left btn-group
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
<button <button
@click.prevent="handleSave()" @click.prevent="handleSave()"
:disabled="isSubmitButtonDisabled" :disabled="isSubmitButtonDisabled"
......
...@@ -146,7 +146,8 @@ ...@@ -146,7 +146,8 @@
<textarea <textarea
id="note_note" id="note_note"
name="note[note]" name="note[note]"
class="note-textarea js-gfm-input js-autosize markdown-area js-vue-issue-note-form js-vue-textarea" class="note-textarea js-gfm-input
js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
:data-supports-quick-actions="!isEditing" :data-supports-quick-actions="!isEditing"
aria-label="Description" aria-label="Description"
v-model="note" v-model="note"
......
...@@ -48,7 +48,9 @@ ...@@ -48,7 +48,9 @@
<div class="user-callout-copy"> <div class="user-callout-copy">
<h4>{{ __('Scheduling Pipelines') }}</h4> <h4>{{ __('Scheduling Pipelines') }}</h4>
<p> <p>
{{ __('The pipelines schedule runs pipelines in the future, repeatedly, for specific branches or tags. Those scheduled pipelines will inherit limited project access based on their associated user.') }} {{ __(`The pipelines schedule runs pipelines in the future,
repeatedly, for specific branches or tags.
Those scheduled pipelines will inherit limited project access based on their associated user.`) }}
</p> </p>
<p> {{ __('Learn more in the') }} <p> {{ __('Learn more in the') }}
<a <a
......
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
{{ s__("Pipelines|Build with confidence") }} {{ s__("Pipelines|Build with confidence") }}
</h4> </h4>
<p> <p>
{{ s__("Pipelines|Continous Integration can help catch bugs by running your tests automatically, while Continuous Deployment can help you deliver code to your product environment.") }} {{ s__(`Pipelines|Continous Integration can help
catch bugs by running your tests automatically,
while Continuous Deployment can help you deliver code to your product environment.`) }}
</p> </p>
<div class="text-center"> <div class="text-center">
<a <a
......
...@@ -197,7 +197,8 @@ ...@@ -197,7 +197,8 @@
<div class="pipelines-container"> <div class="pipelines-container">
<div <div
class="top-area scrolling-tabs-container inner-page-scroll-tabs" class="top-area scrolling-tabs-container inner-page-scroll-tabs"
v-if="!shouldRenderEmptyState"> v-if="!shouldRenderEmptyState"
>
<div class="fade-left"> <div class="fade-left">
<i <i
class="fa fa-angle-left" class="fa fa-angle-left"
...@@ -221,7 +222,7 @@ ...@@ -221,7 +222,7 @@
:new-pipeline-path="newPipelinePath" :new-pipeline-path="newPipelinePath"
:has-ci-enabled="hasCiEnabled" :has-ci-enabled="hasCiEnabled"
:help-page-path="helpPagePath" :help-page-path="helpPagePath"
:resetCachePath="resetCachePath" :reset-cache-path="resetCachePath"
:ci-lint-path="ciLintPath" :ci-lint-path="ciLintPath"
:can-create-pipeline="canCreatePipelineParsed " :can-create-pipeline="canCreatePipelineParsed "
/> />
......
...@@ -40,14 +40,17 @@ ...@@ -40,14 +40,17 @@
visibilityHelpPath: { visibilityHelpPath: {
type: String, type: String,
required: false, required: false,
default: '',
}, },
lfsHelpPath: { lfsHelpPath: {
type: String, type: String,
required: false, required: false,
default: '',
}, },
registryHelpPath: { registryHelpPath: {
type: String, type: String,
required: false, required: false,
default: '',
}, },
}, },
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
matcher: { matcher: {
type: String, type: String,
required: false, required: false,
default: '',
}, },
projectId: { projectId: {
type: Number, type: Number,
...@@ -27,6 +28,7 @@ ...@@ -27,6 +28,7 @@
required: true, required: true,
}, },
avatarUrl: { avatarUrl: {
type: String,
required: true, required: true,
validator(value) { validator(value) {
return value === null || typeof value === 'string'; return value === null || typeof value === 'string';
...@@ -38,7 +40,7 @@ ...@@ -38,7 +40,7 @@
return this.avatarUrl !== null; return this.avatarUrl !== null;
}, },
highlightedProjectName() { highlightedProjectName() {
if (this.matcher) { if (this.matcher !== '') {
const matcherRegEx = new RegExp(this.matcher, 'gi'); const matcherRegEx = new RegExp(this.matcher, 'gi');
const matches = this.projectName.match(matcherRegEx); const matches = this.projectName.match(matcherRegEx);
......
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
/> />
<p v-else-if="!isLoading && !repos.length"> <p v-else-if="!isLoading && !repos.length">
{{ __("No container images stored for this project. Add one by following the instructions above.") }} {{ __(`No container images stored for this project.
Add one by following the instructions above.`) }}
</p> </p>
</div> </div>
</template> </template>
...@@ -105,7 +105,9 @@ ...@@ -105,7 +105,9 @@
</span> </span>
</template> </template>
<template v-if="!mr.rebaseInProgress && mr.canPushToSourceBranch && !isMakingRequest"> <template v-if="!mr.rebaseInProgress && mr.canPushToSourceBranch && !isMakingRequest">
<div class="accept-merge-holder clearfix js-toggle-container accept-action media space-children"> <div
class="accept-merge-holder clearfix
js-toggle-container accept-action media space-children">
<button <button
type="button" type="button"
class="btn btn-sm btn-reopen btn-success" class="btn btn-sm btn-reopen btn-success"
......
<script> <script>
import ciIconBadge from './ci_badge_link.vue'; import ciIconBadge from './ci_badge_link.vue';
import loadingIcon from './loading_icon.vue'; import loadingIcon from './loading_icon.vue';
import timeagoTooltip from './time_ago_tooltip.vue'; import timeagoTooltip from './time_ago_tooltip.vue';
import tooltip from '../directives/tooltip'; import tooltip from '../directives/tooltip';
import userAvatarImage from './user_avatar/user_avatar_image.vue'; import userAvatarImage from './user_avatar/user_avatar_image.vue';
/** /**
* Renders header component for job and pipeline page based on UI mockups * Renders header component for job and pipeline page based on UI mockups
* *
* Used in: * Used in:
* - job show page * - job show page
* - pipeline show page * - pipeline show page
*/ */
export default { export default {
components: {
ciIconBadge,
loadingIcon,
timeagoTooltip,
userAvatarImage,
},
directives: {
tooltip,
},
props: { props: {
status: { status: {
type: Object, type: Object,
...@@ -52,17 +61,6 @@ export default { ...@@ -52,17 +61,6 @@ export default {
}, },
}, },
directives: {
tooltip,
},
components: {
ciIconBadge,
loadingIcon,
timeagoTooltip,
userAvatarImage,
},
computed: { computed: {
userAvatarAltText() { userAvatarAltText() {
return `${this.user.name}'s avatar`; return `${this.user.name}'s avatar`;
...@@ -74,7 +72,7 @@ export default { ...@@ -74,7 +72,7 @@ export default {
this.$emit('actionClicked', action); this.$emit('actionClicked', action);
}, },
}, },
}; };
</script> </script>
<template> <template>
...@@ -84,7 +82,7 @@ export default { ...@@ -84,7 +82,7 @@ export default {
<ci-icon-badge :status="status" /> <ci-icon-badge :status="status" />
<strong> <strong>
{{itemName}} #{{itemId}} {{ itemName }} #{{ itemId }}
</strong> </strong>
<template v-if="shouldRenderTriggeredLabel"> <template v-if="shouldRenderTriggeredLabel">
...@@ -103,7 +101,8 @@ export default { ...@@ -103,7 +101,8 @@ export default {
v-tooltip v-tooltip
:href="user.path" :href="user.path"
:title="user.email" :title="user.email"
class="js-user-link commit-committer-link"> class="js-user-link commit-committer-link"
>
<user-avatar-image <user-avatar-image
:img-src="user.avatar_url" :img-src="user.avatar_url"
...@@ -112,7 +111,7 @@ export default { ...@@ -112,7 +111,7 @@ export default {
:img-size="24" :img-size="24"
/> />
{{user.name}} {{ user.name }}
</a> </a>
</template> </template>
</section> </section>
...@@ -121,12 +120,15 @@ export default { ...@@ -121,12 +120,15 @@ export default {
class="header-action-buttons" class="header-action-buttons"
v-if="actions.length"> v-if="actions.length">
<template <template
v-for="action in actions"> v-for="(action, i) in actions"
>
<a <a
v-if="action.type === 'link'" v-if="action.type === 'link'"
:href="action.path" :href="action.path"
:class="action.cssClass"> :class="action.cssClass"
{{action.label}} :key="i"
>
{{ action.label }}
</a> </a>
<a <a
...@@ -134,8 +136,10 @@ export default { ...@@ -134,8 +136,10 @@ export default {
:href="action.path" :href="action.path"
data-method="post" data-method="post"
rel="nofollow" rel="nofollow"
:class="action.cssClass"> :class="action.cssClass"
{{action.label}} :key="i"
>
{{ action.label }}
</a> </a>
<button <button
...@@ -143,25 +147,31 @@ export default { ...@@ -143,25 +147,31 @@ export default {
@click="onClickAction(action)" @click="onClickAction(action)"
:disabled="action.isLoading" :disabled="action.isLoading"
:class="action.cssClass" :class="action.cssClass"
type="button"> type="button"
{{action.label}} :key="i"
>
{{ action.label }}
<i <i
v-show="action.isLoading" v-show="action.isLoading"
class="fa fa-spin fa-spinner" class="fa fa-spin fa-spinner"
aria-hidden="true"> aria-hidden="true"
>
</i> </i>
</button> </button>
</template> </template>
<button <button
v-if="hasSidebarButton" v-if="hasSidebarButton"
type="button" type="button"
class="btn btn-default visible-xs-block visible-sm-block sidebar-toggle-btn js-sidebar-build-toggle js-sidebar-build-toggle-header" class="btn btn-default visible-xs-block
visible-sm-block sidebar-toggle-btn js-sidebar-build-toggle js-sidebar-build-toggle-header"
aria-label="Toggle Sidebar" aria-label="Toggle Sidebar"
id="toggleSidebar"> id="toggleSidebar"
>
<i <i
class="fa fa-angle-double-left" class="fa fa-angle-double-left"
aria-hidden="true" aria-hidden="true"
aria-labelledby="toggleSidebar"> aria-labelledby="toggleSidebar"
>
</i> </i>
</button> </button>
</section> </section>
......
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
<span v-if="isLockedAndConfidential"> <span v-if="isLockedAndConfidential">
{{ __('This issue is confidential and locked.') }} {{ __('This issue is confidential and locked.') }}
{{ __('People without permission will never get a notification and won\'t be able to comment.') }} {{ __(`People without permission will never
get a notification and won't be able to comment.`) }}
</span> </span>
<span v-else-if="isConfidential"> <span v-else-if="isConfidential">
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</script> </script>
<template> <template>
<component <component
:is="this.rootElementType" :is="rootElementType"
class="text-center"> class="text-center">
<i <i
class="fa fa-spin fa-spinner" class="fa fa-spin fa-spinner"
......
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