Project

General

Profile

Actions

Feature #6787

closed

Think on more generic views

Added by Evgeny Novikov about 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Urgent
Category:
Bridge
Target version:
-
Start date:
02/03/2016
Due date:
06/13/2017
% Done:

100%

Estimated time:
Published in build:

Description

At the moment views of various lists, statistics and the job tree differ too much. So, we have to think about more generic approach to create and to use views. Suggestions are welcome in form of comments.


Related issues 3 (1 open2 closed)

Related to Klever - Bug #8233: There is no page refereshing and notification about stopping page refreshingClosedVladimir Gratinskiy06/02/201706/07/2017

Actions
Related to Klever - Feature #8144: Support limited lists of entitiesClosedVladimir Gratinskiy04/24/2017

Actions
Related to Klever - Feature #8274: Support advanced attributes comparisonNewVladimir Gratinskiy07/05/2017

Actions
Actions #1

Updated by Evgeny Novikov about 8 years ago

I need to filter attribute values not only with "starts with" or "equals to" but also with their negative variants.

Actions #2

Updated by Evgeny Novikov about 8 years ago

By default report lists should be ordered by values of attribute verification object. If there are several reports with the same verification object then they be additionally sorted by values of attribute rule specification.

Actions #3

Updated by Evgeny Novikov about 8 years ago

In many places I can't change the order of first columns, in particular I can't add new interesting columns behind the frozen ones.

Actions #4

Updated by Evgeny Novikov about 8 years ago

I can't sort lines by values of different columns, e.g. sort by date.

Actions #5

Updated by Evgeny Novikov about 8 years ago

There isn't a filter by job identifier in the job tree view.

Actions #6

Updated by Evgeny Novikov about 8 years ago

For lists of reports the number of associated marks should be shown like for lists or marks the number of associated reports are shown.

Actions #7

Updated by Evgeny Novikov about 8 years ago

On pages with all (component) unknowns we would like to see corresponding problems by default.

Actions #8

Updated by Evgeny Novikov about 8 years ago

Lists of marks should be accomplished with modification dates and lines should be ordered by dates by default.

Actions #9

Updated by Evgeny Novikov about 8 years ago

  • Priority changed from Normal to High
Actions #10

Updated by Vladimir Gratinskiy almost 7 years ago

  • Due date set to 06/13/2017
  • Status changed from New to Resolved

Implemented in branch "unified-views".

Actions #11

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Resolved to Open
  • Priority changed from High to Urgent

I met the following exception:

Environment:

Request Method: GET
Request URL: http://localhost:8998/jobs/?&view=%7B%22columns%22%3A%5B%22role%22%2C%22author%22%2C%22date%22%2C%22status%22%2C%22unsafe%3Atotal%22%2C%22problem%3Atotal%22%2C%22safe%3Atotal%22%2C%22unsafe%22%5D%2C%22order%22%3A%5B%22up%22%2C%22date%22%5D%2C%22change_date%22%3A%5B%22older%22%2C%2210%22%2C%22weeks%22%5D%7D&view_type=1

Django Version: 1.11
Python Version: 3.6.1
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.humanize',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'jobs',
 'marks',
 'reports',
 'service',
 'tools',
 'users')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')

Traceback:

File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)

File "/home/novikov/work/klever/bridge/tools/profiling.py" in wait
  133.                 res = f(*args, **kwargs)

File "/home/novikov/work/klever/bridge/jobs/views.py" in tree_view
  77.         'TableData': TableTree(request.user, **view_args)

File "/home/novikov/work/klever/bridge/jobs/JobTableProperties.py" in __init__
  105.         self.__collect_jobdata()

File "/home/novikov/work/klever/bridge/jobs/JobTableProperties.py" in __collect_jobdata
  263.         filters, unfilters = self.__view_filters()

File "/home/novikov/work/klever/bridge/jobs/JobTableProperties.py" in __view_filters
  350.             filters['name__' + self.view['title'][0]] = self.view['title'][1]

Exception Type: TypeError at /jobs/
Exception Value: 'NoneType' object is not subscriptable

In addition I increased the issue priority since important bug #8233 is fixed with it.

Actions #12

Updated by Vladimir Gratinskiy almost 7 years ago

  • Status changed from Open to Feedback

Fixed.

Actions #13

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Feedback to Open
We decided to unify views even more:
  1. Use everywhere the same advanced method for selecting columns as at the jobs tree page. In addition, for some views new columns should be added, e.g. last change author/date for associated unsafe marks (I don't assume these columns should be shown by default, we just need an ability to show them).
  2. Use everywhere the same method for setting filters (now at the job page it differs).
  3. To reduce confusion I suggest to move everywhere sections intended for operations with named views upstairs. Indeed in the most cases users should switch between (shared) named views rather than setting their own ones.
  4. Also I guess that views should be generally arranged and managed in the very similar way everywhere. For instance, now at the job page it is a bit different, e.g. another icon, no names "Columns" and "Filters".

Perhaps there is a bug in this branch for associated unsafe marks. Mark descriptions are placed within column "Association author" and so on.

Actions #14

Updated by Evgeny Novikov almost 7 years ago

I forgot to add that "Number of elements in table" (perfectly "Number of rows") should be a separate section, not a subsection of "Columns". Also "Order" doesn't belong to "Columns". So there should be likely two more corresponding sections.

BTW, in mind I compare Bridge views with the SQL query: SELECT "Columns" WHERE "Filters" ORDER BY "Order" LIMIT "Number of rows".

Actions #15

Updated by Vladimir Gratinskiy almost 7 years ago

  • Status changed from Open to Resolved
  • % Done changed from 0 to 100

Fixed issues you mentioned in last 2 comments. Don't forget to migrate (if you have views for associated marks table).

Actions #16

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Resolved to Open
Remaining issues:
  1. Now there isn't name "Filters" anymore which isn't clear. In addition at the job page there isn't any section name at all. I suggest to use "Data", "Filters" ("Hide..." can be treated as filters) and "Statistics".
  2. Not all columns that could be filtered are allowed for filtering. For instance, at the unsafe marks page there isn't filter "last change date" neither when corresponding column is shown or not (by default). Perhaps there are similar problems for other views as well. I wouldn't like to add all possible filters but some ones should be added.
  3. There isn't a view for the association changes page (as far as I remember it was mentioned even in the specification).
  4. At the jobs tree page after opening the views menu the corresponding controlling element is shown after the views window not before it as for other pages.
  5. The form for choosing ascending/descending order is aligned differently for different views, e.g. at the jobs tree page and at the unsafes page. Please, see other views as well.
  6. Fix alignments of notes like "Enter the full name of the attribute, e.g. Linux kernel:Version". Various views are subjected to the given issue.
  7. At the unsafe marks page the number of rows form is empty although 18 rows are shown as for other tables.
Actions #17

Updated by Vladimir Gratinskiy almost 7 years ago

Evgeny Novikov wrote:

Remaining issues:
  1. There isn't a view for the association changes page (as far as I remember it was mentioned even in the specification).

Fix of this issue will take much time. I've already started it, but I need to rewrite marks association (after mark change/create/deletion) functions, tags + verdicts + association + confirmed caches for safes + unsafes + (unknowns) recalculation functions, and then I will be able to add new views.
While I do it you can check all other issues I've already fixed. But you need to migrate from the master (I've collapsed all migrations in this branch).

Actions #18

Updated by Evgeny Novikov almost 7 years ago

Vladimir Gratinskiy wrote:

Evgeny Novikov wrote:

Remaining issues:
  1. There isn't a view for the association changes page (as far as I remember it was mentioned even in the specification).

Fix of this issue will take much time. I've already started it, but I need to rewrite marks association (after mark change/create/deletion) functions, tags + verdicts + association + confirmed caches for safes + unsafes + (unknowns) recalculation functions, and then I will be able to add new views.

Perhaps it will be easier to avoid dynamically adjusted views for this particular page since it is dynamic itself (i.e. you can't see it after you leave it). So, when users will see this page and change its view, there will be no changes in data representation, but next time data will be represented in accordance with the adjusted view. This was also mentioned in the specification if I remember.

Actions #19

Updated by Evgeny Novikov almost 7 years ago

Vladimir Gratinskiy wrote:

But you need to migrate from the master (I've collapsed all migrations in this branch).

Does this assume I have to remove all the existing data that has many migrations from this branch since I can't migrate it either backward or forward? (Next time I will dump all the data when being at the master branch prior to testing of a new large functionality that will likely require several iterations and something like intermediate migrations refactoring).

Actions #20

Updated by Vladimir Gratinskiy almost 7 years ago

Evgeny Novikov wrote:

Vladimir Gratinskiy wrote:

But you need to migrate from the master (I've collapsed all migrations in this branch).

Does this assume I have to remove all the existing data that has many migrations from this branch since I can't migrate it either backward or forward?

Right.

Actions #21

Updated by Vladimir Gratinskiy almost 7 years ago

  • Status changed from Open to Resolved

I've added new views for associations changes pages.

Actions #22

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Resolved to Closed

For me looks very well! So, I merged the branch to master in 9274ac98. Don't forget to migrate your databases.

Actions

Also available in: Atom PDF