mirror of
https://github.com/status-im/consul.git
synced 2025-01-16 00:35:33 +00:00
5c0ec13fb9
* ui: Apply native class codemod to all services * ui: Apply native class codemod to routes * ui: Apply native class codemod to controllers * Fix up ember proxy `content` issue * Add a CreateTime on policy creation * Minor formatting * Convert child based saving to use ec instead of custom approach * Remove custom event source repo wrapping initializer * Repos here are no longer proxy objects revert to using them normally * Remove areas of code that were used to set up source backed repos
44 lines
1.0 KiB
JavaScript
44 lines
1.0 KiB
JavaScript
import Model from 'ember-data/model';
|
|
import attr from 'ember-data/attr';
|
|
import { computed } from '@ember/object';
|
|
|
|
export const PRIMARY_KEY = 'uid';
|
|
export const SLUG_KEY = 'ID';
|
|
|
|
export const MANAGEMENT_ID = '00000000-0000-0000-0000-000000000001';
|
|
|
|
export default Model.extend({
|
|
[PRIMARY_KEY]: attr('string'),
|
|
[SLUG_KEY]: attr('string'),
|
|
Name: attr('string', {
|
|
defaultValue: '',
|
|
}),
|
|
Description: attr('string', {
|
|
defaultValue: '',
|
|
}),
|
|
Rules: attr('string', {
|
|
defaultValue: '',
|
|
}),
|
|
// frontend only for ordering where CreateIndex can't be used
|
|
CreateTime: attr('number', {
|
|
defaultValue: function() {
|
|
return new Date().getTime();
|
|
},
|
|
}),
|
|
//
|
|
isGlobalManagement: computed('ID', function() {
|
|
return this.ID === MANAGEMENT_ID;
|
|
}),
|
|
Datacenter: attr('string'),
|
|
Namespace: attr('string'),
|
|
SyncTime: attr('number'),
|
|
meta: attr(),
|
|
Datacenters: attr(),
|
|
CreateIndex: attr('number'),
|
|
ModifyIndex: attr('number'),
|
|
|
|
template: attr('string', {
|
|
defaultValue: '',
|
|
}),
|
|
});
|