Commit 7aa4b4a8 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'cngo-milestone-show-startupjs' into 'master'

Change milestone page API calls to startup calls

See merge request gitlab-org/gitlab!60505
parents 36814cbe cd4a042d
query BurnupTimesSeriesData($id: ID!, $isIteration: Boolean = false, $weight: Boolean = false) {
milestone(id: $id) @skip(if: $isIteration) {
__typename
id
title
report {
__typename
burnupTimeSeries {
__typename
date
completedCount @skip(if: $weight)
scopeCount @skip(if: $weight)
completedWeight @include(if: $weight)
scopeWeight @include(if: $weight)
}
stats {
__typename
total {
__typename
count @skip(if: $weight)
weight @include(if: $weight)
}
complete {
__typename
count @skip(if: $weight)
weight @include(if: $weight)
}
incomplete {
__typename
count @skip(if: $weight)
weight @include(if: $weight)
}
}
}
}
iteration(id: $id) @include(if: $isIteration) {
__typename
id
title
report {
__typename
burnupTimeSeries {
__typename
date
completedCount @skip(if: $weight)
scopeCount @skip(if: $weight)
completedWeight @include(if: $weight)
scopeWeight @include(if: $weight)
}
stats {
__typename
total {
__typename
count @skip(if: $weight)
weight @include(if: $weight)
}
complete {
__typename
count @skip(if: $weight)
weight @include(if: $weight)
}
incomplete {
__typename
count @skip(if: $weight)
weight @include(if: $weight)
}
}
}
}
}
......@@ -4,6 +4,8 @@
- page_description @milestone.description_html
- add_page_specific_style 'page_bundles/milestone'
- add_page_startup_api_call milestone_tab_path(@milestone, 'issues', show_project_name: false)
= render 'shared/milestones/header', milestone: @milestone
= render 'shared/milestones/description', milestone: @milestone
......
<script>
import { GlAlert, GlButton, GlButtonGroup } from '@gitlab/ui';
import dateFormat from 'dateformat';
import BurnupQuery from 'shared_queries/burndown_chart/burnup.query.graphql';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { getDayDifference, nDaysAfter, newDateAsLocaleTime } from '~/lib/utils/datetime_utility';
......@@ -8,7 +9,6 @@ import { __ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import BurndownChartData from '../burn_chart_data';
import { Namespace } from '../constants';
import BurnupQuery from '../graphql/burnup.query.graphql';
import BurndownChart from './burndown_chart.vue';
import BurnupChart from './burnup_chart.vue';
import OpenTimeboxSummary from './open_timebox_summary.vue';
......
#import "./burnup_timebox_report.fragment.graphql"
query BurnupTimesSeriesData($id: ID!, $isIteration: Boolean = false, $weight: Boolean = false) {
milestone(id: $id) @skip(if: $isIteration) {
id
title
report {
...BurnupTimeboxReport
}
}
iteration(id: $id) @include(if: $isIteration) {
id
title
report {
...BurnupTimeboxReport
}
}
}
fragment BurnupTimeboxReport on TimeboxReport {
burnupTimeSeries {
date
completedCount @skip(if: $weight)
scopeCount @skip(if: $weight)
completedWeight @include(if: $weight)
scopeWeight @include(if: $weight)
}
stats {
total {
count @skip(if: $weight)
weight @include(if: $weight)
}
complete {
count @skip(if: $weight)
weight @include(if: $weight)
}
incomplete {
count @skip(if: $weight)
weight @include(if: $weight)
}
}
}
......@@ -2,6 +2,7 @@
- burndown_endpoint = milestone.group_milestone? ? api_v4_groups_milestones_burndown_events_path(id: milestone.group.id, milestone_id: milestone.id) : api_v4_projects_milestones_burndown_events_path(id: milestone.project.id, milestone_id: milestone.timebox_id)
- if can_generate_chart?(milestone)
- add_page_startup_graphql_call('burndown_chart/burnup', { id: milestone.to_global_id.to_s, isIteration: false, weight: false } )
.burndown-chart.mb-2{ data: { start_date: milestone.start_date.strftime("%Y-%m-%d"),
due_date: milestone.due_date.strftime("%Y-%m-%d"),
milestone_id: milestone.to_global_id,
......
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