SteveYurongSu commented on a change in pull request #777: URL: https://github.com/apache/incubator-iotdb/pull/777#discussion_r415008672
########## File path: docs/UserGuide/4-Client/8-HTTP API.md ########## @@ -0,0 +1,47 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> + +### Queries + +IoTDB can be queried by JSON objects. Queries can be posted like this: + +``` +curl -X POST '<host>:<port>/rest/?' -H 'Content-Type:application/json' -H 'Accept:application/json' -H 'Authorization:Basic root:root'-d @<query_json_file> +``` + +Note: "root:root" should be encoded by Base64. + +The query language is JSON over HTTP, The Content-Type/Accept Headers can also take 'text/plain'. + +``` +curl -X POST '<queryable_host>:<port>/druid/v2/?pretty' -H 'Content-Type:application/json' -H 'Accept:text/plain' -H 'Authorization:Basic root:root' -d @<query_json_file> +``` + +Note: If Accept header is not provided, it defaults to value of 'Content-Type' header. + +### Available queries + +* [Set Storage Group](./8-1-Set%20Storage%20Group.md) +* [Create TimeSeries](./8-2-Create%20TimeSeries) Review comment: This file is missing the file extension .md ########## File path: docs/UserGuide/4-Client/8-2-Create TimeSeries ########## @@ -0,0 +1,72 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> + +### Create time series queries Review comment: This markdown file is missing the file extension .md ########## File path: docs/UserGuide/4-Client/8-2-Create TimeSeries ########## @@ -0,0 +1,72 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> + +### Create time series queries + +These types of queries take a query object and return an array of JSON objects where each storage group Review comment: storage group ... ? ########## File path: docs/UserGuide/4-Client/8-3-Insert.md ########## @@ -0,0 +1,107 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json Review comment: I prefer the interface of the following style: ```json { "type" : "insert", "targets" : [ { "deviceId" : "root.ln.wf01.wt01", "measurements" : [ "temperature", "status", "hardware" ], "timestamps" : [1, 2, 3], "values" : [ ["1.1", "false", "11"], ["1.1", "false", "11"], ["1.1", "false", "11"], ] }, ] } ``` Such an interface allows users to freely choose whether to insert or batch insert. In most cases, I believe that the interface can save network traffic more. ########## File path: docs/UserGuide/4-Client/8-3-Insert.md ########## @@ -0,0 +1,107 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries Review comment: storage group? Don't copy the entire introduction from 8-1-Set Storage Group.md ... ########## File path: docs/UserGuide/4-Client/8-4-Query.md ########## @@ -0,0 +1,63 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json +{ + "type": "query", + "range": { + "from": "0", + "to": "6" + }, + "targets": [ + { + "target": "root.ln.wf01.wt01.temperature", + "type": "timeserie" + } + ] +} +``` + +If successfully, you will get a result below: + +```json +[{"datapoints":[[1,"1.1"],[2,"2.2"],[3,"3.3"],[4,"4.4"],[5,"5.5"]],"target":"root.ln.wf01.wt01.temperature"}] +``` + +| property | description | required? | +| --- | --- | --- | +| type | describe query type | yes | +| targets | data will be queried | yes | +| target | one time series | yes | +| type | table or timeserie | yes | + +You possibly get several errors below: + Review comment: Are there other error situations? ########## File path: docs/UserGuide/4-Client/8-2-Create TimeSeries ########## @@ -0,0 +1,72 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> + +### Create time series queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json +{ + "type" : "createTimeSeries", + "targets" : [ + { + "target": "root.ln.wf01.wt01.status", + "datatype": "BOOLEAN", + "encoding": "PLAIN" + }, + { + "target": "root.ln.wf01.wt01.temperature", + "datatype": "FLOAT", + "encoding": "PLAIN" + }, + { + "target": "root.ln.wf01.wt01.hardware", + "datatype": "INT32", + "encoding": "PLAIN" + } + ] +} +``` +If successfully, you will get a result below: + +```json +["root.ln.wf01.wt01.status:success","root.ln.wf01.wt01.temperature:success","root.ln.wf01.wt01.hardware:success"] +``` + +| property | description | required? | +| --- | --- | --- | +| type | describe query type | yes | +| targets | time series will be create | yes | +| target | one time series | yes | +| datatype | time series's datatype | yes | +| encoding | time series's encoding | yes | +| compressor | time series's compressor | no | + +You possibly get several errors below: + Review comment: Are there other error situations? ########## File path: docs/UserGuide/4-Client/8-3-Insert.md ########## @@ -0,0 +1,107 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json +{ + "type" : "insert", + "targets" : [ + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 1, + "values" : [ + "1.1", "false", "11" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 2, + "values" : [ + "2.2", "true", "22" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 3, + "values" : [ + "3.3", "false", "33" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 4, + "values" : [ + "4.4", "false", "44" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 5, + "values" : [ + "5.5", "false", "55" + ] + } + ] +} +``` + +If successfully, you will get a result below: + +```json +["root.ln.wf01.wt01:success","root.ln.wf01.wt01:success","root.ln.wf01.wt01:success","root.ln.wf01.wt01:success","root.ln.wf01.wt01:success"] +``` + +| property | description | required? | +| --- | --- | --- | +| type | describe query type | yes | +| targets | values will be inserted | yes | +| deviceId | deviceId | yes | +| measurements | measurements | yes | +| time | time | yes | +| values | values | yes | + +You possibly get several errors below: + Review comment: Are there other error situations? ########## File path: docs/UserGuide/4-Client/8-3-Insert.md ########## @@ -0,0 +1,107 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json +{ + "type" : "insert", + "targets" : [ + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 1, + "values" : [ + "1.1", "false", "11" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 2, + "values" : [ + "2.2", "true", "22" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 3, + "values" : [ + "3.3", "false", "33" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 4, + "values" : [ + "4.4", "false", "44" + ] + }, + { + "deviceId" : "root.ln.wf01.wt01", + "measurements" : [ + "temperature", "status", "hardware" + ], + "time" : 5, + "values" : [ + "5.5", "false", "55" + ] + } + ] +} +``` + +If successfully, you will get a result below: + +```json +["root.ln.wf01.wt01:success","root.ln.wf01.wt01:success","root.ln.wf01.wt01:success","root.ln.wf01.wt01:success","root.ln.wf01.wt01:success"] Review comment: I think this is not clear and it may cause high network traffic cost. What about only returning information for errors? The same suggestion is for `Set Storage Group` and `Create Timeseries` too. ########## File path: docs/UserGuide/4-Client/8-4-Query.md ########## @@ -0,0 +1,63 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json +{ + "type": "query", + "range": { + "from": "0", + "to": "6" + }, + "targets": [ + { + "target": "root.ln.wf01.wt01.temperature", + "type": "timeserie" + } + ] +} +``` + +If successfully, you will get a result below: + +```json +[{"datapoints":[[1,"1.1"],[2,"2.2"],[3,"3.3"],[4,"4.4"],[5,"5.5"]],"target":"root.ln.wf01.wt01.temperature"}] +``` + +| property | description | required? | +| --- | --- | --- | +| type | describe query type | yes | +| targets | data will be queried | yes | +| target | one time series | yes | +| type | table or timeserie | yes | Review comment: here is a duplicate `type` ```suggestion | target.type | table or timeserie | yes | ``` ########## File path: docs/UserGuide/4-Client/8-4-Query.md ########## @@ -0,0 +1,63 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json +{ + "type": "query", + "range": { + "from": "0", + "to": "6" + }, + "targets": [ + { + "target": "root.ln.wf01.wt01.temperature", + "type": "timeserie" + } + ] +} +``` + +If successfully, you will get a result below: + +```json +[{"datapoints":[[1,"1.1"],[2,"2.2"],[3,"3.3"],[4,"4.4"],[5,"5.5"]],"target":"root.ln.wf01.wt01.temperature"}] +``` + +| property | description | required? | +| --- | --- | --- | +| type | describe query type | yes | +| targets | data will be queried | yes | +| target | one time series | yes | +| type | table or timeserie | yes | Review comment: Please explain clearly what is the `timeserie` for and what is the `table` for.. And I don't think the word `table` is suitable here. ########## File path: docs/UserGuide/4-Client/8-4-Query.md ########## @@ -0,0 +1,63 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + Review comment: ```suggestion { "type": "query", "targets": [ { "range": { "from": "0", "to": "6" }, "target": "root.ln.wf01.wt01.temperature", "type": "timeserie" }, { "range": { "from": "1", "to": "7" }, "target": "root.ln.wf01.wt01.speed", "type": "timeserie" } ] } ``` And I have a question, how to execute `select * from root.a.b.c` ? ########## File path: docs/UserGuide/4-Client/8-HTTP API.md ########## @@ -0,0 +1,47 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> + +### Queries + +IoTDB can be queried by JSON objects. Queries can be posted like this: + +``` +curl -X POST '<host>:<port>/rest/?' -H 'Content-Type:application/json' -H 'Accept:application/json' -H 'Authorization:Basic root:root'-d @<query_json_file> +``` + +Note: "root:root" should be encoded by Base64. + +The query language is JSON over HTTP, The Content-Type/Accept Headers can also take 'text/plain'. + +``` +curl -X POST '<queryable_host>:<port>/druid/v2/?pretty' -H 'Content-Type:application/json' -H 'Accept:text/plain' -H 'Authorization:Basic root:root' -d @<query_json_file> Review comment: Could the API be simplier? `/druid/v2/` is kind of ugly.. ########## File path: server/src/assembly/resources/web/src/ServerInfo.js ########## @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +import React from 'react' +import './ServerInfo.css' + +class ServerInfo extends React.Component{ + constructor(props) { + super(props); + this.state = { + list: { + } + } + } + + componentDidMount(){ + fetch('http://localhost:8181/rest/server_information',{ Review comment: Hardcode here? If I change the `http_port=8181` property in iotdb-engine.properties, can the bundle.js be built correctly? ########## File path: docs/UserGuide/4-Client/8-4-Query.md ########## @@ -0,0 +1,63 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> +### Set Storage Group queries + +These types of queries take a query object and return an array of JSON objects where each storage group +is set successfully or not. + +An example set storage group query object is shown below: + +```json +{ + "type": "query", + "range": { + "from": "0", + "to": "6" + }, + "targets": [ + { + "target": "root.ln.wf01.wt01.temperature", + "type": "timeserie" + } + ] +} +``` + +If successfully, you will get a result below: + +```json +[{"datapoints":[[1,"1.1"],[2,"2.2"],[3,"3.3"],[4,"4.4"],[5,"5.5"]],"target":"root.ln.wf01.wt01.temperature"}] Review comment: I think we'd better return temperature in float value if the target's data type is declared as 'FLOAT'. ```suggestion [ { "datapoints":[[1,1.1],[2,2.2],[3,3.3],[4,4.4],[5,5.5]], "target":"root.ln.wf01.wt01.temperature" } ] ``` ########## File path: server/src/assembly/resources/web/src/Header.js ########## @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +import React from 'react' +import './Header.css' +import logo from './iotdb-logo.png' + +class Header extends React.Component{ + constructor(props) { + super(props); + this.state = { + version : "" + } + } + + componentDidMount() { + fetch('http://localhost:8181/rest/version', { Review comment: Hardcode here? If I change the `http_port=8181` property in iotdb-engine.properties, can the bundle.js be built correctly? ########## File path: server/src/assembly/resources/web/src/Table.js ########## @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +import React from 'react' +import './Table.css' + +class Table extends React.Component { + constructor(props) { + super(props); + this.state = { + lists: [], + active: false + }; + this.getMachineAction = this.getMachineAction.bind(this); + this.toggleClass = this.toggleClass.bind(this); + this.toggleContent = this.toggleContent.bind(this); + } + + async getMachineAction() { + try { + await fetch( 'http://localhost:8181/rest/sql_arguments', { Review comment: Hardcode here? If I change the http_port=8181 property in iotdb-engine.properties, can the bundle.js be built correctly? ########## File path: server/src/assembly/resources/web/src/ServerInfo.css ########## @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +.body { + margin-top: 10px; + margin-left: 10px; + position: relative; +} + +.body p { + font-weight: 600; +} + +.body p span{ + font-weight: lighter; +} + +.body > .one { Review comment: change .one, .two, .three, .four, and .five to more meaningful names... ########## File path: server/src/assembly/resources/web/readme.md ########## @@ -0,0 +1,76 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. + +--> + +### Install npm and node in your computer + +npm is just like maven, a package manager for the JavaScript. node is similar to javaSE, JavaScript runtime environment that executes JavaScript code outside of a browser. + +#### MacOS + +you can use +``` +brew install node +brew install npm +``` +to install them or use MacOS installer, download in https://nodejs.org/en/download/. + +#### Windows + +You can use the Windows Installer, which can be downloaded in https://nodejs.org/en/download/. + +#### Ubuntu + +``` +sudo apt-get install nodejs +sudo apt-get install npm +``` + +#### CentOS + +``` +sudo yum install nodejs +sudo yum install npm +``` + +After install, you can check their versions to make sure they have been installed successfully. + +``` +npm -v +node -v +``` + +### Pack web resource + +This is like maven packaging jars. + +Run `npm install` in the web package to install necessary dependencies, and then run `npm run-script build` to pack web resources. + +you can find a bundle.js and a png in dist. Review comment: Is it possible to automatically execute npm install and npm run-scripts during mvn build? If the node and npm environments are satisfied, can we automatically generate bundle.js for users? Or at least automatically check node, npm and bundle.js at IoTDB Server startup, and report an error when the environment is not satisfied or the generated files are missing. I forgot to execute `npm install` and `npm run-script build` when I tried it, but when I accessed the IoTDB Query History Visualization Tool index.html, I did not get any valid error prompts. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
