/* eslint-disable import/no-anonymous-default-export */
export default (function (_ref) {
  var projectId = _ref.projectId,
      selectedPipelineId = _ref.selectedPipelineId,
      startDate = _ref.startDate,
      endDate = _ref.endDate;
  return {
    selection: false,
    autoQuery: true,
    paging: true,
    transport: {
      read: function read() {
        return selectedPipelineId && startDate && endDate ? {
          url: "devops/v1/projects/".concat(projectId, "/cicd_pipelines/trigger/page?pipeline_id=").concat(selectedPipelineId, "&start_time=").concat(startDate, "&end_time=").concat(endDate),
          method: 'get'
        } : {};
      }
    },
    fields: [{
      name: 'status',
      label: '状态'
    }, {
      name: 'viewId',
      label: '执行编号'
    }, {
      name: 'pipelineName',
      label: '流水线名称'
    }, {
      name: 'stageRecordVOS',
      label: '阶段'
    }, {
      name: 'appServiceName',
      label: '关联应用服务'
    }, {
      name: 'createdDate',
      label: '开始时间'
    }, {
      name: 'durationSeconds',
      label: '执行耗时'
    }, {
      name: 'iamUserDTO',
      label: '触发者'
    }]
  };
});