updated webgui to run with Config::JSON 2.04

This commit is contained in:
JT Smith 2008-01-25 05:10:33 +00:00
parent fb434a8b3a
commit 34fd8c9245
20 changed files with 56 additions and 51 deletions

View file

@ -152,7 +152,7 @@ sub loadSiteData {
}
else {
my $siteData = {};
eval { $siteData = JSON::jsonToObj($response->content); };
eval { $siteData = JSON::from_json($response->content); };
if ($@) {
$self->error("Couldn't fetch Spectre configuration data for $key");
}

View file

@ -19,7 +19,7 @@ use DateTime;
use HTTP::Request::Common;
use HTTP::Cookies;
use POE qw(Component::Client::HTTP);
use JSON 'objToJson';
use JSON qw/ to_json /;
#-------------------------------------------------------------------
@ -337,7 +337,7 @@ sub getJsonStatus {
next unless $self->{_jobs}->{$key}->{sitename} eq $sitename;
$data{$key} = $self->{_jobs}->{$key};
}
$kernel->call(IKC => post => $rsvp, objToJson(\%data));
$kernel->call(IKC => post => $rsvp, to_json(\%data));
}

View file

@ -20,7 +20,7 @@ use HTTP::Cookies;
use POE qw(Component::Client::HTTP);
use POE::Queue::Array;
use Tie::IxHash;
use JSON 'objToJson';
use JSON qw/ to_json /;
#-------------------------------------------------------------------
@ -223,7 +223,7 @@ sub editWorkflowPriority {
if ($ackPriority != $newPriority) {
# return an error
my $error = 'edit priority setting error';
$kernel->call(IKC=>post=>$rsvp, objToJson({message => $error}));
$kernel->call(IKC=>post=>$rsvp, to_json({message => $error}));
}
$found = 1;
last;
@ -232,11 +232,11 @@ sub editWorkflowPriority {
if (! $found) {
# return an error message
my $error = 'edit priority instance not found error';
$kernel->call(IKC=>post=>$rsvp, objToJson({message => $error}));
$kernel->call(IKC=>post=>$rsvp, to_json({message => $error}));
}
else {
# return success message
$kernel->call(IKC=>post=>$rsvp, objToJson({message => 'edit priority success'}));
$kernel->call(IKC=>post=>$rsvp, to_json({message => 'edit priority success'}));
}
}
@ -338,7 +338,7 @@ sub getJsonStatus {
}
}
$kernel->call(IKC=>post=>$rsvp, objToJson(\%output));
$kernel->call(IKC=>post=>$rsvp, to_json(\%output));
}
#-------------------------------------------------------------------