diff options
Diffstat (limited to 'ui/imports/ui/components/env-nfv-info')
-rw-r--r-- | ui/imports/ui/components/env-nfv-info/env-nfv-info.html | 128 | ||||
-rw-r--r-- | ui/imports/ui/components/env-nfv-info/env-nfv-info.js | 63 |
2 files changed, 191 insertions, 0 deletions
diff --git a/ui/imports/ui/components/env-nfv-info/env-nfv-info.html b/ui/imports/ui/components/env-nfv-info/env-nfv-info.html new file mode 100644 index 0000000..9b820ba --- /dev/null +++ b/ui/imports/ui/components/env-nfv-info/env-nfv-info.html @@ -0,0 +1,128 @@ +<!-- +######################################################################################## +# 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="EnvNfvInfo"> +<div class="form-horizontal"> + <div class="form-group"> + <label for="nfvProvider" + class="col-sm-2 control-label" + >Master host</label> + + <div class="col-sm-3"> + {{> InputModel(createInputArgs + value=model.host + key="host" + type="text" + disabled=disabled + placeholder="Host") + }} + </div> + + <div class="col-sm-4"> + <p>Some help info</p> + </div> + </div> + + <div class="form-group"> + <label for="mhUsername" + class="col-sm-2 control-label" + >NFV token</label> + + <div class="col-sm-3"> + {{> InputModel(createInputArgs + value=model.nfv_token + key="nfv_token" + type="text" + disabled=disabled + placeholder="NFV token") + }} + </div> + + <div class="col-sm-4"> + <p>Some help info</p> + </div> + </div> + + <div class="form-group"> + <label for="" + class="col-sm-2 control-label" + >Port</label> + + <div class="col-sm-3"> + {{> InputModel(createInputArgs + value=model.port + key="port" + type="text" + disabled=disabled + placeholder="Port") + }} + </div> + + <div class="col-sm-4"> + <p>Some help info</p> + </div> + </div> + + <div class="form-group"> + <label for="" + class="col-sm-2 control-label" + >User</label> + + <div class="col-sm-3"> + {{> InputModel(createInputArgs + value=model.user + key="user" + type="text" + disabled=disabled + placeholder="User") + }} + </div> + + <div class="col-sm-4"> + <p>Some help info</p> + </div> + </div> + + <div class="form-group"> + <label for="" + class="col-sm-2 control-label" + >Password</label> + + <div class="col-sm-3"> + {{> InputModel(createInputArgs + value=model.pwd + key="pwd" + type="password" + disabled=disabled + placeholder="Password") + }} + </div> + + <div class="col-sm-4"> + <p>Some help info</p> + </div> + </div> + + <div class="form-group"> + <div class="col-sm-offset-2 col-sm-10"> + <button type="button" + class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored toast" + >Test connection</button> + </div> + + <div class="col-sm-offset-2 col-sm-10 btn-mgt-5"> + <button type="button" + class="sm-next-button mdl-button mdl-js-button + btnNext" + >Next</button> + </div> + </div> +</div> +</template> diff --git a/ui/imports/ui/components/env-nfv-info/env-nfv-info.js b/ui/imports/ui/components/env-nfv-info/env-nfv-info.js new file mode 100644 index 0000000..296379c --- /dev/null +++ b/ui/imports/ui/components/env-nfv-info/env-nfv-info.js @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////////////////// +// 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: EnvNfvInfo + */ + +//import { Meteor } from 'meteor/meteor'; +import { Template } from 'meteor/templating'; +//import { ReactiveDict } from 'meteor/reactive-dict'; +import * as R from 'ramda'; + +import { createInputArgs } from '/imports/ui/lib/input-model'; + +import './env-nfv-info.html'; + +/* + * Lifecycles + */ + +Template.EnvNfvInfo.onCreated(function() { +}); + +/* +Template.EnvNfvInfo.rendered = function() { +}; +*/ + +/* + * Events + */ + +Template.EnvNfvInfo.events({ + 'click .sm-next-button': function () { + let instance = Template.instance(); + instance.data.onNextRequested(); + } +}); + +/* + * Helpers + */ + +Template.EnvNfvInfo.helpers({ + createInputArgs: createInputArgs, + + markIfDisabled: function () { + let instance = Template.instance(); + let attrs = {}; + if (instance.data.disabled) { + attrs = R.assoc('disabled', true, attrs); + } + + return attrs; + } +}); + + |