Giter VIP home page Giter VIP logo

dderl's People

Contributors

acautin avatar c-bik avatar dergraf avatar dmetzler1988 avatar k2informatics avatar nandapop avatar philipperitter avatar shamis avatar stoch avatar tgdriph3 avatar walter-weinmann avatar zsoltm 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

Watchers

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

dderl's Issues

Ctrl+C/V Table cell copy paste

Ctrl+C and Ctrl+V to move selected ranges from slickgrid to another slickgrid or clipboard is not working properly...

Ctrl+V on a slickgrid selected cells isn't adding/appending/replacing any rows

Hit Commit with no changes breaks FSM

24.03.2013 16:08:10.095407 [_IMEM_] {imem_statement, 0167} imem_statement - update_cursor_execute []
24.03.2013 16:08:10.095408 [info] [_IMDR_] {erlimem_fsm,0251} update_cursor_execute(optimistic) -> []

=ERROR REPORT==== 24-Mar-2013::16:08:10 ===
** State machine <0.1252.0> terminating 
** Last event in was {button,<<"commit">>,#Fun<imem_adapter.19.114815153>} (for all states)
** When State == filling
**      Data  == {state,{ctx,"what is it?",100,<0.1251.0>,
                             [{stmtCol,'$1',<<"time">>,timestamp,0,0,false},
                              {stmtCol,'$2',<<"x">>,integer,0,0,false},
                              {stmtCol,'$3',<<"fX">>,integer,0,0,false},
                              {stmtCol,'$4',<<"oneOverX">>,float,0,0,false},
                              {stmtCol,'$5',<<"comment">>,string,0,0,false}],
                             #Fun<imem_datatype.1.46095101>,
                             #Fun<imem_sql.7.126542434>,[],undefined,
                             <0.1217.0>},
                        6459462,6463559,100,300,<0.1251.0>,
                        [{stmtCol,'$1',<<"time">>,timestamp,0,0,false},
                         {stmtCol,'$2',<<"x">>,integer,0,0,false},
                         {stmtCol,'$3',<<"fX">>,integer,0,0,false},
                         {stmtCol,'$4',<<"oneOverX">>,float,0,0,false},
                         {stmtCol,'$5',<<"comment">>,string,0,0,false}],
                        #Fun<imem_datatype.1.46095101>,[],
                        #Fun<imem_sql.7.126542434>,{},
                        #Fun<erlimem_fsm.27.7640579>,200,1,200,0,99999999,0,0,
                        [],{},200,1,200,112,89,200,false,raw,false,0,false,
                        true,undefined,#Fun<imem_adapter.19.114815153>,<<>>}
** Reason for termination = 
** {badarg,[{erlang,hd,[[]],[]},
            {erlimem_fsm,gui_replace_from,4,
                         [{file,"src/erlimem_fsm.erl"},{line,828}]},
            {erlimem_fsm,handle_event,3,
                         [{file,"src/erlimem_fsm.erl"},{line,692}]},
            {gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,494}]},
            {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}

server crash after drop table

=ERROR REPORT==== 27-Mar-2013::08:22:24 ===
** Generic server <0.782.0> terminating
** Last message in was {'$gen_cast',
{process,
[<<"button">>],
<<"{"button":{"connection":null,"statement":null,"btn":"close"}}">>,
<0.1017.0>}}
** When Server state == {state,{priv,{erlimem_session,<0.787.0>},[]},
[],
{1364372531971830,#Ref<0.0.0.9452>},
<<"admin">>,imem_adapter}
** Reason for termination ==
** {function_clause,[{base64,decode,[null],[{file,"base64.erl"},{line,114}]},
{imem_adapter,process_cmd,3,
[{file,"src/imem_adapter.erl"},{line,195}]},
{dderl_session,process_call,3,
[{file,"src/dderl_session.erl"},
{line,154}]},
{dderl_session,handle_cast,2,
[{file,"src/dderl_session.erl"},
{line,68}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,607}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}
27.03.2013 08:22:31.113830 [error] [DDRL] {dderl_resource,35} session <<"<0.782.0>">> doesn't exists ("process not found")

After executing the drop table command, a (superfluous and empty) data window appears. The session crash happens, when this window is closed.
When no statement reference is returned by exec(), the data result gui should be suppressed.

GUI Defects

  • Dialog move should be restricted so that top border doesn't hide:

current
image
desired
image

  • "Browse Data" on large tables:
    • few pixels are hiding behind the status also its few pixels less wide to bring up the horizontal scroll bar while enough space on right side in the browser
      image
    • if the source table is located near the right border of the browser window, new table do not expand to right
      image
  • The login box don't get cursor in Password field after page load/browser refresh
    image
    should be
    image

Connect and Disconnect options

  1. Add a 'Disconnect' (if connected menu under 'File') it might show disabled (grayed) if not connected.
  2. 'New Connection' should open a new tab only if the current tab is connected, otherwise it shows the connect dialog in the current tab

Table dialog switching clears unfocused table rendering

Having several table dialogs open, entering a target rowid on one of them kills another dialog.

It looks as if the keyboard enter event is routed to a dialog other than the current insert cursor control where I just wrote the text (target rowid).

'Move to end' fetches all rows

Having a query with many result rows quickly shows the final row count in the yellow table size indicator.
Instead of showing the last 100 (one blocksize) rows, the GUI receives all consecutive blocks in sequence. This takes ages.

Commit after delete view crashing FSM

24.03.2013 15:58:10.145004 [info] [_IMDR_] {erlimem_fsm,1429} OldRow/Ch {4,
                 nop,
                 {{ddView,
                   72093129,
                   undefined,
                   41886548,
                   "All Tables",
                   100596913,
                   {viewstate,
                    [{<<"width">>,
                      318},
                     {<<"height">>,
                      367},
                     {<<"y">>,
                      83},
                     {<<"x">>,
                      221}],
                    [[{<<"name">>,
                       <<"name(qname)">>},
                      {<<"width">>,
                       290}]]}},
                  {ddCmd,
                   100596913,
                   "All Tables",
                   41886548,
                   [imem],
                   remote,
                   "select name(qname) from all_tables",
                   []},
                  {41886548}},
                 "admin",
                 "All Tables"} {4,
                                del,
                                []}
24.03.2013 15:58:11.954004 [info] [_IMDR_] {erlimem_fsm,1481} ChangeList length must match DirtyCnt 1 1
24.03.2013 15:58:11.954005 [info] [_IMDR_] {erlimem_fsm,1482} ChangeList [[4,
              del,
              {{ddView,
                72093129,
                undefined,
                41886548,
                "All Tables",
                100596913,
                {viewstate,
                 [{<<"width">>,
                   318},
                  {<<"height">>,
                   367},
                  {<<"y">>,
                   83},
                  {<<"x">>,
                   221}],
                 [[{<<"name">>,
                    <<"name(qname)">>},
                   {<<"width">>,
                    290}]]}},
               {ddCmd,
                100596913,
                "All Tables",
                41886548,
                [imem],
                remote,
                "select name(qname) from all_tables",
                []},
               {41886548}},
              "admin",
              "All Tables"]]
24.03.2013 15:58:12.001000 [info] [_IMDR_] {erlimem_fsm,0237} update_cursor_prepare([[4,
                   del,
                   {{ddView,
                     72093129,
                     undefined,
                     41886548,
                     "All Tables",
                     100596913,
                     {viewstate,
                      [{<<"width">>,
                        318},
                       {<<"height">>,
                        367},
                       {<<"y">>,
                        83},
                       {<<"x">>,
                        221}],
                      [[{<<"name">>,
                         <<"name(qname)">>},
                        {<<"width">>,
                         290}]]}},
                    {ddCmd,
                     100596913,
                     "All Tables",
                     41886548,
                     [imem],
                     remote,
                     "select name(qname) from all_tables",
                     []},
                    {41886548}},
                   "admin",
                   "All Tables"]]) -> ok

24.03.2013 15:58:12.017000 [_IMEM_] {imem_statement, 0167} imem_statement - update_cursor_execute [{4,
                {{},
                 undefined,
                 undefined}}]
24.03.2013 15:58:12.017001 [info] [_IMDR_] {erlimem_fsm,0251} update_cursor_execute(optimistic) -> [{4,
                  {{},
                   undefined,
                   undefined}}]

=ERROR REPORT==== 24-Mar-2013::15:58:12 ===
** State machine <0.954.0> terminating 
** Last event in was {button,<<"commit">>,#Fun<imem_adapter.19.114815153>} (for all states)
** When State == completed
**      Data  == {state,{ctx,"what is it?",100,<0.953.0>,
                             [{stmtCol,'$1',<<"c.owner">>,userid,0,0,true},
                              {stmtCol,'$2',<<"v.name">>,string,0,0,false}],
                             #Fun<imem_datatype.1.46095101>,
                             #Fun<imem_sql.7.126542434>,[],undefined,
                             <0.941.0>},
                        3051583,3055676,100,300,<0.953.0>,
                        [{stmtCol,'$1',<<"c.owner">>,userid,0,0,true},
                         {stmtCol,'$2',<<"v.name">>,string,0,0,false}],
                        #Fun<imem_datatype.1.46095101>,[],
                        #Fun<imem_sql.7.126542434>,{},
                        #Fun<erlimem_fsm.27.7640579>,4,1,4,1,4,4,0,[],{},4,1,
                        4,4,1,4,false,raw,false,-1,false,true,undefined,
                        #Fun<imem_adapter.19.114815153>,<<>>}
** Reason for termination = 
** {badarg,[{erlang,hd,[[]],[]},
            {erlimem_fsm,gui_replace_from,4,
                         [{file,"src/erlimem_fsm.erl"},{line,828}]},
            {erlimem_fsm,handle_event,3,
                         [{file,"src/erlimem_fsm.erl"},{line,692}]},
            {gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,494}]},
            {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}

Autoupdate row count while loading rows is not working

The timer is blocked while rows are being produced. File table.js

var rowStatusCheckInterval = 500;
function rowFunWrapper(countFun, rowFun, table, opts, rowNum, loadFunOpts)
{
    table.data("finished")
        .removeClass("download_incomplete")
        .removeClass("download_complete")
        .addClass("downloading");

    function statusCheckFun() {
        if(jQuery.isFunction(countFun)) {
            countFun(function(resp) {
                if(table.data("finished") != undefined)
                    table.data("finished").val(''+resp.count);
                if(!resp.finished)
                    setTimeout(statusCheckFun, rowStatusCheckInterval);
            });
        }
    };
    setTimeout(statusCheckFun, rowStatusCheckInterval);
    rowFun(opts, rowNum, loadRows, [table, rowNum, loadFunOpts]);
}

Stacks of command timeout.

A timer should be added for all the command that are waiting for rows from the db, in case the timer gets triggered before the operation is complete, then it should reply with the that is currently on the buffer.

New Connection should open a new tab

'New Connection' should open a new tab and leave the existing connection alive in the current tab. This function will enable to connect to the same or a new a new external database using the same or a different user. Credentials are asked in the login.

The new connection will connect to the same local dderl instance as the current tab and inherit the dderl login credentials. This means that the seco needs to be cloned for the new session manager.

Escape control characters on the grid.

If there are control characters on a string we need to escape them properly to allow edition of the cell.

Ctrl-c of the cell should return the original raw text.

insert of new rows uses column names instead of ids

following the result of pasting one entire row into the first field of the empty row at the bottom:

** {function_clause,
[{erlimem_fsm,data_update_row,
[{undefined,ins,
[{"time",
"1\t23.03.2013 17:10:03\t-123\t0\t1.00000000000000000000e+00\tstart"}]},

"time" is a column name where the fsm expects a column position (1 here)
the handling of multi-column paste is discussed in separate issue

Expected ChangeListFormat for insert:

[{RowId,ins,Fields}] where Fields = list( {Col#, StringValue} )

Sort menu items

Column headers should show the following sort menue items:

sort...:

if this column is not yet in the sort spec then
    add this column to the sort spec (ascending, at the end)
endif
show the sort spec

sort asc:

if this column is not yet in the sort spec then
    add this column to the sort spec (ascending, at the end)
else
    correct the sort order for this column to asc
endif
If the resulting sort spec consists of only this column then
    run the sort immediately
else
    show the sort spec
endif

sort desc:

if this column is not yet in the sort spec then
    add this column to the sort spec (descending, at the end)
else
    correct the sort order for this column to desc
endif
If the resulting sort spec consists of only this column then
    run the sort immediately
else
   show the sort spec
endif

sort clear:

if this column is part of the sort spec already then
   remove it
endif
if the resulting sort spec is empty then
    run it (go back to raw navigation)
else
    show the sort spec
endif

Multi select browse data

image

In the scenario shown above "Browse Data" will fail.

Reason: "Browse Data" do not support multiple cells at the moment, but may support in future

Remedy: A right click should clear all the previous selected ranges in the slickgrid cellrowselectionmodel plugin when it is following a left click in the same table at two
different cells.

Readonly fields should not allow edit

Clicking on a cell or moving there by tabulator key use should set the focus and select the current content (like in DataDirect Explorer).

Like that,
typing characters will replace the current text
typing right arrow will deselect and allow appending to the text
typing left arrow will deselect and allow prepending to the text

If the column is readonly, the focus should still be moved into the cell and the current content should be selected. Arrows also work as expected an can be used (with the help of the shift key) to select portions of the current content. When the user wants to type in something, an error box should pop up saying "This cell is read only".

Tcp connection crash when loading table with few rows.

Using a tcp connection to browse the data of a table with a small number of rows (approximately less than 5) crash the server due to time out.

Output:

16.05.2013 20:42:20.563345 [info] [IMDR] {erlimem_session,0376} sort_spec [{1,
<<"asc">>}]
16.05.2013 20:42:20.846208 [info] [IMDR] {erlimem_session,0284} [INCOMPLETE] <0.1650.0> received 1456 of 4908 bytes buffering...
16.05.2013 20:42:20.846336 [info] [IMDR] {erlimem_session,0284} [INCOMPLETE] <0.1650.0> received 2916 of 4908 bytes buffering...
16.05.2013 20:42:20.846428 [info] [IMDR] {erlimem_session,0284} [INCOMPLETE] <0.1650.0> received 4376 of 4908 bytes buffering...
16.05.2013 20:43:54.618150 [info] [IMDR] {erlimem_session,0284} [INCOMPLETE] <0.1650.0> received 284 of 68 bytes buffering...
16.05.2013 20:43:59.621560 [IMEM] {imem_server, 0070} socket #Port<0.8932> got closed!

=ERROR REPORT==== 16-May-2013::21:39:07 ===
** State machine <0.1731.0> terminating
** Last event in was {button,<<">">>,#Fun<imem_adapter.35.37698144>} (for all states)
** When State == empty
** Data == {state,{ctx,"what is it?",100,<0.1730.0>,
[{stmtCol,'$1',<<"id">>,userid,0,0,false},
{stmtCol,'$2',<<"roles">>,list,0,0,false},
{stmtCol,'$3',<<"permissions">>,list,0,0,false},
{stmtCol,'$4',<<"quotas">>,list,0,0,false}],
#Fun<imem_datatype.1.109819567>,
#Fun<imem_sql.7.128848470>,[],undefined,
<0.1650.0>},
8806532,8810629,100,300,<0.1730.0>,
[{stmtCol,'$1',<<"id">>,userid,0,0,false},
{stmtCol,'$2',<<"roles">>,list,0,0,false},
{stmtCol,'$3',<<"permissions">>,list,0,0,false},
{stmtCol,'$4',<<"quotas">>,list,0,0,false}],
#Fun<imem_datatype.1.109819567>,[],
#Fun<imem_sql.7.128848470>,
{undefined,[]},
#Fun<erlimem_fsm.24.123808864>,0,99999999,0,0,
99999999,0,0,[],{},0,99999999,0,0,undefined,undefined,
false,raw,false,0,false,false,undefined,undefined,
<<>>}
** Reason for termination =
** {timeout,{gen_server,call,[<0.1650.0>,[fetch_recs_async,[],<0.1730.0>]]}}

Validation of the fields on connect.

If a connection is attempted with something that is not a integer as the port, dderl_session crash instead of returning the error to the user.

Ctrl-C on arbitrary visible cell selection

Ctrl-C should copy the current cell selection to the clipboard.

The copied data must be usable in the client OS by doing Ctrl-V which emits the values (as 2-D tabulator separated values).

window viewstate not saved

When saving a view, and bringing it back using 'Browse data',
the window position (upper left corner) is restored correctly
the column widths ar ok
the window height is approximately ok (a little too small)
but the window width is not correctly set (too small in test case)

SQL Editor issues

Choosing from SQL-History sometimes replaces the Pretty SQL string but not always (maybe depending on NewQuery/BrowseData).
It does not change the Flat SQL.
Changes in Box are not promoted to Pretty nor Flat when changing the view.
It is ok that the current SQL is not shown in the history but it should be saved before another version from the history replaces it.

SQL history drop down should auto-extend to the end of the footer line.

History should persist on a combination of SQL-window and ist associated table.

Row Update highlighting

When rows are updated, they get a red font color and sometimes a strikethrough.

After committing, the fonts must be changed back to normal.

After roollback, the fonts must be changed back to normal.

Currently, the red color survives even a gui_replace().

Add "auto" as the default expansion level to the Erlang Term Pretty Print

print the given erlang term just as it is presented here:

[{tpi,[{ip,              {127,0,0,1}}]}
,{tpi,[{ip,              {127,0,0,1}}
      ,{verylongportname,8443}
      ,{ssl,             [{certfile,        "priv/mpro.crt/etc/etc/etc/etc/etc/etc/etc/etc"}
                         ,{keyfile,         "priv/mpro.key"}
                         ,{verylongpassword,"mpro"}
                         ]
       }
      ]
 }
,{tpi,[{ip,              {127,0,0,1}},      {port, 9999}]}
]

for the default case where the user wants automatic indenting.

The drop down should allow the following values:

auto (new option, set as default)
0
1
2
3
4
5 (fixed indentation for all elements as you have it)

The rules are as follows:

· fixed space font (e.g. Courier)
· variable nesting indentation, depending of value length (aqs for atom verylongportname)
· given target line length (e.g. 50 characters), can be exceeded if no nesting is possible or if nesting does not help (as with etc/etc/etc/etc)
· nesting is NOT done if whole subnested block fits (unnnested) on remainder of the line
· to be shown in a text box with scrollbars in both directions

About Dialog in DDErl

Good to have a File menu "About" which shows the application versions of DDErl and its dependencies (may or may not include 'kernel' and 'stdlib').

Tabulator use in edit

When editing a cell, the use of the tabulator key should move the focus to the next visible cell in the same row (which it does) but keep the edit mode (which it does not). DataDirect Explorer behaviour should be approximated as much as possible (no enter/doubleclick needed there to enter edit mode).

commit response

Commit response replaces all the rows and only adds the affected rows.

It should just change the formatting of the affected to back to default

Filter menu items

Column headers should show the following menues:

filter...:

if any of the selected columns is not yet part of the filter spec then
    add it to the filter spec (with empty value lists)
endif
show the filter spec (for all columns)

filter clear:

remove these columns from the filter spec (if present)
if resulting filter spec is not empty 
     show the filter spec
else
    execute the new filter (go back to raw navigation) without showing the filter spec
endif

a filter operation on a selected cell range should merge the current selection into a pre existing value list for the columns, removing duplicates and sorting the merged string values in ascending order

if there is no pre-existing filter and if only one filter column is present, the filter can be executed immediately
otherwise, the filter spec is shown

New connection overrides the old one.

When creating a new connection using the same session, the old connection is replaced by the new one. This shouldn't be the case, the new connection should be completely independent of the old one.

jQuery global valiable

All the global variables used in dderl jquery should be kept in one global object as its properties.

For example in dderl.js

Instead of:

var session = null;
var adapter = null;
var connection = null;

Preferred:

var global = {
  session: null,
  adapter: null,
  connection: null
};

Access (lvalue or rvalue):

global.session
global.adapter

This will improve code readability and prevent assignment attempt accidentally creating a new variable in the local scope without change the global variable.

Like (in earlier scenario):

fun() { var session = ... ; } // doesn't change the global variable

In new approach:

fun() { var global.session = ... ; } // error

Column with calculation too slow

Calculating the adapted column widths for the first block of data in a table dialog is implemented too slow.
Possible solution: Sever adds meta information for each column which points to the row in the first block with the highest number of characters.

editing sql for "All Views" crashes

** Reason for termination ==
** {'function not exported',
[{gen_adapter,process_cmd,
[{[<<"parse_stmt">>],
[{<<"parse_stmt">>,
[{<<"qstr">>,
<<"select c.owner, v.name from ddView as v, ddCmd as c where c.id = v.cmd and c.adapters = "[imem]" and (c.owner = user or c.owner = system)">>}]}]},
<0.1764.0>,undefined],
[]},

wrong signature for process_cmd

Server hangs on bad SQL

The following bas SQL brings the server to a hang:

select
*
from
Imem.mproDestinationPeer where appId =ucp
and address="10.231.163.101"
and opts = []

Subsequent corrected SBS is blocked with the error message:

ClientException: Statement creation already in progress!

The dderl server log shows:

11:25:09.799 [error] [IMDR] {erlimem_session,491} throw {case_clause,
{error,
{9,sql_lex,
{illegal,"["}},
9}}
11:25:09.796 [error] [DDRL] {imem_adapter,302} query error {case_clause,{error,{9,sql_lex,{illegal,"["}},9}}

=ERROR REPORT==== 25-Feb-2013::11:25:09 ===
Error in process <0.526.0> on node '[email protected]' with exit value: {badarg,[{erlang,list_to_binary,[[99,97,115,101,95,99,108,97,117,115,101,58,32|error]],[]},{imem_adapter,process_query,2,[{file,"src/imem_adapter.erl"},{line,303}]},{imem_adapter,process_cmd,2,[{file,"src/imem_adapter.erl"},{line,88}]},{dderl_session,'-process_call/3-fun-1-'...

Uniform row heights

All dialog title bar / column headers / toolbars with buttons should be of same height (as the current dialog title bar or slightly higher if necessary).

The height of the data columns may be somewhat different, potentally auto-adjusted to the font when the latter becomes configurable or selectable in the GUI.

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.