refresh button working, spinning circle, navigate function, tolerate sites==undefined...
[plstackapi.git] / planetstack / core / xoslib / templates / xosAdmin.html
index 7eb43d1..bc6ac02 100644 (file)
   <button class="btn btn-default btn-xosnav" onclick="<%= router %>.navigate('<%= routeUrl %>', {trigger: true})"><%= name %></button><br>
 </script>
 
-<script type="text/template" id="xos-log-template">
-  <tr id="<%= logMessageId %>">
-     <td><%= success %></td>
-     <td><%= what %></td>
-     <td><%= status %></td>
-     <td><%= statusText %></td>
-  </tr>
-</script>
-
 <script type="text/template" id="xos-status-template">
-  <%= what %>: [<%= success %>] <%= statusText %> (<%= status %>)
+  <div class="xos-status xos-<%= statusclass %>"><%= what %>: <%= statusText %> (<%= status %>)</div>
 </script>
 
 <script type="text/template" id="xos-tabs-template">
@@ -44,7 +35,7 @@
 </script>
 
 <script type="text/template" id="xos-title-list">
-  <h3><%= title %></h3>
+  <h3><img src="/static/img/brokencircle.gif" height=16 width=16 id="xos-list-title-spinner"> <%= title %></h3>
 </script>
 
 <script type="text/template" id="xos-title-detail">
        <td colspan=2><button class="btn js-submit btn-xos-detail btn-xos-save-leave">Save</button>
            <button class="btn js-submit btn-xos-detail btn-xos-save-continue">Save and Continue Editing</button>
            <button class="btn js-submit btn-xos-detail btn-xos-save-another">Save and Add Another</button>
+           <button class="btn js-submit btn-xos-detail btn-xos-delete">Delete</button>
        </td>
     </tr>
 </script>
 
 <script type="text/template" id="xos-inline-list-buttons-template">
            <button class="btn js-submit btn-xos-list btn-xos-add">Add</button>
+           <button class="btn js-submit btn-xos-list btn-xos-refresh">Refresh</button>
        </td>
     </tr>
 </script>
@@ -98,7 +91,7 @@
   <td class="objectLink"><%= name %></td>
   <td><%= backend_type %></td>
   <td><%= admin_tenant %></td>
-  <td><%= sites.length %></td>
+  <td><%= typeof sites != 'undefined' && sites.length || 0 %></td>
 </script>
 
 <script type="text/template" id="xosAdmin-deployment-detail-template">
 
 <script type="text/template" id="xosAdmin-image-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-networkTemplate-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-network-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-networkSliver-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-networkDeployment-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-node-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-sliceRole-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-service-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-site-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-slice-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
   <form>\r
   <table>\r
   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
+  <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>\r
   <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>\r
   <tr><td>Description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>\r
   <tr><td>Url:</td><td><input type="text" name="slice_url" value="<%= slice_url %>"></td></tr>\r
 
 <script type="text/template" id="xosAdmin-sliceDeployment-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-slicePrivilege-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-sliver-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-user-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>
 
 <script type="text/template" id="xosAdmin-userDeployment-list-template">
   <h3 class="xos-list-title"><%= title %></h3>
+  <%= xosInlineListButtonsTemplate() %>
   <table class="test-table">
   <thead><tr>
      <th>id</th>