Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
KIF
AKPlanning
Commits
69f3dd02
Commit
69f3dd02
authored
4 years ago
by
Nadja Geisler
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-akwall-date-range' into 'master'
Restrict AKWall to dates belonging to the corresponding event Closes
#57
See merge request
!20
parents
39a761c1
062ceb9e
Branches
Branches containing commit
No related tags found
1 merge request
!20
Restrict AKWall to dates belonging to the corresponding event
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AKPlan/views.py
+6
-2
6 additions, 2 deletions
AKPlan/views.py
AKPlanning/settings.py
+0
-1
0 additions, 1 deletion
AKPlanning/settings.py
with
6 additions
and
3 deletions
AKPlan/views.py
+
6
−
2
View file @
69f3dd02
...
@@ -60,8 +60,12 @@ class PlanScreenView(PlanIndexView):
...
@@ -60,8 +60,12 @@ class PlanScreenView(PlanIndexView):
def
get_queryset
(
self
):
def
get_queryset
(
self
):
# Determine interesting range (some hours ago until some hours in the future as specified in the settings)
# Determine interesting range (some hours ago until some hours in the future as specified in the settings)
self
.
start
=
datetime
.
now
().
astimezone
(
self
.
event
.
timezone
)
-
timedelta
(
hours
=
settings
.
PLAN_WALL_HOURS_RETROSPECT
)
now
=
datetime
.
now
().
astimezone
(
self
.
event
.
timezone
)
self
.
end
=
self
.
start
+
timedelta
(
hours
=
(
settings
.
PLAN_WALL_HOURS_RETROSPECT
+
settings
.
PLAN_WALL_HOURS_FUTURE
))
if
self
.
event
.
start
<
now
<
self
.
event
.
end
:
self
.
start
=
now
-
timedelta
(
hours
=
settings
.
PLAN_WALL_HOURS_RETROSPECT
)
else
:
self
.
start
=
self
.
event
.
start
self
.
end
=
self
.
event
.
end
# Restrict AK slots to relevant ones
# Restrict AK slots to relevant ones
# This will automatically filter all rooms not needed for the selected range in the orginal get_context method
# This will automatically filter all rooms not needed for the selected range in the orginal get_context method
...
...
This diff is collapsed.
Click to expand it.
AKPlanning/settings.py
+
0
−
1
View file @
69f3dd02
...
@@ -161,7 +161,6 @@ FOOTER_INFO = {
...
@@ -161,7 +161,6 @@ FOOTER_INFO = {
PLAN_MAX_NEXT_AKS
=
10
PLAN_MAX_NEXT_AKS
=
10
# Specify range of plan for screen/projector view
# Specify range of plan for screen/projector view
PLAN_WALL_HOURS_RETROSPECT
=
3
PLAN_WALL_HOURS_RETROSPECT
=
3
PLAN_WALL_HOURS_FUTURE
=
18
# Should the plan use a hierarchy of buildings and rooms?
# Should the plan use a hierarchy of buildings and rooms?
PLAN_SHOW_HIERARCHY
=
True
PLAN_SHOW_HIERARCHY
=
True
# For which time (in seconds) should changes of akslots be highlighted in plan?
# For which time (in seconds) should changes of akslots be highlighted in plan?
...
...
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