Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but 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
15 priv/www/admin/openacd/queues.js
View
@@ -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();
};
9 src/cpx_web_management.erl
View
@@ -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.