Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSWeb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
VIPS
VIPSWeb
Commits
672cae6f
Commit
672cae6f
authored
6 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Fixing viewing today's observations on frontpage and observations page
parent
14095d91
Branches
Branches containing commit
No related tags found
1 merge request
!2
Spotit multi org
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
VIPSWeb/static/js/frontpage.js
+1
-0
1 addition, 0 deletions
VIPSWeb/static/js/frontpage.js
observations/views.py
+1
-1
1 addition, 1 deletion
observations/views.py
with
2 additions
and
1 deletion
VIPSWeb/static/js/frontpage.js
+
1
−
0
View file @
672cae6f
...
...
@@ -72,6 +72,7 @@ function cacheObservations(callback)
{
var
systemTime
=
moment
().
add
(
settings
.
systemTimeOffsetMonths
,
"
months
"
);
var
from
=
systemTime
.
format
(
"
YYYY
"
)
+
"
-01-01
"
;
// XXXX-01-01
systemTime
.
add
(
1
,
'
days
'
);
var
to
=
systemTime
.
format
(
"
YYYY-MM-DD
"
);
var
uuidParam
=
settings
.
userUuid
!=
null
?
"
&userUUID=
"
+
settings
.
userUuid
:
""
;
//$.getJSON(settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/rest/observation/broadcast/list/" + settings.vipsOrganizationId, function( json ) {
...
...
This diff is collapsed.
Click to expand it.
observations/views.py
+
1
−
1
View file @
672cae6f
...
...
@@ -47,7 +47,7 @@ def index(request):
if
request
.
GET
.
get
(
"
to
"
,
None
)
is
not
None
:
date_to
=
datetime
.
strptime
(
request
.
GET
[
"
to
"
],
"
%Y-%m-%d
"
)
else
:
date_to
=
datetime
.
now
()
+
relativedelta
(
months
=
settings
.
SYSTEM_TIME_OFFSET_MONTHS
)
date_to
=
datetime
.
now
()
+
relativedelta
(
months
=
settings
.
SYSTEM_TIME_OFFSET_MONTHS
)
+
relativedelta
(
days
=
1
)
#date_to = datetime.strptime(request.GET.get("to", "%s-12-31" % (datetime.now() + relativedelta(months = settings.SYSTEM_TIME_OFFSET_MONTHS)).year),"%Y-%m-%d")
period_days
=
date_to
-
date_from
current_day_in_period
=
(
datetime
.
now
()
+
relativedelta
(
months
=
settings
.
SYSTEM_TIME_OFFSET_MONTHS
))
-
date_from
...
...
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