+ on_leases_field_state_changed: function(data)
+ {
+ console.log('leases_field_state_changed');
+ this.on_field_state_changed(data);
+ },
+ on_field_state_changed: function(data)
+ {
+ var query_ext;
+
+ switch (data.state) {
+ case STATE_SET:
+ case STATE_WARNINGS:
+ /* Get the number of pending / unconfigured resources */
+ /* Let's store it in query_ext */
+ query_ext = manifold.query_store.find_analyzed_query_ext(this.options.query_uuid);
+
+ $('#badge-pending').text(query_ext.num_pending);
+ if (query_ext.num_pending > 0) {
+ $('#badge-pending').show();
+ } else {
+ $('#badge-pending').hide();
+ }
+
+ $('#badge-unconfigured').text(query_ext.num_unconfigured);
+ if (query_ext.num_unconfigured > 0) {
+ $('#badge-unconfigured').show();
+ } else {
+ $('#badge-unconfigured').hide();
+ }
+ default:
+ break;
+ }
+ },
+