hunk.code_window: package adminmonitor
   import (
   	"context"
   	"log"
   	"time"
   	portainer "github.com/portainer/portainer/api"
   	"github.com/portainer/portainer/api/dataservices"
   )
  
hunk.labels: keep keep keep keep add keep keep keep keep keep
hunk.after_edit: 	"sync"
  
hunk.file_path: api/adminmonitor/admin_monitor.go
hunk.type: add
file: import { jsonObjectsToArrayHandler } from './response/handlers';
  
  angular.module('portainer.docker').factory('Build', [
    '$resource',
    'API_ENDPOINT_ENDPOINTS',
    'EndpointProvider',
    function BuildFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
      'use strict';
      return $resource(
        API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/build',
        {
          endpointId: EndpointProvider.endpointID,
        },
        {
          buildImage: {
            method: 'POST',
            ignoreLoadingBar: true,
            transformResponse: jsonObjectsToArrayHandler,
            isArray: true,
            headers: { 'Content-Type': 'application/x-tar' },
          },
          buildImageOverride: {
            method: 'POST',
            ignoreLoadingBar: true,
            transformResponse: jsonObjectsToArrayHandler,
            isArray: true,
          },
        }
      );
    },
  ]);
  