2019-12-17 18:47:37 +00:00
|
|
|
import RepositoryService from 'consul-ui/services/repository';
|
2020-02-21 16:48:54 +00:00
|
|
|
import { PRIMARY_KEY, SLUG_KEY } from 'consul-ui/models/nspace';
|
2019-12-17 18:47:37 +00:00
|
|
|
|
|
|
|
const modelName = 'nspace';
|
|
|
|
const DEFAULT_NSPACE = 'default';
|
|
|
|
export default RepositoryService.extend({
|
2020-02-21 16:48:54 +00:00
|
|
|
getPrimaryKey: function() {
|
|
|
|
return PRIMARY_KEY;
|
|
|
|
},
|
|
|
|
getSlugKey: function() {
|
|
|
|
return SLUG_KEY;
|
|
|
|
},
|
2019-12-17 18:47:37 +00:00
|
|
|
getModelName: function() {
|
|
|
|
return modelName;
|
|
|
|
},
|
|
|
|
findAll: function(configuration = {}) {
|
|
|
|
return Promise.resolve([]);
|
|
|
|
},
|
|
|
|
getActive: function() {
|
|
|
|
return {
|
|
|
|
Name: DEFAULT_NSPACE,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
authorize: function(dc, nspace) {
|
|
|
|
return Promise.resolve([]);
|
|
|
|
},
|
|
|
|
});
|