mirror of
https://github.com/nasa/openmct.git
synced 2025-01-30 08:04:03 +00:00
Merge pull request #1643 from nasa/open1641
[Open 1641] Change warnings to info messages
This commit is contained in:
commit
23839b05b0
@ -75,6 +75,21 @@ define(
|
||||
].join(""));
|
||||
}
|
||||
|
||||
//Log an info: defaults to "no service provide by"
|
||||
function info(extension, category, message) {
|
||||
var msg = message || "No service provided by";
|
||||
$log.info([
|
||||
msg,
|
||||
" ",
|
||||
category,
|
||||
" ",
|
||||
extension.key,
|
||||
" from bundle ",
|
||||
(extension.bundle || { path: "unknown bundle" }).path,
|
||||
"; skipping."
|
||||
].join(""));
|
||||
}
|
||||
|
||||
// Echo arguments; used to represent groups of non-built-in
|
||||
// extensions as a single dependency.
|
||||
function echoMany() {
|
||||
@ -161,13 +176,13 @@ define(
|
||||
name = makeName("aggregator", service, index);
|
||||
|
||||
if (!service) {
|
||||
return warn(aggregator, "aggregator");
|
||||
return info(aggregator, "aggregator");
|
||||
}
|
||||
|
||||
// Aggregators need other services to aggregate, otherwise they
|
||||
// do nothing.
|
||||
if (!latest[service]) {
|
||||
return warn(
|
||||
return info(
|
||||
aggregator,
|
||||
"aggregator",
|
||||
"No services to aggregate for"
|
||||
|
@ -195,7 +195,8 @@ define(
|
||||
expect(mockApp.service).not.toHaveBeenCalled();
|
||||
|
||||
// Should have gotten one warning for each skipped component
|
||||
expect(mockLog.warn.calls.length).toEqual(3);
|
||||
expect(mockLog.warn.calls.length).toEqual(2);
|
||||
expect(mockLog.info.calls.length).toEqual(1);
|
||||
});
|
||||
|
||||
it("warns about and skips aggregators with zero providers", function () {
|
||||
@ -217,7 +218,7 @@ define(
|
||||
expect(mockApp.service).not.toHaveBeenCalled();
|
||||
|
||||
// Should have gotten a warning
|
||||
expect(mockLog.warn).toHaveBeenCalled();
|
||||
expect(mockLog.info).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("warns about and skips decorators with nothing to decorate", function () {
|
||||
|
@ -115,9 +115,7 @@ define(
|
||||
return (this.telemetryService =
|
||||
$injector.get("telemetryService"));
|
||||
} catch (e) {
|
||||
// $injector should throw if telemetryService
|
||||
// is unavailable or unsatisfiable.
|
||||
$log.warn("Telemetry service unavailable");
|
||||
$log.info("Telemetry service unavailable");
|
||||
return (this.telemetryService = null);
|
||||
}
|
||||
};
|
||||
@ -314,4 +312,3 @@ define(
|
||||
return TelemetryCapability;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -199,7 +199,7 @@ define(
|
||||
|
||||
telemetry.requestData();
|
||||
|
||||
expect(mockLog.warn).toHaveBeenCalled();
|
||||
expect(mockLog.info).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("if a new style telemetry source is available, use it", function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user