Unify remaining service order and enforce (#3359)

Ref #3353
This commit is contained in:
Paul Melnikow
2019-04-24 16:53:33 -04:00
committed by GitHub
parent f8aeb56129
commit 0088a9d0da
38 changed files with 665 additions and 665 deletions

View File

@@ -111,16 +111,6 @@ module.exports = class BaseService {
throw new Error(`Route not defined for ${this.name}`)
}
static get _cacheLength() {
const cacheLengths = {
build: 30,
license: 3600,
version: 300,
debug: 60,
}
return cacheLengths[this.category]
}
/**
* Example URLs for this service. These should use the format
* specified in `route`, and can be used to demonstrate how to use badges for
@@ -153,6 +143,16 @@ module.exports = class BaseService {
return []
}
static get _cacheLength() {
const cacheLengths = {
build: 30,
license: 3600,
version: 300,
debug: 60,
}
return cacheLengths[this.category]
}
/**
* Default data for the badge. Can include label, logo, and color. These
* defaults are used if the value is neither included in the service data
@@ -162,6 +162,10 @@ module.exports = class BaseService {
return {}
}
static render(props) {
throw new Error(`render() function not implemented for ${this.name}`)
}
static validateDefinition() {
assertValidCategory(this.category, `Category for ${this.name}`)
@@ -209,10 +213,6 @@ module.exports = class BaseService {
return result
}
static render(props) {
throw new Error(`render() function not implemented for ${this.name}`)
}
constructor({ sendAndCacheRequest }, { handleInternalErrors }) {
this._requestFetcher = sendAndCacheRequest
this._handleInternalErrors = handleInternalErrors