From 1fff14f0a5e25adaa851537c71c7bd8381c1bbb1 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Mon, 2 Oct 2017 11:37:03 +0300 Subject: ui move to docker Change-Id: Iff31ebb3fff782e848704801b7800fdf480264a1 Signed-off-by: Koren Lev (cherry picked from commit a9691f5fe78af32c474754f841a71a68e2d2a484) --- .../general-node-dashboard.js | 84 ---------------------- 1 file changed, 84 deletions(-) delete mode 100644 ui/imports/ui/components/general-node-dashboard/general-node-dashboard.js (limited to 'ui/imports/ui/components/general-node-dashboard/general-node-dashboard.js') diff --git a/ui/imports/ui/components/general-node-dashboard/general-node-dashboard.js b/ui/imports/ui/components/general-node-dashboard/general-node-dashboard.js deleted file mode 100644 index 3009ee3..0000000 --- a/ui/imports/ui/components/general-node-dashboard/general-node-dashboard.js +++ /dev/null @@ -1,84 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) and others / -// / -// All rights reserved. This program and the accompanying materials / -// are made available under the terms of the Apache License, Version 2.0 / -// which accompanies this distribution, and is available at / -// http://www.apache.org/licenses/LICENSE-2.0 / -///////////////////////////////////////////////////////////////////////////////////////// -/* - * Template Component: GeneralNodeDashboard - */ - -//import { Meteor } from 'meteor/meteor'; -import { Template } from 'meteor/templating'; -import { SimpleSchema } from 'meteor/aldeed:simple-schema'; -import { ReactiveDict } from 'meteor/reactive-dict'; -import { Inventory } from '/imports/api/inventories/inventories'; - -import '/imports/ui/components/detailed-node-info-box/detailed-node-info-box'; - -import './general-node-dashboard.html'; - -/* - * Lifecycles - */ - -Template.GeneralNodeDashboard.onCreated(function() { - var instance = this; - instance.state = new ReactiveDict(); - instance.state.setDefault({ - id: null, - node: null, - }); - - instance.autorun(function () { - let data = Template.currentData(); - new SimpleSchema({ - _id: { type: { _str: { type: String, regEx: SimpleSchema.RegEx.Id } } }, - onNodeSelected: { type: Function }, - }).validate(data); - - instance.state.set('_id', data._id); - }); - - instance.autorun(function () { - let _id = instance.state.get('_id'); - - instance.subscribe('inventory?_id', _id); - Inventory.find({ _id: _id }).forEach((node) => { - instance.state.set('node', node); - }); - }); -}); - -/* -Template.GeneralNodeDashboard.rendered = function() { -}; -*/ - -/* - * Events - */ - -Template.GeneralNodeDashboard.events({ -}); - -/* - * Helpers - */ - -Template.GeneralNodeDashboard.helpers({ - getNode: function () { - let instance = Template.instance(); - return instance.state.get('node'); - }, - - argsGenNodeInfoBox: function (node) { - return { - node: node, - }; - } -}); - - -- cgit 1.2.3-korg