snapshot-dataset.html 2.92 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<div>
<div id='snapshot_modal' class='modal fade'>
  <div class='modal-dialog'>
    <div class='modal-content'>
      <div class='modal-header'>
	<h4 class='modal-title text-center'>Snapshot Dataset</h4>
      </div>
      <div class='modal-body'>
	<p>
	  Replace the contents of your dataset by taking a new snapshot of
	  the data from one of your current experiments. Pick the
	  experiment from the drop down menu, be sure to check that the
	  node and blockstore names are correct. 
	</p>
	<p>
	  <b>Be sure to log off from your node so that we can get a
	  consistent snapshot</b>. More generally, nothing should be
	  running that is accessing the data while we do the snapshot.
	</p>
	<form id='snapshot_dataset_form'
	      class='form-horizontal' role='form'>
22
	  <input type='hidden' name='dataset_uuid' value='<%- dataset_uuid %>'>
23 24 25
	  <div class='row'>
	    <div class='col-sm-12'>
	      <% if (instancelist) { %>
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
		<div class="form-group">
		  <select name="dataset_instance"
			  id="dataset_instance"
			  class='form-control format-me'
			  data-key="dataset_instance"
			  data-label="Instance"
			  placeholder='Please Select'>
		    <option value=''>Please Select</option>
		    <% _.each(instancelist, function(instance) { %>
		      <option
			  <% if (instance.uuid == formfields.dataset_instance) { %>
			  selected
			  <% } %>
			  value='<%= instance.uuid %>'><%= instance.name %>
		      </option>
		    <% }); %>
		  </select>
		</div>
		<div class="form-group">
		  <select name="dataset_node"
			  id="dataset_node"
			  class='form-control format-me'
			  data-key="dataset_node"
			  data-label="Node"
			  placeholder='Please Select'>
		  </select>
		</div>
		<div class="form-group">
		  <select name="dataset_bsname"
			  id="dataset_bsname"
			  class='form-control format-me'
			  data-key="dataset_bsname"
			  data-label="BS Name"
			  placeholder='Please Select'>
		  </select>
		</div>
62
	      <% } else if (embedded) { %>
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
	        <div class="form-group">
		  <input name="dataset_node" id='dataset_node'
			 value="<%- formfields.dataset_node %>"
			 class="form-control format-me"
			 data-key="dataset_node"
			 data-label="Node"
			 placeholder="Node to snapshot dataset from"
			 type="text">
		</div>
		<div class="form-group">
		  <input name="dataset_bsname" id='dataset_bsname'
			 value="<%- formfields.dataset_bsname %>"
			 class="form-control format-me"
			 data-key="dataset_bsname"
			 data-label="BS Name"
			 placeholder="Blockstore name on the node"
			 type="text">
		</div>
81
	      <% } %>
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
	    </div>
	    <br><br>
	    <center>
              <button type='button' style='margin-right: 20px;'
                      class='btn btn-primary btn-sm' 
                      data-dismiss='modal' aria-hidden='true'>
		Cancel</button>
	      <button type='button' class='btn btn-success btn-sm'
		      id='snapshot_submit_button'>
		Confirm</button>
	    </center>
	  </div>
	</form>
      </div>
    </div>
  </div>
</div>
</div>