2018-05-15 12:01:26 +00:00
|
|
|
/*
|
|
|
|
* Wazuh app - Factory to store loaded visualizations
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 Wazuh, Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Find more information about this on the LICENSE file.
|
|
|
|
*/
|
2018-06-15 10:42:57 +00:00
|
|
|
import { uiModules } from 'ui/modules'
|
2018-05-15 12:01:26 +00:00
|
|
|
|
2018-06-15 10:42:57 +00:00
|
|
|
const app = uiModules.get('app/wazuh', []);
|
2018-05-15 12:01:26 +00:00
|
|
|
|
2018-08-20 07:00:50 +00:00
|
|
|
class LoadedVisualizations {
|
|
|
|
constructor(){
|
|
|
|
this.list = [];
|
|
|
|
}
|
2018-05-15 12:01:26 +00:00
|
|
|
|
2018-08-20 07:00:50 +00:00
|
|
|
addItem(item) {
|
|
|
|
this.list.push(item);
|
2018-05-15 12:01:26 +00:00
|
|
|
}
|
|
|
|
|
2018-08-20 07:00:50 +00:00
|
|
|
getList() {
|
|
|
|
return this.list;
|
2018-05-15 12:01:26 +00:00
|
|
|
}
|
|
|
|
|
2018-08-20 07:00:50 +00:00
|
|
|
removeAll() {
|
|
|
|
this.list = [];
|
2018-05-15 12:01:26 +00:00
|
|
|
}
|
2018-08-20 07:00:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
app.service('loadedVisualizations', LoadedVisualizations);
|