Hi all,
Time to help a bit on the UI project!
As I've mentioned, I'm not a Javascript/UI expert. For starters,
I've got a very basic modal login dialog started here (loving
JQuery+Bootstrap so far), and the intent is to hit "/api" to figure
out if the login is successful or not and to dismiss the dialog. To
do this, I'm trying to use the jQuery .ajax.
https://github.com/ansible/ansible-commander/blob/master/ui/index.html
https://github.com/ansible/ansible-commander/blob/master/ui/commander.js
See the function "api_call" which I'm trying to define and debug.
It's calling the error callback with a code of "0" and not telling me
very much more about what I'm doing wrong.
Can someone help me out here and see why the API is not logging in
successfully? It does not seem to be hitting the REST layer and
Firebug is of limited usefulness. I have added some calls in the API
to log to syslog when things are hit, though logging is not showing up
yet.
I figure once we get past this, and also have some basic REST examples
of some POSTs and DELETEs as well, it will be VERY easy to go to town
on this and implement all the basic object editing.
The idea is it's going to be a one page interface -- the modal goes
away after login, and you see the main commander interface, and there
are different panels/tabs/whatever for working with users, inventory,
and so on.
Anyway, help on getting this first API request working would be very welcome.
Thanks!
--Michael