e0326c3b0a
This gives more prominence to 'Service Instances' as opposed to 'Services'. It also begins to surface Connect related 'nouns' such as 'Proxies' and 'Upstreams' and begins to interconnect them giving more visibility to operators. Various smaller changes: 1. Move healthcheck-status component to healthcheck-output 2. Create a new healthcheck-status component for showing the number of checks plus its icon 3. Create a new healthcheck-info component to group multiple statuses plus a different view if there are no checks 4. Componentize tag-list
21 lines
844 B
JavaScript
21 lines
844 B
JavaScript
import Adapter from './application';
|
|
import { PRIMARY_KEY, SLUG_KEY } from 'consul-ui/models/proxy';
|
|
import { OK as HTTP_OK } from 'consul-ui/utils/http/status';
|
|
export default Adapter.extend({
|
|
urlForQuery: function(query, modelName) {
|
|
if (typeof query.id === 'undefined') {
|
|
throw new Error('You must specify an id');
|
|
}
|
|
// https://www.consul.io/api/catalog.html#list-nodes-for-connect-capable-service
|
|
return this.appendURL('catalog/connect', [query.id], this.cleanQuery(query));
|
|
},
|
|
handleResponse: function(status, headers, payload, requestData) {
|
|
let response = payload;
|
|
if (status === HTTP_OK) {
|
|
const url = this.parseURL(requestData.url);
|
|
response = this.handleBatchResponse(url, response, PRIMARY_KEY, SLUG_KEY);
|
|
}
|
|
return this._super(status, headers, response, requestData);
|
|
},
|
|
});
|