Code Monkey home page Code Monkey logo

viur-framework / viur-vi Goto Github PK

View Code? Open in Web Editor NEW
17.0 12.0 7.0 9.43 MB

Visual administration interface for ViUR as web-app, with the ability to generate its input masks and data structures automatically from the underlying data model.

Home Page: https://vi.docs.viur.dev

License: GNU Lesser General Public License v3.0

Makefile 0.09% Python 60.11% HTML 0.44% JavaScript 1.95% CSS 24.70% Less 12.70%
appengine html5-application administration-interface appengine-python viur pyodide administration python python3 viur-website

viur-vi's Introduction

ViUR Vi

release Documentation Status

Vi is the web-based administration client for the ViUR framework.

The software runs on any modern web browser and was built using Flare, a framework and toolkit for writing web-apps in Python, and Pyodide, a Python interpreter running in the browser.

Usage

Vi can be used as a submodule or from a zip-file to be used in your ViUR projects. It runs out of the box without further dependencies.

A default viur-base installation provides a guided way to include a recent Vi into your ViUR project. viur-cli supports you keeping your Vi up-to-date.

Contributing

ViUR is developed and maintained by Mausbrand Informationssysteme GmbH, from Dortmund in Germany. We are a software company consisting of young, enthusiastic software developers, designers and social media experts, working on exciting projects for different kinds of customers. All of our newer projects are implemented with ViUR, from tiny web-pages to huge company intranets with hundreds of users.

Help of any kind to extend and improve or enhance this project in any kind or way is always appreciated.

We take great interest in your opinion about ViUR. We appreciate your feedback and are looking forward to hear about your ideas. Share your vision or questions with us and participate in ongoing discussions.

License

Copyright ยฉ 2022 by Mausbrand Informationssysteme GmbH.
Mausbrand and ViUR are registered trademarks of Mausbrand Informationssysteme GmbH.

You may use, modify and distribute this software under the terms and conditions of the GNU Lesser General Public License (LGPL). See the file LICENSE provided within this package for more information.

viur-vi's People

Contributors

achimschumacher avatar akelch avatar arnegudermann avatar ciansen avatar dependabot[bot] avatar grashalmbeisser avatar icubes avatar phneutral avatar phorward avatar przybyla86 avatar skoegl avatar sveneberth avatar thevax avatar timmytiefkuehl avatar tsteinruecken avatar xnopasaranx avatar

Stargazers

 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

viur-vi's Issues

Clone must use addSkel, not an editSkel

When cloning an entry, the form must use the structure from an addSkel, not an editSkel. Currently, we simply use the editForm and reset its Key to None (so data will be pushed to /module/add instead). But addSkel and editSkel might have different structures (like readOnly fields that can only be set once during add). These would currently be still readOnly and clone not possible on such modules.

Fulltext search removes predefined filters

When using a fulltext search on a view, which has predefined filters these filters are not send to the server - just the searchstring. Furthermore, if you close the search, the view will display all entries as the predefined filter remains missing.

Unable to edit tree items (file module)

There seems to be a problem with the file module and the standard Vi when trying to edit file entries. The server reports error 406 before /file/edit is invoked. The reason for this is, that "key" is provided both as a running variable attached to the function call as /file/edit/leaf/key and as a parameter in the POST values.

image

Built-in Lorem ipsum generator for bones

It would be nice feature to generate lorem ipsum text for testing purposes easily by a function provided by stringBone and textBone. This would allow for rapid content prototyping. It should be disabled by default, and activateable by a conf key.

Grouping of action bar elements

At the moment it is possible to add a spacer between action bar elements using a single "|".

With ViUR ignite it is possible to put action buttons in groups that can be aligned left, right and center on the bar. More over it is possible to join multiple action buttons into one input group.

To make use of this Vi would need some kind of grouping syntax within actions.
Something like the example below or similar:

groupedActions = {"left":["add"],"center":["edit"],"right":["delete"]}

joinedActions = [("add", "edit"),("clone", "delete")]

Refactoring EditWidget

The EditWidget must be refactored to fullfill different requirements for later use.

  • Bones should not be re-rendered on any actions and handle errors more consequently
  • The differences between an EditWidget and an InternalEdit must be solved to provide one single EditWidget which can be used in different ways

This requirement is needed to solve customer-related modifications more easily.

Actions are Global

It's not possible to have available actions depend on views. The buttons displayed in the actionbar are always derived from the main entry in adminInfo; even if the field is set in a view it's ignored

Vi drops Bones which are visible=False

If a Bone is visible=False the content will be deleted from the Datastore, cause the vi does not send the Data as hidden Fields to the Server.

To reproduce:
Set a bunch of Bones visible =True and fill them with Data.
Change the Bones to visible = False and resave the entry.
Now all Bones are empty

Here my test Bones:
t1 = stringBone(descr="str",visible=False)
t2 = stringBone( descr="strM",multiple=True, visible=False )
t3 = selectOneBone( descr="one", visible=False,values={"1":"1","2":"2"} )
t4 = selectMultiBone( descr="mult", visible=False,values={"1":"1","2":"2"} )
t5 = textBone( descr="txt", visible=False )
t6 = relationalBone( descr="rel", visible=False,kind="arel" )
t7 = relationalBone( descr="rel",multiple=True, visible=False,kind="arel" )
t8 = relationalBone( descr="rel", visible=False, kind="arel",using=useSkel )
t9 = relationalBone( descr="rel", multiple=True, visible=False, kind="arel",using=useSkel )

Vi must not retry POST-requests failing with error code 500

Currently, the vi automatically retries requests if it receives a non 200 status code. While this may or may not be useful for GET requests, it's an error to silently retry posts as they are not idempotent.
This can (and recently did) corrupt data.

Possible better solution for vi https-redirect?

A local development server can be exposed to the network using

dev_appserver.py -A myproject-viur --log_level=debug --host myhost --enable_host_checking=0 .

The front page can be viewed with http://myhost:8080 or, for example, http://192.168.1.3:8080.

This works very well, except when trying to use the vi, and calling something like http://myhost:8080/vi. In this case, this conidition is satisfied, and performs a Javascript redirect to https://myhost/vi/s/main.html, which is totally incorrect. The port 8080 is removed, and generally https cannot be used here.

So maybe we need to figure out a solution how to deal with local network servers?

Customized user interface

I'd would be nice for every user to have some customizing of the interface.
Some simple things like:

  • enabled/disabled columns of lists
  • customize and save the order of the module list
  • save the opened category of edit views

Implement developer mode

What about a Vi developer mode? When using Vi in developer mode, it may provide some detailed information in various places.

  • Function to quickly obtain an entities key value
  • Tool for generating execCalls (initialHashHandler)
  • Directly jump into Google Cloud console
  • Show bone names and type instead of description values

These are some first ideas.

Strange things relating log and indexeddb

Hi, the current feature/viur3 branch has a serious problem with its log and maybe the indexed-db.

I got stuck with this screen in the end:
image

I also recognized this strange message "Task started!" that comes up every time I start a new Vi, and after the yellow "a script is slowing down"-bar has deceased.
image

In the console, the following message is also strange and repeats 1000 times:
image
Its origin is here: https://github.com/viur-framework/viur-vi/blob/feature/viur3/utils.py#L269

When I clean-up vi-cache/vi-log in indexeddb, everything works better, but after a while the problem occurs again.

DOMException: Failed to execute 'appendChild' on 'Node': The new child element contains the parent.

I'm recognizing this error when this numericBone is active:
shot-2020-10-16_16-45-56

The traceback is very incomprehensible, and does not help much.

    at _hiwire_call_member (http://localhost:8080/pyodide/pyodide.asm.js:8:31195)
    at _JsBoundMethod_Call (http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[325]:0xfb707)
    at http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[14894]:0x973c2e
    at __PyObject_FastCallKeywords (http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[841]:0x133ca7)
    at _call_function (http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[2755]:0x327e2b)
    at __PyEval_EvalFrameDefault (http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[2750]:0x3206a0)
    at http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[20581]:0x98721c
    at __PyEval_EvalCodeWithName (http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[2745]:0x314c59)
    at __PyFunction_FastCallKeywords (http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[842]:0x133f3d)
    at _call_function (http://localhost:8080/pyodide/pyodide.asm.wasm:wasm-function[2755]:0x327e1f)
_hiwire_call_member @ pyodide.asm.js:8
_JsBoundMethod_Call @ pyodide.asm.wasm:0xfb707
(anonymous) @ pyodide.asm.wasm:0x973c2e
__PyObject_FastCallKeywords @ pyodide.asm.wasm:0x133ca7
_call_function @ pyodide.asm.wasm:0x327e2b
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x3206a0
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133f3d
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x32068f
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallDict @ pyodide.asm.wasm:0x132898
__PyObject_FastCallDict @ pyodide.asm.wasm:0x1322de
__PyObject_Call_Prepend @ pyodide.asm.wasm:0x1353f6
_method_call @ pyodide.asm.wasm:0x136d3a
(anonymous) @ pyodide.asm.wasm:0x9743f5
_PyObject_Call @ pyodide.asm.wasm:0x134af1
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x320d48
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallDict @ pyodide.asm.wasm:0x132898
__PyObject_FastCallDict @ pyodide.asm.wasm:0x1322de
__PyObject_Call_Prepend @ pyodide.asm.wasm:0x1353f6
_slot_tp_init @ pyodide.asm.wasm:0x1d186a
(anonymous) @ pyodide.asm.wasm:0x97655c
_type_call @ pyodide.asm.wasm:0x1e07d6
(anonymous) @ pyodide.asm.wasm:0x9762ee
__PyObject_FastCallKeywords @ pyodide.asm.wasm:0x133ca7
_call_function @ pyodide.asm.wasm:0x327e2b
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x3206fe
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133f3d
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x32068f
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133f3d
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x320764
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133f3d
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x320764
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133f3d
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x320764
(anonymous) @ pyodide.asm.wasm:0x98721c
_function_code_fastcall @ pyodide.asm.wasm:0x13359d
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133eb2
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x3206fe
(anonymous) @ pyodide.asm.wasm:0x98721c
_function_code_fastcall @ pyodide.asm.wasm:0x13359d
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133eb2
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x32068f
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallDict @ pyodide.asm.wasm:0x132898
__PyObject_FastCallDict @ pyodide.asm.wasm:0x1322de
__PyObject_Call_Prepend @ pyodide.asm.wasm:0x1353f6
_method_call @ pyodide.asm.wasm:0x136d3a
(anonymous) @ pyodide.asm.wasm:0x9743f5
_PyObject_Call @ pyodide.asm.wasm:0x134af1
__pyproxy_apply @ pyodide.asm.wasm:0xfc26d
Module.__pyproxy_apply @ pyodide.asm.js:8
apply @ pyodide.asm.js:8
XMLHttpRequest.send (async)
_hiwire_call_member @ pyodide.asm.js:8
_JsBoundMethod_Call @ pyodide.asm.wasm:0xfb707
(anonymous) @ pyodide.asm.wasm:0x973c2e
__PyObject_FastCallKeywords @ pyodide.asm.wasm:0x133ca7
_call_function @ pyodide.asm.wasm:0x327e2b
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x3206a0
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallDict @ pyodide.asm.wasm:0x132898
__PyObject_FastCallDict @ pyodide.asm.wasm:0x1322de
__PyObject_Call_Prepend @ pyodide.asm.wasm:0x1353f6
_method_call @ pyodide.asm.wasm:0x136d3a
(anonymous) @ pyodide.asm.wasm:0x9743f5
_PyObject_Call @ pyodide.asm.wasm:0x134af1
__pyproxy_apply @ pyodide.asm.wasm:0xfc26d
Module.__pyproxy_apply @ pyodide.asm.js:8
apply @ pyodide.asm.js:8
_hiwire_call_member @ pyodide.asm.js:8
_JsBoundMethod_Call @ pyodide.asm.wasm:0xfb707
(anonymous) @ pyodide.asm.wasm:0x973c2e
__PyObject_FastCallKeywords @ pyodide.asm.wasm:0x133ca7
_call_function @ pyodide.asm.wasm:0x327e2b
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x3206a0
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133f3d
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x320764
(anonymous) @ pyodide.asm.wasm:0x98721c
_function_code_fastcall @ pyodide.asm.wasm:0x13359d
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133eb2
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x32068f
(anonymous) @ pyodide.asm.wasm:0x98721c
_function_code_fastcall @ pyodide.asm.wasm:0x13359d
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133eb2
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x32068f
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallDict @ pyodide.asm.wasm:0x132898
__PyObject_FastCallDict @ pyodide.asm.wasm:0x1322de
__PyObject_Call_Prepend @ pyodide.asm.wasm:0x1353f6
_slot_tp_init @ pyodide.asm.wasm:0x1d186a
(anonymous) @ pyodide.asm.wasm:0x97655c
_type_call @ pyodide.asm.wasm:0x1e07d6
(anonymous) @ pyodide.asm.wasm:0x9762ee
__PyObject_FastCallKeywords @ pyodide.asm.wasm:0x133ca7
_call_function @ pyodide.asm.wasm:0x327e2b
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x3206fe
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133f3d
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x320764
(anonymous) @ pyodide.asm.wasm:0x98721c
_function_code_fastcall @ pyodide.asm.wasm:0x13359d
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133eb2
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x32068f
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallDict @ pyodide.asm.wasm:0x132898
__PyObject_FastCallDict @ pyodide.asm.wasm:0x1322de
__PyObject_Call_Prepend @ pyodide.asm.wasm:0x1353f6
_slot_tp_init @ pyodide.asm.wasm:0x1d186a
(anonymous) @ pyodide.asm.wasm:0x97655c
_type_call @ pyodide.asm.wasm:0x1e07d6
(anonymous) @ pyodide.asm.wasm:0x9762ee
_PyObject_Call @ pyodide.asm.wasm:0x134af1
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x320d48
(anonymous) @ pyodide.asm.wasm:0x98721c
_function_code_fastcall @ pyodide.asm.wasm:0x13359d
__PyFunction_FastCallKeywords @ pyodide.asm.wasm:0x133eb2
_call_function @ pyodide.asm.wasm:0x327e1f
__PyEval_EvalFrameDefault @ pyodide.asm.wasm:0x32068f
(anonymous) @ pyodide.asm.wasm:0x98721c
__PyEval_EvalCodeWithName @ pyodide.asm.wasm:0x314c59
__PyFunction_FastCallDict @ pyodide.asm.wasm:0x132898
__PyObject_FastCallDict @ pyodide.asm.wasm:0x1322de
__PyObject_Call_Prepend @ pyodide.asm.wasm:0x1353f6
_method_call @ pyodide.asm.wasm:0x136d3a
(anonymous) @ pyodide.asm.wasm:0x9743f5
_PyObject_Call @ pyodide.asm.wasm:0x134af1
__pyproxy_apply @ pyodide.asm.wasm:0xfc26d
Module.__pyproxy_apply @ pyodide.asm.js:8
apply @ pyodide.asm.js:8
Show 130 more frames

Don't bug the server with frequent /vi/user/view/self requests when logged out

I often see periodic calls to /vi/user/view/self in the logs that are discarded with 401 Unauthorized. This (in my opinion) happens when an VI is keept is a background tab and the System awakes from suspend. My suggestion is to use the new Page Visibility API (https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API) to check whenever the page is actually visible to the user and not issue any further checks to /vi/user/view/self unless the page has become visible again.

Screenshot_20200806_150939

indexeddb wrapper fails occasionally on startup

When I use the pyodide vi locally, I sometimes get a strange error when logging in to the vi for the first time after starting up:

pyodide.asm.js:8   File "/lib/python3.7/site-packages/vi/network.py", line 67, in onReadyStateChange
pyodide.asm.js:8     self.cb.onCompletion( self.req.responseText )
pyodide.asm.js:8   File "/lib/python3.7/site-packages/vi/network.py", line 338, in onCompletion
pyodide.asm.js:8     s( self )
pyodide.asm.js:8   File "/lib/python3.7/site-packages/vi/admin.py", line 107, in getCurrentUserSuccess
pyodide.asm.js:8     self.startup()
pyodide.asm.js:8   File "/lib/python3.7/site-packages/vi/admin.py", line 126, in startup
pyodide.asm.js:8     self.topBar.invoke()
pyodide.asm.js:8   File "/lib/python3.7/site-packages/vi/widgets/topbar.py", line 70, in invoke
pyodide.asm.js:8     conf["mainWindow"].logWdg = widget()
pyodide.asm.js:8   File "/lib/python3.7/site-packages/vi/log.py", line 121, in __init__
pyodide.asm.js:8     idb.dbAction( "createStore", "vi_log", None, { "autoIncrement": True } )
pyodide.asm.js:8   File "/lib/python3.7/site-packages/vi/utils.py", line 244, in dbAction
pyodide.asm.js:8     self.dbVersion +=1
pyodide.asm.js:8 TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'
pyodide.asm.js:8 
pyodide.asm.js:8 Uncaught Error: Traceback (most recent call last):
  File "/lib/python3.7/site-packages/vi/network.py", line 67, in onReadyStateChange
    self.cb.onCompletion( self.req.responseText )
  File "/lib/python3.7/site-packages/vi/network.py", line 338, in onCompletion
    s( self )
  File "/lib/python3.7/site-packages/vi/admin.py", line 107, in getCurrentUserSuccess
    self.startup()
  File "/lib/python3.7/site-packages/vi/admin.py", line 126, in startup
    self.topBar.invoke()
  File "/lib/python3.7/site-packages/vi/widgets/topbar.py", line 70, in invoke
    conf["mainWindow"].logWdg = widget()
  File "/lib/python3.7/site-packages/vi/log.py", line 121, in __init__
    idb.dbAction( "createStore", "vi_log", None, { "autoIncrement": True } )
  File "/lib/python3.7/site-packages/vi/utils.py", line 244, in dbAction
    self.dbVersion +=1
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'

    at _hiwire_throw_error (pyodide.asm.js:8)
    at wasm-function[358]:0xfc6c0
    at wasm-function[356]:0xfbff0
    at Module.__pyproxy_apply (pyodide.asm.js:8)
    at Object.apply (pyodide.asm.js:8)```

Unable to edit tree nodes (file module)

When a folder/node is focus selected the edit button of the file module is not disabled, suggesting that it is possible to edit the folder/node. But the button is not working. It would be nice to for example rename folders/notes.

File-browser causes error 500 due using wrong cursor

In the File browser, a 500 raises with this content (server side):

400 The query kind is file_rootNode but cursor.postfix_position.key kind is file.
Traceback (most recent call last):
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/grpc/_channel.py", line 923, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/grpc/_channel.py", line 826, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "The query kind is file_rootNode but cursor.postfix_position.key kind is file."
	debug_error_string = "{"created":"@1604666164.475622500","description":"Error received from peer ipv4:216.58.210.10:443","file":"src/core/lib/surface/call.cc","file_line":1061,"grpc_message":"The query kind is file_rootNode but cursor.postfix_position.key kind is file.","grpc_status":3}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/c/Users/tk/Documents/Mausbrand/bastlboards/deploy/viur/core/request.py", line 218, in processRequest
    self.findAndCall(path)
  File "/mnt/c/Users/tk/Documents/Mausbrand/bastlboards/deploy/viur/core/request.py", line 392, in findAndCall
    res = caller(*self.args, **self.kwargs)
  File "/mnt/c/Users/tk/Documents/Mausbrand/bastlboards/deploy/viur/core/prototypes/tree.py", line 265, in list
    res = query.fetch()
  File "/mnt/c/Users/tk/Documents/Mausbrand/bastlboards/deploy/viur/core/db.py", line 838, in fetch
    dbRes = self.run(limit)
  File "/mnt/c/Users/tk/Documents/Mausbrand/bastlboards/deploy/viur/core/db.py", line 798, in run
    res = self._fixKind(self._runSingleFilterQuery(self.filters, qryLimit))
  File "/mnt/c/Users/tk/Documents/Mausbrand/bastlboards/deploy/viur/core/db.py", line 655, in _runSingleFilterQuery
    res = next(qryRes.pages)
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/api_core/page_iterator.py", line 243, in _page_iter
    page = self._next_page()
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/cloud/datastore/query.py", line 537, in _next_page
    self._query.project, partition_id, read_options, query=query_pb
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/cloud/datastore_v1/gapic/datastore_client.py", line 384, in run_query
    request, retry=retry, timeout=timeout, metadata=metadata
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py", line 145, in __call__
    return wrapped_func(*args, **kwargs)
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/api_core/retry.py", line 286, in retry_wrapped_func
    on_error=on_error,
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/api_core/retry.py", line 184, in retry_target
    return target()
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/tmp/tmpZASLAf/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 The query kind is file_rootNode but cursor.postfix_position.key kind is file.

It seems that client-side, there is the same cursor used, and the entire node/leaf-fetch-flow intermixes where it shouldn't (see https://github.com/viur-framework/viur-vi/blob/master/widgets/tree.py#L650 and below).

shot-2020-11-06_14-19-22

SelectTable with no selected columns fails completely

In a list you can select the columns to be displayed. So far, so good. But when you disable all columns respectively you haven't selected any column and apply it you will get an AssertionError.

AssertionError: Cannot create cols with negative index
Traceback:
pyjslib.py, line 140
html5.ext.py, line 27:
    self.callback(self)
actions.list.py, line 504:
    self.listWdg.setFields( res )
widgets.list.py, line 320:
    self.table.setShownFields(fields)
widgets.table.py, line 706:
    self.rebuildTable()
widgets.table.py, line 693:
    self.table.prepareGrid( len(self._model), len(self._shownFields))
html5.core.py, line 2815:
    self.prepareCol(row, cols)
widgets.table.py, line 413:
    super( SelectTable, self ).prepareCol( row, col + self._extraCols() - 1 )
html5.core.py, line 2795:
    assert col >= 0, "Cannot create cols with negative index"

That means the current Pane isn't usable anymore, which is bad if this was a careless mistake, see:
image

Post login handler

In projects where there are several portals, a pop-up appears after login with the selection for the type of administration (a specific portal, all portals etc.). This function is useful for many projects with more complex roles and rights. Up to now, however, the pop-up appears in the app context (with a white overlay in the background). In my opinion it would make more sense to implement this selection as the last step in the login process (and corresponding layout).

Don't run multiple NetworkRequests in parallel that include skeys

In ViUR 3.0, it's not possible to retrieve multiple skeys in advance (they are now bound to your session object). You'll get always the same skey until it's used. So we can't run multiple requests in parallel that have secure=True set. They have to be queued and processed one by one.

Deleting items not possible

image

Uncaught Error: Traceback (most recent call last):
  File "/lib/python3.7/site-packages/vi/html5/ext.py", line 34, in onClick
    self.callback(self)
  File "/lib/python3.7/site-packages/vi/html5/ext.py", line 326, in onYesClicked
    self.yesCallback(self)
  File "/lib/python3.7/site-packages/vi/actions/list.py", line 237, in doDelete
    deleteList = dialog.deleteList
AttributeError: 'YesNoDialog' object has no attribute 'deleteList'
    _hiwire_throw_error http://localhost:8080/pyodide/pyodide.asm.js:8
    __pyproxy_apply http://localhost:8080/pyodide/pyodide.asm.js:8
    apply http://localhost:8080/pyodide/pyodide.asm.js:8
pyodide.asm.js:8:38724
    _hiwire_throw_error http://localhost:8080/pyodide/pyodide.asm.js:8
    <anonymous> http://localhost:8080/pyodide/pyodide.asm.wasm:1034721
    <anonymous> http://localhost:8080/pyodide/pyodide.asm.wasm:1032977
    __pyproxy_apply http://localhost:8080/pyodide/pyodide.asm.js:8
    apply http://localhost:8080/pyodide/pyodide.asm.js:8

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.