Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
7919d793
Commit
7919d793
authored
Mar 24, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another cache header fix
parent
a5c38552
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
2 deletions
+30
-2
pkg/cmd/web.go
+2
-2
src/app/features/dashboard/rowCtrl.js
+8
-0
src/app/partials/dashboard.html
+8
-0
src/css/less/panel.less
+12
-0
No files found.
pkg/cmd/web.go
View file @
7919d793
...
...
@@ -66,12 +66,12 @@ func newMacaron() *macaron.Macaron {
func
mapStatic
(
m
*
macaron
.
Macaron
,
dir
string
,
prefix
string
)
{
headers
:=
func
(
c
*
macaron
.
Context
)
{
c
.
Resp
.
Header
()
.
Set
(
"Cache-Control"
,
"public max-age: 3600"
)
c
.
Resp
.
Header
()
.
Set
(
"Cache-Control"
,
"public
,
max-age: 3600"
)
}
if
setting
.
Env
==
setting
.
DEV
{
headers
=
func
(
c
*
macaron
.
Context
)
{
c
.
Resp
.
Header
()
.
Set
(
"Cache-Control"
,
"max-age: 0"
)
c
.
Resp
.
Header
()
.
Set
(
"Cache-Control"
,
"max-age: 0
, must-revalidate
"
)
}
}
...
...
src/app/features/dashboard/rowCtrl.js
View file @
7919d793
...
...
@@ -168,4 +168,12 @@ function (angular, app, _, config) {
};
});
module
.
directive
(
'panelGhostPanel'
,
function
()
{
return
function
(
scope
,
element
)
{
var
dropZoneSpan
=
12
-
scope
.
dashboard
.
rowSpan
(
scope
.
row
);
element
.
find
(
'.panel-container'
).
css
(
'height'
,
scope
.
row
.
height
);
element
[
0
].
style
.
width
=
((
dropZoneSpan
/
1.2
)
*
10
)
+
'%'
;
};
});
});
src/app/partials/dashboard.html
View file @
7919d793
...
...
@@ -86,6 +86,14 @@
<panel-loader
type=
"panel.type"
class=
"panel-margin"
></panel-loader>
</div>
<div
panel-ghost-panel
class=
"panel ghost-panel panel-margin"
>
<div
class=
"panel-container"
>
<div
style=
"text-align: center"
>
<h2>
Add panel
</h2>
</div>
</div>
</div>
<div
panel-drop-zone
class=
"panel panel-drop-zone"
ui-on-drop=
"onDrop($data, row)"
data-drop=
"true"
>
...
...
src/css/less/panel.less
View file @
7919d793
...
...
@@ -169,6 +169,18 @@
}
}
.ghost-panel {
&:hover {
.panel-container {
visibility: visible;
}
}
.panel-container {
visibility: hidden;
border: 1px solid @grayDark;
}
}
.panel-time-info {
font-weight: bold;
float: right;
...
...
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