summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/rpc.js
Commit message (Collapse)AuthorAgeFilesLines
* Refactoring of rpc modulePavel Vomacka2017-01-051-20/+65
| | | | | | | | | | | | | | | | | | | | | | The rpc module is now separated from display layer. There are two new global topics: - 'rpc-start' for showing the widget which indicates execution of rpc calls - 'rpc-end' for hiding the widget which indicates execution of rpc calls. These two global topics replace the original methods IPA.display_activity_icon() and IPA.hide_activity_icon(). There is also new property of a command (notify_globally), which allows to turn off the widget which indicates network activity. Instead of classic activity indicator there can be called custom function at the beginning and at the end of network activity. There are also changes in internal communication in rpc.js module. There are four new events, two for calling on_success and on_error methods and two for calling custom functions at the beginning and at the end of network activity. https://fedorahosted.org/freeipa/ticket/6144 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* Coverity - true branch can't be executedPavel Vomacka2016-11-101-1/+2
| | | | | | | The 'result' variable is always false because of previous condition. Therefore there is direct assignment. Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* Coverity - true branch can't be executedPavel Vomacka2016-11-101-1/+2
| | | | | | | The 'data' variable is always false because of previous condition. Therefore there is direct assignment. Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* WebUI: Add handling for HTTP error 404Pavel Vomacka2016-09-151-1/+8
| | | | | | | | | | In case that API is not accessible the 404 error is thrown. There was error dialog with almost no information. The new dialog says what error is there and what can be the main cause of the error. https://fedorahosted.org/freeipa/ticket/4821 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Removed unwanted line break from RefererError Dialog messageAbhijeet Kasurde2016-08-231-1/+1
| | | | | | | Fixes: https://fedorahosted.org/freeipa/ticket/5932 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Close host adder dialog before showing 4304 dialogPavel Vomacka2016-07-271-0/+1
| | | | | | | | The adder dialog window stayed opened but not visible. This patch closes it. https://fedorahosted.org/freeipa/ticket/6050 Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
* Add ability to turn off activity iconPavel Vomacka2016-06-291-4/+42
| | | | | | | | | By specifying correct attribute when creating command it turn off showing activity icon when webui waits for response from the server. https://fedorahosted.org/freeipa/ticket/5381 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* webui: add Deferred/Promise API to rpc.commandPetr Vobornik2015-11-271-1/+20
| | | | | | | | so that commands could be easily chained prerequisite for: https://fedorahosted.org/freeipa/ticket/4286 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* webui: display messages contained in API responsesPetr Vobornik2014-07-071-1/+20
| | | | | | | | API responses can contain warnings in "messages" array. This patch also adds support for displaying multiple notifications at the same time in order to show the message and a status of finished operation. Reviewed-By: Petr Spacek <pspacek@redhat.com>
* webui: extract rpc value from object envelopePetr Vobornik2014-06-271-0/+43
| | | | | | | | adapt Web UI to a newer style of encapsulation object data https://fedorahosted.org/freeipa/ticket/4394 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: send API version in RPC requestsPetr Vobornik2014-06-271-0/+4
| | | | | | | | | | | | | Currently there is an incorrect behavior that server doesn't send datetime and dnsname data in new format. This patch adds the version to each RPC request making the UI look as the latest client. Server then sends data in correct format. It also removes the "unknown version" warning from each RPC response. https://fedorahosted.org/freeipa/ticket/4394 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: handle back button when unauthenticatedPetr Vobornik2014-06-111-1/+1
| | | | | | | | | | | | | | using browser history when unauthenticated causes transition to the original and/or preceding facets. But nothing works since all commands fail due to expired credentials in session. These changes make sure that user stays on login screen if he misses valid session credentials while he wants to switch to facet which requires authentication. https://fedorahosted.org/freeipa/ticket/4353 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: use asynchronous call for authenticationPetr Vobornik2014-04-151-8/+17
| | | | | | | | | | | | | | Change `IPA.login_password` and `IPA.get_credentials` to use async AJAX and to return promise instead of blocking the code. IPA.get_credentials is still partially blocking because of negotiate process. We can't do anything about that. It allows activity indicators to do their job. https://fedorahosted.org/freeipa/ticket/3903 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: authentication modulePetr Vobornik2014-04-151-18/+13
| | | | | | | | General purpose authentication interface and state. See doc of 'freeipa/auth' module. https://fedorahosted.org/freeipa/ticket/3903 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: replace IPA.command usage with rpc.commandPetr Vobornik2014-03-271-25/+14
| | | | | | | Replace all IPA.command, IPA.batch_command and IPA.concurrent_command usages by equivalents from rpc module. Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: move RPC code from IPA module to its own modulePetr Vobornik2014-03-271-0/+930
- moves RPC code from ipa.js to it's own module - part of ongoing effort where the ultimate goal is to get rid of ipa.js and IPA namespace Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>