From 56e71d7c765fa8ae2953126e2cbe512ef7f23a2d Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Thu, 28 Feb 2019 19:22:28 -0500 Subject: [PATCH] Label all deprecated services as such (#3120) * Label all deprecated services as such This will change service_requests_total{category="other",family="cocoapods",service="cocoapods_apps"} 76 to service_requests_total{category="other",family="cocoapods",service="deprecated_cocoapods_apps"} 76 * Fix tests --- core/base-service/deprecated-service.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/base-service/deprecated-service.js b/core/base-service/deprecated-service.js index f81c2014a5..c844070f28 100644 --- a/core/base-service/deprecated-service.js +++ b/core/base-service/deprecated-service.js @@ -27,12 +27,11 @@ function deprecatedService(attrs) { return class DeprecatedService extends BaseService { static get name() { - return ( - name || - `Deprecated${camelcase(route.base.replace(/\//g, '_'), { - pascalCase: true, - })}` - ) + return name + ? `Deprecated${name}` + : `Deprecated${camelcase(route.base.replace(/\//g, '_'), { + pascalCase: true, + })}` } static get category() {