Sort and limit in ispconfig

Discussion in 'Developers' Forum' started by xaver, Feb 24, 2012.

  1. xaver

    xaver New Member

    Hi,

    i tested a little bit with few lines jquery and some changes in client_list.htm and client_list.php and listfrom.inc.php.
    Right now the implementation is only testing. The limit is for all lists and sort is always for this list with session like the other filters.

    Because screenshots are useless, i made a small video.
    (HTML5 ogv,webm)
    http://www.xwissen.info/web_log/2012/Feb/ispconfigsort.html

    regards
    xaver
     
  2. edge

    edge Active Member Moderator

    For me the video does not load (only showing a small red x) in IE.
    It does work in Firefox.
     
  3. xaver

    xaver New Member

    Like i said only webm and ogv. IE support only h264 patent troll format. I don't use it.

    edit:
    i was more asking for feedback, i hope i can create a better version.
    for me it works fine. Change Cursor to pointer and maybe show a hover effect like move the background image in the th.
     
    Last edited: Feb 24, 2012
  4. kwickcut

    kwickcut Member HowtoForge Supporter

    loaded and worked fine using ff


    kwick
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Looks nice, but how do you do the sorting and limiting in the list? I guess you load all elements at once and then limit and sort them with ajax? My concern with that is how it scales if you have many thousand lines in a list.
     
  6. conceptnet

    conceptnet New Member

    Hello,

    NO!

    Limit is getQuery... function in list class. If a Limit isset, it will be saved in the session and override the actual limit from the class. (Limit is global)

    Sort is nearly the same way. You have a order parameter with get (i use the class names from columes) + str_prelace and regex check.
    Ifset it will be added infront of other sort params. If session isset and you click again it is Desc.

    From performance no difference.
     
  7. conceptnet

    conceptnet New Member

    Hello,

    first patch finished for testing.

    Includes:
    Sorting in all lists
    Limit select box in clients -> the limit is global for all lists in a session
    ASC and DESC -> column names jumps on other site for UI.

    Missing:
    Add limit select box to every page (only in client)
    Works only in combobox template -> system -> Users -> admin default_combobox. (Reason, ~15 jquery and 2 lines css missing in other templates. In final commit, i will patch all templates.)

    Problems:
    Quota Webspace (used,soft,hard,files) is not in database, i need to implement a Manuel sort *LATER* Site and webs able to sort.
    Some empty columns have also css class names or wrong once and sorting is not working or wrong column
    -> If you see such a column, plz post it. know is Web Quota

    Bug/Improvement:
    Right know system remembers is you change a site, but if you switch a site and sort another the sold sort is still in another list like filters .. BUT the UI change from listing is missing. Reason is i use only jquery and no new info.
    -> I think this way is OK

    Please test it and give feedback (positive or negative), but i wouldn't use it on a productive system. It should work, but maybe a list cant be shown -> MySQL Query error (no known problems).
    Hello,

    first patch finished for testing.

    Includes:
    Sorting in all lists
    Limit select box in clients -> the limit is global for all lists in a session
    ASC and DESC -> column names jumps on other site for UI.

    Missing:
    Add limit select box to every page (only in client)
    Works only in combobox template -> system -> Users -> admin default_combobox. (Reason, ~15 jquery and 2 lines css missing in other templates. In final commit, i will patch all templates.)

    Problems:
    Quota Webspace (used,soft,hard,files) is not in database, i need to implement a Manuel sort *LATER* Site and webs able to sort.
    Some empty columns have also css class names or wrong once and sorting is not working or wrong column
    -> If you see such a column, plz post it. know is Web Quota

    Bug/Improvement:
    Right know system remembers is you change a site, but if you switch a site and sort another the sold sort is still in another list like filters .. BUT the UI change from listing is missing. Reason is i use only jquery and no new info.
    -> I think this way is OK

    Please test it and give feedback (positive or negative), but i wouldn't use it on a productive system. It should work, but maybe a list cant be shown -> MySQL Query error (no known problems).

    (txt is allowed in upload -> normal .patch or nothing)

    regards
    xaver

    Edit:
    - If no sorting set, list is empty -> press a column head (i fix it...)
    -> fixed in 29022012_1603 (always ordered, even empty value)
     

    Attached Files:

    Last edited: Feb 29, 2012
  8. xaver

    xaver New Member

    Hello again,

    problems: first sort (i fixed that local)

    List of all listpages and status (i go form page to page / every site get the limit option / sometimes local state)

    RED = Broken like in tab in zones or non existing column(s)
    Purple = Works but mostly one or more columns uses IDs and not the join OR no Filter = no sort
    Green = all orders should work and limit function

    Italic -> fixed / solved / changed situation

    admin
    - cpusers
    -- edit user -> username works / problem forename,name,city -> looks like a join
    - system
    -- server services
    -- server config
    -- server ip -> client_id,server_id sort -> join again
    - firewall -> server_id sort -> join again
    -Apps & addons
    -- repo
    -- Apps & Addon packages -> No Filter = no URL, no sort
    -- Software updates -> No Filter = no URL, no sort
    - Language Editor
    -- Languages -> No Filter = no URL, no sort
    - Remote Users
    -- edit users -> username -> join again -> fixed

    client
    - clients
    -- Edit Client
    -- Client-Templates ADDED template_id
    - reseller
    -- Edit Reseller

    dns
    - dns wizard
    -- templates
    - dns
    -- zones -> server_id -> join
    - - - Records
    - Secondary Zone
    -- Secondary Zones -> server_id -> join

    domain
    - domains
    -- domains -> user_txt missing -> sys_groupid missing

    help
    - Support
    -- View Messages -> no idear, always empty, never used i cant see my send messanges.. but if i switch user, it works
    - FAQ
    -- Manage Section -> No Filter = no sort -> strange order of columns
    -- Manage Section -> No Filter = no sort -> strange order of columns

    email
    - email accounts
    -- domain -> server_id, parent_domain_id -> join
    -- domain alias
    -- email mailbox
    -- email alias
    -- email forward
    -- email catchall
    -- email routing -> server_id
    - Mailing List
    -- Mailing List
    - Spam filter
    -- Whitelist -> server_id,rid -> join
    -- Blacklist -> server_id,rid -> join
    -- User / Domain -> server_id,policy -> join
    -- policy
    - fetchmail
    -- fetchmail -> server_id -> join
    -Statisitics
    -- Mailbox Quota -> SQL Error like other stats
    -- Mailbox traffic -> SQL Error like other stats
    - Global Filters
    -- postfix whitelist -> server_id -> join (recipient_txt output)
    -- postfix blacklist -> server_id -> join
    -- Content filter -> server_id -> join
    -- fetchmail -> server_id -> join

    monitor
    - system state (overview was green, but some updates available and under updates are blue...)
    - show System-Log -> server_id -> join
    - show Jobqueue -> server_id -> join

    sites
    - websites
    -- website -> sys_groupid,server_id -> join again !!! Test normal user also, different list
    - - -Existing backups no Filter
    -- Subdomain -> server_id, parent_domain_id -> join
    - ftp
    -- ftp-user -> server_id, parent_domain_id -> join
    - shell
    -- shell-user -> server_id, parent_domain_id -> join
    - database
    -- database -> server_id, parent_domain_id -> join
    - web-dav
    -- web-dav -> server_id, parent_domain_id -> join
    - folder protection
    -- folder -> server_id, parent_domain_id -> join
    -- folder user -> web_folder_id -> join
    - Cron
    -- Cron jobs -> server_id, parent_domain_id -> join
    - Statistic
    -- Web Traffic -> SQL error by month and year
    -- Website quota -> i wrote already about this problem

    vserver
    - OpenVZ
    -- Virtual Servers -> veid,server_id,ostemplate_id,ttemplate_id -> join
    -- OS Templates -> server_id -> join
    -- VM Templates
    -- IP Addresses -> server_id -> join (+ title of vm_id is missing)

    -> DONT FORGET PATCH IS ONLY default_combobox TEMPLATE

    File update:
    sorting_patch_03032012_0004.txt - Support DNS Zone Records sort

    regards
    xaver
     
    Last edited: Mar 4, 2012
  9. xaver

    xaver New Member

    Sry, but i can't edit my old post:

    --------COPY of the post before and update-----

    Hello again,

    problems: first sort (i fixed that local)

    List of all listpages and status (i go form page to page / every site get the limit option / sometimes local state)

    RED = Broken like in tab in zones or non existing column(s)
    Purple = Works but mostly one or more columns uses IDs and not the join OR no Filter = no sort
    Green = all orders should work and limit function

    Italic -> fixed / solved / changed situation

    admin
    - cpusers
    -- edit user -> username works / missing in database ??? forename,name,city
    - system
    -- server services
    --
    server config
    -- server ip -> client_id,server_id sort -> join again
    - firewall -> server_id sort -> join again

    -Apps & addons
    -- repo
    --
    Apps & Addon packages -> No Filter = no URL, no sort
    --
    Software updates -> No Filter = no URL, no sort
    - Language Editor
    -- Languages -> No Filter = no URL, no sort
    - Remote Users
    -- edit users -> username -> join again -> fixed

    client
    - clients
    -- Edit Client
    -- Client-Templates ADDED template_id
    - reseller
    -- Edit Reseller

    dns
    - dns wizard
    -- templates
    - dns
    -- zones -> server_id -> join
    - - - Records
    - Secondary Zone
    -- Secondary Zones -> server_id -> join

    domain
    - domains
    -- domains -> -> sys_groupid missing user_txt missing

    help
    - Support
    -- View Messages -> no idear, always empty, never used i cant see my send messanges.. but if i switch user, it works
    - FAQ
    -- Manage Section -> No Filter = no sort -> strange order of columns
    --
    Manage Section -> No Filter = no sort -> strange order of columns

    email
    - email accounts
    -- domain -> server_id, client_id-> join
    -- domain alias
    -- email mailbox
    - - - Email Box Rules missing -> forgot it... -> Change tab was missing -> Added
    -- email alias
    -- email forward
    -- email catchall
    -- email routing -> server_id
    - Mailing List
    -- Mailing List
    - Spam filter
    -- Whitelist -> server_id,rid -> join
    --
    Blacklist -> server_id,rid -> join
    --
    User / Domain -> server_id,policy -> join

    -- policy
    - fetchmail
    -- fetchmail -> server_id -> join
    -Statisitics
    -- Mailbox Quota -> SQL Error like other stats -> dropped sorting for traffic and quota -> info in monitor_data as array serialized or something like that
    -- Mailbox traffic -> SQL Error like other stats
    - Global Filters
    -- postfix whitelist -> server_id -> join (recipient_txt output)
    --
    postfix blacklist -> server_id -> join
    --
    Content filter -> server_id -> join

    -- fetchmail -> server_id -> join

    monitor
    - system state (overview was green, but some updates available and under updates are blue...)
    - show System-Log -> server_id -> join
    -
    show Jobqueue -> server_id -> join

    sites
    - websites
    -- website -> sys_groupid,server_id -> join again !!! Test normal user also, different list
    - - -Existing backups no Filter
    -- Subdomain -> server_id, parent_domain_id -> join
    - ftp
    -- ftp-user -> server_id, parent_domain_id -> join
    - shell
    -- shell-user -> server_id, parent_domain_id -> join
    - database
    -- database -> server_id, parent_domain_id -> join
    - web-dav
    -- web-dav -> server_id, parent_domain_id -> join
    - folder protection
    -- folder -> server_id, parent_domain_id -> join
    -- folder user -> web_folder_id -> join
    - Cron
    -- Cron jobs -> server_id, parent_domain_id -> join
    - Statistic
    -- Web Traffic -> SQL error by month and year -> dropped sorting for traffic and quota -> info in monitor_data as array serialized or something like that
    -- Website quota -> i wrote already about this problem

    vserver
    - OpenVZ
    -- Virtual Servers -> ostemplate_id,template_id -> join
    -- OS Templates -> server_id -> join
    -- VM Templates
    --
    IP Addresses -> server_id -> join (+ title of vm_id is missing)


    -> DONT FORGET PATCH IS ONLY default_combobox TEMPLATE

    I wrote a "hack" for server_id and client_id as join in query for sort. It is working.

    File update:
    sorting_patch_03032012_0004.txt - Support DNS Zone Records sort

    sorting_patch_04032012_0235.txt - Join Support for right Order alhpa numeric and don't only ids - fixed GENERAL bug in mailrules filter - dropped sort support for quota and traffic (quota not possible in a join..) - admin -> users -> 3 columns don't exist

    sorting_patch_04032012_0245.txt - added join to help (should be last one)

    REMOVED FILES - Commited in trunk
    -> commit #2984 + fixes in 2985
    I tested SVN version, tried every table.

    regards
    xaver
     
    Last edited: Mar 4, 2012

Share This Page