mirror of
https://github.com/yldio/copilot.git
synced 2024-12-29 05:10:05 +02:00
style(cp-frontend): format
This commit is contained in:
parent
441d4118d7
commit
468604058e
@ -11,7 +11,10 @@ export const MetricNames = [
|
||||
|
||||
export const withServiceMetricsPolling = ({
|
||||
pollingInterval = 1000, // in milliseconds
|
||||
getPreviousEnd = () => moment().utc().format()
|
||||
getPreviousEnd = () =>
|
||||
moment()
|
||||
.utc()
|
||||
.format()
|
||||
}) => {
|
||||
return WrappedComponent => {
|
||||
return class extends Component {
|
||||
@ -68,12 +71,15 @@ export const withServiceMetricsGql = ({
|
||||
...instance,
|
||||
metrics: instance.metrics.map(metric => ({
|
||||
...metric,
|
||||
metrics: uniqBy(getPreviousMetrics(
|
||||
previousResult,
|
||||
service.id,
|
||||
instance.id,
|
||||
metric.name
|
||||
).concat(metric.metrics), 'time')
|
||||
metrics: uniqBy(
|
||||
getPreviousMetrics(
|
||||
previousResult,
|
||||
service.id,
|
||||
instance.id,
|
||||
metric.name
|
||||
).concat(metric.metrics),
|
||||
'time'
|
||||
)
|
||||
}))
|
||||
}))
|
||||
}))
|
||||
|
@ -77,7 +77,13 @@ export default compose(
|
||||
return false;
|
||||
}
|
||||
|
||||
return get(service, 'instances[0].metrics[0].end', moment().utc().format());
|
||||
return get(
|
||||
service,
|
||||
'instances[0].metrics[0].end',
|
||||
moment()
|
||||
.utc()
|
||||
.format()
|
||||
);
|
||||
}
|
||||
}),
|
||||
withNotFound([GqlPaths.DEPLOYMENT_GROUP, GqlPaths.SERVICES])
|
||||
|
@ -110,9 +110,7 @@ export class ServiceList extends Component {
|
||||
? 'An error occurred while attempting to restart your service.'
|
||||
: '';
|
||||
|
||||
renderedError = (
|
||||
<ErrorMessage title="Ooops!" message={message} />
|
||||
);
|
||||
renderedError = <ErrorMessage title="Ooops!" message={message} />;
|
||||
}
|
||||
|
||||
const serviceList = sortBy(services, ['slug'])
|
||||
@ -191,7 +189,12 @@ export default compose(
|
||||
.filter(Boolean)
|
||||
.shift();
|
||||
|
||||
return previousEnd || moment().utc().format();
|
||||
return (
|
||||
previousEnd ||
|
||||
moment()
|
||||
.utc()
|
||||
.format()
|
||||
);
|
||||
}
|
||||
}),
|
||||
UiConnect,
|
||||
|
@ -58,7 +58,11 @@ const GraphNodeInfo = ({ data, pos }) => {
|
||||
))
|
||||
);
|
||||
|
||||
const healthy = <HealthyIcon healthy={instancesHealthy.total === instancesHealthy.healthy} />;
|
||||
const healthy = (
|
||||
<HealthyIcon
|
||||
healthy={instancesHealthy.total === instancesHealthy.healthy}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<g transform={`translate(${x}, ${y})`}>
|
||||
|
Loading…
Reference in New Issue
Block a user