All files / components/Jobs JobLogModal.jsx

100% Statements 1/1
100% Branches 1/1
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37                              135x                                          
import React from "react";
import Modal from "react-bootstrap/Modal";
import JobLogTail from "main/components/Jobs/JobLogTail";
 
/**
 * A modal that follows the log of a job of a course as it is written. The log
 * is only followed while the modal is open.
 */
export default function JobLogModal({
  show,
  onHide,
  courseId,
  jobId,
  testIdPrefix = "JobLogModal",
}) {
  return (
    <Modal
      show={show}
      onHide={onHide}
      size="lg"
      centered={true}
      data-testid={testIdPrefix}
    >
      <Modal.Header closeButton>
        <Modal.Title>Job {jobId} Log</Modal.Title>
      </Modal.Header>
      <Modal.Body>
        <JobLogTail
          courseId={courseId}
          jobId={jobId}
          testIdPrefix={`${testIdPrefix}-tail`}
        />
      </Modal.Body>
    </Modal>
  );
}