Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pony
tsview
Commits
1f02d6b73022
Commit
2ed88a08
authored
Aug 06, 2019
by
André Espaze
Browse files
Add permalink and history urls
parent
eb5ebcbf7800
Changes
1
Hide whitespace changes
Inline
Side-by-side
elm/Plot.elm
View file @
1f02d6b7
...
@@ -16,7 +16,6 @@ import LruCache exposing (LruCache)
...
@@ -16,7 +16,6 @@ import LruCache exposing (LruCache)
import
Tachyons
.
Classes
as
T
import
Tachyons
.
Classes
as
T
import
Task
exposing
(
Task
)
import
Task
exposing
(
Task
)
import
Time
import
Time
import
Url
import
Url
.
Builder
as
UB
import
Url
.
Builder
as
UB
...
@@ -315,12 +314,47 @@ view model =
...
@@ -315,12 +314,47 @@ view model =
else
else
children
children
)
)
urls
=
let
cls
=
classes
[
T
.
link
,
T
.
blue
,
T
.
lh_title
]
permalink
=
let
url
=
UB
.
relative
[
"
tsview"
]
(
List
.
map
(
\
x
->
UB
.
string
"
series"
x
)
model
.
selectedSeries
)
in
a
[
A
.
href
url
,
cls
]
[
text
"
Permalink"
]
histories
=
List
.
map
(
\
x
->
a
[
A
.
href
<|
UB
.
relative
[
"
tshistory"
,
x
]
[]
,
A
.
target
"
_blank"
,
cls
]
[
text
<|
"
View "
++
x
++
"
history"
]
)
model
.
selectedSeries
in
ul
[
classes
[
T
.
list
,
T
.
mt3
,
T
.
mb0
]
]
(
List
.
map
(
\
x
->
li
[
classes
[
T
.
pv2
]
]
[
x
])
(
permalink
::
histories
)
)
in
in
div
[
classes
[
T
.
bg_light_blue
]
]
div
[]
[
header
[]
[
selector
]
[
header
[
classes
[
T
.
bg_light_blue
]
]
[
selector
]
,
div
[
A
.
id
plotDiv
]
[]
,
div
[
A
.
id
plotDiv
]
[]
,
plotFigure
[
A
.
attribute
"
args"
args
]
[]
,
plotFigure
[
A
.
attribute
"
args"
args
]
[]
,
footer
[]
[]
,
footer
[]
[
urls
]
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment