}
export function getStatus(
- componentId?: string
+ component?: string
): Promise<{ failing: number; inProgress: number; pending: number; pendingTime?: number }> {
- const data = {};
- if (componentId) {
- Object.assign(data, { componentId });
- }
- return getJSON('/api/ce/activity_status', data);
+ return getJSON('/api/ce/activity_status', { component });
}
export function getTask(id: string, additionalFields?: string[]): Promise<Task> {
const parameters = mapFiltersToParameters(filters);
if (this.props.component) {
- parameters.componentId = this.props.component.id;
+ parameters.component = this.props.component.key;
}
- Promise.all([getActivity(parameters), getStatus(parameters.componentId)]).then(
+ Promise.all([getActivity(parameters), getStatus(parameters.component)]).then(
([{ tasks }, status]) => {
if (this.mounted) {
this.setState({