Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Taiko Web
Commits
f726ecdd
Commit
f726ecdd
authored
Dec 05, 2018
by
Bui
Committed by
GitHub
Dec 05, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #90 from bui/uncache-views
add query string to view requests
parents
ca90d4ae
ac23292f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
app.py
app.py
+10
-3
public/src/js/loader.js
public/src/js/loader.js
+2
-1
No files found.
app.py
View file @
f726ecdd
...
...
@@ -44,6 +44,7 @@ def get_config():
if
not
config
.
get
(
'assets_baseurl'
):
config
[
'assets_baseurl'
]
=
''
.
join
([
request
.
host_url
,
'assets'
])
+
'/'
config
[
'_version'
]
=
get_version
()
return
config
...
...
@@ -118,6 +119,14 @@ def get_tja_preview(tja):
return
0
def
get_version
():
version
=
None
if
os
.
path
.
isfile
(
'version.json'
):
version
=
json
.
load
(
open
(
'version.json'
,
'r'
))
return
version
@
app
.
teardown_appcontext
def
close_connection
(
exception
):
db
=
getattr
(
g
,
'_database'
,
None
)
...
...
@@ -127,9 +136,7 @@ def close_connection(exception):
@
app
.
route
(
'/'
)
def
route_index
():
version
=
None
if
os
.
path
.
isfile
(
'version.json'
):
version
=
json
.
load
(
open
(
'version.json'
,
'r'
))
version
=
get_version
()
return
render_template
(
'index.html'
,
version
=
version
,
config
=
get_config
())
...
...
public/src/js/loader.js
View file @
f726ecdd
...
...
@@ -84,7 +84,8 @@ class Loader{
assets
.
views
.
forEach
(
name
=>
{
var
id
=
this
.
getFilename
(
name
)
this
.
promises
.
push
(
this
.
ajax
(
"
src/views/
"
+
name
).
then
(
page
=>
{
var
qs
=
gameConfig
.
_version
?
'
?
'
+
gameConfig
.
_version
.
commit_short
:
'
?
'
this
.
promises
.
push
(
this
.
ajax
(
"
src/views/
"
+
name
+
qs
).
then
(
page
=>
{
assets
.
pages
[
id
]
=
page
}))
})
...
...
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