diff options
Diffstat (limited to 'app')
9 files changed, 26 insertions, 165 deletions
diff --git a/app/assets/javascripts/boards/components/board_card_inner.vue b/app/assets/javascripts/boards/components/board_card_inner.vue index a7f46dc9325..2c9ff3105bf 100644 --- a/app/assets/javascripts/boards/components/board_card_inner.vue +++ b/app/assets/javascripts/boards/components/board_card_inner.vue @@ -15,7 +15,6 @@ import { isScopedLabel } from '~/lib/utils/common_utils'; import { updateHistory } from '~/lib/utils/url_utility'; import { sprintf, __, n__ } from '~/locale'; import isShowingLabelsQuery from '~/graphql_shared/client/is_showing_labels.query.graphql'; -import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import WorkItemTypeIcon from '~/work_items/components/work_item_type_icon.vue'; import IssuableBlockedIcon from '~/vue_shared/components/issuable_blocked_icon/issuable_blocked_icon.vue'; @@ -32,7 +31,6 @@ export default { GlLoadingIcon, GlIcon, UserAvatarLink, - TooltipOnTruncate, IssueDueDate, IssueTimeEstimate, IssueCardWeight: () => import('ee_component/boards/components/issue_card_weight.vue'), @@ -155,6 +153,9 @@ export default { const { referencePath } = this.item; return referencePath.split(this.itemPrefix)[0]; }, + directNamespaceReference() { + return this.itemReferencePath.split('/').slice(-1)[0]; + }, orderedLabels() { return sortBy(this.item.labels.filter(this.isNonListLabel), 'title'); }, @@ -308,13 +309,15 @@ export default { :work-item-type="item.type" show-tooltip-on-hover /> - <tooltip-on-truncate + <span v-if="showReferencePath" + v-gl-tooltip :title="itemReferencePath" - placement="bottom" - class="board-item-path gl-text-truncate gl-font-weight-bold" - >{{ itemReferencePath }}</tooltip-on-truncate + data-placement="bottom" + class="board-item-path gl-text-truncate gl-font-weight-bold gl-cursor-help" > + {{ directNamespaceReference }} + </span> {{ itemId }} </span> <span class="board-info-items gl-mt-3 gl-display-inline-block"> diff --git a/app/assets/javascripts/ci/reports/codequality_report/store/actions.js b/app/assets/javascripts/ci/reports/codequality_report/store/actions.js deleted file mode 100644 index 5247faef363..00000000000 --- a/app/assets/javascripts/ci/reports/codequality_report/store/actions.js +++ /dev/null @@ -1,30 +0,0 @@ -import pollUntilComplete from '~/lib/utils/poll_until_complete'; -import { STATUS_NOT_FOUND } from '../../constants'; -import { parseCodeclimateMetrics } from '../utils/codequality_parser'; -import * as types from './mutation_types'; - -export const setPaths = ({ commit }, paths) => commit(types.SET_PATHS, paths); - -export const fetchReports = ({ state, dispatch, commit }) => { - commit(types.REQUEST_REPORTS); - - return pollUntilComplete(state.reportsPath) - .then(({ data }) => { - if (data.status === STATUS_NOT_FOUND) { - return dispatch('receiveReportsError', data); - } - return dispatch('receiveReportsSuccess', { - newIssues: parseCodeclimateMetrics(data.new_errors, state.headBlobPath), - resolvedIssues: parseCodeclimateMetrics(data.resolved_errors, state.baseBlobPath), - }); - }) - .catch((error) => dispatch('receiveReportsError', error)); -}; - -export const receiveReportsSuccess = ({ commit }, data) => { - commit(types.RECEIVE_REPORTS_SUCCESS, data); -}; - -export const receiveReportsError = ({ commit }, error) => { - commit(types.RECEIVE_REPORTS_ERROR, error); -}; diff --git a/app/assets/javascripts/ci/reports/codequality_report/store/getters.js b/app/assets/javascripts/ci/reports/codequality_report/store/getters.js deleted file mode 100644 index 70d11e96a54..00000000000 --- a/app/assets/javascripts/ci/reports/codequality_report/store/getters.js +++ /dev/null @@ -1,63 +0,0 @@ -import { spriteIcon } from '~/lib/utils/common_utils'; -import { sprintf, s__, n__ } from '~/locale'; -import { LOADING, ERROR, SUCCESS, STATUS_NOT_FOUND } from '../../constants'; - -export const hasCodequalityIssues = (state) => - Boolean(state.newIssues?.length || state.resolvedIssues?.length); - -export const codequalityStatus = (state) => { - if (state.isLoading) { - return LOADING; - } - if (state.hasError) { - return ERROR; - } - - return SUCCESS; -}; - -export const codequalityText = (state) => { - const { newIssues, resolvedIssues } = state; - let text; - if (!newIssues.length && !resolvedIssues.length) { - text = s__('ciReport|No changes to code quality'); - } else if (newIssues.length && resolvedIssues.length) { - text = sprintf( - s__(`ciReport|Code quality scanning detected %{issueCount} changes in merged results`), - { - issueCount: newIssues.length + resolvedIssues.length, - }, - ); - } else if (resolvedIssues.length) { - text = n__( - `ciReport|Code quality improved due to 1 resolved issue`, - `ciReport|Code quality improved due to %d resolved issues`, - resolvedIssues.length, - ); - } else if (newIssues.length) { - text = n__( - `ciReport|Code quality degraded due to 1 new issue`, - `ciReport|Code quality degraded due to %d new issues`, - newIssues.length, - ); - } - - return text; -}; - -export const codequalityPopover = (state) => { - if (state.status === STATUS_NOT_FOUND) { - return { - title: s__('ciReport|Base pipeline codequality artifact not found'), - content: sprintf( - s__('ciReport|%{linkStartTag}Learn more about codequality reports %{linkEndTag}'), - { - linkStartTag: `<a href="${state.helpPath}" target="_blank" rel="noopener noreferrer">`, - linkEndTag: `${spriteIcon('external-link', 's16')}</a>`, - }, - false, - ), - }; - } - return {}; -}; diff --git a/app/assets/javascripts/ci/reports/codequality_report/store/index.js b/app/assets/javascripts/ci/reports/codequality_report/store/index.js deleted file mode 100644 index c2f706e56e6..00000000000 --- a/app/assets/javascripts/ci/reports/codequality_report/store/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import Vue from 'vue'; -// eslint-disable-next-line no-restricted-imports -import Vuex from 'vuex'; -import * as actions from './actions'; -import * as getters from './getters'; -import mutations from './mutations'; -import state from './state'; - -Vue.use(Vuex); - -export const getStoreConfig = (initialState) => ({ - actions, - getters, - mutations, - state: state(initialState), -}); - -export default (initialState) => new Vuex.Store(getStoreConfig(initialState)); diff --git a/app/assets/javascripts/ci/reports/codequality_report/store/mutation_types.js b/app/assets/javascripts/ci/reports/codequality_report/store/mutation_types.js deleted file mode 100644 index c362c973ae1..00000000000 --- a/app/assets/javascripts/ci/reports/codequality_report/store/mutation_types.js +++ /dev/null @@ -1,5 +0,0 @@ -export const SET_PATHS = 'SET_PATHS'; - -export const REQUEST_REPORTS = 'REQUEST_REPORTS'; -export const RECEIVE_REPORTS_SUCCESS = 'RECEIVE_REPORTS_SUCCESS'; -export const RECEIVE_REPORTS_ERROR = 'RECEIVE_REPORTS_ERROR'; diff --git a/app/assets/javascripts/ci/reports/codequality_report/store/mutations.js b/app/assets/javascripts/ci/reports/codequality_report/store/mutations.js deleted file mode 100644 index 249c2f35c0b..00000000000 --- a/app/assets/javascripts/ci/reports/codequality_report/store/mutations.js +++ /dev/null @@ -1,27 +0,0 @@ -import * as types from './mutation_types'; - -export default { - [types.SET_PATHS](state, paths) { - state.baseBlobPath = paths.baseBlobPath; - state.headBlobPath = paths.headBlobPath; - state.reportsPath = paths.reportsPath; - state.helpPath = paths.helpPath; - }, - [types.REQUEST_REPORTS](state) { - state.isLoading = true; - }, - [types.RECEIVE_REPORTS_SUCCESS](state, data) { - state.hasError = false; - state.status = ''; - state.statusReason = ''; - state.isLoading = false; - state.newIssues = data.newIssues; - state.resolvedIssues = data.resolvedIssues; - }, - [types.RECEIVE_REPORTS_ERROR](state, error) { - state.isLoading = false; - state.hasError = true; - state.status = error?.status || ''; - state.statusReason = error?.response?.data?.status_reason; - }, -}; diff --git a/app/assets/javascripts/ci/reports/codequality_report/store/state.js b/app/assets/javascripts/ci/reports/codequality_report/store/state.js deleted file mode 100644 index f68dbc2a5fa..00000000000 --- a/app/assets/javascripts/ci/reports/codequality_report/store/state.js +++ /dev/null @@ -1,16 +0,0 @@ -export default () => ({ - reportsPath: null, - - baseBlobPath: null, - headBlobPath: null, - - isLoading: false, - hasError: false, - status: '', - statusReason: '', - - newIssues: [], - resolvedIssues: [], - - helpPath: null, -}); diff --git a/app/assets/stylesheets/themes/_dark.scss b/app/assets/stylesheets/themes/_dark.scss index 69d0431c9a8..303ea9dd005 100644 --- a/app/assets/stylesheets/themes/_dark.scss +++ b/app/assets/stylesheets/themes/_dark.scss @@ -8,6 +8,19 @@ $gray-dark: darken($gray-100, 2); $gray-darker: darken($gray-200, 2); $gray-darkest: $gray-700; +// $data-viz blue shades required for $calendar-activity-colors +$data-viz-blue-50: #2a2b59; +$data-viz-blue-100: #303470; +$data-viz-blue-200: #374291; +$data-viz-blue-300: #3f51ae; +$data-viz-blue-400: #4e65cd; +$data-viz-blue-500: #617ae2; +$data-viz-blue-600: #7992f5; +$data-viz-blue-700: #97acff; +$data-viz-blue-800: #b7c6ff; +$data-viz-blue-900: #d2dcff; +$data-viz-blue-950: #e9ebff; + // Some of the other $t-gray-a variables are used // for borders and some other places, so we cannot override // them. These are used only for box shadows so we can diff --git a/app/models/project_repository.rb b/app/models/project_repository.rb index a9cef16f3ac..4119a00b84b 100644 --- a/app/models/project_repository.rb +++ b/app/models/project_repository.rb @@ -4,6 +4,10 @@ class ProjectRepository < ApplicationRecord include EachBatch include Shardable + enum object_format: { sha1: 0, sha256: 1 } + + validates :object_format, presence: true + belongs_to :project, inverse_of: :project_repository class << self |