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
34d0c083
Commit
34d0c083
authored
Mar 05, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure text panel content is hidden until showdown.js is available
parent
3eb9c5de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
panels/text/module.html
+2
-1
panels/text/module.js
+2
-0
No files found.
panels/text/module.html
View file @
34d0c083
<kibana-panel
ng-controller=
'text'
ng-init=
"init()"
>
<kibana-panel
ng-controller=
'text'
ng-init=
"init()"
>
<!--<p ng-style="panel.style" ng-bind-html-unsafe="panel.content | striphtml | newlines"></p>-->
<!--<p ng-style="panel.style" ng-bind-html-unsafe="panel.content | striphtml | newlines"></p>-->
<markdown>
<markdown
ng-show=
"ready"
>
{{panel.content}}
{{panel.content}}
</markdown>
</markdown>
</kibana-panel>
</kibana-panel>
\ No newline at end of file
panels/text/module.js
View file @
34d0c083
...
@@ -10,6 +10,7 @@ angular.module('kibana.text', [])
...
@@ -10,6 +10,7 @@ angular.module('kibana.text', [])
_
.
defaults
(
$scope
.
panel
,
_d
);
_
.
defaults
(
$scope
.
panel
,
_d
);
$scope
.
init
=
function
()
{
$scope
.
init
=
function
()
{
$scope
.
ready
=
false
;
}
}
}).
directive
(
'markdown'
,
function
()
{
}).
directive
(
'markdown'
,
function
()
{
...
@@ -23,6 +24,7 @@ angular.module('kibana.text', [])
...
@@ -23,6 +24,7 @@ angular.module('kibana.text', [])
function
render_panel
()
{
function
render_panel
()
{
var
scripts
=
$LAB
.
script
(
"panels/text/lib/showdown.js"
)
var
scripts
=
$LAB
.
script
(
"panels/text/lib/showdown.js"
)
scripts
.
wait
(
function
(){
scripts
.
wait
(
function
(){
scope
.
ready
=
true
;
var
converter
=
new
Showdown
.
converter
();
var
converter
=
new
Showdown
.
converter
();
var
text
=
scope
.
panel
.
content
.
replace
(
/&/g
,
'&'
)
var
text
=
scope
.
panel
.
content
.
replace
(
/&/g
,
'&'
)
.
replace
(
/>/g
,
'>'
)
.
replace
(
/>/g
,
'>'
)
...
...
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