<!DOCTYPE html>
<html>
<head>
  <title>Snapshot</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
  <style type="text/css">
   html, body, div, iframe { margin:0; padding:0; height:100%; }
  </style>
</head>
<body>
<%= render :partial => 'databases/navbar' %>
<div class="container" height="100%">

<% @snapshots.each do |snapshot| %>
   <strong>Database Name:</strong>  <%= snapshot.database_name %>
   &nbsp;
   <strong>Snapshot Indexed at:</strong>  <%= snapshot.created_at %>

<% end %>


<% @snapshots.each do |snapshot| %>
    <iframe src=<%=snapshot.s3_url%> width="100%"  height="97%"  id="rails_iframe" >error!
    </iframe>
<%= link_to snapshot.s3_url, snapshot.s3_url %>
<%= link_to snapshot.csv_url, snapshot.csv_url %>


<%= button_to "delete", {:controller => :snapshots,
      :action => 'destroy', :id => snapshot.id, :database_name => snapshot.database_name, :s3_url => snapshot.s3_url }, :method => :delete %>
<% end %>

</div>
</body>
</html>

