export default (function (_ref) {
  var formatMessage = _ref.formatMessage,
      projectId = _ref.projectId;
  return {
    autoQuery: false,
    selection: false,
    transport: {
      read: function read(_ref2) {
        var data = _ref2.data;
        var envId = data.envId,
            appServiceIds = data.appServiceIds,
            startTime = data.startTime,
            endTime = data.endTime;
        return {
          url: "devops/v1/projects/".concat(projectId, "/app_service_instances/env_commands/timeTable?env_id=").concat(envId, "&endTime=").concat(endTime, "&startTime=").concat(startTime),
          method: 'post',
          data: appServiceIds
        };
      }
    },
    fields: [{
      name: 'status',
      type: 'string',
      label: formatMessage({
        id: 'app.active'
      })
    }, {
      name: 'creationDate',
      type: 'string',
      label: formatMessage({
        id: 'report.deploy-duration.time'
      })
    }, {
      name: 'appServiceInstanceCode',
      type: 'string',
      label: formatMessage({
        id: 'deploy.instance'
      })
    }, {
      name: 'appServiceName',
      type: 'string',
      label: formatMessage({
        id: 'deploy.appName'
      })
    }, {
      name: 'appServiceVersion',
      type: 'string',
      label: formatMessage({
        id: 'deploy.ver'
      })
    }, {
      name: 'lastUpdatedName',
      type: 'string',
      label: formatMessage({
        id: 'report.deploy-duration.user'
      })
    }]
  };
});