node-build-monitor icon indicating copy to clipboard operation
node-build-monitor copied to clipboard

Move color-definition of build-state to global scope

Open ehmkah opened this issue 5 years ago • 1 comments

Many different build-systems are supported and the state of the build is mapped to a color. This mapping is implemented in getBuildStatus. It would be nice to have a global defined mapping of states to color. It would make it

  • easier to define which color could be expected especially if you show different build-systems simultaneously
  • easier to define themes where the colors of build-state could be changed too (no idea whether thats useful)
  • easier to integrate new build-systems because colors are already defined

e.g for such a mapping could be (taken from https://github.com/marcells/node-build-monitor/blob/master/app/services/Tfs.js)

 const colorScheme = Object.freeze({
    succeeded:          'Green',
    partiallySucceeded: '#F8A800',
    failed:             'Red',
    canceled:           'Gray',
    inProgress:         '#0078D7',
    completed:          'Green',
    cancelling:         '#0078D7',
    postponed:          'Gray',
    notStarted:         'Gray',
    all:                'Gray'
  });

ehmkah avatar Oct 08 '20 18:10 ehmkah

Good idea. You can implement it, if you want to.

marcells avatar Oct 09 '20 16:10 marcells