diff options
Diffstat (limited to 'app')
15 files changed, 37 insertions, 26 deletions
diff --git a/app/assets/javascripts/boards/components/issue_card_inner.vue b/app/assets/javascripts/boards/components/issue_card_inner.vue index bdaed17fd09..274565adab0 100644 --- a/app/assets/javascripts/boards/components/issue_card_inner.vue +++ b/app/assets/javascripts/boards/components/issue_card_inner.vue @@ -177,9 +177,9 @@ export default { class="confidential-icon append-right-4" :aria-label="__('Confidential')" /> - <a :href="issue.path" :title="issue.title" class="js-no-trigger" @mousemove.stop> - {{ issue.title }} - </a> + <a :href="issue.path" :title="issue.title" class="js-no-trigger" @mousemove.stop>{{ + issue.title + }}</a> </h4> </div> <div v-if="showLabelFooter" class="board-card-labels prepend-top-4 d-flex flex-wrap"> @@ -225,7 +225,7 @@ export default { #{{ issue.iid }} </span> <span class="board-info-items prepend-top-8 d-inline-block"> - <issue-due-date v-if="issue.dueDate" :date="issue.dueDate" /> + <issue-due-date v-if="issue.dueDate" :date="issue.dueDate" :closed="issue.closed" /> <issue-time-estimate v-if="issue.timeEstimate" :estimate="issue.timeEstimate" /> <issue-card-weight v-if="validIssueWeight" diff --git a/app/assets/javascripts/boards/components/issue_due_date.vue b/app/assets/javascripts/boards/components/issue_due_date.vue index a32ebdab5e1..1d70c635c18 100644 --- a/app/assets/javascripts/boards/components/issue_due_date.vue +++ b/app/assets/javascripts/boards/components/issue_due_date.vue @@ -16,6 +16,11 @@ export default { GlTooltip, }, props: { + closed: { + type: Boolean, + required: false, + default: false, + }, date: { type: String, required: true, @@ -66,7 +71,7 @@ export default { return getDayDifference(today, this.issueDueDate); }, isPastDue() { - if (this.timeDifference >= 0) return false; + if (this.timeDifference >= 0 || this.closed) return false; return true; }, standardDateFormat() { @@ -92,7 +97,8 @@ export default { }}</time> </span> <gl-tooltip :target="() => $refs.issueDueDate" :placement="tooltipPlacement"> - <span class="bold">{{ __('Due date') }}</span> <br /> + <span class="bold">{{ __('Due date') }}</span> + <br /> <span :class="{ 'text-danger-muted': isPastDue }">{{ title }}</span> </gl-tooltip> </span> diff --git a/app/assets/javascripts/boards/models/issue.js b/app/assets/javascripts/boards/models/issue.js index 044d96a9aec..0e86359534b 100644 --- a/app/assets/javascripts/boards/models/issue.js +++ b/app/assets/javascripts/boards/models/issue.js @@ -19,6 +19,7 @@ class ListIssue { this.isFetching = { subscriptions: true, }; + this.closed = obj.closed; this.isLoading = {}; this.refreshData(obj, defaultAvatar); diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue index f5051748f10..048dc274cf2 100644 --- a/app/assets/javascripts/diffs/components/diff_file.vue +++ b/app/assets/javascripts/diffs/components/diff_file.vue @@ -1,6 +1,6 @@ <script> import { mapActions, mapGetters, mapState } from 'vuex'; -import _ from 'underscore'; +import { escape as esc } from 'lodash'; import { GlLoadingIcon } from '@gitlab/ui'; import { __, sprintf } from '~/locale'; import createFlash from '~/flash'; @@ -46,7 +46,7 @@ export default { return sprintf( __('You can %{linkStart}view the blob%{linkEnd} instead.'), { - linkStart: `<a href="${_.escape(this.file.view_path)}">`, + linkStart: `<a href="${esc(this.file.view_path)}">`, linkEnd: '</a>', }, false, diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue index 731c53a7339..d4270960f57 100644 --- a/app/assets/javascripts/diffs/components/diff_file_header.vue +++ b/app/assets/javascripts/diffs/components/diff_file_header.vue @@ -1,5 +1,5 @@ <script> -import _ from 'underscore'; +import { escape as esc } from 'lodash'; import { mapActions, mapGetters } from 'vuex'; import { GlButton, GlTooltipDirective, GlLoadingIcon } from '@gitlab/ui'; import { polyfillSticky } from '~/lib/utils/sticky'; @@ -91,7 +91,7 @@ export default { return this.expanded ? 'chevron-down' : 'chevron-right'; }, viewFileButtonText() { - const truncatedContentSha = _.escape(truncateSha(this.diffFile.content_sha)); + const truncatedContentSha = esc(truncateSha(this.diffFile.content_sha)); return sprintf( s__('MergeRequests|View file @ %{commitId}'), { commitId: truncatedContentSha }, @@ -99,7 +99,7 @@ export default { ); }, viewReplacedFileButtonText() { - const truncatedBaseSha = _.escape(truncateSha(this.diffFile.diff_refs.base_sha)); + const truncatedBaseSha = esc(truncateSha(this.diffFile.diff_refs.base_sha)); return sprintf( s__('MergeRequests|View replaced file @ %{commitId}'), { diff --git a/app/assets/javascripts/diffs/components/diff_stats.vue b/app/assets/javascripts/diffs/components/diff_stats.vue index 9d362ceb429..0234fc4f40e 100644 --- a/app/assets/javascripts/diffs/components/diff_stats.vue +++ b/app/assets/javascripts/diffs/components/diff_stats.vue @@ -1,7 +1,7 @@ <script> import Icon from '~/vue_shared/components/icon.vue'; import { n__ } from '~/locale'; -import { isNumber } from 'underscore'; +import { isNumber } from 'lodash'; export default { components: { Icon }, diff --git a/app/assets/javascripts/diffs/components/image_diff_overlay.vue b/app/assets/javascripts/diffs/components/image_diff_overlay.vue index 703a281308e..be7e6789216 100644 --- a/app/assets/javascripts/diffs/components/image_diff_overlay.vue +++ b/app/assets/javascripts/diffs/components/image_diff_overlay.vue @@ -1,6 +1,6 @@ <script> import { mapActions, mapGetters } from 'vuex'; -import _ from 'underscore'; +import { isArray } from 'lodash'; import imageDiffMixin from 'ee_else_ce/diffs/mixins/image_diff'; import Icon from '~/vue_shared/components/icon.vue'; @@ -46,7 +46,7 @@ export default { return this.getCommentFormForDiffFile(this.fileHash); }, allDiscussions() { - return _.isArray(this.discussions) ? this.discussions : [this.discussions]; + return isArray(this.discussions) ? this.discussions : [this.discussions]; }, }, methods: { diff --git a/app/assets/javascripts/diffs/components/no_changes.vue b/app/assets/javascripts/diffs/components/no_changes.vue index 47e9627a957..09cb542c3dc 100644 --- a/app/assets/javascripts/diffs/components/no_changes.vue +++ b/app/assets/javascripts/diffs/components/no_changes.vue @@ -1,6 +1,6 @@ <script> import { mapGetters } from 'vuex'; -import _ from 'underscore'; +import { escape as esc } from 'lodash'; import { GlButton } from '@gitlab/ui'; import { __, sprintf } from '~/locale'; @@ -24,8 +24,8 @@ export default { { ref_start: '<span class="ref-name">', ref_end: '</span>', - source_branch: _.escape(this.getNoteableData.source_branch), - target_branch: _.escape(this.getNoteableData.target_branch), + source_branch: esc(this.getNoteableData.source_branch), + target_branch: esc(this.getNoteableData.target_branch), }, false, ); diff --git a/app/assets/javascripts/diffs/store/utils.js b/app/assets/javascripts/diffs/store/utils.js index 29133c814ea..9c788e283b9 100644 --- a/app/assets/javascripts/diffs/store/utils.js +++ b/app/assets/javascripts/diffs/store/utils.js @@ -1,4 +1,4 @@ -import _ from 'underscore'; +import { property, isEqual } from 'lodash'; import { truncatePathMiddleToLength } from '~/lib/utils/text_utility'; import { diffModes, diffViewerModes } from '~/ide/constants'; import { @@ -442,7 +442,7 @@ export function isDiscussionApplicableToLine({ discussion, diffPosition, latestD const originalRefs = discussion.original_position; const refs = discussion.position; - return _.isEqual(refs, diffPositionCopy) || _.isEqual(originalRefs, diffPositionCopy); + return isEqual(refs, diffPositionCopy) || isEqual(originalRefs, diffPositionCopy); } // eslint-disable-next-line @@ -578,10 +578,10 @@ export const convertExpandLines = ({ for (let i = 0, diffLinesLength = diffLines.length; i < diffLinesLength; i += 1) { const line = diffLines[i]; - if (_.property(typeKey)(line) === 'match') { + if (property(typeKey)(line) === 'match') { const beforeLine = diffLines[i - 1]; const afterLine = diffLines[i + 1]; - const newLineProperty = _.property(newLineKey); + const newLineProperty = property(newLineKey); const beforeLineIndex = newLineProperty(beforeLine) || 0; const afterLineIndex = newLineProperty(afterLine) - 1 || dataLength; @@ -589,7 +589,7 @@ export const convertExpandLines = ({ ...data.slice(beforeLineIndex, afterLineIndex).map((l, index) => mapLine({ line: Object.assign(l, { hasForm: false, discussions: [] }), - oldLine: (_.property(oldLineKey)(beforeLine) || 0) + index + 1, + oldLine: (property(oldLineKey)(beforeLine) || 0) + index + 1, newLine: (newLineProperty(beforeLine) || 0) + index + 1, }), ), diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 1a06ae1ed41..347addcec37 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -316,7 +316,7 @@ $note-form-margin-left: 72px; .btn.delete-description-history { position: absolute; top: 18px; - right: 0; + right: 10px; } pre { diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb index 67d3f49af18..889dcefb65a 100644 --- a/app/controllers/projects/graphs_controller.rb +++ b/app/controllers/projects/graphs_controller.rb @@ -37,7 +37,8 @@ class Projects::GraphsController < Projects::ApplicationController private def get_commits - @commits = @project.repository.commits(@ref, limit: 2000, skip_merges: true) + @commits_limit = 2000 + @commits = @project.repository.commits(@ref, limit: @commits_limit, skip_merges: true) @commits_graph = Gitlab::Graphs::Commits.new(@commits) @commits_per_week_days = @commits_graph.commits_per_week_days @commits_per_time = @commits_graph.commits_per_time diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb index 6a9cd77d356..4886f2debb1 100644 --- a/app/models/clusters/applications/runner.rb +++ b/app/models/clusters/applications/runner.rb @@ -3,7 +3,7 @@ module Clusters module Applications class Runner < ApplicationRecord - VERSION = '0.13.1' + VERSION = '0.14.0' self.table_name = 'clusters_applications_runners' diff --git a/app/serializers/issue_board_entity.rb b/app/serializers/issue_board_entity.rb index 13897279815..ea629d9d774 100644 --- a/app/serializers/issue_board_entity.rb +++ b/app/serializers/issue_board_entity.rb @@ -12,6 +12,9 @@ class IssueBoardEntity < Grape::Entity expose :project_id expose :relative_position expose :time_estimate + expose :closed do |issue| + issue.closed? + end expose :project do |issue| API::Entities::Project.represent issue.project, only: [:id, :path] diff --git a/app/views/award_emoji/_awards_block.html.haml b/app/views/award_emoji/_awards_block.html.haml index 793ddef2c58..a063fe54c99 100644 --- a/app/views/award_emoji/_awards_block.html.haml +++ b/app/views/award_emoji/_awards_block.html.haml @@ -16,5 +16,4 @@ %span{ class: "award-control-icon award-control-icon-neutral" }= sprite_icon('slight-smile') %span{ class: "award-control-icon award-control-icon-positive" }= sprite_icon('smiley') %span{ class: "award-control-icon award-control-icon-super-positive" }= sprite_icon('smile') - = icon('spinner spin', class: "award-control-icon award-control-icon-loading") = yield diff --git a/app/views/projects/graphs/charts.html.haml b/app/views/projects/graphs/charts.html.haml index b38449b3ab9..cb76e89f736 100644 --- a/app/views/projects/graphs/charts.html.haml +++ b/app/views/projects/graphs/charts.html.haml @@ -20,6 +20,7 @@ - end_time = capture do #{@commits_graph.end_date.strftime('%b %d')} = (_("Commit statistics for %{ref} %{start_time} - %{end_time}") % { ref: "<strong>#{h @ref}</strong>", start_time: start_time, end_time: end_time }).html_safe + = _("Excluding merge commits. Limited to %{limit} commits.") % {limit: number_with_delimiter(@commits_limit, delimiter: ',')} .col-md-6 .tree-ref-container |