From 7c7f52668420007d551549f34df66345f1373e36 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Fri, 5 Jan 2018 14:31:01 +0000 Subject: [ci skip] Fix more rules --- .../javascripts/boards/components/board_card.vue | 3 +- .../clusters/components/applications.vue | 12 +- .../components/stage_code_component.vue | 2 +- .../components/stage_plan_component.vue | 2 +- .../components/stage_review_component.vue | 5 +- .../components/stage_staging_component.vue | 6 +- .../components/stage_test_component.vue | 66 +- .../components/total_time_component.vue | 28 +- .../deploy_keys/components/action_btn.vue | 24 +- .../javascripts/deploy_keys/components/app.vue | 46 +- .../javascripts/deploy_keys/components/key.vue | 9 +- .../deploy_keys/components/keys_panel.vue | 12 +- .../environments/components/container.vue | 19 +- .../environments/components/empty_state.vue | 13 +- .../components/environment_actions.vue | 94 +-- .../components/environment_external_url.vue | 46 +- .../environments/components/environment_item.vue | 890 +++++++++++---------- .../issue_show/components/description.vue | 14 +- .../javascripts/issue_show/components/edited.vue | 52 +- .../issue_show/components/fields/description.vue | 6 +- .../javascripts/issue_show/components/form.vue | 26 +- .../javascripts/issue_show/components/title.vue | 28 +- app/assets/javascripts/jobs/components/header.vue | 24 +- .../jobs/components/sidebar_detail_row.vue | 7 +- .../jobs/components/sidebar_details_block.vue | 60 +- .../monitoring/components/dashboard.vue | 62 +- .../monitoring/components/empty_state.vue | 18 +- .../javascripts/monitoring/components/graph.vue | 148 ++-- .../monitoring/components/graph/deployment.vue | 74 +- .../monitoring/components/graph/flag.vue | 23 +- .../monitoring/components/graph/legend.vue | 77 +- .../monitoring/components/graph/path.vue | 9 +- .../monitoring/components/graph_group.vue | 16 +- .../javascripts/notes/components/note_actions.vue | 34 +- 34 files changed, 1035 insertions(+), 920 deletions(-) (limited to 'app') diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue index 7e0e0a13a46..23fec503586 100644 --- a/app/assets/javascripts/boards/components/board_card.vue +++ b/app/assets/javascripts/boards/components/board_card.vue @@ -89,6 +89,7 @@ export default { :issue="issue" :issue-link-base="issueLinkBase" :root-path="rootPath" - :update-filters="true" /> + :update-filters="true" + /> diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue index 38fcc006831..25cef44c1b8 100644 --- a/app/assets/javascripts/clusters/components/applications.vue +++ b/app/assets/javascripts/clusters/components/applications.vue @@ -77,12 +77,12 @@ which incur additional costs. See %{pricingLink}`)), return sprintf( _.escape(s__(`ClusterIntegration|Prometheus is an open-source monitoring system with %{gitlabIntegrationLink} to monitor deployed applications.`)), - { - gitlabIntegrationLink: ` - ${_.escape(s__('ClusterIntegration|Gitlab Integration'))} - `, - }, + { + gitlabIntegrationLink: ` + ${_.escape(s__('ClusterIntegration|Gitlab Integration'))} + `, + }, false, ); }, diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue index e06f803b30b..a71dcf78103 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue @@ -12,7 +12,7 @@ props: { items: { type: Array, - default: [] + default: () => [], }, stage: { type: Object, diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue index 4f2c8256277..cee294b4ac2 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue @@ -13,7 +13,7 @@ props: { items: { type: Array, - default: [] + default: () => [], }, stage: { type: Object, diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue index c419347d219..39b699a6395 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue @@ -14,7 +14,7 @@ props: { items: { type: Array, - default: [] + default: () => [], }, stage: { type: Object, @@ -81,8 +81,7 @@ name="fork" :size="16" /> - + {{ mergeRequest.branch.name }} diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue index 26ee5a8c69d..92f2a95a66a 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue @@ -15,7 +15,7 @@ props: { items: { type: Array, - default: [] + default: () => [], }, stage: { type: Object, @@ -69,7 +69,7 @@ + > {{ build.shortSha }} @@ -77,7 +77,7 @@ + > {{ build.date }} {{ s__('ByAuthor|by') }} diff --git a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue index 88fa6b073ca..c0f6c9ae573 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue @@ -6,15 +6,21 @@ import icon from '../../vue_shared/components/icon.vue'; export default { - props: { - items: Array, - stage: Object, - }, components: { totalTime, limitWarning, icon, }, + props: { + items: { + type: Array, + default: () => [], + }, + stage: { + type: Object, + default: () => ({}), + }, + }, computed: { iconBuildStatus() { return iconBuildStatus; @@ -35,29 +41,59 @@
  • + class="stage-event-item item-build-component" + >
    - +
  • diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.vue b/app/assets/javascripts/cycle_analytics/components/total_time_component.vue index 62efd4f9c28..08d158314b3 100644 --- a/app/assets/javascripts/cycle_analytics/components/total_time_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.vue @@ -17,10 +17,30 @@ diff --git a/app/assets/javascripts/jobs/components/sidebar_details_block.vue b/app/assets/javascripts/jobs/components/sidebar_details_block.vue index d0145fed396..56814a52525 100644 --- a/app/assets/javascripts/jobs/components/sidebar_details_block.vue +++ b/app/assets/javascripts/jobs/components/sidebar_details_block.vue @@ -6,6 +6,13 @@ export default { name: 'SidebarDetailsBlock', + components: { + detailRow, + loadingIcon, + }, + mixins: [ + timeagoMixin, + ], props: { job: { type: Object, @@ -16,13 +23,6 @@ required: true, }, }, - mixins: [ - timeagoMixin, - ], - components: { - detailRow, - loadingIcon, - }, computed: { shouldRenderContent() { return !this.isLoading && Object.keys(this.job).length > 0; @@ -58,11 +58,13 @@ diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 8da723ced03..025e38ea99a 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -11,6 +11,12 @@ export default { + components: { + Graph, + GraphGroup, + EmptyState, + }, + data() { const metricsData = document.querySelector('#prometheus-graphs').dataset; const store = new MonitoringStore(); @@ -36,12 +42,30 @@ }; }, - components: { - Graph, - GraphGroup, - EmptyState, + created() { + this.service = new MonitoringService({ + metricsEndpoint: this.metricsEndpoint, + deploymentEndpoint: this.deploymentEndpoint, + }); + eventHub.$on('toggleAspectRatio', this.toggleAspectRatio); + eventHub.$on('hoverChanged', this.hoverChanged); + }, + + beforeDestroy() { + eventHub.$off('toggleAspectRatio', this.toggleAspectRatio); + eventHub.$off('hoverChanged', this.hoverChanged); + window.removeEventListener('resize', this.resizeThrottled, false); }, + mounted() { + this.resizeThrottled = _.throttle(this.resize, 600); + if (!this.hasMetrics) { + this.state = 'gettingStarted'; + } else { + this.getGraphsData(); + window.addEventListener('resize', this.resizeThrottled, false); + } + }, methods: { getGraphsData() { this.state = 'loading'; @@ -72,36 +96,14 @@ this.hoverData = data; }, }, - - created() { - this.service = new MonitoringService({ - metricsEndpoint: this.metricsEndpoint, - deploymentEndpoint: this.deploymentEndpoint, - }); - eventHub.$on('toggleAspectRatio', this.toggleAspectRatio); - eventHub.$on('hoverChanged', this.hoverChanged); - }, - - beforeDestroy() { - eventHub.$off('toggleAspectRatio', this.toggleAspectRatio); - eventHub.$off('hoverChanged', this.hoverChanged); - window.removeEventListener('resize', this.resizeThrottled, false); - }, - - mounted() { - this.resizeThrottled = _.throttle(this.resize, 600); - if (!this.hasMetrics) { - this.state = 'gettingStarted'; - } else { - this.getGraphsData(); - window.addEventListener('resize', this.resizeThrottled, false); - } - }, };