Re: [Freeipa-devel] [PATCH] 201 Successful action notification

2012-08-29 Thread Petr Vobornik

On 08/28/2012 04:49 PM, Endi Sukma Dewata wrote:

On 8/27/2012 5:57 AM, Petr Vobornik wrote:

User was not notified about success of actions executed from action
list, action panel or facet control bar.

This patch adds IPA.notify_success(message) call. It creates a yellow
notification area with supplied message in Web UI header in the middle
of the green area (empty space of first level navigation).
This area is displayed for 3s and then it fades out (800ms). It also
fades out when it is clicked.

This call is used(directly or indirectly) in:
  * search facets: delete, disable, enable actions
  * details facets: delete action
  * user details facet: reset password action
  * host details facet: unprovision, set OTP actions
  * service details facet: unprovision action
  * host and service details facet: request, revoke, restore
certificates actions
  * group details facet: change to POSIX/external actions
  * dns zone details facet: add/remove permission actions

  https://fedorahosted.org/freeipa/ticket/2977


ACK.


Pushed to master, ipa-3-0.



What do you think about creating a console/log page to show the action
history? This way if the user misses the notification he still can check
the logs. The logs will be stored in memory only and have size limit.
The page can also be used to show the CLI commands of those actions.



I was thinking about it as well. New ticket: 
https://fedorahosted.org/freeipa/ticket/3040  I guess it will have 
really low priority.



--
Petr Vobornik


___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 201 Successful action notification

2012-08-28 Thread Endi Sukma Dewata

On 8/27/2012 5:57 AM, Petr Vobornik wrote:

User was not notified about success of actions executed from action
list, action panel or facet control bar.

This patch adds IPA.notify_success(message) call. It creates a yellow
notification area with supplied message in Web UI header in the middle
of the green area (empty space of first level navigation).
This area is displayed for 3s and then it fades out (800ms). It also
fades out when it is clicked.

This call is used(directly or indirectly) in:
  * search facets: delete, disable, enable actions
  * details facets: delete action
  * user details facet: reset password action
  * host details facet: unprovision, set OTP actions
  * service details facet: unprovision action
  * host and service details facet: request, revoke, restore
certificates actions
  * group details facet: change to POSIX/external actions
  * dns zone details facet: add/remove permission actions

  https://fedorahosted.org/freeipa/ticket/2977


ACK.

What do you think about creating a console/log page to show the action 
history? This way if the user misses the notification he still can check 
the logs. The logs will be stored in memory only and have size limit. 
The page can also be used to show the CLI commands of those actions.


--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 201 Successful action notification

2012-08-27 Thread Petr Vobornik
User was not notified about success of actions executed from action 
list, action panel or facet control bar.


This patch adds IPA.notify_success(message) call. It creates a yellow 
notification area with supplied message in Web UI header in the middle 
of the green area (empty space of first level navigation).
This area is displayed for 3s and then it fades out (800ms). It also 
fades out when it is clicked.


This call is used(directly or indirectly) in:
 * search facets: delete, disable, enable actions
 * details facets: delete action
 * user details facet: reset password action
 * host details facet: unprovision, set OTP actions
 * service details facet: unprovision action
 * host and service details facet: request, revoke, restore 
certificates actions

 * group details facet: change to POSIX/external actions
 * dns zone details facet: add/remove permission actions

 https://fedorahosted.org/freeipa/ticket/2977
--
Petr Vobornik

From b2d1087257a095a3615623a545b6a9294fd59c1c Mon Sep 17 00:00:00 2001
From: Petr Vobornik 
Date: Mon, 27 Aug 2012 10:57:47 +0200
Subject: [PATCH] Successful action notification

User was not notified about success of actions executed from action list, action panel or facet cotrol bar.

This patch adds IPA.notify_success(message) call. It creates a yellow notification area with supplied message in Web UI header in the middle of the green area (empty space of first level navigation).
This area is displayed for 3s and then it fades out (800ms). It also fades out when it is clicked.

This call is used(directly or indirectly) in:
 * search facets: delete, disable, enable actions
 * details facets: delete action
 * user details facet: reset password action
 * host details facet: unprovision, set OTP actions
 * service details facet: unprovision action
 * host and service details facet: request, revoke, restore certificates actions
 * group details facet: change to POSIX/external actions
 * dns zone details facet: add/remove permission actions

 https://fedorahosted.org/freeipa/ticket/2977
---
 install/ui/certificate.js  |3 +++
 install/ui/details.js  |4 
 install/ui/dns.js  |   22 +-
 install/ui/hbac.js |   16 ++---
 install/ui/host.js |2 ++
 install/ui/ipa.css |   15 
 install/ui/ipa.js  |   35 +++-
 install/ui/search.js   |   44 
 install/ui/selinux.js  |   16 ++---
 install/ui/serverconfig.js |6 ++---
 install/ui/service.js  |1 +
 install/ui/sudo.js |   16 ++---
 install/ui/test/data/ipa_init.json |   10 +++-
 install/ui/user.js |   18 ---
 ipalib/plugins/internal.py |8 +++
 15 files changed, 135 insertions(+), 81 deletions(-)

diff --git a/install/ui/certificate.js b/install/ui/certificate.js
index e94c81a032c10504a91e7d296b8f91a0868679d7..6a6509e7e118f98f470fda4d85824ec1356474ea 100755
--- a/install/ui/certificate.js
+++ b/install/ui/certificate.js
@@ -696,6 +696,7 @@ IPA.cert.request_action = function(spec) {
 },
 on_success: function(data, text_status, xhr) {
 facet.refresh();
+IPA.notify_success(IPA.messages.objects.cert.requested);
 }
 }).execute();
 }
@@ -746,6 +747,7 @@ IPA.cert.revoke_action = function(spec) {
 },
 on_success: function(data, text_status, xhr) {
 facet.refresh();
+IPA.notify_success(IPA.messages.objects.cert.revoked);
 }
 }).execute();
 }
@@ -792,6 +794,7 @@ IPA.cert.restore_action = function(spec) {
 args: [certificate.serial_number],
 on_success: function(data, text_status, xhr) {
 facet.refresh();
+IPA.notify_success(IPA.messages.objects.cert.restored);
 }
 }).execute();
 }
diff --git a/install/ui/details.js b/install/ui/details.js
index 0530592d71592e0caeae33cdd279873d82fb647c..883bb06bfd56ffd800f1ce60e229bc0c1f4ec1bb 100644
--- a/install/ui/details.js
+++ b/install/ui/details.js
@@ -1123,6 +1123,8 @@ IPA.object_action = function(spec) {
 };
 
 that.on_success = function(facet, data, text_status, xhr) {
+
+IPA.notify_success(data.result.summary);
 facet.on_update.notify();
 };
 
@@ -1190,6 +1192,8 @@ IPA.delete_action = function(spec) {
 var that = IPA.object_action(spec);
 
 that.on_success = function(facet, data, text_status, xhr) {
+
+IPA.notify_success(data.result.summary);
 facet.on_update.notify();
 facet.redirect();
 };
diff --git a/install/u