UNPKG

node-red-contrib-nec-baas

Version:
78 lines (70 loc) 3.1 kB
/** * NEC Mobile Backend Platform * * Copyright (c) 2014-2017 NEC Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ <script type="text/x-red" data-template-name="nebula-server"> <div class="form-row"> <label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="nebula.label.name"></span></label> <input type="text" id="node-config-input-name" data-i18n="[placeholder]nebula.placeholder.name"> </div> <div class="form-row"> <label for="node-config-input-tenantId"><i class="icon-tag"></i> <span data-i18n="nebula.label.tenant"></span></label> <input type="text" id="node-config-input-tenantId"> </div> <div class="form-row"> <label for="node-config-input-appId"><i class="icon-tag"></i> <span data-i18n="nebula.label.app-id"></span></label> <input type="text" id="node-config-input-appId"> </div> <div class="form-row"> <label for="node-config-input-appKey"><i class="fa fa-lock"></i> <span data-i18n="nebula.label.app-key"></span></label> <input type="text" id="node-config-input-appKey"> </div> <div class="form-row"> <label for="node-config-input-baseUri"><i class="fa fa-globe"></i> <span data-i18n="nebula.label.base-uri"></span></label> <input type="text" id="node-config-input-baseUri" data-i18n="[placeholder]nebula.placeholder.base-uri"> </div> <p style="margin-bottom:1em;"> <div class="form-row" style="visibility: hidden;"> <label for="node-config-input-useProxy"><i class="fa fa-check"></i> <span data-i18n="nebula.label.use-proxy"></span></label> <input type="checkbox" id="node-config-input-useProxy" style="width: auto;" checked="checked"> </div> </script> <script type="text/javascript"> 'use restrict'; RED.nodes.registerType('nebula-server', { category: 'config', defaults: { name: { value: '', required: true }, tenantId: { value: '', required: true }, baseUri: { value: '', required: true }, tenantId: { value: '', required: true }, useProxy: { value: true } // Proxy settings are not yet supported. }, credentials: { appId: { type: "text"}, appKey: { type: "text"} }, label: function() { if (this.name) { return this.name; } else { return this.tenantId; // for compatibility with old version } }, oneditsave: function () { } }); </script>