Giter VIP home page Giter VIP logo

yeti-web's People

Contributors

bigg1947 avatar cyril-s avatar denisoster avatar dependabot-preview[bot] avatar dependabot[bot] avatar dmitry-sinina avatar fivell avatar furmur avatar gigorok avatar irenliber avatar ivanov-anton avatar marodru avatar max-konin avatar paratskyi avatar sashker avatar segrey11 avatar senid231 avatar skumring avatar stekatk avatar thiadmer avatar unnumbered avatar workgena avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yeti-web's Issues

Feature request: As an admin I would like to have White-lists for a Customer Auth

Hello.

For some cases it's insufficient to have only black-lists. Assume, you should pass through calls with certain number (or list of numbers) and reject others. It's still possible to make it different ways, but it is might be really tedious.

P.S. Import from file is really useful feature for white-lists(and black as well).

Feature request : Invoice mail sending

It would be nice to have a posibility to create a custom Subject, Body email with text, signatures etc for the customer/vendor when sending out invoices.
Also good to have a standard naming of invoicing NAME_OF_THE_PARTNER+date.pdf(docx,etc) but not an invoice ID.

Feature request: Additional FIELDS in cdr's

It will be nice to have in cdr details following fields

  • bill seconds -> billed seconds after round
  • real bill seconds -> bill seconds before round
    But Duration abbreviation move to total call time (with PDD etc..)
    This will help in the future to resolve issues and disputes...

JSON RPC options connect_timeout and read_timeout

Since jrpc gem allows to set connect and read timeout through option we should add such options to Node.

I propose to add fields to Node model: connect_timeout (Integer) and read_timeout (Integer). By defaul NULL.

If field is set then it should be passed to YetisNode::JsonRpcTransport.new.

refer to yeti-switch/yetis_node#7


In such way we can handle slow nodes more accurate.

deprecation warning on routing simulator

DEPRECATION WARNING: input_class is deprecated and will be removed from Formtastic 4.0 (configure Formtastic::FormBuilder.input_class_finder instead (upgrade guide on wiki: http://bit.ly/1F9QtKc )). (called from block (2 levels) in _app_views_routing_simulation__form_html_erb__150360917902795122_47231308871840 at /home/e/yeti-web/app/views/routing_simulation/_form.html.erb:4)

There is no button which can unblock zombie-job

Sometimes, jobs might seem active whereas the are not. As a result, some functionality may be broken. (It might be happened if yeti-web unexpectedly shutdown).

Batch button with action "Shutdown all selected tasks" seems useful for users (in order to avoid changing via database level).

Customer-Auth import error

I'd saved some data from Customer-Auth page to CSV file, then filled it with new items and tried to import it to Yeti.

I see the following error in the GUI:
Error: Missing column for value <dst_numberlist_name> at index 17

though, the field named "Dst numberlist name" is in csv

Audit log doesn't show "Changes" for event type destroy.

Branch: 1.5 and under

When I create a new dialpeer, I can see extended information about this event in "Changes" are in the Audit log.
But when I delete this dialpeer, there is no such information for the item type = Dialpeer and event type = "destroy" (probably the same for the item type= "Routing::RoutingPlan") though all necessary information persists in the database.

undefined method `underscore' for nil:NilClass when some additional data persists in the csv

If there is any additional data in CSV file without column name - it raises such an exception.

Error: undefined method `underscore' for nil:NilClass

I've checked it with destinations import.

Apr 29 18:25:01 hz YETI-admin[19224]: [18:25:01.820697 ] [ WARN]: /home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/relation/finder_methods.rb:139:in first!'#012/home/yeti-web/app/jobs/base_job.rb:41:in block in launch!'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in block in transaction'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in within_new_transaction'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in transaction'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/transactions.rb:208:in transaction'#12/home/yeti-web/app/jobs/base_job.rb:37:in launch!'#012/home/yeti-web/app/controllers/api/rest/system/jobs_controller.rb:5:in run'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_controller/metal/implicit_render.rb:4:in send_action'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/abstract_controller/base.rb:189:in process_action'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_controller/metal/rendering.rb:10:in process_action'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/abstract_controller/callbacks.rb:20:in block in process_action'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:113:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in block in halting'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:299:in block (2 levels) in halting'#012/home/yeti-web/app/controllers/api_controller.rb:13:in db_logging'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:424:in block in make_lambda'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:298:in block in halting'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in block in halting'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in block in halting'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in block in halting'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:166:in block in halting'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:86:in run_callbacks'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/abstract_controller/callbacks.rb:19:in process_action'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_controller/metal/rescue.rb:29:in process_action'#012/home/yeti-web/config/initializers/instrumentation_notification.rb:28:in block in process_action'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/notifications.rb:159:in block in instrument'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/notifications/instrumenter.rb:20:in instrument'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/notifications.rb:159:in instrument'#012/home/yeti-web/config/initializers/instrumentation_notification.rb:27:in process_action'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_controller/metal/params_wrapper.rb:250:in process_action'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/railties/controller_runtime.rb:18:in process_action'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/abstract_controller/base.rb:136:in process'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionview-4.1.9/lib/action_view/rendering.rb:30:in process'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_controller/metal.rb:196:in dispatch'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_controller/metal/rack_delegation.rb:13:in dispatch'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_controller/metal.rb:232:in block in action'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:82:in dispatch'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:50:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:73:in block in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:59:in each'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/journey/router.rb:59:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/routing/route_set.rb:685:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in block in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in catch'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/etag.rb:23:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/conditionalget.rb:35:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/head.rb:11:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/params_parser.rb:27:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/flash.rb:254:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:225:in context'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/session/abstract/id.rb:220:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/cookies.rb:562:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/query_cache.rb:36:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/callbacks.rb:29:in block in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:82:in run_callbacks'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/callbacks.rb:27:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/remote_ip.rb:76:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/debug_exceptions.rb:17:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/show_exceptions.rb:30:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/rack/logger.rb:38:in call_app'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/rack/logger.rb:22:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/request_store-1.1.0/lib/request_store/middleware.rb:8:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/actionpack-4.1.9/lib/action_dispatch/middleware/request_id.rb:21:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in call'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/runtime.rb:17:in call'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'#12/h
Apr 29 18:25:01 hz YETI-admin[19224]: [18:25:01.821650 ] [ INFO]: Rendered text template (0.0ms)

yeti-web 1.4.8 fails to start when ldap.yml is present

/home/yeti-web/app/models/admin_user.rb:64:in `alias_method': undefined method `valid_password?' for class `AdminUser (call 'AdminUser.connection' to establish a connection)' (NameError)
Did you mean?  validators
	from /home/yeti-web/app/models/admin_user.rb:64:in `<class:AdminUser>'
	from /home/yeti-web/app/models/admin_user.rb:27:in `<top (required)>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:360:in `require_or_load'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:494:in `load_missing_constant'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:184:in `const_missing'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:261:in `const_get'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:261:in `block in constantize'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:259:in `each'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:259:in `inject'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:259:in `constantize'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:566:in `get'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:597:in `constantize'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise.rb:291:in `get'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/mapping.rb:81:in `to'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/mapping.rb:76:in `modules'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/mapping.rb:93:in `routes'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/mapping.rb:160:in `default_used_route'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/mapping.rb:70:in `initialize'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise.rb:325:in `new'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise.rb:325:in `add_mapping'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/rails/routes.rb:238:in `block in devise_for'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/rails/routes.rb:237:in `each'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/rails/routes.rb:237:in `devise_for'
	from /home/yeti-web/config/routes.rb:2:in `block in <top (required)>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.9/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.9/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.9/lib/action_dispatch/routing/route_set.rb:410:in `draw'
	from /home/yeti-web/config/routes.rb:1:in `<top (required)>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `block in load'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/routes_reloader.rb:40:in `each'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/routes_reloader.rb:40:in `load_paths'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/routes_reloader.rb:16:in `reload!'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:170:in `reload_routes!'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/devise-3.5.10/lib/devise/rails.rb:14:in `block in <class:Engine>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `each'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/finisher.rb:55:in `block in <module:Finisher>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `instance_exec'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `run'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
	from /usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
	from /usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
	from /usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
	from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
	from /usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
	from /usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:54:in `run_initializers'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:352:in `initialize!'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `public_send'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `method_missing'
	from /home/yeti-web/config/environment.rb:5:in `<top (required)>'
	from config.ru:6:in `require'
	from config.ru:6:in `block in <main>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
	from config.ru:1:in `new'
	from config.ru:1:in `<main>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in `start'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `load'
	from /home/yeti-web/vendor/bundle/ruby/2.3.0/bin/unicorn:23:in `<main>'

Commenting out app/models/admin_user.rb:64 seems to fix the issue:

    if ldap_config_exists?
      include AdminUserLdapHandler
    else
      include AdminUserDatabaseHandler
    end
  
    #alias_method :authenticate, :valid_password?
  
    def email
      @email ||= billing_contact.try!(:email)
    end

Feature Request - Count Calls by Code Name

Hello,
It will be very good and important to have custom invoice with field for count of traffic by network name. Different networks are different prices, so invoice should show which networks had the traffic instead of one line of total calls.

Please see sample invoice
invoice-CCSNL-100070.pdf
invoice_template

application does not start with "development" environment

$ RAILS_ENV=development bundle exec rails s
=> Booting Thin
=> Rails 4.1.9 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/concern.rb:126:in `included': Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)
        from /home/laeda/projects/yeti-web/lib/yeti/registration_reloader.rb:4:in `<module:RegistrationReloader>'
        from /home/laeda/projects/yeti-web/lib/yeti/registration_reloader.rb:2:in `<module:Yeti>'
        from /home/laeda/projects/yeti-web/lib/yeti/registration_reloader.rb:1:in `<top (required)>'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `block in require'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
        from /home/laeda/projects/yeti-web/config/initializers/yeti.rb:3:in `block in <top (required)>'
        from /home/laeda/projects/yeti-web/config/initializers/yeti.rb:3:in `each'
        from /home/laeda/projects/yeti-web/config/initializers/yeti.rb:3:in `<top (required)>'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `block in load'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/engine.rb:648:in `block in load_config_initializer'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/notifications.rb:161:in `instrument'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/engine.rb:647:in `load_config_initializer'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/engine.rb:611:in `each'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/engine.rb:611:in `block in <class:Engine>'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `instance_exec'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `run'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from /usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/initializable.rb:44:in `each'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/initializable.rb:44:in `tsort_each_child'
        from /usr/lib/ruby/2.3.0/tsort.rb:415:in `call'
        from /usr/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
        from /usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
        from /usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
        from /usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
        from /usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/initializable.rb:54:in `run_initializers'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/application.rb:300:in `initialize!'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `public_send'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `method_missing'
        from /home/laeda/projects/yeti-web/config/environment.rb:5:in `<top (required)>'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `block in require'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
        from /home/laeda/projects/yeti-web/config.ru:5:in `block in <main>'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
        from /home/laeda/projects/yeti-web/config.ru:in `new'
        from /home/laeda/projects/yeti-web/config.ru:in `<main>'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands/server.rb:50:in `app'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands/server.rb:130:in `log_to_stdout'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands/server.rb:67:in `start'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:81:in `block in server'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:76:in `tap'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:76:in `server'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
        from /home/laeda/projects/yeti-web/.bundle_gem/ruby/2.3.0/gems/railties-4.1.9/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

undefined method `contractor_id' for nil:NilClass when account is not selected

Apr 28 10:14:35 yeti-main YETI-admin[23702]: [10:14:35.944510 ] [ERROR]: undefined method `contractor_id' for nil:NilClass
Apr 28 10:14:35 yeti-main YETI-admin[23702]: [10:14:35.945085 ] [ WARN]: /home/yeti-web/app/models/dialpeer.rb:166:in `vendor_owners_the_account'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:424:in `block in make_lambda'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:184:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'#012/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in sim

Customer Auth import error from CSV

eti Admin ver: 1.4.0~rc3. Routing ver 20170907203638. CDR ver 20170907204350

When trying to import customer_auth from CSV file I get the next error:
"YETI-admin[2852]: [09:45:45.142213 ] [ERROR]: undefined method `dst_numberlist' for #Importing::CustomersAuth:0x0000000c53a848#012Did you mean? dst_numberlist_id#012 dst_numberlist_id=#12 dst_numberlist_id?"

Feature request : Destination Increase

Would be nice to have a posibility to configure a INCREASE for the SELL RATE (destination) and posibility to upload all increases for 7 day from CSV file.

Add the 'global re-registration period' option

It would be nice to have an option in config or yeti-web, which allows to change global retry interval for failed SIP registrations. Because, in some cases Yeti sends requests for a new registration very frequently (every 0.5 sec.)

Thanks in advance!

Issues: Rateplan / Copy with destination don't work

Hi.
When I was try copy rateplan with destination, I was got error "We're sorry, but something went wrong".

Jan 18 07:39:22 yetigui0 YETI-admin[21441]: [07:39:22.067912 ] [FATAL]: NoMethodError (undefined method uuid=' for #<Routing::RateplanDuplicator:0x0000000d4190f8>):#012 lib/resource_dsl/acts_as_c lone.rb:66:in block in fill_resource'#12 lib/resource_dsl/acts_as_clone.rb:66:in each'#012 lib/resource_dsl/acts_as_clone.rb:66:in map'#12 lib/resource_dsl/acts_as_clone.rb:66:in fill_reso urce'#012 lib/resource_dsl/acts_as_clone.rb:74:in block in act_as_clone_helper_for'#12 config/initializers/instrumentation_notification.rb:28:in block in process_action'#012 config/initialize rs/instrumentation_notification.rb:27:in process_action'

100rel configuration options

new options

aleg_rel100_mode_id smallint
bleg_rel100_mode_id smallint

possible values

  • 0 disabled
  • 1 supported
  • 2 supported not announced
  • 3 require
  • 4 ignored

brief modes explanation

disabled

  • reply with 420 Bad Extension if 100rel required and ignore it if supported in incoming INVITE
  • ignore 100rel related headers

supported

  • add 100rel to Supported header for outgoing INVITE requests
  • process extension related things according to RFC

supported not announced

  • DONT add 100rel to any header for outgoing INVITE requests,
    but enable 100rel processing if reply contains 100rel in Require header
  • process extension related things according to RFC

require

  • add 100rel to Require header for outgoing INVITE requests
  • reply with 421 Extension Required if 100rel is not supported or required in incoming INVITE
  • hangup session if no Rseq in incoming reply
  • process extension related things according to RFC

ignored

  • completely ignore any headers related to 100rel extension

reference

pgq-processors failed to start

Feb 20 14:40:52 web ruby[8386]: Psych::SyntaxError: (<unknown>): could not find expected ':' while scanning a simple key at line 46 column 5
Feb 20 14:40:52 web ruby[8386]: /home/yeti-web/pgq-processors/pgq_config.rb:17:in `config'
Feb 20 14:40:52 web ruby[8386]: /home/yeti-web/pgq-processors/pgq_config.rb:10:in `initialize'
Feb 20 14:40:52 web ruby[8386]: /home/yeti-web/pgq-processors/pgq_env.rb:35:in `new'
Feb 20 14:40:52 web ruby[8386]: /home/yeti-web/pgq-processors/pgq_env.rb:35:in `initialize'
Feb 20 14:40:52 web ruby[8386]: /home/yeti-web/pgq-processors/Rakefile:7:in `new'
Feb 20 14:40:52 web ruby[8386]: /home/yeti-web/pgq-processors/Rakefile:7:in `block (2 levels) in <top (required)>'
Feb 20 14:40:52 web ruby[8386]: /home/yeti-web/pgq-processors/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Feb 20 14:40:52 web ruby[8386]: Tasks: TOP => pgq:worker
Feb 20 14:40:52 web ruby[8386]: (See full trace by running task with --trace)
Feb 20 14:40:52 web systemd[1]: yeti-cdr-billing@cdr_billing.service: main process exited, code=exited, status=1/FAILURE
Feb 20 14:40:52 web systemd[1]: Unit yeti-cdr-billing@cdr_billing.service entered failed state.
cdr_amqp:
  mode: production
  class: cdr_amqp
  queue: cdr_streaming
  consumer: cdr_amqp
  syslog_program_name: "YETI-cdr-billing"
  mail_to: "[email protected]"
  mail_from: "[email protected]"
  mail_subject: "Exception happened in CDR AMQP"
  connect:
    host: "127.0.0.1"
    port: 5672
    ssl: false
    vhost: "/"
    user: "guest"
    pass "guest"

Dialpeer import error

PG::NotNullViolation: ERROR: null value in column "enabled" violates not-null constraint DETAIL: Failing row contains (1377773, null, 23490, null, null, 0, 0, null, 27, 0.073, 0.0, 28, 26, null, null, f, 109, null, 1, 0.0, 1, 1, 2017-04-01 01:51:00+02, 2020-12-08 11:19:00+01, 7, null, 17506, 2017-07-14 20:29:36.155307+02, 1, null, null, null, null, f, null). : INSERT INTO "dialpeers" ("account_id", "created_at", "gateway_group_id", "initial_rate", "network_prefix_id", "next_rate", "prefix", "priority", "routing_group_id", "valid_from", "valid_till", "vendor_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id" 

HEP Sensors configuration

1. database changes

1.1 table: sys.sensor_modes

new row:

id name
3 HEPv3 encapsulation

1.2 table: sys.sensors

new columns:

Column Type
target_port smallint
capture_id integer

1.3 function: switchX.load_sensor()

add new columns to the output:

Column Type
o_target_port smallint
o_capture_id integer

2. interface changes

2.1 System -> Sensors common view

show additional fields from table sys.sensors:

db column name in the interface
target_port Target Port
capture_id Capture Id

2.2 System -> Sensors -> new

assign fields for HEPv3 encapsulation mode:

Name related sys.sensors column validation defaults in sems node
Target ip target_ip unicast IPv4 addr mandatory
Target port target_port integer 1-65535 15060 (default tapir-salto port)
Capture id capture_id positive integer node_id

Wrong specification

Api is not JSON API compatible. Because if you return this relationship obejct:

"relationships":{"vendor":{"links":{"self":"http://example.org/api/rest/admin/gateway-groups/14/relationships/vendor","related":"http://example.org/api/rest/admin/gateway-groups/14/vendor"}}}

But in http://jsonapi.org/format/#document-resource-object-relationships

A “relationship object” MUST contain at least one of the following:

links: a links object containing at least one of the following:
    self: a link for the relationship itself (a “relationship link”). This link allows the client to directly manipulate the relationship. For example, removing an author through an article’s relationship URL would disconnect the person from the article without deleting the people resource itself. When fetched successfully, this link returns the linkage for the related resources as its primary data. (See Fetching Relationships.)
    related: a related resource link
data: resource linkage
meta: a meta object that contains non-standard meta-information about the relationship

You must add data object.

yeti-db exit code on error

yeti-db returns code 0 even SQL exception happened:

# yeti-db  --yes --cdr apply_all
current database version is: 48
going to apply sequence of patches: 
        /home/yeti-web/sql/cdr/48_49.sql
going to update database to version 49
are you sure [y/N] y (auto confirm)
apply /home/yeti-web/sql/cdr/48_49.sql...BEGIN
INSERT 0 1
 fail 3
psql:/home/yeti-web/sql/cdr/48_49.sql:5: ERROR:  relation "invoice_networks" already exists

ERROR: sql error during sequence processing. exit
actual database version is: 48
# echo $?
0

such behavior cause problems with CI - build will be marked as successful even migration was crashed.

Exception if one of nodes is unreachable via JSON RPC

As example, if one of two nodes is unreachable via JSON RPC and an user wants to get outgoing_registration, the GUI shows "We're sorry, but something went wrong." and the log says:

May 2 07:02:36 yetiserver YETI-admin[28525]: [07:02:36.382967 ] [ INFO]: request to node 10
May 2 07:02:36 yetiserver YETI-admin[28525]: [07:02:36.383910 ] [ INFO]: request to node 8
May 2 07:02:36 yetiserver YETI-admin[28525]: [07:02:36.564145 ] [ INFO]: loading 151 registrations
May 2 07:02:38 yetiserver YETI-admin[28525]: [07:02:38.889670 ] [ERROR]: JSON RPC Error: Can't connect to 192.168.1.137:7080

I believe that the GUI should handle such the exceptions and it should show part of the information from working nodes and warnings if some nodes are unreachable.

Update models anotations

We have models and spec annotations, using gem "annotate"

Almost all annotations is outdated. We need update them. And i propose to keep only model-annotations, and remove them from spec and factories.

Also we should have annotate-hook on db:migrate commands(rollback, up, down).

Call simulation crash

Absolutely every CDR crashes call simulator when admin pushes the 'Call simulation' button.

There are some stuff in the log:

Oct 26 07:46:31 yetigui0 YETI-admin[8547]: [07:46:31.232058 ] [ INFO]: Completed 500 Internal Server Error in 1481ms
Oct 26 07:46:31 yetigui0 YETI-admin[8547]: [07:46:31.233783 ] [FATAL]: NoMethodError (undefined method pai_in' for #<Cdr::Cdr:0x0000000fae15f0>):#012 app/admin/cdr/cdrs.rb:162:in block (2 levels) in <top (required)>'#12 config/initializers/instrumentation_notification.rb:28:in block in process_action'#012 config/initializers/instrumentation_notification.rb:27:in process_action'

Exception when user opens the Termination distribution report

Info from yeti-admin.log

May 5 08:59:24 yetigui0 YETI-admin[30679]: [08:59:24.995566 ] [ INFO]: Processing by ReportRealtimeTerminationDistributionsController#index as HTML
May 5 08:59:25 yetigui0 YETI-admin[30679]: [08:59:25.155865 ] [ERROR]: undefined method to_a' for 60:Fixnum#012Did you mean? to_yaml#012 to_param#012 to_c#012 to_d#012 to_r#012 to_i#012 to_f#012 to_s May 5 08:59:25 yetigui0 YETI-admin[30679]: [08:59:25.156268 ] [ WARN]: /home/yeti-web/.bundle_gem/ruby/2.3.0/gems/activesupport-4.1.9/lib/active_support/duration.rb:115:in method_missing'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/ransack-1.4.1/lib/ransack/search.rb:19:in `block in initialize'#12/home/yeti-web/.bundle_gem/ruby/2.3.0/gems/ransack-1

Customer auth multiple IPs

Нужно дать возможность в одной записи customer_auth в полях match conditions перечислять множество условий.
например преставим что у нас есть таблица

create table customer_auth(
    id serial primary key,
    name varchar not null unique,
    ip inet not null,
    dst_prefix varchar not null default ''
);

Тут match conditions это поля ip и dst_prefix.
Нужно преобразовать таблицу к виду:

create table customer_auth(
    id serial primary key,
    name varchar not null unique,
    ip inet[] not null,
    dst_prefix varchar[] not null default {''}::varchar[]
);

Таким образом в одной записи customer_auth мы дадим возможность записать множество match conditions - это упростит процесс настройки.

Однако суть объектов customer_auth - быстрый выбор одной строки наиболее подходящей для даного звонка - это сильно усложняется если каждый объект хранит массив данных - нужно реализовывать новый тип индекса. Чтобы избежать этого - создаем дополнительную таблицу:

create table customer_auth_denormalized(
    id serial primary key,
    customer_auth_id integer not null references customer_auth(id),
    name varchar not null,
    ip inet not null,
    dst_prefix varchar not null default {''}::varchar
);

В неё сохраняем денормализированые записи, например в таблицу customer_auth добавили такие поля

id  name    ip                      dst_prefix
1   test1   1.1.1.1/32              123
2   test2   2.2.2.0/24, 1.2.2.2/32  123,234

Автоматически в customer_auth мы должны создать такие строки:

id  customer_auth_id    name        ip                      dst_prefix
1   1                   test1       1.1.1.1/32              123
2   2                   test2       2.2.2.0/24              123
2   2                   test2       2.2.2.0/24              234
3   2                   test2       1.2.2.2/32              123
3   2                   test2       1.2.2.2/32              234

То есть мы разворачиваем массивы и создаем для каждой записи customer_auth множество записей customer_auth_denormalized, столько сколько у нас есть комбинаций полей. Поля которые не содержат массивов(например name) для все таких записей одинаковы. При удалении customer_auth нужно удалять соответствующие записи customer_auth_denormalized. При обновлении customer_auth нужно перегенерировать связаные строки. Таблица customer_auth_denormalized должна быть доступна в UI только для чтения, исключительно для упрощения дебага.

Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)

I get this exception in development environment, when I try to open rails console.
ruby 2.3.3

trace

$ rails c
"Timezone Asia/Krasnoyarsk"
/home/andrey/web/yeti-web/lib/yeti/network_detector.rb:6: warning: already initialized constant Yeti::NetworkDetector::EMPTY_NETWORK_HINT
/home/andrey/web/yeti-web/lib/yeti/network_detector.rb:6: warning: previous definition of EMPTY_NETWORK_HINT was here
/home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/concern.rb:126:in `included': Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)
        from /home/andrey/web/yeti-web/lib/yeti/network_detector.rb:8:in `<module:NetworkDetector>'
        from /home/andrey/web/yeti-web/lib/yeti/network_detector.rb:2:in `<module:Yeti>'
        from /home/andrey/web/yeti-web/lib/yeti/network_detector.rb:1:in `<top (required)>'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `block in require'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
        from /home/andrey/web/yeti-web/config/initializers/yeti.rb:3:in `block in <top (required)>'
        from /home/andrey/web/yeti-web/config/initializers/yeti.rb:3:in `each'
        from /home/andrey/web/yeti-web/config/initializers/yeti.rb:3:in `<top (required)>'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `block in load'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in `load'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/engine.rb:648:in `block in load_config_initializer'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/activesupport-4.1.9/lib/active_support/notifications.rb:161:in `instrument'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/engine.rb:647:in `load_config_initializer'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/engine.rb:611:in `each'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/engine.rb:611:in `block in <class:Engine>'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `instance_exec'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `run'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/initializable.rb:44:in `each'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/initializable.rb:44:in `tsort_each_child'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:415:in `call'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `call'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
        from /home/andrey/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/initializable.rb:54:in `run_initializers'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/application.rb:300:in `initialize!'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `public_send'
        from /home/andrey/.rvm/gems/ruby-2.3.3/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `method_missing'
        from /home/andrey/web/yeti-web/config/environment.rb:5:in `<top (required)>'
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.