git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d0b5e2d
)
fix javascript error if enacted is undefined
author
Scott Baker
<smbaker@gmail.com>
Wed, 24 Dec 2014 01:17:27 +0000
(17:17 -0800)
committer
Scott Baker
<smbaker@gmail.com>
Wed, 24 Dec 2014 01:17:27 +0000
(17:17 -0800)
planetstack/core/xoslib/templates/xosAdmin.html
patch
|
blob
|
history
diff --git
a/planetstack/core/xoslib/templates/xosAdmin.html
b/planetstack/core/xoslib/templates/xosAdmin.html
index
4ad198a
..
700fd19
100644
(file)
--- a/
planetstack/core/xoslib/templates/xosAdmin.html
+++ b/
planetstack/core/xoslib/templates/xosAdmin.html
@@
-84,7
+84,9
@@
</script>
<script type="text/template" id="xos-backend-status-icon-template">
</script>
<script type="text/template" id="xos-backend-status-icon-template">
- <% if ((enacted) && (enacted >= updated)) { %>
+ <% if (model.enacted === undefined) { %>
+ <!-- enacted is undefined; this must be a new object -->
+ <% } else 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;"><img src="/static/admin/img/icon_success.gif"></span>
<% } else { %>
<% if ((backend_status == "Provisioning in progress") || (!backend_status)) { %>
@@
-97,7
+99,9
@@
<script type="text/template" id="xos-backend-status-text-template">
<%= xosBackendStatusIconTemplate.apply(this,arguments) %>
<script type="text/template" id="xos-backend-status-text-template">
<%= xosBackendStatusIconTemplate.apply(this,arguments) %>
- <% if ((enacted) && (enacted >= updated)) { %>
+ <% if (model.enacted === undefined) { %>
+ <!-- enacted is undefined; this must be a new object -->
+ <% } else if ((enacted) && (enacted >= updated)) { %>
Successfully enacted
<% } else { %>
<%= _.escape(backend_status) %>
Successfully enacted
<% } else { %>
<%= _.escape(backend_status) %>