Git Product home page Git Product logo

mozaik-ext-travis's Introduction

Mozaïk travis widgets

License Travis CI NPM version Coverage Status widget count

Mozaïk travis dashboard

This branch contains code for the version compatible with Mozaïk v2, if you're looking for v1, please use mozaik-1 branch.

Demo

You can see a live demo of the widgets here

Install

Install extension:

# npm
npm install -S @mozaik/ext-travis
# yarn
yarn add @mozaik/ext-travis

Register client api

You should register extension's client by adding this to register_apis.js:

// …
Mozaik.registerApi('travis', require('@mozaik/ext-travis/client'))

Register widgets

You should register extension's widget by adding this to src/register_extensions.js:

import { Registry } from '@mozaik/ui'
import travis from '@mozaik/ext-travis'
// … 
Registry.addExtensions({
    travis,
})

Client Configuration

In order to use the Mozaïk travis extension, you must also configure its client. Configuration is loaded from environment variables.

env key required description
TRAVIS_API_TOKEN yes your personal travis API token

Widgets

BuildHistogram

BuildHistogram widget

Display travis repo build histogram (duration / build number / status)

parameters

key required description
owner yes repo owner
repository yes repo name
limit no limit displayed builds, default to 20
title no override default title, default to ${owner}/${repository} builds

usage

- extension:  travis
  widget:     BuildHistogram
  owner:      plouc
  repository: mozaik
  columns:    1
  rows:       1
  x:          0
  y:          0

BuildHistory

BuildHistory widget

Display travis repo build history

parameters

key required description
owner yes repo owner
repository yes repo name
limit no limit displayed builds, default to 10
title no override default title, default to ${owner}/${repository} builds

usage

- extension:  travis
  widget:     BuildHistory
  owner:      plouc
  repository: mozaik
  columns:    1
  rows:       1
  x:          0
  y:          0

LatestRepositoryBuild

LatestRepositoryBuild widget

Show info about latest repository build for default branch

parameters

key required description
owner yes repo owner
repository yes repo name
- extension:  travis
  widget:     LatestRepositoryBuild
  owner:      plouc
  repository: mozaik
  columns:    1
  rows:       1
  x:          0
  y:          0

Repository

Repository widgets

Display travis repository info

parameters

key required description
owner yes repo owner
repository yes repo name
title no override default title, default to ${owner}/${repository}

usage

- extension:  travis
  widget:     Repository
  owner:      plouc
  repository: mozaik
  columns:    1
  rows:       1
  x:          0
  y:          0

RepositoryBuildsStats

RepositoryBuildsStats widget

Show global stats about repository builds

parameters

key required description
owner yes repo owner
repository yes repo name
title no override default title, default to ${owner}/${repository} builds

usage

- extension:  travis
  widget:     RepositoryBuildsStats
  owner:      plouc
  repository: mozaik
  columns:    1
  rows:       1
  x:          0
  y:          0

mozaik-ext-travis's People

Contributors

plouc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mozaik-ext-travis's Issues

Uncaught exception leads to crashing server

item info notes
node version v6.3.0 output from node --version
npm version 3.10.3 output from npm --version
mozaik-ext-travis version 1.1.0 available in project's package.json
mozaik version 1.4.4 available in project's package.json
mozaik-demo master version of the demo used

Expected behavior

Handle Travis errors and exceptions properly (instead of crashing the server).

Actual behavior

code = "ECONNRESET"
message = "socket hang up"

leads to

/mozaik-demo/node_modules/mozaik-ext-travis/src/client.js:84
                res.builds.forEach(function (build) {
                   ^

TypeError: Cannot read property 'builds' of undefined
    at client.js:59:17
    at /mozaik-demo/node_modules/travis-ci/lib/travis-ci.js:51:21

Steps to reproduce

  1. Launch the mozaik-demo
  2. Join a crappy public WiFi

Scroll bars on histograms + Incorrect sizes

item info notes
node version v6.3.0 output from node --version
npm version 3.10.3 output from npm --version
mozaik-ext-travis version 1.1.0 available in project's package.json
mozaik version 1.4.4 available in project's package.json
mozaik-demo version version of the demo used, depends on which method you used to setup your Mozaïk dashboard
component name of the extension's component or client if it's related to the extension's client
browser Chrome Version 54.0.2840.71 (64-bit) browser used, applyable if the issue is not related to the client

Expected behavior

Histogram charts will not cause scroll bars to occur.

Histogram charts will be sized correctly to fit within their boundaries.

Actual behavior

After coming out of F11 (fullscreen):
image

After initial load:
image

On Chrome with no zoom applied, the histograms have some weird behaviour. When doing nothing and simply opening the dashboard, the charts display scroll bars despite looking like they'd fit normally. When changing to full screen (F11) and then coming out, they look even larger.

When entering Fullscreen mode, the scroll bars disappear for a few seconds before appearing again.

Steps to reproduce

Mentioned above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.