PythonNewbie
PythonNewbie

Reputation: 1163

How to display HTML in Grafana 7

I have been having trouble upgrading from Grafana 6 to 7! I have currently trying to upgrade to the newer version and I did come up with some issues where I am not able to display any HTML anymore. See the attached image:

Grafana image

<center>
<br />
<table style="border: none;">
    <tr style="border: none;">
        <td style="border: none;">
            <select id="kw-type" name="kw-type" class="btn navbar-button gf-timepicker-nav-btn" style="width: 130px;">
                <option value="positive">POSITIVE</option>
                <option value="negative">NEGATIVE</option>
            </select>
        </td>
        <td style="border: none;">
            <input type="text" id="kw-keyword" name="kw-keyword" class="btn navbar-button gf-timepicker-nav-btn" style="text-align: left;" />
        </td>
    </tr>
    <tr>
        <td colspan="2" style="border: none; text-align: center;">
            <center>
                <button
                    onclick="insertKeywords(1,document.getElementById('kw-type').value,document.getElementById('kw-keyword').value,'popup','refresh');document.getElementById('kw-keyword').value=''"
                    class="btn navbar-button gf-timepicker-nav-btn"
                >
                    Add to watchlist
                </button>
            </center>
        </td>
    </tr>
</table>
</center>

and it worked fine when I had it in Grafana 6 but now as you can see it only displays the code now.

I wonder how I can add HTML Code in grafana like I had it in 6 before :'(

Upvotes: 0

Views: 7668

Answers (1)

rohatgisanat
rohatgisanat

Reputation: 828

You need to set disable_sanitize_html = true under the Panels section. disable_sanitize_html HTML sanitization

Upvotes: 1

Related Questions