Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
proto3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
protokollsystem
proto3
Commits
91159f04
Commit
91159f04
authored
8 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
Correctly handle unset open_states
parent
1b88d4a0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
server.py
+4
-4
4 additions, 4 deletions
server.py
with
4 additions
and
4 deletions
server.py
+
4
−
4
View file @
91159f04
...
@@ -402,7 +402,7 @@ def list_protocols():
...
@@ -402,7 +402,7 @@ def list_protocols():
protocol_done
=
bool
(
state_open
)
protocol_done
=
bool
(
state_open
)
protocols
=
[
protocols
=
[
protocol
for
protocol
in
protocols
protocol
for
protocol
in
protocols
if
protocol
.
is_done
()
==
protocol_done
if
(
protocol
.
is_done
()
or
False
)
==
protocol_done
]
]
if
shall_search
:
if
shall_search
:
protocols
=
[
protocols
=
[
...
@@ -446,7 +446,7 @@ def list_protocols():
...
@@ -446,7 +446,7 @@ def list_protocols():
page
=
0
page
=
0
begin_index
=
page
*
page_length
begin_index
=
page
*
page_length
end_index
=
(
page
+
1
)
*
page_length
end_index
=
(
page
+
1
)
*
page_length
max_page_length_exp
=
math
.
ceil
(
math
.
log10
(
len
(
protocols
)))
max_page_length_exp
=
math
.
ceil
(
math
.
log10
(
len
(
protocols
)))
if
len
(
protocols
)
>
0
else
1
protocols
=
protocols
[
begin_index
:
end_index
]
protocols
=
protocols
[
begin_index
:
end_index
]
protocols_table
=
ProtocolsTable
(
protocols
,
search_results
=
search_results
)
protocols_table
=
ProtocolsTable
(
protocols
,
search_results
=
search_results
)
return
render_template
(
"
protocols-list.html
"
,
protocols
=
protocols
,
protocols_table
=
protocols_table
,
search_form
=
search_form
,
page
=
page
,
page_count
=
page_count
,
page_diff
=
config
.
PAGE_DIFF
,
protocoltype_id
=
protocoltype_id
,
search_term
=
search_term
,
state_open
=
state_open
,
page_length
=
page_length
,
max_page_length_exp
=
max_page_length_exp
)
return
render_template
(
"
protocols-list.html
"
,
protocols
=
protocols
,
protocols_table
=
protocols_table
,
search_form
=
search_form
,
page
=
page
,
page_count
=
page_count
,
page_diff
=
config
.
PAGE_DIFF
,
protocoltype_id
=
protocoltype_id
,
search_term
=
search_term
,
state_open
=
state_open
,
page_length
=
page_length
,
max_page_length_exp
=
max_page_length_exp
)
...
@@ -848,7 +848,7 @@ def list_todos():
...
@@ -848,7 +848,7 @@ def list_todos():
page
=
0
page
=
0
begin_index
=
page
*
page_length
begin_index
=
page
*
page_length
end_index
=
(
page
+
1
)
*
page_length
end_index
=
(
page
+
1
)
*
page_length
max_page_length_exp
=
math
.
ceil
(
math
.
log10
(
len
(
todos
)))
max_page_length_exp
=
math
.
ceil
(
math
.
log10
(
len
(
todos
)))
if
len
(
todos
)
>
0
else
1
todos
=
todos
[
begin_index
:
end_index
]
todos
=
todos
[
begin_index
:
end_index
]
todos_table
=
TodosTable
(
todos
)
todos_table
=
TodosTable
(
todos
)
return
render_template
(
"
todos-list.html
"
,
todos
=
todos
,
todos_table
=
todos_table
,
search_form
=
search_form
,
page
=
page
,
page_count
=
page_count
,
page_diff
=
config
.
PAGE_DIFF
,
protocoltype_id
=
protocoltype_id
,
search_term
=
search_term
,
state_open
=
state_open
,
page_length
=
page_length
,
max_page_length_exp
=
max_page_length_exp
)
return
render_template
(
"
todos-list.html
"
,
todos
=
todos
,
todos_table
=
todos_table
,
search_form
=
search_form
,
page
=
page
,
page_count
=
page_count
,
page_diff
=
config
.
PAGE_DIFF
,
protocoltype_id
=
protocoltype_id
,
search_term
=
search_term
,
state_open
=
state_open
,
page_length
=
page_length
,
max_page_length_exp
=
max_page_length_exp
)
...
@@ -1008,7 +1008,7 @@ def list_decisions():
...
@@ -1008,7 +1008,7 @@ def list_decisions():
page
=
0
page
=
0
begin_index
=
page
*
page_length
begin_index
=
page
*
page_length
end_index
=
(
page
+
1
)
*
page_length
end_index
=
(
page
+
1
)
*
page_length
max_page_length_exp
=
math
.
ceil
(
math
.
log10
(
len
(
decisions
)))
max_page_length_exp
=
math
.
ceil
(
math
.
log10
(
len
(
decisions
)))
if
len
(
decisions
)
>
0
else
1
decisions
=
decisions
[
begin_index
:
end_index
]
decisions
=
decisions
[
begin_index
:
end_index
]
decisions_table
=
DecisionsTable
(
decisions
)
decisions_table
=
DecisionsTable
(
decisions
)
return
render_template
(
"
decisions-list.html
"
,
decisions
=
decisions
,
decisions_table
=
decisions_table
,
search_form
=
search_form
,
page
=
page
,
page_count
=
page_count
,
page_diff
=
config
.
PAGE_DIFF
,
protocoltype_id
=
protocoltype_id
,
search_term
=
search_term
,
decisioncategory_id
=
decisioncategory_id
,
page_length
=
page_length
,
max_page_length_exp
=
max_page_length_exp
)
return
render_template
(
"
decisions-list.html
"
,
decisions
=
decisions
,
decisions_table
=
decisions_table
,
search_form
=
search_form
,
page
=
page
,
page_count
=
page_count
,
page_diff
=
config
.
PAGE_DIFF
,
protocoltype_id
=
protocoltype_id
,
search_term
=
search_term
,
decisioncategory_id
=
decisioncategory_id
,
page_length
=
page_length
,
max_page_length_exp
=
max_page_length_exp
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment