Blame SOURCES/bz1189857-05-remove-removing-constriants-from-client-side-javascr.patch

71541a
From 41e2d3e4f5ae0331d7984612485b3bbb84d41304 Mon Sep 17 00:00:00 2001
71541a
From: Ondrej Mular <omular@redhat.com>
71541a
Date: Wed, 2 Sep 2015 12:39:06 +0200
71541a
Subject: [PATCH] remove removing constriants from client-side (javascript)
71541a
71541a
All changes are displayed after update.
71541a
---
71541a
 pcsd/public/js/nodes-ember.js | 24 ------------------------
71541a
 pcsd/public/js/pcsd.js        |  6 ------
71541a
 2 files changed, 30 deletions(-)
71541a
71541a
diff --git a/pcsd/public/js/nodes-ember.js b/pcsd/public/js/nodes-ember.js
71541a
index 0943c65..5fec386 100644
71541a
--- a/pcsd/public/js/nodes-ember.js
71541a
+++ b/pcsd/public/js/nodes-ember.js
71541a
@@ -390,30 +390,6 @@ Pcs.resourcesContainer = Ember.Object.create({
71541a
     };
71541a
   },
71541a
 
71541a
-  remove_constraint: function(constraint_id) {
71541a
-    $.each(this.get('resource_map'), function(key, resource) {
71541a
-      $.each(
71541a
-        [
71541a
-          "location_constraints",
71541a
-          "ordering_constraints",
71541a
-          "ordering_set_constraints",
71541a
-          "colocation_constraints"
71541a
-        ],
71541a
-        function(_, constraint_type) {
71541a
-          if (resource.get(constraint_type)) {
71541a
-            resource.set(
71541a
-              constraint_type,
71541a
-              $.grep(
71541a
-                resource.get(constraint_type),
71541a
-                function(value2, key) { return value2.id != constraint_id; }
71541a
-              )
71541a
-            );
71541a
-          }
71541a
-        }
71541a
-      );
71541a
-    });
71541a
-  },
71541a
-
71541a
   update_meta_attr: function(resource_id, attr, value) {
71541a
     value = typeof value !== 'undefined' ? value.trim() : "";
71541a
     var data = {
71541a
diff --git a/pcsd/public/js/pcsd.js b/pcsd/public/js/pcsd.js
71541a
index 879b533..197cdd1 100644
71541a
--- a/pcsd/public/js/pcsd.js
71541a
+++ b/pcsd/public/js/pcsd.js
71541a
@@ -1595,9 +1595,6 @@ function remove_constraint(id) {
71541a
     url: get_cluster_remote_url() + 'remove_constraint_remote',
71541a
     data: {"constraint_id": id},
71541a
     timeout: pcs_timeout,
71541a
-    success: function (data) {
71541a
-      Pcs.resourcesContainer.remove_constraint(id);
71541a
-    },
71541a
     error: function (xhr, status, error) {
71541a
       alert(
71541a
         "Error removing constraint "
71541a
@@ -1617,9 +1614,6 @@ function remove_constraint_rule(id) {
71541a
     url: get_cluster_remote_url() + 'remove_constraint_rule_remote',
71541a
     data: {"rule_id": id},
71541a
     timeout: pcs_timeout,
71541a
-    success: function (data) {
71541a
-      Pcs.resourcesContainer.remove_constraint(id);
71541a
-    },
71541a
     error: function (xhr, status, error) {
71541a
       alert(
71541a
         "Error removing constraint rule "
71541a
-- 
71541a
1.9.1
71541a