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