diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-17 18:10:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-17 18:10:08 +0300 |
commit | 78a5f872de316860ccd7a983c10805bf6c6b771c (patch) | |
tree | 29c394a4114d012cf9dcef37037e1992ef15105d /app/assets | |
parent | 14c3ebc6364f7d5eb31cbf2e66a79ec574e88b70 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
3 files changed, 29 insertions, 10 deletions
diff --git a/app/assets/javascripts/admin/statistics_panel/components/app.vue b/app/assets/javascripts/admin/statistics_panel/components/app.vue index 87325b07144..5e7b7e959e0 100644 --- a/app/assets/javascripts/admin/statistics_panel/components/app.vue +++ b/app/assets/javascripts/admin/statistics_panel/components/app.vue @@ -29,13 +29,19 @@ export default { <template> <gl-card> - <h4>{{ __('Statistics') }}</h4> - <gl-loading-icon v-if="isLoading" size="lg" class="my-3" /> - <template v-else> - <p v-for="statistic in getStatistics(statisticsLabels)" :key="statistic.key" class="js-stats"> - {{ statistic.label }} - <span class="light float-right">{{ statistic.value }}</span> - </p> - </template> + <h4 class="gl-heading-4">{{ __('Statistics') }}</h4> + <slot name="footer"> + <gl-loading-icon v-if="isLoading" size="lg" class="my-3" /> + <template v-else> + <p + v-for="statistic in getStatistics(statisticsLabels)" + :key="statistic.key" + class="js-stats" + > + {{ statistic.label }} + <span class="light float-right">{{ statistic.value }}</span> + </p> + </template> + </slot> </gl-card> </template> diff --git a/app/assets/javascripts/graphql_shared/possible_types.json b/app/assets/javascripts/graphql_shared/possible_types.json index fe151c2b358..1e7903ffa19 100644 --- a/app/assets/javascripts/graphql_shared/possible_types.json +++ b/app/assets/javascripts/graphql_shared/possible_types.json @@ -198,6 +198,7 @@ "WorkItemWidgetMilestone", "WorkItemWidgetNotes", "WorkItemWidgetNotifications", + "WorkItemWidgetParticipants", "WorkItemWidgetProgress", "WorkItemWidgetRequirementLegacy", "WorkItemWidgetRolledupDates", diff --git a/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue b/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue index 750f53a29b6..89095a55a11 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/merge_checks.vue @@ -98,6 +98,17 @@ export default { checks() { return this.state.mergeabilityChecks || []; }, + sortedChecks() { + return [...this.checks] + .sort((a, b) => { + if (a.status === 'FAILED' && b.status !== 'FAILED') return -1; + if (a.status === 'SUCCESS' && b.status !== 'SUCCESS') + return b.status === 'FAILED' ? 1 : -1; + + return 0; + }) + .filter((s) => s.status !== 'INACTIVE'); + }, failedChecks() { return this.checks.filter((c) => c.status.toLowerCase() === 'failed'); }, @@ -143,14 +154,15 @@ export default { <div class="gl-px-5"> <component :is="checkComponent(check)" - v-for="(check, index) in checks" + v-for="(check, index) in sortedChecks" :key="index" :class="{ - 'gl-border-b-solid gl-border-b-1 gl-border-gray-100': index !== checks.length - 1, + 'gl-border-b-solid gl-border-b-1 gl-border-gray-100': index !== sortedChecks.length - 1, }" :check="check" :mr="mr" :service="service" + data-testid="merge-check" /> </div> </div> |