- 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
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
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
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
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
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
* $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
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
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
inflate/deflate DateTime for simple (complete) timestamps
considering the correct timezone at the latest possible point
in the action chains: on form-level as well as in the DataTables json output.
Change-Id: Icfe94d6d5a9ac02d9fca0f4b8d048d86cf66cffa
* remove $config->{sms}{smsc} selection as
there is no such thing as smsc in ngcp_panel.conf
* remove charset from the send_sms query form as charset
is now set in the smsc peer group and taken from the template
Change-Id: I12ac8b74d2923a54194685c3f5e28a37f8df1902
* smsc_peer preference is mandatory for NGCP::Utils::SMS::send_sms()
and contains a handle of one of the avilable group=smsc id
* sms_journal is extended to also store smsc_peer
Change-Id: I1a368b55c263bb5ea2acda004bbaf463d6431413
* moved sms_journal record creation into a new
NGCP::Utils::SMS::add_journal_record()
* 'cli' is used when sending sms to store
user_cli or cli subscriber preference.
that is useful for calls where caller is a
remote number
Change-Id: I80bc31da294a56b302e154133525eea187ab6aff
* in case of a specified fax format (pdf)
the temp filehandle had been closed before filled in with data
Change-Id: I938cfa47051a525069902f73b83de121838c00bb
* colelction_nav_links() should be used instead of the old
self/prev/next href link code
* Entities.pm fix colletion_nav_links() to pass missing
$c->request->params
* collection_nav_links() use default $c->request->path and
$c->request->params if those arguments are not specified
Change-Id: Icca5afac812f2e06e6927ba6f4e91057f9745d21
now there is a tag per API rail instead of per method
this also makes it easy to render the documentation centrally per API rail
Change-Id: I683048f742c2bd2da591e502bc2d8f63cc422627
by using strict where it wasn't used before
plus fix all bugs that were discovered along the way by enabling strict
Change-Id: I7f9a8bf0cee74014fd7551ec26f2ab3922715efc