bluemix node-red flow editor "deploy" 按钮未启用

bluemix node-red flow editor "deploy" button is not enabled

我正在学习教程:"Build a real-time chat app with Node-RED in 5 minutes" http://www.ibm.com/developerworks/cloud/library/cl-rtchat-app/

但是“部署”按钮未启用。所以我无法部署。

我已经为我的应用程序安装了 CF 命令行和 运行 "push"。这是我在仪表板中的 "Start Coding" 中学到的,在 "CFApp" 下。成功了。

这个"push"和Node-Red编辑器中的"deploy"一样吗?

谢谢。

该教程有一个稍微误导性的编辑器屏幕截图,其中有一个空白的工作区和一个启用的部署按钮。仅当工作区中存在尚未部署到运行时的更改时,部署按钮才会激活。

A 'push' 用于将 node-red 应用程序上传到 bluemix。这与将流程部署到应用程序不同。

部署按钮不同于CF推送。 node-red 部署按钮在 node-red 图形 UI.

中可用

创建 node-red 应用程序后,您必须启动它。

这是教程第 1 步中的第 3 项。在 Bluemix 仪表板上单击应用程序名称以启动它。

node-red 应用程序的主要 window 已显示(本教程第 1 步中的项目符号编号 4)。

单击红色大按钮 "Go to your node-RED flow editor" 将打开节点红色流编辑器(显示在第 1 步的项目符号 5 上)。此时你应该看到一个空的 sheet 并且右上角的 "Deploy" 按钮应该被禁用。

按照步骤 2 的说明导入 node-red 流(为方便起见,我将其包含在下面):

[{"id":"bc740d23.438bf","type":"websocket-listener","path":"/ws/chat","wholemsg":"false"},{"id":"c86da933.379258","type":"websocket in","name":"","server":"bc740d23.438bf","x":112,"y":61,"z":"d46b9957.2b9468","wires":[["f9476129.06b8a"]]},{"id":"f9476129.06b8a","type":"function","name":"","func":"delete msg._session;\nreturn msg;\n\n","outputs":1,"valid":true,"x":286,"y":61,"z":"d46b9957.2b9468","wires":[["bda54943.425ab8"]]},{"id":"bda54943.425ab8","type":"websocket out","name":"","server":"bc740d23.438bf","x":467,"y":61,"z":"d46b9957.2b9468","wires":[]},{"id":"df7af34a.20851","type":"http in","name":"","url":"/chat","method":"get","x":120,"y":129,"z":"d46b9957.2b9468","wires":[["969892ad.69677"]]},{"id":"969892ad.69677","type":"template","name":"","field":"","template":"<head>\n  <meta name=\"viewport\" content=\"width=320, initial-scale=1\">\n  <title>Chat</title>\n</head>\n\n<body>\n  <div id=\"wrapper\">\n    <div id=\"chat_box\" class=\"content\"></div>\n\n    <div id=\"footer\">\n      <div class=\"content\">\n        <input type=\"text\" id=\"user\" placeholder=\"Who are you?\" />\n        <input type=\"text\" id=\"message\" placeholder=\"What do you want to say?\" />\n        <input type=\"button\" id=\"send_btn\" value=\"Send\" onclick=\"sendMessage()\">\n      </div>\n    </div>\n  </div>\n</body>\n\n<script type=\"text/javascript\">\n  var wsUri = \"ws://{{req.headers.host}}/ws/chat\";\n  var ws = new WebSocket(wsUri);\n\n  function createSystemMessage(message) {\n    var message = document.createTextNode(message);\n\n    var messageBox = document.createElement('p');\n    messageBox.className = 'system';\n\n    messageBox.appendChild(message);\n\n    var chat = document.getElementById('chat_box');\n    chat.appendChild(messageBox);\n  }\n\n  function createUserMessage(user, message) {\n    var user = document.createTextNode(user + ': ');\n\n    var userBox = document.createElement('span');\n    userBox.className = 'username';\n    userBox.appendChild(user);\n\n    var message = document.createTextNode(message);\n\n    var messageBox = document.createElement('p');\n    messageBox.appendChild(userBox);\n    messageBox.appendChild(message);\n\n    var chat = document.getElementById('chat_box');\n    chat.appendChild(messageBox);\n  }\n\n  ws.onopen = function(ev) {\n    createSystemMessage('[Connected]');\n  };\n\n  ws.onclose = function(ev) {\n    createSystemMessage('[Disconnected]');\n  }\n\n  ws.onmessage = function(ev) {\n    var payload = JSON.parse(ev.data);\n    createUserMessage(payload.user, payload.message);\n\n    var chat = document.getElementById('chat_box');\n    chat.scrollTop = chat.scrollHeight;\n  }\n\n  function sendMessage() {\n    var user = document.getElementById('user');\n    var message = document.getElementById('message');\n\n    var payload = {\n      message: message.value,\n      user: user.value,\n      ts: (new Date()).getTime()\n    };\n\n    ws.send(JSON.stringify(payload));\n    message.value = \"\";\n  };\n</script>\n\n<style type=\"text/css\">\n  * {\n    font-family: \"Palatino Linotype\", \"Book Antiqua\", Palatino, serif;\n    font-style: italic;\n    font-size: 24px;\n  }\n\n  html, body, #wrapper {\n    margin: 0;\n    padding: 0;\n    height: 100%;\n  }\n\n  #wrapper {\n    background-color: #ecf0f1;\n  }\n\n  #chat_box {\n    box-sizing: border-box;\n    height: 100%;\n    overflow: auto;\n    padding-bottom: 50px;\n  }\n\n  #footer {\n    box-sizing: border-box;\n    position: fixed;\n    bottom: 0;\n    height: 50px;\n    width: 100%;\n    background-color: #2980b9;\n  }\n\n  #footer .content {\n    padding-top: 4px;\n    position: relative;\n  }\n\n  #user { width: 20%; }\n  #message { width: 68%; }\n  #send_btn {\n    width: 10%;\n    position: absolute;\n    right: 0;\n    bottom: 0;\n    margin: 0;\n  }\n\n  .content {\n    width: 70%;\n    margin: 0 auto;\n  }\n\n  input[type=\"text\"],\n  input[type=\"button\"] {\n    border: 0;\n    color: #fff;\n  }\n\n  input[type=\"text\"] {\n    background-color: #146EA8;\n    padding: 3px 10px;\n  }\n\n  input[type=\"button\"] {\n    background-color: #f39c12;\n    border-right: 2px solid #e67e22;\n    border-bottom: 2px solid #e67e22;\n    min-width: 70px;\n    display: inline-block;\n  }\n\n  input[type=\"button\"]:hover {\n    background-color: #e67e22;\n    border-right: 2px solid #f39c12;\n    border-bottom: 2px solid #f39c12;\n    cursor: pointer;\n  }\n\n  .system,\n  .username {\n    color: #aaa;\n    font-style: italic;\n    font-family: monospace;\n    font-size: 16px;\n  }\n\n  @media(max-width: 1000px) {\n    .content { width: 90%; }\n  }\n\n  @media(max-width: 780px) {\n    #footer { height: 91px; }\n    #chat_box { padding-bottom: 91px; }\n\n    #user { width: 100%; }\n    #message { width: 80%; }\n  }\n\n  @media(max-width: 400px) {\n    #footer { height: 135px; }\n    #chat_box { padding-bottom: 135px; }\n\n    #message { width: 100%; }\n    #send_btn {\n      position: relative;\n      margin-top: 3px;\n      width: 100%;\n    }\n  }\n</style>\n","x":286,"y":129,"z":"d46b9957.2b9468","wires":[["82cb0232.7d35"]]},{"id":"82cb0232.7d35","type":"http response","name":"","x":429,"y":129,"z":"d46b9957.2b9468","wires":[]}]

按照其他步骤导入上面的流程,部署并 运行 应用程序。