Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
visualizer-embed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Owen Graham
visualizer-embed
Commits
ac235f47
Verified
Commit
ac235f47
authored
3 years ago
by
Owen Graham
Browse files
Options
Downloads
Patches
Plain Diff
Rename template-generated JavaScript constants
parent
8baa9282
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
visualizer/static/script.js
+6
-6
6 additions, 6 deletions
visualizer/static/script.js
visualizer/templates/base.html
+2
-2
2 additions, 2 deletions
visualizer/templates/base.html
with
8 additions
and
8 deletions
visualizer/static/script.js
+
6
−
6
View file @
ac235f47
...
...
@@ -3,7 +3,7 @@
*/
function
getYears
(
n
)
{
const
station
=
selectVal
(
suffixID
(
'
station
'
,
n
));
const
years
=
recordYears
[
station
];
const
years
=
RECORD_YEARS
[
station
];
appendYears
(
years
,
n
);
}
...
...
@@ -12,7 +12,7 @@ function getYears(n) {
*/
function
boxplotGetYears
()
{
const
station
=
selectVal
(
'
station
'
);
const
years
=
recordYears
[
station
];
const
years
=
RECORD_YEARS
[
station
];
appendYears
(
years
,
1
);
appendYears
(
years
,
2
);
}
...
...
@@ -48,7 +48,7 @@ function indexVisualize() {
return
;
}
setSources
(
sourceLink
(
params
.
station
,
params
.
year
));
visualize
(
`
${
$
SCRIPT_ROOT
}
/plot`
,
params
);
visualize
(
`
${
SCRIPT_ROOT
}
/plot`
,
params
);
}
function
overlayVisualize
()
{
...
...
@@ -64,7 +64,7 @@ function overlayVisualize() {
}
setSources
(
sourceLink
(
params
.
station1
,
params
.
year1
,
1
),
sourceLink
(
params
.
station2
,
params
.
year2
,
2
));
visualize
(
`
${
$
SCRIPT_ROOT
}
/plot/overlay`
,
params
);
visualize
(
`
${
SCRIPT_ROOT
}
/plot/overlay`
,
params
);
}
function
boxplotVisualize
()
{
...
...
@@ -79,7 +79,7 @@ function boxplotVisualize() {
}
setSources
(
sourceLink
(
params
.
station
,
params
.
year1
));
// XXX No year 2?
visualize
(
`
${
$
SCRIPT_ROOT
}
/plot/boxplot`
,
params
);
visualize
(
`
${
SCRIPT_ROOT
}
/plot/boxplot`
,
params
);
}
/**
...
...
@@ -103,7 +103,7 @@ function sourceLink(station, year, n) {
a
.
text
=
`
${
suffixTitle
(
'
Source
'
,
n
)}
: AMRDC Data Repository`
;
a
.
title
=
'
AMRDC Data Repository
'
;
div
.
appendChild
(
a
);
fetch
(
`
${
$
SCRIPT_ROOT
}
/record/link
${
paramString
({
station
,
year
})}
`
)
fetch
(
`
${
SCRIPT_ROOT
}
/record/link
${
paramString
({
station
,
year
})}
`
)
.
then
(
response
=>
response
.
json
())
.
then
(
response
=>
{
a
.
href
=
response
;
...
...
This diff is collapsed.
Click to expand it.
visualizer/templates/base.html
+
2
−
2
View file @
ac235f47
...
...
@@ -11,8 +11,8 @@
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='style.css') }}"
>
<link
rel=
"stylesheet"
href=
"https://amrdc.ssec.wisc.edu/wp-test/wp-content/themes/amrdc-theme/dist/fonts/uw160/fonts.css?ver=1.0.0"
>
<script>
const
$
SCRIPT_ROOT
=
{{
request
.
script_root
|
tojson
}};
const
recordYears
=
{{
g
.
record_years
|
tojson
}};
const
SCRIPT_ROOT
=
{{
request
.
script_root
|
tojson
}};
const
RECORD_YEARS
=
{{
g
.
record_years
|
tojson
}};
</script>
<script
defer
src=
"{{ url_for('static', filename='script.js') }}"
></script>
</head>
...
...
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