@include('header')
<div class="page-header">
  <div class="row align-items-end">
    <div class="col-lg-12">
      <div class="page-header-title">
        <div class="d-inline">
          <h4>Replication Tasks</h4>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- Tabs navs -->
<div class="row">
  <div class="col-5">
    <ul class="nav nav-tabs nav-tabs-table duration border-0" id="tableTab" role="tablist">
      <li class="nav-item nav-item-table ">
        <a class="nav-link nav-link-table active" id="tableTab-allTab" data-toggle="tab" href="#tableTab-tabs-allTab" role="tab" aria-controls="tableTab-tabs-allTab" aria-selected="true">All</a>
      </li>
      <li class="nav-item nav-item-table">
        <a class="nav-link nav-link-table" id="tableTab-tab-running" data-toggle="tab" href="#tableTab-tabs-running" role="tab" aria-controls="tableTab-tabs-running" aria-selected="false">Running</a>
      </li>
      <li class="nav-item nav-item-table">
        <a class="nav-link nav-link-table" id="tableTab-tab-failed" data-toggle="tab" href="#tableTab-tabs-failed" role="tab" aria-controls="tableTab-tabs-failed" aria-selected="false">Failed</a>
      </li>
      <li class="nav-item nav-item-table">
        <a class="nav-link nav-link-table" id="tableTab-tab-succeeded" data-toggle="tab" href="#tableTab-tabs-succeeded" role="tab" aria-controls="tableTab-tabs-succeeded" aria-selected="false">Succeeded</a>
      </li>
    </ul>
  </div>
  <div class="col text-right">
    <div class="d-flex justify-content-end">
      <select class="box-select mx-3" style="padding: 5px;">
        <option value="">avmzone1</option>
        <option value="">avmzone1vcf</option>
        <option value="">avmzone3vcf</option>
      </select>
      <div class="datePicker">
        from<input type="date" class="picker" id="startTimeAfter">to<input type="date" class="picker" id="startTimeBefore">
      </div>
    </div>
  </div>
  <!-- Tabs navs -->
</div>
<!-- Tabs content -->
<div class="tab-content" id="tableTab-content">
  <div class="tab-pane fade show active" id="tableTab-tabs-allTab" role="tabpanel" aria-labelledby="tableTab-allTab">
    <!-- Tab 1 content -->
    <div class="row">
      <div class="col-md-12">
        <div class="card table-card">
          <!-- Table -->
          <div class="card-block" style="padding:20px;">
            <div class="table-responsive scroll-widget">
              <div id="data_table_s3_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
                <div class="row">
                  <div class="col-sm-12 col-md-6">
                    <div class="dataTables_length" id="data_table_s3_length">
                      <label>Show
                        <select name="data_table_s3_length" aria-controls="data_table_s3" class="custom-select custom-select-sm form-control form-control-sm">
                          <option value="10">10</option>
                          <option value="25">25</option>
                          <option value="50">50</option>
                          <option value="100">100</option>
                        </select> entries
                      </label>
                    </div>
                  </div>
                  <div class="col-sm-12 col-md-6">
                    <div id="data_table_s3_filter" class="dataTables_filter">
                      <label>Search:
                        <input type="search" class="form-control form-control-sm" placeholder="" aria-controls="data_table_s3">
                      </label>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12">
                    <table id="data_table_s3" class="table table-striped table-bordered nowrap dataTable no-footer" role="grid" aria-describedby="data_table_s3_info" style="width: 860px;">
                      <thead>
                        <tr role="row">
                          <th class="sorting_asc" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task: activate to sort column descending" style="width: 200px;" aria-sort="ascending">Task</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Target: activate to sort column ascending" style="width: 78px;">Target</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Start Time: activate to sort column ascending" style="width: 136px;">Start Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Completion Time: activate to sort column ascending" style="width: 146px;">Completion Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task ID: activate to sort column ascending" style="width: 147px;">Task ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Resource ID: activate to sort column ascending" style="width: 147px;">Resource ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Execution Time: activate to sort column ascending" style="width: 147px;">Execution Time</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr role="row" class="odd">
                          <td>Resume</td>
                          <td>VM-2021Decv6</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>30b18d08-8244-4105-912e-8498a3 <i class="far fa-copy" id="copyTaskID1"></i></td>
                          <td>C4-38e681fa-73a8-4f4f-b64c-aff5b <i class="far fa-copy" id="copyResourceID1"></i></td>
                          <td>336 ms</td>
                        </tr>
                      </tbody>
                    </table>
                    <div id="data_table_s3_processing" class="dataTables_processing card" style="display: none;">Processing...</div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12 col-md-5">
                    <div class="dataTables_info" id="data_table_s3_info" role="status" aria-live="polite">Showing 1 to 1 of 1 entries</div>
                  </div>
                  <div class="col-sm-12 col-md-7">
                    <div class="dataTables_paginate paging_simple_numbers" id="data_table_s3_paginate">
                      <ul class="pagination">
                        <li class="paginate_button page-item previous disabled" id="data_table_s3_previous"><a href="#" aria-controls="data_table_s3" data-dt-idx="0" tabindex="0" class="page-link">Previous</a></li>
                        <li class="paginate_button page-item active"><a href="#" aria-controls="data_table_s3" data-dt-idx="1" tabindex="0" class="page-link">1</a></li>
                        <li class="paginate_button page-item next disabled" id="data_table_s3_next"><a href="#" aria-controls="data_table_s3" data-dt-idx="2" tabindex="0" class="page-link">Next</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>


        </div>
      </div>
    </div>
  </div>
  <div class="tab-pane fade" id="tableTab-tabs-running" role="tabpanel" aria-labelledby="tableTab-tab-running">
    <!-- Tab 2 content -->
    <div class="row">
      <div class="col-md-12">
        <div class="card table-card">
          <!-- Table -->
          <div class="card-block" style="padding:20px;">
            <div class="table-responsive scroll-widget">
              <div id="data_table_s3_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
                <div class="row">
                  <div class="col-sm-12 col-md-6">
                    <div class="dataTables_length" id="data_table_s3_length">
                      <label>Show
                        <select name="data_table_s3_length" aria-controls="data_table_s3" class="custom-select custom-select-sm form-control form-control-sm">
                          <option value="10">10</option>
                          <option value="25">25</option>
                          <option value="50">50</option>
                          <option value="100">100</option>
                        </select> entries
                      </label>
                    </div>
                  </div>
                  <div class="col-sm-12 col-md-6">
                    <div id="data_table_s3_filter" class="dataTables_filter">
                      <label>Search:
                        <input type="search" class="form-control form-control-sm" placeholder="" aria-controls="data_table_s3">
                      </label>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12">
                    <table id="data_table_s3" class="table table-striped table-bordered nowrap dataTable no-footer" role="grid" aria-describedby="data_table_s3_info" style="width: 860px;">
                      <thead>
                        <tr role="row">
                          <th class="sorting_asc" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task: activate to sort column descending" style="width: 200px;" aria-sort="ascending">Task</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Target: activate to sort column ascending" style="width: 78px;">Target</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Start Time: activate to sort column ascending" style="width: 136px;">Start Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Completion Time: activate to sort column ascending" style="width: 146px;">Completion Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task ID: activate to sort column ascending" style="width: 147px;">Task ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Resource ID: activate to sort column ascending" style="width: 147px;">Resource ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Execution Time: activate to sort column ascending" style="width: 147px;">Execution Time</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr role="row" class="odd">
                          <td>Resume</td>
                          <td>VM-2021Decv6</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>30b18d08-8244-4105-912e-8498a3 <i class="far fa-copy" id="copyTaskID1"></i></td>
                          <td>C4-38e681fa-73a8-4f4f-b64c-aff5b <i class="far fa-copy" id="copyResourceID1"></i></td>
                          <td>336 ms</td>
                        </tr>
                      </tbody>
                    </table>
                    <div id="data_table_s3_processing" class="dataTables_processing card" style="display: none;">Processing...</div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12 col-md-5">
                    <div class="dataTables_info" id="data_table_s3_info" role="status" aria-live="polite">Showing 1 to 1 of 1 entries</div>
                  </div>
                  <div class="col-sm-12 col-md-7">
                    <div class="dataTables_paginate paging_simple_numbers" id="data_table_s3_paginate">
                      <ul class="pagination">
                        <li class="paginate_button page-item previous disabled" id="data_table_s3_previous"><a href="#" aria-controls="data_table_s3" data-dt-idx="0" tabindex="0" class="page-link">Previous</a></li>
                        <li class="paginate_button page-item active"><a href="#" aria-controls="data_table_s3" data-dt-idx="1" tabindex="0" class="page-link">1</a></li>
                        <li class="paginate_button page-item next disabled" id="data_table_s3_next"><a href="#" aria-controls="data_table_s3" data-dt-idx="2" tabindex="0" class="page-link">Next</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>


        </div>
      </div>
    </div>
  </div>
  <div class="tab-pane fade" id="tableTab-tabs-failed" role="tabpanel" aria-labelledby="tableTab-tab-failed">
    <!-- Tab 3 content -->
    <div class="row">
      <div class="col-md-12">
        <div class="card table-card">
          <!-- Table -->
          <div class="card-block" style="padding:20px;">
            <div class="table-responsive scroll-widget">
              <div id="data_table_s3_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
                <div class="row">
                  <div class="col-sm-12 col-md-6">
                    <div class="dataTables_length" id="data_table_s3_length">
                      <label>Show
                        <select name="data_table_s3_length" aria-controls="data_table_s3" class="custom-select custom-select-sm form-control form-control-sm">
                          <option value="10">10</option>
                          <option value="25">25</option>
                          <option value="50">50</option>
                          <option value="100">100</option>
                        </select> entries
                      </label>
                    </div>
                  </div>
                  <div class="col-sm-12 col-md-6">
                    <div id="data_table_s3_filter" class="dataTables_filter">
                      <label>Search:
                        <input type="search" class="form-control form-control-sm" placeholder="" aria-controls="data_table_s3">
                      </label>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12">
                    <table id="data_table_s3" class="table table-striped table-bordered nowrap dataTable no-footer" role="grid" aria-describedby="data_table_s3_info" style="width: 860px;">
                      <thead>
                        <tr role="row">
                          <th class="sorting_asc" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task: activate to sort column descending" style="width: 200px;" aria-sort="ascending">Task</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Target: activate to sort column ascending" style="width: 78px;">Target</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Start Time: activate to sort column ascending" style="width: 136px;">Start Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Completion Time: activate to sort column ascending" style="width: 146px;">Completion Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task ID: activate to sort column ascending" style="width: 147px;">Task ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Resource ID: activate to sort column ascending" style="width: 147px;">Resource ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Execution Time: activate to sort column ascending" style="width: 147px;">Execution Time</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr role="row" class="odd">
                          <td>Resume</td>
                          <td>VM-2021Decv6</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>30b18d08-8244-4105-912e-8498a3 <i class="far fa-copy" id="copyTaskID1"></i></td>
                          <td>C4-38e681fa-73a8-4f4f-b64c-aff5b <i class="far fa-copy" id="copyResourceID1"></i></td>
                          <td>336 ms</td>
                        </tr>
                      </tbody>
                    </table>
                    <div id="data_table_s3_processing" class="dataTables_processing card" style="display: none;">Processing...</div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12 col-md-5">
                    <div class="dataTables_info" id="data_table_s3_info" role="status" aria-live="polite">Showing 1 to 1 of 1 entries</div>
                  </div>
                  <div class="col-sm-12 col-md-7">
                    <div class="dataTables_paginate paging_simple_numbers" id="data_table_s3_paginate">
                      <ul class="pagination">
                        <li class="paginate_button page-item previous disabled" id="data_table_s3_previous"><a href="#" aria-controls="data_table_s3" data-dt-idx="0" tabindex="0" class="page-link">Previous</a></li>
                        <li class="paginate_button page-item active"><a href="#" aria-controls="data_table_s3" data-dt-idx="1" tabindex="0" class="page-link">1</a></li>
                        <li class="paginate_button page-item next disabled" id="data_table_s3_next"><a href="#" aria-controls="data_table_s3" data-dt-idx="2" tabindex="0" class="page-link">Next</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>


        </div>
      </div>
    </div>
  </div>
  <div class="tab-pane fade" id="tableTab-tabs-succeeded" role="tabpanel" aria-labelledby="tableTab-tab-succeeded">
    <!-- Tab 4 content -->
    <div class="row">
      <div class="col-md-12">
        <div class="card table-card">
          <!-- Table -->
          <div class="card-block" style="padding:20px;">
            <div class="table-responsive scroll-widget">
              <div id="data_table_s3_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
                <div class="row">
                  <div class="col-sm-12 col-md-6">
                    <div class="dataTables_length" id="data_table_s3_length">
                      <label>Show
                        <select name="data_table_s3_length" aria-controls="data_table_s3" class="custom-select custom-select-sm form-control form-control-sm">
                          <option value="10">10</option>
                          <option value="25">25</option>
                          <option value="50">50</option>
                          <option value="100">100</option>
                        </select> entries
                      </label>
                    </div>
                  </div>
                  <div class="col-sm-12 col-md-6">
                    <div id="data_table_s3_filter" class="dataTables_filter">
                      <label>Search:
                        <input type="search" class="form-control form-control-sm" placeholder="" aria-controls="data_table_s3">
                      </label>
                    </div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12">
                    <table id="data_table_s3" class="table table-striped table-bordered nowrap dataTable no-footer" role="grid" aria-describedby="data_table_s3_info" style="width: 860px;">
                      <thead>
                        <tr role="row">
                          <th class="sorting_asc" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task: activate to sort column descending" style="width: 200px;" aria-sort="ascending">Task</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Target: activate to sort column ascending" style="width: 78px;">Target</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Start Time: activate to sort column ascending" style="width: 136px;">Start Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Completion Time: activate to sort column ascending" style="width: 146px;">Completion Time</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Task ID: activate to sort column ascending" style="width: 147px;">Task ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Resource ID: activate to sort column ascending" style="width: 147px;">Resource ID</th>
                          <th class="sorting" tabindex="0" aria-controls="data_table_s3" rowspan="1" colspan="1" aria-label="Execution Time: activate to sort column ascending" style="width: 147px;">Execution Time</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr role="row" class="odd">
                          <td>Resume</td>
                          <td>VM-2021Decv6</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>11/24/2023, 3:45:41 PM</td>
                          <td>30b18d08-8244-4105-912e-8498a3 <i class="far fa-copy" id="copyTaskID1"></i></td>
                          <td>C4-38e681fa-73a8-4f4f-b64c-aff5b <i class="far fa-copy" id="copyResourceID1"></i></td>
                          <td>336 ms</td>
                        </tr>
                      </tbody>
                    </table>
                    <div id="data_table_s3_processing" class="dataTables_processing card" style="display: none;">Processing...</div>
                  </div>
                </div>
                <div class="row">
                  <div class="col-sm-12 col-md-5">
                    <div class="dataTables_info" id="data_table_s3_info" role="status" aria-live="polite">Showing 1 to 1 of 1 entries</div>
                  </div>
                  <div class="col-sm-12 col-md-7">
                    <div class="dataTables_paginate paging_simple_numbers" id="data_table_s3_paginate">
                      <ul class="pagination">
                        <li class="paginate_button page-item previous disabled" id="data_table_s3_previous"><a href="#" aria-controls="data_table_s3" data-dt-idx="0" tabindex="0" class="page-link">Previous</a></li>
                        <li class="paginate_button page-item active"><a href="#" aria-controls="data_table_s3" data-dt-idx="1" tabindex="0" class="page-link">1</a></li>
                        <li class="paginate_button page-item next disabled" id="data_table_s3_next"><a href="#" aria-controls="data_table_s3" data-dt-idx="2" tabindex="0" class="page-link">Next</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- Tabs content -->
@include('footer')

<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.min.js"></script>
<script>
  document.addEventListener('DOMContentLoaded', function() {
    // Initialize Clipboard.js
    var clipboardTaskID = new ClipboardJS('#copyTaskID1', {
      text: function(trigger) {
        // Get the text from the corresponding <td>
        var row = trigger.closest('tr');
        return row.querySelector('td:nth-child(5)').innerText;
      }
    });

    var clipboardResourceID = new ClipboardJS('#copyResourceID1', {
      text: function(trigger) {
        // Get the text from the corresponding <td>
        var row = trigger.closest('tr');
        return row.querySelector('td:nth-child(6)').innerText;
      }
    });

    // Display success message when copying is successful
    clipboardTaskID.on('success', function(e) {
      alert('Task ID copied to clipboard!');
      e.clearSelection();
    });

    clipboardResourceID.on('success', function(e) {
      alert('Resource ID copied to clipboard!');
      e.clearSelection();
    });
  });
</script>