Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom DashBoard Missing Icon #4220

Open
DC11011100 opened this issue Jul 19, 2018 · 1 comment
Open

Custom DashBoard Missing Icon #4220

DC11011100 opened this issue Jul 19, 2018 · 1 comment

Comments

@DC11011100
Copy link

I've added a custom dashboard as per this documentation. However, as shown in the attached image of my dashboard, the icon is missing.

bb-bug-missing-icon

Visiting font awesome, as mentioned in the documentation example's comments, I notice icon 'area-chart' has been renamed 'chart-area'. I updated to 'chart-area' as shown below in a snippet of my implementation, but the icon remains empty.

import requests
import time

from flask import Flask
from flask import render_template

from buildbot.process.results import statusToString`

app_buildMetrics = Flask('test', root_path=os.path.dirname(__file__))
# this allows to work on the template without having to restart Buildbot
app_buildMetrics.config['TEMPLATES_AUTO_RELOAD'] = True

@app_buildMetrics.route("/index.html")
def main():
    builders = app_buildMetrics.buildbot_api.dataGet("/builders")
    builds = app_buildMetrics.buildbot_api.dataGet("/builds", limit=20)

    # Generate some filler data
    graph_data = []
    from random import randint
    for i in range(500,600):
        graph_data.append(dict(x = i,
                               y = randint(i - 500,100)))

    # Render the updated html and pass in the optional variables to be rendered with
    return render_template('app_buildMetrics.html', 
                           builders   = builders, 
                           builds     = builds,
                           graph_data = graph_data)

def getAppDict(url_suffix, menu_title, flask_app, menu_spot, menu_icon):
    return dict({
                    'name'    : url_suffix,
                    'caption' : menu_title,
                    'app'     : flask_app,
                    'order'   : menu_spot,
                    'icon'    : menu_icon
                })
    
# Add to BB instance
c['www']['plugins']['wsgi_dashboards'] = []
c['www']['plugins']['wsgi_dashboards'].append(getAppDict('build-metrics',
                                                         'Build Metrics',
                                                         app_buildMetrics,
                                                         3,
                                                         u'chart-area'))`

And a corresponding http.log snippet

"xxx.xxx.xxx.xx" - - [31/May/2018:20:01:24 +0000] "GET /fonts/fontawesome-webfont.woff?v=4.1.0 HTTP/1.1" 200 83760 "http://build64-1:8010/styles.css" "Mozilla/5.0 (Windows NT 6.1; Win64; x64;

@scottalthoff
Copy link

I experience this too. Any luck in solving this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants