public function renderBatchTool() {
        wp_enqueue_style('ilab-media-importer-css', ILAB_PUB_CSS_URL.'/ilab-media-importer.min.css');

        $data = BatchManager::instance()->stats($this->batchIdentifier());

        $postData = $this->getImportBatch(1);
        $data['posts'] = $postData['posts'];
        $data['pages'] = $postData['pages'];

        $background = EnvironmentOptions::Option('ilab-media-s3-batch-background-processing', null, true);

        if (!$background) {
            $data['total'] = $postData['total'];
        } else {
            if($data['total'] == 0) {
                $data['total'] = $postData['total'];
            }
        }

        if ($postData['shouldRun']) {
            $data['status'] = 'running';
        } else {
            $data['status'] =  ($data['running']) ? 'running' : 'idle';
        }
        $data['shouldRun'] = $postData['shouldRun'];
        $data['enabled'] = $this->enabled();
        $data['title'] = $this->title();
        $data['instructions'] = View::render_view($this->instructionView(), ['background' => $background]);
        $data['fromSelection'] = $postData['fromSelection'];
        $data['disabledText'] = 'enable Storage';
        $data['commandLine'] = null;
        $data['commandTitle'] = 'Run Tool';
        $data['cancelCommandTitle'] = 'Cancel Tool';

        $data['cancelAction'] = $this->cancelActionName();
        $data['startAction'] = $this->startActionName();
        $data['manualAction'] = $this->manualActionName();
        $data['progressAction'] = $this->progressActionName();
        $data['nextBatchAction'] = $this->nextBatchActionName();
        $data['background'] = $background;

        $data = $this->filterRenderData($data);
        echo View::render_view('importer/importer.php', $data);
    }