diff options
Diffstat (limited to 'ui/imports/ui/components/network-info-box')
3 files changed, 0 insertions, 109 deletions
diff --git a/ui/imports/ui/components/network-info-box/network-info-box.html b/ui/imports/ui/components/network-info-box/network-info-box.html deleted file mode 100644 index b9e07f2..0000000 --- a/ui/imports/ui/components/network-info-box/network-info-box.html +++ /dev/null @@ -1,38 +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 name="NetworkInfoBox"> - <div class="cards-450 white flex-box-1"> - <div class="flex-box "> - <div class="flex-box-1"> - <i class="material-icons">device_hub</i> - </div> - <div class="flex-box-2"> - <h3>Network name:<br> {{ network.name }}</h3> - <table class="table table-striped"> - <tbody> - <tr> - <th>Last Scanning</th> - <td></td> - </tr> - <tr> - <th>Ports count</th> - <td>{{ portsCount }}</td> - </tr> - <tr> - <th>Instaces</th> - <td></td> - </tr> - </tbody> - </table> - </div> - </div> - </div> -</template> diff --git a/ui/imports/ui/components/network-info-box/network-info-box.js b/ui/imports/ui/components/network-info-box/network-info-box.js deleted file mode 100644 index 8843c5c..0000000 --- a/ui/imports/ui/components/network-info-box/network-info-box.js +++ /dev/null @@ -1,69 +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: NetworkInfoBox - */ - -//import { Meteor } from 'meteor/meteor'; -import { Template } from 'meteor/templating'; -import { ReactiveDict } from 'meteor/reactive-dict'; -import { regexEscape } from '/imports/lib/regex-utils'; -import { Inventory } from '/imports/api/inventories/inventories'; - -import './network-info-box.html'; - -/* - * Lifecycles - */ - -Template.NetworkInfoBox.onCreated(function() { - var instance = this; - - instance.state = new ReactiveDict(); - instance.state.setDefault({ - portsCount: 0 - }); - - instance.autorun(function () { - let network = instance.data.network; - instance.subscribe('inventory?id_path_like&type', network.id_path, 'port'); - - let idPathExp = new RegExp(regexEscape(network.id)); - instance.state.set('portsCount', Inventory.find({ - id_path: idPathExp, - type: 'port' - }).count()); - }); - -}); - -/* -Template.NetworkInfoBox.rendered = function() { -}; -*/ - -/* - * Events - */ - -Template.NetworkInfoBox.events({ -}); - -/* - * Helpers - */ - -Template.NetworkInfoBox.helpers({ - portsCount: function () { - let instance = Template.instance(); - return instance.state.get('portsCount'); - } -}); - - diff --git a/ui/imports/ui/components/network-info-box/network-info-box.styl b/ui/imports/ui/components/network-info-box/network-info-box.styl deleted file mode 100644 index 5228d20..0000000 --- a/ui/imports/ui/components/network-info-box/network-info-box.styl +++ /dev/null @@ -1,2 +0,0 @@ -/* Set the component style here */ -// "NetworkInfoBox" |