* in mRender (custom_renderers), "data" variable is
a string, therefore data.escapeHtml could not be used
* add new function argument "opt", where it is a dedicated hash
containing custom passable options, so it now looks as
function(data, type, full, opt)
* adapted the existing code to include/use the new argument where
applicable
Change-Id: I4957eece3b2d0f6359cbc8f36caf5a350d7bad95
* add color pickers and store the hex code of the colors
inside the branding table in panel UI
* implement /api/resellerbrandings endpoint, where all things
related to reseller branding can be managed; the branding
logo will still be retrieved using /api/resellerrandinglogos
Change-Id: Ib7ed364811acf67ffd62252d9799a0af8b91e9bc
The localization was missing for the following lines:
> <p>ANY of the rules must match to choose the peering group for outbound calls.</p>
> <p>ALL of the rules must match to choose the peering group for inbound calls.</p>
Committing them to test translation of new messages on crowdin.com.
Change-Id: I5fef746f38d09ddb1ce27131758f104bf0f7bdeb
* Keep all buttons in the same "line".
* Add localization for all strings on the page.
* Align the code accordingly to the Sipwise code style.
Change-Id: I60df82b0a9f75b353ccf30d9ad5a7a94d05f46f4
* Create upload and content type form fields for 'blob'
type preferences
* Implement blob preference upload/download to database
* Show blob content in read only text area if content
is text
Change-Id: Ic4b800f84324eab0aadbf8eeb55c03c770ecc94f
* Devices already had these buttons in Customer -> PBX Devices;
creating same buttons for Device Management -> Deployed Devices
simplifies testing a lot
Change-Id: I5db3a8584821058db12225cae4e3ff201a9643f2
The min/max buttons did not work for dynamic block.
It is a regression of the initial commit d0f339eef7 and 6f2cc8b717.
Fixing it by removing min\max buttons from dynamic popups. It looks like the information on those popups will not look better after maximization (subscriber prefferences \ CallForwarding section \ question mark icons to activate popups).
Change-Id: Idca62bf55a411d12e7f75b240c0a139bb22c8874
We have two pop-up declarations in modal.tt: default & dynamic.
The min/max buttons order was wrong for dynamic block.
It is a regression of the initial commit d0f339eef7
Fixing it by aligning dynamic block with the default one.
Change-Id: I134ec88ad8c40ae5a560a406608543f556694e2c
Add missing title and use the same style buttons with better padding:
x - close
+ - maximize
- - minimize
Change-Id: I8d15d90f00f0d8ba452bfbd75c40e0780599ae95
It will improve end-users usability significantly.
The code created by Sergii Leonenko <sleonenko@sipwise.com>, THANK YOU!
Change-Id: Ifc083fd53df5392791728ea102591fb6aa764dab
* on administrator login, store said variables so
we can automatically log in to v2 without having
to redirect
Change-Id: I50d79996198561c54e555d264388d26610905ca6
The dashboard is the default page which user see on login.
Unfortunately, the current v1 padding 30px looks miss-aligned on v2.
Let's remove the padding here to improve v2 first impression.
As side effect here: dashboard will use full page on v2,
which actually looks pretty nice on v2. Let's give it a try.
Change-Id: I6345986955a5a1783ec98be55f2273778101b83b
* In view mode, webpaswords are shown as '******'
* In edit mode, the generated or written password
is hidden
* A button with an eye icon can change wether the
password is shown or not
* When pushing 'Generate' button show '(modified)'
after the input
Change-Id: I494d61b0ea5808a1be0f518d0667bf75b9ab20d5
* The endpoint generates a jwt token and stores it in
Redis, then redirects to /v2/#/?v1_auth={token}
* Also added an id in DOM to indentify the Panel V1 login page
Change-Id: I307a3f457f88bbba04bb7735d60fa51bdc5d0438
* if there are no more *enabled* CFT left after editing
callforwards (simple/advanced) or if CFT is deleted,
the ringtimeout has to be removed.
Change-Id: Icfa2fb1db281a5a5b4b2edce28ad7b0d69ddf47c
* new c.users.role 'lintercept', that set to when an admin user has
enabled 'lawful_intercept' flag
* only Administrator page /api/admins and /api/interceptions are available for
the role
* 'lintercept' role can only see own user and only change password
and email
Change-Id: Iadcb022a124afbd77b224e734026f380af0170e8
- also show page description/location for proxied pages,
like: "Subscriber Preferences for carol@10.0.0.1".
It significantly improves user experience/understanding
about the current location.
- restore missing button "Expand Groups" for proxied 'accordion' pages
- restore missing confirmation "Are you sure?" for proxied pages
- fix main navigation buttons layout to have proper padding on proxied pages
- fix missing "Edit" button on all pages for proxied mode
Change-Id: I0df8cd37abdd0eebfd90b8c3e9f38daa1c97cc2d
We have several pages with Create/Download/Upload buttons,
for example the page 'Phonebook' has the proper buttons order
in one line layout:
> [Create] [Download] [Upload]
while on the page 'Call List Suppressions' it was two lines:
> [Download] [Upload]
> [Create]
Let's use common buttons order on page 'Call List Suppressions'.
Change-Id: Ic6828a8c825590df43879e20dfb7ea7622db568f
All the top buttons "Create", "Download", "Upload" were displayed with
the wrong positioning due to "margin-left: -30px;" in bootstrap-responsive.css.
Most probably it was some workaround from the middle ages and
it is not a time to refactor it and provide the "proper fix" here
as we are trying to deprecate the old admin panel interface completely.
Those margin-left has been introduced in the very first commit f33ed459 back to 2013.
Let's mute the annoying margin-left padding for the admin-ui case framed=1.
Change-Id: I7a9cae804587515bf380da1ccb2672784c2431c0
The initial commit d31797c tried to hide back button using helper 'datatables'
while some ngcp-panel pages have separate 'back' button definition.
Let's mute all of them for ngcp-admin-ui case (framed=1).
Change-Id: Ib2ed3e9362a26a1c4a353e2f615138f8b6ab6461
* Introduce endopint '/resetpassword' for asking for
password reset using admin username
* Create form for introducing username
* Create url with unique token pointing to '/recoverpassword'
where admin user can introduce new password and email
said url to admin's email address
* Create form for setting new password
* Store username and unique token in Redis expiring
in 5 minutes to store password reset attempt
and identify it when user accesses url in email
* Limit admin access to be able to only change own password
due to new password reset possibility as requested in
TT#76110
Change-Id: Ie3acb961444398afa5b2fdc85e3ca8ceccf9244a
* Remove headers, menu, site title and footer if
parameter 'framed' is sent
* Persist 'framed' in the session once it's sent
and only restore header/footer once 'framed' is
sent again with the value 0
Change-Id: Ie1dcc698b901ea3c659a05391ffcdc882113ef13
- persist prov tmeplates in the database: create, update
and permanently remove them again.
- prov templates from config.yml are still supported,
but cannot be edited though. the templates from
config.yml are merged with those from the db.
- each reseller can have their own prov templates,
while the prov templates from config.yml are visible
to all.
- YAML syntax highlighting and parse check when saving.
Scripting language (perl/javascript) is currently parsed
when executing a provisioning templates only. It is
possible to further extend the parsing checks.
- the prov template "name" + reseller is the unique
identifier. relevant also for the command line tool.
Change-Id: I58d7c54fa82fe512b263b3219bfc84d7e49c56a8
* Change the way webpassword is handled accross
NGCP Panel UI/API to comply with new password
encryption
* At login, if password is not encrypted with
high cost due to the ngcp-bcrypt-webpassword
script, encrypt it with proper cost
* Accept old password format as well until all
webpasswords are encrypted
Change-Id: Iefa9584a62ab4b7d2a224d10bdd415e9cbb8dfb5
* The search field was disabled because of long
time filtering duration when caching it for calls
but it is desirable to cache it in other places
* Added condition to not cache the field only in
calls table
Change-Id: I7a359c60f5fcc016fe37a587905ac06e2e81a366
Even if kamailo supports negative q-value it will handle them
as positive one creating confusion in customers.
Change-Id: Ia74f798c48191af1aacca5660448b664883b9860
* Enabled stateSave but only for row
number because it was previously
disabled for caching the search box
Change-Id: Ie1bd42dc890bd574167db3a073f8350c3d90f043
* Change datepicker to datetimepicker
to be able to select time as well
* datetimepicker is now available only
for call lists since this is where
a more thorough filtering is needed
in case the limit of 1000 entries is
passed
Change-Id: I48107fa8f7c4d4ee9b40044c8ae5f7842e35c2a5
* Remove '(details)' and make the status
text clickable
* If no errors, don't make status clickable
and not show the modal
Change-Id: I1ae1d05231aea450f99649996acdb63fcd2e6f75
* Retrieve statistics details from
ngcp-collective-check
* Restore statistics widget to display
either "All services running", "Errors"
or "Warnings" according to collective-
check result
* Create pop-up modal to display ngcp-
collective-check results
Change-Id: I094a51ad1905d2bf968775dd43480c94a7a440b8
Those lines confuses Firefox 69.0.1 (64-bit) on dev laptop and
Firefox 68.0.1 on Jenkins in the following way:
AXAJ data is not loaded/shows on WEB interface after editing "Time set->Events".
The permanent message "Loading..." is displayed in the table.
The JS error says:
> Source map error: TypeError: NetworkError when attempting to fetch resource.
> Resource URL: moz-extension://93b8c0a0-04b0-41df-8ec9-8647b0f75bc2/browser-polyfill.min.js
> Source Map URL: browser-polyfill.min.js.map
>
> Source map error: request failed with status 404
> Resource URL: https://ce-trunk.mgm.sipwise.com:1443/js/libs/rrule/rrule.js
> Source Map URL: rrule.js.map
It looks like the first message is FF related:
https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default
which forward us to https://bugzilla.mozilla.org/show_bug.cgi?id=1437937
Also it sometimes appears even page is loaded properly.
While the second error message sounds like the origin of our problem.
After tracing it down with Andreas Granig (Tnx, BTW!) we noticed the hint
lines in rrule.js file. It looks like the map file mentioned there points
the browser to load it. In the same time we do not have rrule.js.map in Git repo
and moreover we do not use rrule.min.js, so rrule.js.map is useless here.
After removing this line we were not able to reproduce the issue,
however we should consider it as a shoot in a dark.
P.S. Actually we have no ideas about version, origin URL, license for rrule.js library.
It has been committed in commit 0162f70fae
> TT#49688 Implement human readable rrule in ical events list
So, we cannot provide rrule.js.map file here.
As luxon.js file has the same problem and they were committed together,
let's clean them together. I hope FF will be happy now.
Change-Id: I5ec52b66f4baf76c92eed111a27b8664e7a25fca
* Controller/Domain missed privileges for
ccareadmin/ccare roles
* Fix ccareadmin role typo in customer templates
preventing "Create Susbcriber" button to show up for the role
Change-Id: I05bb520912ad0f1f49a0097d7443081d40aa7426
* Ajax request failed when vouchers was
not set in ngcp_panel.conf under features
because it redirected to denied_page;
moved redirect to topup_voucher method
in Customer.pm because it doesn't work
on ajax requests
* Also hide the top up voucher button if
voucher option is not set under features
in ngcp_panel.conf
Change-Id: I888ac46e9634d75163241cdb4b59b00a2ca08b2f
* ccareadmin and ccare roles have full access to
Customers, Subscribers and their preferences/settings,
and read-only access to BillingProfiles,InvoceTemplates,
EmailTemplates
* ccare role is restricted to the related reseller
Change-Id: I6cf7d3adf912f0fa98d1ef5c02abea2f4331ec4b
* the system status widget is disabled because
it contains static "OK" values. will be reenabled
once the values represent the actual system state.
Change-Id: I4dbdb64d423911e5a40f0d36e9fb769e0c1424f1
When clicking into a datatables search field, then moving the mouse over
a result row of a different datatable, then start typing in the search
field, a hover() seems to trigger a handlerOut event, making the buttons
to disappear.
Using two separate onmouseover() and onmouseout() events instead of the
hover() seems to fix this.
Change-Id: I5c3e43f226faa3455db514ada3543120d5313e76
Add executable bits for scripts. And remove them for assets.
We do this once in the repo and can then remove the code to do it
everytime at build-time via a dh_fixperms override.
Change-Id: I190123d8f7120e3684c1ecf7915b51ef946b950f
And also fix description for Location creation form
All Customer controller fix implemented a little out of common way to handle customer detatils forms
Forms on customer details page use common code on the bottom of the customer/details.tt. Phonebook forms use helpers/datatables forms related code. It allows to avoid stashed "description" parameter, that is totally related to View (template) and generates correct name for the edit form.
Change-Id: I2a16d6861cd2d847f68bd02245058c9a4535a0a9
The is_devid and devid_alias were not properly saved and re-loaded
in edit, nor was their status shown in the master data.
Change-Id: If3403b5baa6135b4171e7b523aaa56de0fc5cb10
* UI: subscriber Preferences" page now contains
a new "Header Manipulations" tab that enables
setting header manipulation rules per subscriber.
They are applied in the following order:
- domain header rule set is applied (if defined)
- subscriber header rules are applied (if defined)
An internal header rule set is now created per subscriber
automatically, if used from the UI
* API: /api/headerrulesets now supports "subsriber_id",
when a whole collection is fetched without ?subscriber_id
only records where subscriber_id = NULL are returned
by default
* fix "read only" UI elements representation in the datable
for header rule sets, rules, conditions, actions
Change-Id: I3e80d1899c577055f3603e80bb3a13d70c5b22cf
* header manipulations related endpoints are now
rendered with the datatables and support pagination,
and search
Change-Id: I264d2c55ec97199714159bbc2d1d3181e23880fb
* sound_sets are now allowed for peering hosts
and since peerings are not bound to resellers
and only managed by the administrators of the platform,
it is possible to set any soundset from any reseller,
the only limitation is sound sets that are assigned to
a contract cannot be used for a peering host
Change-Id: I438395d989dbc917bef2ad87d1c80201722fa247
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
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
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
"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
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
When clicking on the "Dashboard Administration" link in the Monitoring
and Statistics menu of the panel, grant administrative access to the
grafana dashboard.
This privilege elevation is kept in the session until you click any
of the other dashboard links in the Monitoring and Statistics menu.
Change-Id: I703a05b74fc6943ecac82cca5acb2d71674028e7
* When enabling password_sip/web_validate, panel checks password
against username (web and sip, respectively), and runs it through
cracklib to enforce a reasonably strong password.
* Add auto-generate buttons next to web/sip password.
Change-Id: I11f5f6c2d69dc5658f298094f7d17d26d0a26ee1
* enables a mode for cf source sets, where all numbers are
considered as whitelisted or blacklisted (similar to the
NCOS levels mode)
Change-Id: I84e76e5ba717050c48bcaf5c1fd5f67ed5582cab
* RRDs are gone for good, link statistics to grafana.
* Directly link into individual dashboards in new tab/window,
since we don't iframe grafana (for now?)
Change-Id: Ica37ab5a9c9d50ed63142eb09e3b1de568c95aba
- a new feature, "Peering Overview" under the "Tools" menu that
shows a consolidated table of peering rules, peering groups and
peering hosts with a quick links to the related edit dialogs
- added a group selection for "peering rule edit" dialogs that
enables a possibility to move a peering rule into another
peering group
- changed the "back" uri in the "peering host" and "peering rule"
dialogs to return back to the previous uri instead of forcing it
to /peering, that is needed to call those dialogs from
/peeringoverview and then get back to the original uri upon
completion
- dynamic columns support
- separate outbound and inbound peering rules respresentation
- export to "CSV", also with the "Search" filter support
- add dynamic column join detection excluding excessive joins
if no related columns are selected
Change-Id: I71b4c62c4583989baacfc166f08e965c4464e4b2