From 0050e2fcd957cd037e25c3ef68322a6204de7450 Mon Sep 17 00:00:00 2001 From: Endi DeWata Date: Wed, 8 Sep 2010 19:25:14 -0400 Subject: [PATCH] Services adds the Service tab: search, details, add, associations It also contains the sample data for some service operations --- install/static/Makefile.am | 1 + install/static/add.js | 10 +- install/static/index.xhtml | 1 + install/static/navigation.js | 7 +- install/static/sampledata/service_add.json | 29 ++++++ .../static/sampledata/service_add_host.json | 21 ++++ install/static/sampledata/service_del.json | 9 ++ install/static/sampledata/service_find.json | 48 ++++++++++ .../static/sampledata/service_remove_host.sh | 18 ++++ install/static/sampledata/service_show.json | 18 ++++ install/static/service.js | 96 +++++++++++++++++++ 11 files changed, 255 insertions(+), 3 deletions(-) create mode 100644 install/static/sampledata/service_add.json create mode 100644 install/static/sampledata/service_add_host.json create mode 100644 install/static/sampledata/service_del.json create mode 100644 install/static/sampledata/service_find.json create mode 100644 install/static/sampledata/service_remove_host.sh create mode 100644 install/static/sampledata/service_show.json create mode 100644 install/static/service.js diff --git a/install/static/Makefile.am b/install/static/Makefile.am index 63e58943c..b0c4c7f7b 100644 --- a/install/static/Makefile.am +++ b/install/static/Makefile.am @@ -19,6 +19,7 @@ app_DATA = \ jquery.cookie.js \ navigation.js \ netgroup.js \ + service.js \ pageparams.js \ search.js \ details.js \ diff --git a/install/static/add.js b/install/static/add.js index 4af6a8e72..97f7666a1 100644 --- a/install/static/add.js +++ b/install/static/add.js @@ -96,15 +96,23 @@ function EntityBuilder(obj,addProperties,addOptionsFunction ){ function addAnother(response){ + if (response.error){ + alert("error adding entry"); + return; + } var params = ipa_parse_qs(); builders[params["tab"]].setup(); } function addEdit(response){ + if (response.error){ + alert("error adding entry"); + return; + } var params = ipa_parse_qs(); var hash= "tab=" + params["tab"] +"&facet=details&pkey=" +$("#pkey").val(); window.location.hash = hash; -} \ No newline at end of file +} diff --git a/install/static/index.xhtml b/install/static/index.xhtml index 4077d4f32..6e1d04352 100644 --- a/install/static/index.xhtml +++ b/install/static/index.xhtml @@ -20,6 +20,7 @@ +