Skip to content
Snippets Groups Projects
Commit e06d0e77 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent f7dae0cd
No related branches found
No related tags found
No related merge requests found
Showing
with 486 additions and 74 deletions
import $ from 'jquery';
import Sortable from 'sortablejs';
import Vue from 'vue';
import { GlButtonGroup, GlButton, GlTooltip } from '@gitlab/ui';
import { GlButtonGroup, GlButton, GlLabel, GlTooltip } from '@gitlab/ui';
import isWipLimitsOn from 'ee_else_ce/boards/mixins/is_wip_limits';
import { s__, __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
Loading
Loading
@@ -14,6 +14,7 @@ import IssueCount from './issue_count.vue';
import boardsStore from '../stores/boards_store';
import { getBoardSortableDefaultOptions, sortableEnd } from '../mixins/sortable_default_options';
import { ListType } from '../constants';
import { isScopedLabel } from '~/lib/utils/common_utils';
 
export default Vue.extend({
components: {
Loading
Loading
@@ -24,6 +25,7 @@ export default Vue.extend({
GlButtonGroup,
IssueCount,
GlButton,
GlLabel,
GlTooltip,
},
directives: {
Loading
Loading
@@ -95,6 +97,9 @@ export default Vue.extend({
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
return `boards.${this.boardId}.${this.list.type}.${this.list.id}`;
},
helpLink() {
return boardsStore.scopedLabels.helpLink;
},
},
watch: {
filter: {
Loading
Loading
@@ -145,6 +150,10 @@ export default Vue.extend({
}
},
methods: {
showScopedLabels(label) {
return boardsStore.scopedLabels.enabled && isScopedLabel(label);
},
showNewIssueForm() {
this.$refs['board-list'].showIssueForm = !this.$refs['board-list'].showIssueForm;
},
Loading
Loading
Loading
Loading
@@ -2,6 +2,7 @@
 
import $ from 'jquery';
import Vue from 'vue';
import { GlLabel } from '@gitlab/ui';
import Flash from '~/flash';
import { sprintf, __ } from '~/locale';
import Sidebar from '~/right_sidebar';
Loading
Loading
@@ -22,6 +23,7 @@ export default Vue.extend({
components: {
AssigneeTitle,
Assignees,
GlLabel,
SidebarEpicsSelect: () =>
import('ee_component/sidebar/components/sidebar_item_epics_select.vue'),
RemoveBtn,
Loading
Loading
@@ -67,6 +69,9 @@ export default Vue.extend({
selectedLabels() {
return this.hasLabels ? this.issue.labels.map(l => l.title).join(',') : '';
},
helpLink() {
return boardsStore.scopedLabels.helpLink;
},
},
watch: {
detail: {
Loading
Loading
@@ -147,8 +152,5 @@ export default Vue.extend({
showScopedLabels(label) {
return boardsStore.scopedLabels.enabled && isScopedLabel(label);
},
helpLink() {
return boardsStore.scopedLabels.helpLink;
},
},
});
import $ from 'jquery';
import _ from 'underscore';
import { isString, mapValues, isNumber, reduce } from 'lodash';
import * as timeago from 'timeago.js';
import dateFormat from 'dateformat';
import { languageCode, s__, __, n__ } from '../../locale';
Loading
Loading
@@ -79,7 +79,7 @@ export const getDayName = date =>
* @returns {String}
*/
export const formatDate = (datetime, format = 'mmm d, yyyy h:MMtt Z') => {
if (_.isString(datetime) && datetime.match(/\d+-\d+\d+ /)) {
if (isString(datetime) && datetime.match(/\d+-\d+\d+ /)) {
throw new Error(__('Invalid date'));
}
return dateFormat(datetime, format);
Loading
Loading
@@ -497,7 +497,7 @@ export const parseSeconds = (
 
let unorderedMinutes = Math.abs(seconds / SECONDS_PER_MINUTE);
 
return _.mapObject(timePeriodConstraints, minutesPerPeriod => {
return mapValues(timePeriodConstraints, minutesPerPeriod => {
if (minutesPerPeriod === 0) {
return 0;
}
Loading
Loading
@@ -516,7 +516,7 @@ export const parseSeconds = (
* If the 'fullNameFormat' param is passed it returns a non condensed string eg '1 week 3 days'
*/
export const stringifyTime = (timeObject, fullNameFormat = false) => {
const reducedTime = _.reduce(
const reducedTime = reduce(
timeObject,
(memo, unitValue, unitName) => {
const isNonZero = Boolean(unitValue);
Loading
Loading
@@ -642,7 +642,7 @@ export const dayAfter = date => new Date(newDate(date).setDate(date.getDate() +
* @return {String} approximated time
*/
export const approximateDuration = (seconds = 0) => {
if (!_.isNumber(seconds) || seconds < 0) {
if (!isNumber(seconds) || seconds < 0) {
return '';
}
 
Loading
Loading
import fuzzaldrinPlus from 'fuzzaldrin-plus';
import _ from 'underscore';
import sanitize from 'sanitize-html';
 
/**
Loading
Loading
@@ -17,11 +16,11 @@ import sanitize from 'sanitize-html';
* @param {String} matchSuffix The string to insert at the end of a match
*/
export default function highlight(string, match = '', matchPrefix = '<b>', matchSuffix = '</b>') {
if (_.isUndefined(string) || _.isNull(string)) {
if (!string) {
return '';
}
 
if (_.isUndefined(match) || _.isNull(match) || match === '') {
if (!match) {
return string;
}
 
Loading
Loading
@@ -34,7 +33,7 @@ export default function highlight(string, match = '', matchPrefix = '<b>', match
return sanitizedValue
.split('')
.map((character, i) => {
if (_.contains(occurrences, i)) {
if (occurrences.includes(i)) {
return `${matchPrefix}${character}${matchSuffix}`;
}
 
Loading
Loading
import _ from 'underscore';
import { isString } from 'lodash';
 
/**
* Adds a , to a string composed by numbers, at every 3 chars.
Loading
Loading
@@ -199,7 +199,7 @@ export const splitCamelCase = string =>
* i.e. "My Group / My Subgroup / My Project"
*/
export const truncateNamespace = (string = '') => {
if (_.isNull(string) || !_.isString(string)) {
if (string === null || !isString(string)) {
return '';
}
 
Loading
Loading
/**
* Formats a number as string using `toLocaleString`.
*
* @param {Number} number to be converted
* @param {params} Parameters
* @param {params.fractionDigits} Number of decimal digits
* to display, defaults to using `toLocaleString` defaults.
* @param {params.maxLength} Max output char lenght at the
* expense of precision, if the output is longer than this,
* the formatter switches to using exponential notation.
* @param {params.factor} Value is multiplied by this factor,
* useful for value normalization.
* @returns Formatted value
*/
function formatNumber(
value,
{ fractionDigits = undefined, valueFactor = 1, style = undefined, maxLength = undefined },
) {
if (value === null) {
return '';
}
const num = value * valueFactor;
const formatted = num.toLocaleString(undefined, {
minimumFractionDigits: fractionDigits,
maximumFractionDigits: fractionDigits,
style,
});
if (maxLength !== undefined && formatted.length > maxLength) {
// 123456 becomes 1.23e+8
return num.toExponential(2);
}
return formatted;
}
/**
* Formats a number as a string scaling it up according to units.
*
* While the number is scaled down, the units are scaled up.
*
* @param {Array} List of units of the scale
* @param {Number} unitFactor - Factor of the scale for each
* unit after which the next unit is used scaled.
*/
const scaledFormatter = (units, unitFactor = 1000) => {
if (unitFactor === 0) {
return new RangeError(`unitFactor cannot have the value 0.`);
}
return (value, fractionDigits) => {
if (value === null) {
return '';
}
if (
value === Number.NEGATIVE_INFINITY ||
value === Number.POSITIVE_INFINITY ||
Number.isNaN(value)
) {
return value.toLocaleString(undefined);
}
let num = value;
let scale = 0;
const limit = units.length;
while (Math.abs(num) >= unitFactor) {
scale += 1;
num /= unitFactor;
if (scale >= limit) {
return 'NA';
}
}
const unit = units[scale];
return `${formatNumber(num, { fractionDigits })}${unit}`;
};
};
/**
* Returns a function that formats a number as a string.
*/
export const numberFormatter = (style = 'decimal', valueFactor = 1) => {
return (value, fractionDigits, maxLength) => {
return `${formatNumber(value, { fractionDigits, maxLength, valueFactor, style })}`;
};
};
/**
* Returns a function that formats a number as a string with a suffix.
*/
export const suffixFormatter = (unit = '', valueFactor = 1) => {
return (value, fractionDigits, maxLength) => {
const length = maxLength !== undefined ? maxLength - unit.length : undefined;
return `${formatNumber(value, { fractionDigits, maxLength: length, valueFactor })}${unit}`;
};
};
/**
* Returns a function that formats a number scaled using SI units notation.
*/
export const scaledSIFormatter = (unit = '', prefixOffset = 0) => {
const fractional = ['y', 'z', 'a', 'f', 'p', 'n', 'µ', 'm'];
const multiplicative = ['k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
const symbols = [...fractional, '', ...multiplicative];
const units = symbols.slice(fractional.length + prefixOffset).map(prefix => {
return `${prefix}${unit}`;
});
if (!units.length) {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
throw new RangeError('The unit cannot be converted, please try a different scale');
}
return scaledFormatter(units);
};
import { s__ } from '~/locale';
import { suffixFormatter, scaledSIFormatter, numberFormatter } from './formatter_factory';
/**
* Supported formats
*/
export const SUPPORTED_FORMATS = {
// Number
number: 'number',
percent: 'percent',
percentHundred: 'percentHundred',
// Duration
seconds: 'seconds',
miliseconds: 'miliseconds',
// Digital
bytes: 'bytes',
kilobytes: 'kilobytes',
megabytes: 'megabytes',
gigabytes: 'gigabytes',
terabytes: 'terabytes',
petabytes: 'petabytes',
};
/**
* Returns a function that formats number to different units
* @param {String} format - Format to use, must be one of the SUPPORTED_FORMATS. Defaults to number.
*
*
*/
export const getFormatter = (format = SUPPORTED_FORMATS.number) => {
// Number
if (format === SUPPORTED_FORMATS.number) {
/**
* Formats a number
*
* @function
* @param {Number} value - Number to format
* @param {Number} fractionDigits - precision decimals
* @param {Number} maxLength - Max lenght of formatted number
* if lenght is exceeded, exponential format is used.
*/
return numberFormatter();
}
if (format === SUPPORTED_FORMATS.percent) {
/**
* Formats a percentge (0 - 1)
*
* @function
* @param {Number} value - Number to format, `1` is rendered as `100%`
* @param {Number} fractionDigits - number of precision decimals
* @param {Number} maxLength - Max lenght of formatted number
* if lenght is exceeded, exponential format is used.
*/
return numberFormatter('percent');
}
if (format === SUPPORTED_FORMATS.percentHundred) {
/**
* Formats a percentge (0 to 100)
*
* @function
* @param {Number} value - Number to format, `100` is rendered as `100%`
* @param {Number} fractionDigits - number of precision decimals
* @param {Number} maxLength - Max lenght of formatted number
* if lenght is exceeded, exponential format is used.
*/
return numberFormatter('percent', 1 / 100);
}
// Durations
if (format === SUPPORTED_FORMATS.seconds) {
/**
* Formats a number of seconds
*
* @function
* @param {Number} value - Number to format, `1` is rendered as `1s`
* @param {Number} fractionDigits - number of precision decimals
* @param {Number} maxLength - Max lenght of formatted number
* if lenght is exceeded, exponential format is used.
*/
return suffixFormatter(s__('Units|s'));
}
if (format === SUPPORTED_FORMATS.miliseconds) {
/**
* Formats a number of miliseconds with ms as units
*
* @function
* @param {Number} value - Number to format, `1` is formatted as `1ms`
* @param {Number} fractionDigits - number of precision decimals
* @param {Number} maxLength - Max lenght of formatted number
* if lenght is exceeded, exponential format is used.
*/
return suffixFormatter(s__('Units|ms'));
}
// Digital
if (format === SUPPORTED_FORMATS.bytes) {
/**
* Formats a number of bytes scaled up to larger digital
* units for larger numbers.
*
* @function
* @param {Number} value - Number to format, `1` is formatted as `1B`
* @param {Number} fractionDigits - number of precision decimals
*/
return scaledSIFormatter('B');
}
if (format === SUPPORTED_FORMATS.kilobytes) {
/**
* Formats a number of kilobytes scaled up to larger digital
* units for larger numbers.
*
* @function
* @param {Number} value - Number to format, `1` is formatted as `1kB`
* @param {Number} fractionDigits - number of precision decimals
*/
return scaledSIFormatter('B', 1);
}
if (format === SUPPORTED_FORMATS.megabytes) {
/**
* Formats a number of megabytes scaled up to larger digital
* units for larger numbers.
*
* @function
* @param {Number} value - Number to format, `1` is formatted as `1MB`
* @param {Number} fractionDigits - number of precision decimals
*/
return scaledSIFormatter('B', 2);
}
if (format === SUPPORTED_FORMATS.gigabytes) {
/**
* Formats a number of gigabytes scaled up to larger digital
* units for larger numbers.
*
* @function
* @param {Number} value - Number to format, `1` is formatted as `1GB`
* @param {Number} fractionDigits - number of precision decimals
*/
return scaledSIFormatter('B', 3);
}
if (format === SUPPORTED_FORMATS.terabytes) {
/**
* Formats a number of terabytes scaled up to larger digital
* units for larger numbers.
*
* @function
* @param {Number} value - Number to format, `1` is formatted as `1GB`
* @param {Number} fractionDigits - number of precision decimals
*/
return scaledSIFormatter('B', 4);
}
if (format === SUPPORTED_FORMATS.petabytes) {
/**
* Formats a number of petabytes scaled up to larger digital
* units for larger numbers.
*
* @function
* @param {Number} value - Number to format, `1` is formatted as `1PB`
* @param {Number} fractionDigits - number of precision decimals
*/
return scaledSIFormatter('B', 5);
}
// Fail so client library addresses issue
throw TypeError(`${format} is not a valid number format`);
};
Loading
Loading
@@ -4,7 +4,7 @@ import { GlLink, GlButton, GlTooltip, GlResizeObserverDirective } from '@gitlab/
import { GlAreaChart, GlLineChart, GlChartSeriesLabel } from '@gitlab/ui/dist/charts';
import dateFormat from 'dateformat';
import { s__, __ } from '~/locale';
import { roundOffFloat } from '~/lib/utils/common_utils';
import { getFormatter } from '~/lib/utils/unit_format';
import { getSvgIconPathContent } from '~/lib/utils/icon_utils';
import Icon from '~/vue_shared/components/icon.vue';
import {
Loading
Loading
@@ -37,6 +37,8 @@ const events = {
datazoom: 'datazoom',
};
 
const yValFormatter = getFormatter('number');
export default {
components: {
GlAreaChart,
Loading
Loading
@@ -171,7 +173,7 @@ export default {
boundaryGap: [0.1, 0.1],
scale: true,
axisLabel: {
formatter: num => roundOffFloat(num, 3).toString(),
formatter: num => yValFormatter(num, 3),
},
...yAxis,
};
Loading
Loading
@@ -313,7 +315,8 @@ export default {
this.tooltip.commitUrl = deploy.commitUrl;
} else {
const { seriesName, color, dataIndex } = dataPoint;
const value = yVal.toFixed(3);
const value = yValFormatter(yVal, 3);
this.tooltip.content.push({
name: seriesName,
dataIndex,
Loading
Loading
<script>
import { GlLoadingIcon } from '@gitlab/ui';
export default {
name: 'ResolveDiscussionButton',
components: {
GlLoadingIcon,
},
props: {
isResolving: {
type: Boolean,
Loading
Loading
@@ -17,12 +22,7 @@ export default {
 
<template>
<button ref="button" type="button" class="btn btn-default ml-sm-2" @click="$emit('onClick')">
<i
v-if="isResolving"
ref="isResolvingIcon"
aria-hidden="true"
class="fa fa-spinner fa-spin"
></i>
<gl-loading-icon v-if="isResolving" ref="isResolvingIcon" inline />
{{ buttonTitle }}
</button>
</template>
Loading
Loading
@@ -13,16 +13,14 @@
 
.page-title,
.modal-title {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
.modal-title-with-label span {
vertical-align: middle;
display: inline-block;
}
.color-label {
font-size: $gl-font-size;
padding: $gl-vert-padding $label-padding-modal;
vertical-align: middle;
}
}
 
.modal-title {
Loading
Loading
Loading
Loading
@@ -51,7 +51,8 @@
}
 
.btn {
.spinner {
.spinner,
.gl-spinner {
vertical-align: text-bottom;
}
}
Loading
Loading
@@ -86,14 +86,19 @@
}
 
.issuable-show-labels {
a {
.gl-label {
margin-bottom: 5px;
margin-right: 5px;
}
a {
display: inline-block;
 
.color-label {
padding: 4px $grid-size;
border-radius: $label-border-radius;
margin-right: 4px;
margin-bottom: 4px;
}
 
&:hover .color-label {
Loading
Loading
@@ -159,9 +164,25 @@
.avatar {
border-color: rgba($gray-normal, 0.2);
}
}
}
 
a.gl-label-icon {
color: $gray-500;
}
.gl-label .gl-label-link:hover {
text-decoration: none;
color: inherit;
.gl-label-text:last-of-type {
text-decoration: underline;
}
}
 
.gl-label .gl-label-icon:hover {
text-decoration: none;
color: $gray-500;
}
 
.btn-link {
Loading
Loading
@@ -800,11 +821,23 @@
 
a {
color: $gl-text-color;
}
 
.fa {
color: $gl-text-color-secondary;
.gl-label-link {
color: inherit;
&:hover {
text-decoration: none;
.gl-label-text:last-of-type {
text-decoration: underline;
}
}
}
.gl-label-icon {
color: $gray-500;
}
}
 
@media(max-width: map-get($grid-breakpoints, lg)-1) {
Loading
Loading
Loading
Loading
@@ -127,6 +127,11 @@
.color-label {
padding: $gl-padding-4 $grid-size;
}
.prepend-description-left {
vertical-align: top;
line-height: 24px;
}
}
 
.prioritized-labels {
Loading
Loading
@@ -305,10 +310,13 @@
width: 150px;
flex-shrink: 0;
 
.badge {
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
.scoped-label-wrapper,
.gl-label {
line-height: $gl-line-height;
}
.gl-label-scoped .gl-label-text:last-of-type {
padding-right: 22px;
}
}
 
Loading
Loading
@@ -445,10 +453,19 @@
}
}
 
.gl-label-scoped {
box-shadow: 0 0 0 2px currentColor inset;
&.gl-label-sm {
box-shadow: 0 0 0 1px inset;
}
}
// Label inside title of Delete Label Modal
.modal-header .page-title {
.scoped-label-wrapper {
.scoped-label {
.scoped-label,
.gl-label-icon {
line-height: 20px;
}
 
Loading
Loading
Loading
Loading
@@ -59,9 +59,19 @@ $status-box-line-height: 26px;
}
 
.issuable-row {
span a {
color: $gl-text-color;
word-wrap: break-word;
span {
a {
color: $gl-text-color;
word-wrap: break-word;
}
.gl-label-link {
color: inherit;
}
.gl-label-icon {
color: $gray-500;
}
}
}
 
Loading
Loading
Loading
Loading
@@ -283,7 +283,7 @@ $note-form-margin-left: 72px;
text-transform: lowercase;
}
 
a {
a:not(.gl-link) {
color: $blue-600;
}
 
Loading
Loading
@@ -671,6 +671,16 @@ $note-form-margin-left: 72px;
a:hover {
text-decoration: underline;
}
.gl-label-link:hover,
.gl-label-icon:hover {
text-decoration: none;
color: inherit;
.gl-label-text:last-of-type {
text-decoration: underline;
}
}
}
 
/**
Loading
Loading
Loading
Loading
@@ -36,37 +36,42 @@ module LabelsHelper
# link_to_label(label) { "My Custom Label Text" }
#
# Returns a String
def link_to_label(label, type: :issue, tooltip: true, css_class: nil, &block)
def link_to_label(label, type: :issue, tooltip: true, small: false, &block)
link = label.filter_path(type: type)
 
if block_given?
link_to link, class: css_class, &block
link_to link, &block
else
render_label(label, tooltip: tooltip, link: link, css: css_class)
render_label(label, link: link, tooltip: tooltip, small: small)
end
end
 
def render_label(label, tooltip: true, link: nil, css: nil, dataset: nil)
# if scoped label is used then EE wraps label tag with scoped label
# doc link
html = render_colored_label(label, tooltip: tooltip)
html = link_to(html, link, class: css, data: dataset) if link
def render_label(label, link: nil, tooltip: true, dataset: nil, small: false)
html = render_colored_label(label)
 
html
if link
title = label_tooltip_title(label) if tooltip
html = render_label_link(html, link: link, title: title, dataset: dataset)
end
wrap_label_html(html, small: small, label: label)
end
 
def render_colored_label(label, label_suffix: '', tooltip: true, title: nil)
text_color = text_color_for_bg(label.color)
title ||= tooltip ? label_tooltip_title(label) : label.name
def render_colored_label(label, suffix: '')
render_label_text(
label.name,
suffix: suffix,
css_class: text_color_class_for_bg(label.color),
bg_color: label.color
)
end
 
# Intentionally not using content_tag here so that this method can be called
# by LabelReferenceFilter
span = %(<span class="badge color-label #{"has-tooltip" if tooltip}" ) +
%(data-html="true" style="background-color: #{label.color}; color: #{text_color}" ) +
%(title="#{ERB::Util.html_escape_once(title)}" data-container="body">) +
%(#{ERB::Util.html_escape_once(label.name)}#{label_suffix}</span>)
# We need the `label` argument here for EE
def wrap_label_html(label_html, small:, label:)
wrapper_classes = %w(gl-label)
wrapper_classes << 'gl-label-sm' if small
 
span.html_safe
%(<span class="#{wrapper_classes.join(' ')}">#{label_html}</span>).html_safe
end
 
def label_tooltip_title(label)
Loading
Loading
@@ -109,6 +114,20 @@ module LabelsHelper
end
end
 
def text_color_class_for_bg(bg_color)
if bg_color.length == 4
r, g, b = bg_color[1, 4].scan(/./).map { |v| (v * 2).hex }
else
r, g, b = bg_color[1, 7].scan(/.{2}/).map(&:hex)
end
if (r + g + b) > 500
'gl-label-text-dark'
else
'gl-label-text-light'
end
end
def text_color_for_bg(bg_color)
if bg_color.length == 4
r, g, b = bg_color[1, 4].scan(/./).map { |v| (v * 2).hex }
Loading
Loading
@@ -246,6 +265,31 @@ module LabelsHelper
def issuable_types
['issues', 'merge requests']
end
private
def render_label_link(label_html, link:, title:, dataset:)
classes = %w(gl-link gl-label-link)
dataset ||= {}
if title.present?
classes << 'has-tooltip'
dataset.merge!(html: true, title: title)
end
link_to(label_html, link, class: classes.join(' '), data: dataset)
end
def render_label_text(name, suffix: '', css_class: nil, bg_color: nil)
<<~HTML.chomp.html_safe
<span
class="gl-label-text #{css_class}"
data-container="body"
data-html="true"
#{"style=\"background-color: #{bg_color}\"" if bg_color}
>#{ERB::Util.html_escape_once(name)}#{suffix}</span>
HTML
end
end
 
LabelsHelper.prepend_if_ee('EE::LabelsHelper')
Loading
Loading
@@ -11,15 +11,15 @@ module Clusters
self.table_name = 'clusters'
 
APPLICATIONS = {
Applications::Helm.application_name => Applications::Helm,
Applications::Ingress.application_name => Applications::Ingress,
Applications::CertManager.application_name => Applications::CertManager,
Applications::Crossplane.application_name => Applications::Crossplane,
Applications::Prometheus.application_name => Applications::Prometheus,
Applications::Runner.application_name => Applications::Runner,
Applications::Jupyter.application_name => Applications::Jupyter,
Applications::Knative.application_name => Applications::Knative,
Applications::ElasticStack.application_name => Applications::ElasticStack
Clusters::Applications::Helm.application_name => Clusters::Applications::Helm,
Clusters::Applications::Ingress.application_name => Clusters::Applications::Ingress,
Clusters::Applications::CertManager.application_name => Clusters::Applications::CertManager,
Clusters::Applications::Crossplane.application_name => Clusters::Applications::Crossplane,
Clusters::Applications::Prometheus.application_name => Clusters::Applications::Prometheus,
Clusters::Applications::Runner.application_name => Clusters::Applications::Runner,
Clusters::Applications::Jupyter.application_name => Clusters::Applications::Jupyter,
Clusters::Applications::Knative.application_name => Clusters::Applications::Knative,
Clusters::Applications::ElasticStack.application_name => Clusters::Applications::ElasticStack
}.freeze
DEFAULT_ENVIRONMENT = '*'
KUBE_INGRESS_BASE_DOMAIN = 'KUBE_INGRESS_BASE_DOMAIN'
Loading
Loading
Loading
Loading
@@ -101,7 +101,7 @@ module Issuable
def create_milestone_note
if milestone_changes_tracking_enabled?
# Creates a synthetic note
ResourceEvents::ChangeMilestoneService.new(resource: issuable, user: current_user).execute
ResourceEvents::ChangeMilestoneService.new(issuable, current_user).execute
else
SystemNoteService.change_milestone(issuable, issuable.project, current_user, issuable.milestone)
end
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ module ResourceEvents
class ChangeMilestoneService
attr_reader :resource, :user, :event_created_at, :milestone
 
def initialize(resource:, user:, created_at: Time.now)
def initialize(resource, user, created_at: Time.now)
@resource = resource
@user = user
@event_created_at = created_at
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@
- if issue.labels.any?
&nbsp;
- presented_labels_sorted_by_title(issue.labels, issue.project).each do |label|
= link_to_label(label, css_class: 'label-link')
= link_to_label(label, small: true)
 
= render_if_exists "projects/issues/issue_weight", issue: issue
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment