[users at bb.net] buildbot-data issue

Greg MacDonald gmacdonald at trionworlds.com
Thu Nov 5 20:41:17 UTC 2015


I had a typo and now I’m not getting the websocket error. But I still need to know how to point the web page at the master buildbot machine, or if it’s even possible to run them on different machines.

-Greg
From: users [mailto:users-bounces at buildbot.net] On Behalf Of Greg MacDonald
Sent: Thursday, November 05, 2015 12:19 PM
To: Pierre Tardy; users at buildbot.net
Subject: Re: [users at bb.net] buildbot-data issue

That got me a bit further, now I’m getting this:

WebSocket connection to 'ws://localhost:63342/angular_sandbox/app/index.htmlws' failed: Error during WebSocket handshake: Unexpected response code: 404

I’m guessing this is because it doesn’t know where the buildbot master is and it’s on another machine. Where does that get specified?

-Greg

From: Greg MacDonald
Sent: Thursday, November 05, 2015 11:27 AM
To: 'Pierre Tardy'; users at buildbot.net<mailto:users at buildbot.net>
Subject: RE: [users at bb.net] buildbot-data issue

Thanks a lot! I just couldn’t see it for some reason. ☺

From: Pierre Tardy [mailto:tardyp at gmail.com]
Sent: Wednesday, November 04, 2015 11:53 PM
To: Greg MacDonald; users at buildbot.net<mailto:users at buildbot.net>
Subject: Re: [users at bb.net] buildbot-data issue

Hi greg,

as per http://docs.buildbot.net/latest/developer/www.html#dataservice
What you need to inject is the dataService. the module is called bbData (what you need to depend in you angular,module), and the service is dataService.

so you should replace this line
            controller: ['$scope', '$attrs', 'bbData', function($scope, $attrs, dataService) {
by
            controller: ['$scope', '$attrs', 'dataService', function($scope, $attrs, dataService) {
Cheers
Pierre


Le jeu. 5 nov. 2015 à 03:15, Greg MacDonald <gmacdonald at trionworlds.com<mailto:gmacdonald at trionworlds.com>> a écrit :
Hi Everyone,

I’m trying to use the buildbot-data angular service (for 0.9.0b2) for a separate web ui and I’m having problems getting started. Bower installs buildbot-data fine, but I get an error when I try to use it:

Error: [$injector:unpr] Unknown provider: bbDataProvider <- bbData


Here’s the code that tries to use it. It’s not getting past the dependency injection.

angular.module('myApp.buildStatus', ['bbData', 'bbData'])
    .directive("buildStatus", function() {
        return {
            restrict: "E",
            replace: true,
            scope: {
                name: '@',
                builder: '@',
                status: '='
            },
            templateUrl: 'directives/build_status/build_status.html',
            controller: ['$scope', '$attrs', 'bbData', function($scope, $attrs, dataService) {
                $scope.builder = $attrs.builder;
                $scope.name<http://scope.name> = $attrs.name<http://attrs.name>;
                $scope.status = 'unknown';

            }]
        }
    });


App dependency works:

angular.module('myApp', [
    'bbData',
    'ngMaterial',
    'ngRoute',
    'myApp.view1',
    'myApp.view2',
    'myApp.version',
    'myApp.buildStatus'
]).
config(['$routeProvider', '$httpProvider', function($routeProvider, $httpProvider) {
    $routeProvider.otherwise({redirectTo: '/view1'});
    $httpProvider.defaults.useXDomain = true;
    delete $httpProvider.defaults.headers.common['X-Requested-With'];
}]);


And It’s being included like this in index.html

  <script src="bower_components/buildbot-data/dist/scripts.js"></script>

I’m not sure where to go from here. Any help is greatly appreciated. Thx! ☺

-Greg

_______________________________________________
users mailing list
users at buildbot.net<mailto:users at buildbot.net>
https://lists.buildbot.net/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20151105/5f434b4f/attachment.html>


More information about the users mailing list