|
|
71541a |
From 7e92db5789ad09f0e1184691ba69fb087402f24c Mon Sep 17 00:00:00 2001
|
|
|
71541a |
From: Ondrej Mular <omular@redhat.com>
|
|
|
71541a |
Date: Wed, 2 Sep 2015 11:16:14 +0200
|
|
|
71541a |
Subject: [PATCH] fix constraints removing in web UI
|
|
|
71541a |
|
|
|
71541a |
---
|
|
|
71541a |
pcsd/public/js/nodes-ember.js | 9 ++++++---
|
|
|
71541a |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
71541a |
|
|
|
71541a |
diff --git a/pcsd/public/js/nodes-ember.js b/pcsd/public/js/nodes-ember.js
|
|
|
71541a |
index d2f85bd..0943c65 100644
|
|
|
71541a |
--- a/pcsd/public/js/nodes-ember.js
|
|
|
71541a |
+++ b/pcsd/public/js/nodes-ember.js
|
|
|
71541a |
@@ -562,9 +562,12 @@ Pcs.resourcesContainer = Ember.Object.create({
|
|
|
71541a |
self.set('constraints', constraints);
|
|
|
71541a |
var resource_map = self.get('resource_map');
|
|
|
71541a |
$.each(constraints, function(const_type, cons) {
|
|
|
71541a |
- $.each(cons, function(resource_id, cons_list) {
|
|
|
71541a |
- if (resource_id in resource_map)
|
|
|
71541a |
- resource_map[resource_id].set(const_type, cons_list);
|
|
|
71541a |
+ $.each(resource_map, function(resource_id, resource_obj) {
|
|
|
71541a |
+ if (resource_id in cons) {
|
|
|
71541a |
+ resource_obj.set(const_type, cons[resource_id]);
|
|
|
71541a |
+ } else {
|
|
|
71541a |
+ resource_obj.set(const_type, []);
|
|
|
71541a |
+ }
|
|
|
71541a |
});
|
|
|
71541a |
});
|
|
|
71541a |
}
|
|
|
71541a |
--
|
|
|
71541a |
1.9.1
|
|
|
71541a |
|