You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by ji...@apache.org on 2016/11/07 13:09:00 UTC
incubator-eagle git commit: [EAGLE-745] add site delete err message
Repository: incubator-eagle
Updated Branches:
refs/heads/master a28e2c485 -> 3f8a33d8b
[EAGLE-745] add site delete err message
add site delete err message
Author: zombieJ <sm...@gmail.com>
Closes #618 from zombieJ/EAGLE-745.
Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/3f8a33d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/3f8a33d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/3f8a33d8
Branch: refs/heads/master
Commit: 3f8a33d8bb6b2fd936852f77b1de6ab28b980627
Parents: a28e2c4
Author: zombieJ <sm...@gmail.com>
Authored: Mon Nov 7 21:08:50 2016 +0800
Committer: zombieJ <sm...@gmail.com>
Committed: Mon Nov 7 21:08:50 2016 +0800
----------------------------------------------------------------------
.../webapp/app/dev/partials/integration/siteList.html | 2 +-
.../webapp/app/dev/public/js/ctrls/integrationCtrl.js | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3f8a33d8/eagle-server/src/main/webapp/app/dev/partials/integration/siteList.html
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/partials/integration/siteList.html b/eagle-server/src/main/webapp/app/dev/partials/integration/siteList.html
index 491d902..ab29a79 100644
--- a/eagle-server/src/main/webapp/app/dev/partials/integration/siteList.html
+++ b/eagle-server/src/main/webapp/app/dev/partials/integration/siteList.html
@@ -48,7 +48,7 @@
<td class="text-center">
<div class="btn-group btn-group-xs">
<a class="btn btn-default btn-sm" ui-sref="integration.site({id: site.siteId})">Edit</a>
- <button class="btn btn-default btn-sm" ng-click="deleteSite(site)">Delete</button>
+ <button class="btn btn-danger btn-sm" ng-click="deleteSite(site)">Delete</button>
</div>
</td>
</tr>
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/3f8a33d8/eagle-server/src/main/webapp/app/dev/public/js/ctrls/integrationCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/integrationCtrl.js b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/integrationCtrl.js
index 0766391..a16c889 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/integrationCtrl.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/integrationCtrl.js
@@ -41,10 +41,16 @@
$scope.deleteSite = function (site) {
UI.deleteConfirm(site.siteId)
(function (entity, closeFunc, unlock) {
- Entity.delete("sites", site.uuid)._then(function () {
+ Entity.delete("sites", site.uuid)._then(function (res) {
Site.reload();
closeFunc();
- }, unlock);
+ }, function (res) {
+ $.dialog({
+ title: "OPS",
+ content: common.getValueByPath(res, ["data", "message"])
+ });
+ unlock();
+ });
});
};