mirror of
https://github.com/status-im/consul.git
synced 2025-01-19 02:03:00 +00:00
4d13e31ae0
* Create BindingRule adapter and tests * Create BindingRule serializer and test * Create BindingRule model and repository * Add binding-rules mock data * Create binding-rules router and call endpoint * Create Binding rules tab * Create and use BindingView component * Create empty state for BindingView * Remove binding rule requestForQueryRecord endpoint and tests * Update binding rules selector to be monospaced * Add bind type tooltip * Create and Tabular-dl styling component * Update hr tag global styling * Rename BindingView to BindingList and refactor * Add translations for bind types tooltip info * Remove unused endpoint * Refactor based on review notes
33 lines
872 B
JavaScript
33 lines
872 B
JavaScript
import RepositoryService from 'consul-ui/services/repository';
|
|
import statusFactory from 'consul-ui/utils/acls-status';
|
|
import isValidServerErrorFactory from 'consul-ui/utils/http/acl/is-valid-server-error';
|
|
import { PRIMARY_KEY, SLUG_KEY } from 'consul-ui/models/binding-rule';
|
|
import dataSource from 'consul-ui/decorators/data-source';
|
|
|
|
const isValidServerError = isValidServerErrorFactory();
|
|
const status = statusFactory(isValidServerError, Promise);
|
|
const MODEL_NAME = 'binding-rule';
|
|
|
|
export default class BindingRuleService extends RepositoryService {
|
|
getModelName() {
|
|
return MODEL_NAME;
|
|
}
|
|
|
|
getPrimaryKey() {
|
|
return PRIMARY_KEY;
|
|
}
|
|
|
|
getSlugKey() {
|
|
return SLUG_KEY;
|
|
}
|
|
|
|
@dataSource('/:ns/:dc/binding-rules')
|
|
async findAllByDatacenter() {
|
|
return super.findAllByDatacenter(...arguments);
|
|
}
|
|
|
|
status(obj) {
|
|
return status(obj);
|
|
}
|
|
}
|