open-nomad/ui/app/services/watch-list.js
Buck Doyle 9b2fb14e51
UI: Update Ember to 3.12 LTS (#6419)
This is mostly deprecation fixes and blueprint changes. There
are some dependency updates too; the changes to Ember
Basic Dropdown necessitated changing it to angle bracket
component invocation. The conversion of the rest of the
templates will happen separately.
2019-10-15 13:32:58 -05:00

25 lines
417 B
JavaScript

import { readOnly } from '@ember/object/computed';
import { copy } from 'ember-copy';
import Service from '@ember/service';
let list = {};
export default Service.extend({
list: readOnly(function() {
return copy(list, true);
}),
init() {
this._super(...arguments);
list = {};
},
getIndexFor(url) {
return list[url] || 1;
},
setIndexFor(url, value) {
list[url] = +value;
},
});