Commit 1a97d1fc authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents fca4ae63 fe25f955
...@@ -136,19 +136,13 @@ export default { ...@@ -136,19 +136,13 @@ export default {
return failedCount === 0 ? 100 : ratio; return failedCount === 0 ? 100 : ratio;
}, },
formattedCounts() { formattedCounts() {
const { const { totalPipelines, successfulPipelines, failedPipelines } = this.counts;
totalPipelines,
successfulPipelines,
failedPipelines,
totalPipelineDuration,
} = this.counts;
return { return {
total: totalPipelines?.count, total: totalPipelines?.count,
success: successfulPipelines?.count, success: successfulPipelines?.count,
failed: failedPipelines?.count, failed: failedPipelines?.count,
successRatio: this.successRatio, successRatio: this.successRatio,
totalDuration: totalPipelineDuration,
}; };
}, },
areaCharts() { areaCharts() {
......
<script> <script>
import { formatTime } from '~/lib/utils/datetime_utility';
import { SUPPORTED_FORMATS, getFormatter } from '~/lib/utils/unit_format'; import { SUPPORTED_FORMATS, getFormatter } from '~/lib/utils/unit_format';
import { s__, n__ } from '~/locale'; import { s__, n__ } from '~/locale';
...@@ -13,9 +12,6 @@ export default { ...@@ -13,9 +12,6 @@ export default {
}, },
}, },
computed: { computed: {
totalDuration() {
return formatTime(this.counts.totalDuration);
},
statistics() { statistics() {
const formatter = getFormatter(SUPPORTED_FORMATS.percentHundred); const formatter = getFormatter(SUPPORTED_FORMATS.percentHundred);
...@@ -36,10 +32,6 @@ export default { ...@@ -36,10 +32,6 @@ export default {
title: s__('PipelineCharts|Success ratio:'), title: s__('PipelineCharts|Success ratio:'),
value: formatter(this.counts.successRatio, defaultPrecision), value: formatter(this.counts.successRatio, defaultPrecision),
}, },
{
title: s__('PipelineCharts|Total duration:'),
value: this.totalDuration,
},
]; ];
}, },
}, },
......
...@@ -9,6 +9,5 @@ query getPipelineCountByStatus($projectPath: ID!) { ...@@ -9,6 +9,5 @@ query getPipelineCountByStatus($projectPath: ID!) {
failedPipelines: pipelines(status: FAILED) { failedPipelines: pipelines(status: FAILED) {
count count
} }
totalPipelineDuration
} }
} }
...@@ -20518,9 +20518,6 @@ msgstr "" ...@@ -20518,9 +20518,6 @@ msgstr ""
msgid "PipelineCharts|There was an error parsing the data for the charts." msgid "PipelineCharts|There was an error parsing the data for the charts."
msgstr "" msgstr ""
msgid "PipelineCharts|Total duration:"
msgstr ""
msgid "PipelineCharts|Total:" msgid "PipelineCharts|Total:"
msgstr "" msgstr ""
......
...@@ -38,14 +38,5 @@ exports[`StatisticsList displays the counts data with labels 1`] = ` ...@@ -38,14 +38,5 @@ exports[`StatisticsList displays the counts data with labels 1`] = `
50.00% 50.00%
</strong> </strong>
</li> </li>
<li>
<span>
Total duration:
</span>
<strong>
00:01:56
</strong>
</li>
</ul> </ul>
`; `;
...@@ -57,7 +57,6 @@ describe('ProjectsPipelinesChartsApp', () => { ...@@ -57,7 +57,6 @@ describe('ProjectsPipelinesChartsApp', () => {
success: 23, success: 23,
total: 34, total: 34,
successRatio: 95.83333333333334, successRatio: 95.83333333333334,
totalDuration: 2471,
}); });
}); });
......
...@@ -313,7 +313,7 @@ RSpec.describe ApplicationSetting do ...@@ -313,7 +313,7 @@ RSpec.describe ApplicationSetting do
it { is_expected.to validate_presence_of(:max_attachment_size) } it { is_expected.to validate_presence_of(:max_attachment_size) }
it do specify do
is_expected.to validate_numericality_of(:max_attachment_size) is_expected.to validate_numericality_of(:max_attachment_size)
.only_integer .only_integer
.is_greater_than(0) .is_greater_than(0)
...@@ -321,13 +321,13 @@ RSpec.describe ApplicationSetting do ...@@ -321,13 +321,13 @@ RSpec.describe ApplicationSetting do
it { is_expected.to validate_presence_of(:max_import_size) } it { is_expected.to validate_presence_of(:max_import_size) }
it do specify do
is_expected.to validate_numericality_of(:max_import_size) is_expected.to validate_numericality_of(:max_import_size)
.only_integer .only_integer
.is_greater_than_or_equal_to(0) .is_greater_than_or_equal_to(0)
end end
it do specify do
is_expected.to validate_numericality_of(:local_markdown_version) is_expected.to validate_numericality_of(:local_markdown_version)
.only_integer .only_integer
.is_greater_than_or_equal_to(0) .is_greater_than_or_equal_to(0)
...@@ -472,7 +472,7 @@ RSpec.describe ApplicationSetting do ...@@ -472,7 +472,7 @@ RSpec.describe ApplicationSetting do
end end
[:gitaly_timeout_default, :gitaly_timeout_medium, :gitaly_timeout_fast].each do |timeout_name| [:gitaly_timeout_default, :gitaly_timeout_medium, :gitaly_timeout_fast].each do |timeout_name|
it do specify do
is_expected.to validate_presence_of(timeout_name) is_expected.to validate_presence_of(timeout_name)
is_expected.to validate_numericality_of(timeout_name).only_integer is_expected.to validate_numericality_of(timeout_name).only_integer
.is_greater_than_or_equal_to(0) .is_greater_than_or_equal_to(0)
...@@ -821,7 +821,7 @@ RSpec.describe ApplicationSetting do ...@@ -821,7 +821,7 @@ RSpec.describe ApplicationSetting do
context 'validations' do context 'validations' do
it { is_expected.to validate_presence_of(:diff_max_patch_bytes) } it { is_expected.to validate_presence_of(:diff_max_patch_bytes) }
it do specify do
is_expected.to validate_numericality_of(:diff_max_patch_bytes) is_expected.to validate_numericality_of(:diff_max_patch_bytes)
.only_integer .only_integer
.is_greater_than_or_equal_to(Gitlab::Git::Diff::DEFAULT_MAX_PATCH_BYTES) .is_greater_than_or_equal_to(Gitlab::Git::Diff::DEFAULT_MAX_PATCH_BYTES)
......
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