open-consul/ui/packages/consul-ui/app/models/role.js
John Cowen 148b18b28c
ui: Search/filtering 'Filtered by:' search status (#9442)
Adds a 'status' for the filtering/searching in the UI, without this its not super clear that you are filtering a recordset due to the menu selections being hidden once closed. You can also use the pills in this status view to delete individual filters.
2021-01-25 18:13:54 +00:00

28 lines
939 B
JavaScript

import Model, { attr } from '@ember-data/model';
export const PRIMARY_KEY = 'uid';
export const SLUG_KEY = 'ID';
export default class Role extends Model {
@attr('string') uid;
@attr('string') ID;
@attr('string') Datacenter;
@attr('string') Namespace;
@attr('string', { defaultValue: () => '' }) Name;
@attr('string', { defaultValue: () => '' }) Description;
@attr({ defaultValue: () => [] }) Policies;
@attr({ defaultValue: () => [] }) ServiceIdentities;
@attr({ defaultValue: () => [] }) NodeIdentities;
@attr('number') SyncTime;
@attr('number') CreateIndex;
@attr('number') ModifyIndex;
// frontend only for ordering where CreateIndex can't be used i.e. for when
// we need to order items that aren't yet saved to the backend, for example
// in the role-selector
@attr('number') CreateTime;
// TODO: Figure out whether we need this or not
@attr() Datacenters; // string[]
@attr('string') Hash;
}