Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions nodes/flow-test-config.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!--
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not add the license header. We're moving away from doing that as the consensus is having the top-level LICENSE file is sufficient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed license from code.

Copyright JS Foundation and other contributors, http://js.foundation

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.
-->

<!--
UI and related operations are defined in flow tester
-->

<script type="text/html" data-template-name="flow-test-config">

<div class="form-row">
<label for="node-input-name"><span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name"/>
</div>

<div class="form-row" id="test-actions-row">
<div id="test-actions-container"></div>
</div>

</script>

<script type="text/javascript">
(function () {
RED.nodes.registerType("flow-test-config", {
category: "config", // category of node
defaults: {
name: { value: "" },
tests: { tests: [] },
},
label: function() {
return this.name || "flow test";
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";
},
oneditprepare: function() {
var node = this;
},
oneditsave: function() {
var node = this;
},
oneditresize: function(size) {
var node = this;
}
});

})();

</script>
27 changes: 27 additions & 0 deletions nodes/flow-test-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* 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.
**/

module.exports = function(RED) {
"use strict";

function FlowTestConfig(n) {
RED.nodes.createNode(this, n);
const node = this;
node.name = n.name;
}

RED.nodes.registerType("flow-test-config", FlowTestConfig);
};
21 changes: 21 additions & 0 deletions nodes/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "node-red-flow-test",
"version": "0.0.1",
"description": "Node-RED node for Flow Test",
"node-red": {
"nodes": {
"flow-test-config": "flow-test-config.js"
}
},
"license": "Apache 2.0",
"keywords": [
"node-red"
],
"author": {
"name": "Hiroyasu Nishiyama",
"email": "hiroyasu.nishiyama.uq@hitachi.com"
},
"dependencies": {},
"devDependencies": {
}
}
Loading