Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 15 additions and 9 deletions.
  1. +8 −7 priv/www/admin/openacd/queues.js
  2. +7 −2 src/cpx_web_management.erl
View
15 priv/www/admin/openacd/queues.js
@@ -271,11 +271,12 @@ queues.newQueue = function(form, reciper, node){
}
});
};
- queues.store.fetchItemByIdentity({
- identity:vals.group,
- onItem:function(i){
- vals.group = queues.store.getValue(i, 'name');
- doxhr();
- }
- });
+ var group = queues.store.query({'name':vals.group});
+ if(group.length){
+ group = group[0];
+ } else {
+ group = 'Default';
+ }
+ vals.group = group;
+ doxhr();
};
View
9 src/cpx_web_management.erl
@@ -1018,8 +1018,13 @@ api({queues, "queue", Queue, "update"}, ?COOKIE, Post) ->
queue_manager:load_queue(Queue),
{200, [], mochijson2:encode({struct, [{success, true}]})};
api({queues, "queue", Queue, "delete"}, ?COOKIE, _Post) ->
- call_queue_config:destroy_queue(Queue),
- {200, [], mochijson2:encode({struct, [{success, true}]})};
+ case call_queue_config:get_queue(Queue) of
+ noexists ->
+ {200, [], mochijson2:encode({struct, [{success, false}, {<<"message">>, <<"No such queue">>}]})};
+ Queuerec ->
+ call_queue_config:destroy_queue(Queuerec),
+ {200, [], mochijson2:encode({struct, [{success, true}]})}
+ end;
api({queues, "queue", "new"}, ?COOKIE = Cookie, Post) ->
Name = proplists:get_value("name", Post),
Qrec = #call_queue{

No commit comments for this range

Something went wrong with that request. Please try again.