* fix relative path use in billing zones ajax
causing an error when rendering the datatable
* fix BillingFee form field to correctly
capture ajax datatable billing profile id
* fix typo when stashing billing_zone_id
* move billing zone datatable fields
from base to zones_list
Change-Id: Ibbeb776a3bc6bfb26798fc13c1183ddb68a9d2fd
- All item_rs modifications should be done before we get rows, so apply order_by before pager
- We can't distinguish if subscriberregistrations really has column or not if we return true for all columns.
We will use has_column only in cases when it returns something really meaningful.
- Subscriberregistrations can't order by nat and subscriber_id
Change-Id: I04b7bb719ee058590a7705c6411cb08bcfb15387
Move strange reseller prefetch upper, that looks as not intended copy-paste
Now this query with prefetch will be used for pagination too.
Change-Id: Ie23d2a574e352754d57e1f67d081943aaef50aea
ALE phones first download the first 256 bytes "header" of the firmware
to check if a new version is available. Support simple single Range
request in format "Range: bytes=X-Y" with X being start and Y being
end.
Also make sure to use $rs->count instead of $rs->first to only
execute the full query once and use a count query before instead,
otherwise we're fetching dozens of MB of data twice when fetching
the firmware.
Change-Id: I0c4e9f8b7d856d077eaa4ba8f2bc0aeaf42deebe
* get_subscriber_location_rs for the DB model
tried to determine filter based only on username
and domain for the multidomain option but
another use of the function was with passing only
the id. Since the filter argument is built outside
the function with already checking for the multidomain
option there is no need to rely on the filter parameters
in the function itself.
Change-Id: Ie5ad7e58404400d0dda0300720edd55f38eca09c
Fix voip_peer_rule linking to voip_peer_group
Remove temporal method for time_set_ajax from Peering controller, use /timeset/fieldajax method instead.
Change-Id: I95670ee3e8160ecdaa9b1289123d9ef051843747
Add test script for API
Fix DateTime create/update issue in TimeSets API (get2put case)
(add and edit functionlity used raw/inflated data respecively)
Add datetimepicker field
Change-Id: If724b7350658c306dbbecbc04309d1d1c0b4a3e2
* Faxes numbers representation now uses one of the available
normalization logics. For the API part it is possible to
override it in /api/faxes with a new 'number_rewrite_mode'
query param or 'fax_number_rewrite_mode',
in case of /api/conversations
Change-Id: I64cfcaa53284eafdc980cdab4c3a01d22a55749b
* attachment_name is added to the EmailTemplate form
and it is used to define the attachnemt name where
applicable
Change-Id: Ide6d7aab46fb99ca9c38a34eea9c8db18affc8f9
Unify UI and API code to make subscriberadmin behavior with profile_set and profile common
Change alias_numbers input field to embedded RepeatableJS so it pass form validation
Change-Id: I1b3dc6f88cc6c1f43d76acc8e339dbb664c166a3
while limiting the count queries is sufficient for basic
queries, a plethora of perfromance cosniderations arise
when running compound queries (queries with set operations)
against large tables. this is the particular case with the
call history UI.
+ multi-column search must not hit any un-indexed column.
when limit is providied, it seems ok for the optimizer
even when no appropriate multi-col index is present.
+ 'col LIKE "%xyz%"' must be turned to 'col LIKE "xyz%"'
- otherwise and idnex is useless. if fulltextsearch is
desired, this needs to be done separately, including all
the pain of maintaining the keyword/substring index etc.
+ each partial query of a compound query must have a LIMIT
clause. if not, the db tends to try building an intermediate
table (which gets large -> slow). this is the only option when sorting,
but it must be prevent if only displaying unsorted or filtered rows.
BIx::Class::Helper::ResultSet::SetOperations generates malformend
SQL when limiting the partial queries. Therefore, the generated
SQL will therefore be parsed and patched.
+ considering the LIMIT for the partial queries, it is also
mandatory to inject the filter/joins to each. this is done
properly by ReseultSet::SetOperations; but needs to be done
explicitly when building compound queries.
+ aggregation footers must be prevented when clipped - it wont
show useful data (sum, count, ..) anyway.
+ prevent page query when count gives 0
+ prevent 'int_column = "12345678901"' search terms: literal must be
numeric and not longer than the digits supported by the column (10)
+ implement * wildcard and strict_search
Change-Id: Ie256877d368747ad6bfe74f5b6ac5dae88be9e58
the "Try it out" button is disabled for the operations:
PUT, PATCH, DELETE, POST
and therefore only enabled for GET unless the special request param is used.
Change-Id: Iee8338c18e3e8053d6349a20315a7ef3c2f203d5
to prevent long-running count query in case of mio.
of items, it is done on a limited set, ie.
select count(1) from (select id from cdr where .. limit 1000)
the method determines if there are more than eg. 1000
rows, in which case the UI datatable will simply render a "+"
"Showing 1 to 5 of 1000+ records"
it is only enabled for the topical call history datatable
for now.
Change-Id: I1ca6d22c69784f20ec39c74e3db989c43f1a6918
* init_time field is added as a field as well
as query parameters init_le,init_ge to query
calls by the call initiation time
Change-Id: I6540d632e40d9f0fed6b8f50f126a977eb34e369
Clone cached expensive collections and files list data before return
Otherwise changes applied to members of referenced data will preserve and accumulate
Change-Id: I2c7a014eaea9c695725a796b236a782877a6358c
* Utils::Events::get_aliases_snapshot()
both $subsriber and $prov_subscriber variables
are now checked to avoid calls on undef
* Utils::Contract::recursively_lock_contract() changes:
- terminates only active/locked subscribers
- database entries removal happen only in the end
- admin id is checked beforehand
- adjusted Perl syntax
Change-Id: I964be4480450dcd095bc8899385cab526bfcba72
* Remove config prefix and suffix when fetching config
* Add support for trailing tag when fetching firmware
Change-Id: I36c2bc23e4886696ab3c620e3b84a03fc0a60d40
this catches */* when only whitespace, semicolon or colon
comes before or after it. no other characters
Change-Id: I6a6aa2c1ff8b60982497964f7858a94f268567ab
Sessions saved to the `parts` list get cancelled after a failure. In
case of one session failing with an 'insufficient funds', don't save
that session to the `parts` list so the code doesn't try to cancel it.
Instead just destroy the session.
Change-Id: I43c3791baea5af07e1c6f6777e03c63ea2baae34
the accept header can contain a list of comma-separated values. If only
one of those is application/json or */*, we should send that.
Example of an Accept header:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Change-Id: I45bdea5dca05060c1cc17ce5bbdff9c58cb5ca72
* improved the CF "mode" field tooltip
* the tooltip also states that the "mode" field is mandatory
Change-Id: I44a0bee7ca75d71d0c60df2b45ea9d968e1e54fa
implemented for Source Sets and B-Number Set in:
* Panel
* /api/cfbnumbersets/
* /api/cfsourcesets/
* /api/callforwards/
in addition, the fields have also been documented in the forms (and therefore
also in the API documentation)
Change-Id: I955dd9addf1e61ec7516b4c518adec151248bacc
* $sess returned from SMS::session_create() can be either
>0 = success
0 = remote rejected (subscriber=inactive)
-1 = internal error
* improve the error messages and the session reason based
on the refined return values
Change-Id: I775c637bd3d08fea3bf53094b4ab60072daabfa6
We can replace the apply usage with map plus a returning s///.
This also fixes a hidden bug with the liblist-moreutils-perl dependency
missing from debian/control, being indirectly pulled by some other
dependency, while an implementation detail.
Change-Id: Ibfc7b362ad77c4b202d93cf71774c40623503f14
* perform_prepaid_billing() part of the code
that cancels the session is moved into a new
function cancel_prepaid_billing()
* cancel_prepaid_billing is called in perform_prepaid_billing()
and after init_prepaid_billing() if session status != 'ok'
* add_journal_record() set default coding=0 if undefined
Change-Id: Id98f8e5b738953d5bb047f59657218f5fa6cab62
* smsc_peer is set as 'default' if none is identified
* fill in status and reason fields for sms receive
* write 'cli' fields as intended
Change-Id: I7316935c3253563db96104d481cbaba7213ad436
* fix routine path
* fix passing arguments as an array, not hashref
* send_sms() uses UTF-8 charset for the query_form() method
Change-Id: I3039999751ffc666ce10b40cb01209a69c98e94e
one was actually a true positive. the others were false positives
and are going to be silenced for the time being, while we try to find
an upstream solution. more details can be found in the ticket.
Change-Id: Iae8df7606774a9d26e4d44dbba557c9fe62d2252
this is to fix the TAP tests of the sipwise QA chain
fixed (or ignored):
- ControlStructures::ProhibitMutatingListFunctions
- Documentation::RequirePodSections
- InputOutput::RequireEncodingWithUTF8Layer
- Subroutines::ProhibitSubroutinePrototypes
- BuiltinFunctions::ProhibitStringySplit
- TestingAndDebugging::ProhibitNoStrict
- TestingAndDebugging::ProhibitProlongedStrictureOverride
- InputOutput::ProhibitTwoArgOpen
- CodeLayout::ProhibitQuotedWordLists
Change-Id: I7dce4ce123bad40de2d9b51ba5b1a141e20c3783
to fix:
Can't modify non-lvalue subroutine call of &NGCP::Panel::Utils::Generic::is_int
in scalar assignment at lib/NGCP/Panel/Controller/Rewrite.pm line 278, near ")) "
Change-Id: Ic19001b4e8ebae843b2371e83c8cf4329d2b091b
these are to fix sipwise TAP tests. The following policies were
violated and have been fixed (or ignored where apppropriate):
- Variables::ProhibitAugmentedAssignmentInDeclaration
- Variables::ProhibitConditionalDeclarations
- Variables::RequireLocalizedPunctuationVars
Change-Id: Ifee93d537cd6e33d9e6e6ef8026be4b2b9fd0ee5
* enables fetching captured sip data
GET all collection returns JSON with available SIP messages
GET item collection requires a valid call-id and
returns pcap data generated from the packets of the call-id
Change-Id: I552ee9a312a4b9acf95bde93f6c584bbf82f9ea9
* Storage model provides with a layer for more than one
DBIx::Class connection and handles them, currently only
first connection is supported.
* Storage model also uses different DSN than the DB model
* Callflows use the Storage model to fetch captured dialogs
Change-Id: I6e742b7a7f1f9f047ca68ea75f6eea01349c8664
this is to clean the Sipwise TAP tests for this repo
the critical places where undef is really the intended return value (because
a scalar should always be returned) the rule has been overridden
Change-Id: I66e217a03a00e0f366db9c0cbc5007dd15cd9f96
"Mixed high and low-precedence booleans"
The operations have different precedence and must not be mixed together.
Change-Id: If38e25d6e94f599dc9462d9ee37ce165fa303b35
translate forms in NGCP::Panel::Form (the caching module) instead of in the
templates. This gives us better control to avoid translating cached forms
multiple times. Multiple translations lead to errors due to escaping of
special symbols and simply fails from one (non-english) language to another.
Change-Id: I234b22cb70dc068530e4a9f241cb9bb5653e1959
The only two files left with such warning:
* lib/NGCP/Panel/Field/URI.pm
* t/lib/Selenium/Remote/Driver/Extensions.pm
While they need some special Perl magic to be fixed.
Change-Id: I23553bbffd5bfb38b222733bdeb3937945eabf3e