backend_status icon
diff --git a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
index 2a1e94f..d450ea9 100644
--- a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
+++ b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
@@ -758,6 +758,9 @@
var collectionName = view.collection.collectionName;
mRender = function(x,y,z) { return '<a href="#' + collectionName + '/' + z.id + '">' + x + '</a>'; };
}
+ if (fieldName=="backend_status") {
+ mRender = function(x,y,z) { return xosBackendStatusIconTemplate(z); };
+ }
thisColumn = {sTitle: fieldNameToHumanReadable(fieldName), mData: fieldName, mRender: mRender, mSearchText: mSearchText};
view.columnsByIndex.push( thisColumn );
view.columnsByFieldName[fieldName] = thisColumn;
diff --git a/planetstack/core/xoslib/templates/xosAdmin.html b/planetstack/core/xoslib/templates/xosAdmin.html
index 9a0e0f5..8b5c613 100644
--- a/planetstack/core/xoslib/templates/xosAdmin.html
+++ b/planetstack/core/xoslib/templates/xosAdmin.html
@@ -83,6 +83,18 @@
</tr>
</script>
+<script type="text/template" id="xos-backend-status-icon-template">
+ <% if ((enacted) && (enacted >= updated)) { %>
+ <span style="min-width:16px;"><img src="/static/admin/img/icon_success.gif"></span>
+ <% } else { %>
+ <% if ((backend_status == "Provisioning in progress") || (!backend_status)) { %>
+ <span style="min-width:16px;" title="<%= _.escape(backend_status) %>"><img src="/static/admin/img/icon_clock.gif"></span>
+ <% } else { %>
+ <span style="min-width:16px;" title="<%= _.escape(backend_status) %>"><img src="/static/admin/img/icon_error.gif"></span>
+ <% } %>
+ <% } %>
+</script>
+
<script type="text/template" id="xos-list-header-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>
@@ -195,5 +207,6 @@
xosListFooterTemplate = _.template($("#xos-list-footer-template").html());
xosDeleteButtonTemplate = _.template($("#xos-delete-button-template").html());
xosDetailLinkTemplate = _.template($("#xos-detail-link-template").html());
+xosBackendStatusIconTemplate = _.template($("#xos-backend-status-icon-template").html());
</script>