[jira] [Commented] (KNOX-2858) Provide UI proxy support for the Grafana UI ?
[ https://issues.apache.org/jira/browse/KNOX-2858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17653806#comment-17653806 ] panlijie commented on KNOX-2858: Thank you [~smore] , I will ask a question on the Knox mailing list. (y) > Provide UI proxy support for the Grafana UI ? > - > > Key: KNOX-2858 > URL: https://issues.apache.org/jira/browse/KNOX-2858 > Project: Apache Knox > Issue Type: New Feature >Reporter: panlijie >Priority: Minor > > Provide UI proxy support for the Grafana UI ? > Thank you! -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [knox] smolnar82 commented on pull request #659: fix validation errors of getPID: return 0 when the process started
smolnar82 commented on PR #659: URL: https://github.com/apache/knox/pull/659#issuecomment-1369060888 Let's close this now and have it re-opened once @anyorey has time to reply to the above question and can rebase this PR on top of the current `master` branch. -- 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. To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [knox] smolnar82 closed pull request #659: fix validation errors of getPID: return 0 when the process started
smolnar82 closed pull request #659: fix validation errors of getPID: return 0 when the process started URL: https://github.com/apache/knox/pull/659 -- 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. To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Work logged] (KNOX-2809) HDFSUI is not high available
[ https://issues.apache.org/jira/browse/KNOX-2809?focusedWorklogId=836415=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-836415 ] ASF GitHub Bot logged work on KNOX-2809: Author: ASF GitHub Bot Created on: 02/Jan/23 16:05 Start Date: 02/Jan/23 16:05 Worklog Time Spent: 10m Work Description: smolnar82 commented on code in PR #638: URL: https://github.com/apache/knox/pull/638#discussion_r1060110657 ## gateway-spi/src/main/java/org/apache/knox/gateway/util/URLUtils.java: ## @@ -0,0 +1,48 @@ +/* + * 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. + */ +package org.apache.knox.gateway.util; + +import java.net.URI; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; + +public class URLUtils { + + /** + * A method that decode url and concat query params, return result as URI. + * + * @param encoded encoded url + * @param queryStr query params + * @return decoded URI + */ + public static URI getDecodeUri(String encoded, String queryStr) { +String decoded; +try { + decoded = URLDecoder.decode(encoded, StandardCharsets.UTF_8.name()); +} catch (final Exception e) { + /* fall back in case of exception */ + decoded = encoded; +} + +final StringBuilder str = new StringBuilder(decoded); +if (queryStr != null) { Review Comment: You may want to check for being `not blank` here (`StringUtils.isNotBlank(queryStr)`). Even if this is not null, it may be a blank string that makes no sense to append at the end of the decoded URI. ## gateway-spi/src/test/java/org/apache/knox/gateway/util/URLUtilsTest.java: ## @@ -0,0 +1,33 @@ +/* + * 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. + */ +package org.apache.knox.gateway.util; + +import org.junit.Test; + +import java.net.URI; + +import static org.junit.Assert.assertEquals; + +public class URLUtilsTest { Review Comment: Please add other test cases with null and empty query strings. ## gateway-spi/src/main/java/org/apache/knox/gateway/util/URLUtils.java: ## @@ -0,0 +1,48 @@ +/* + * 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. + */ +package org.apache.knox.gateway.util; + +import java.net.URI; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; + +public class URLUtils { + + /** + * A method that decode url and concat query params, return result as URI. + * + * @param encoded encoded url + * @param queryStr query params + * @return decoded URI + */ + public static URI getDecodeUri(String encoded, String queryStr) { Review Comment: nit: I think there is a typo
[GitHub] [knox] smolnar82 commented on a diff in pull request #638: KNOX-2809 - Fix dispatch ha-class for HDFSUI high available.
smolnar82 commented on code in PR #638: URL: https://github.com/apache/knox/pull/638#discussion_r1060110657 ## gateway-spi/src/main/java/org/apache/knox/gateway/util/URLUtils.java: ## @@ -0,0 +1,48 @@ +/* + * 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. + */ +package org.apache.knox.gateway.util; + +import java.net.URI; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; + +public class URLUtils { + + /** + * A method that decode url and concat query params, return result as URI. + * + * @param encoded encoded url + * @param queryStr query params + * @return decoded URI + */ + public static URI getDecodeUri(String encoded, String queryStr) { +String decoded; +try { + decoded = URLDecoder.decode(encoded, StandardCharsets.UTF_8.name()); +} catch (final Exception e) { + /* fall back in case of exception */ + decoded = encoded; +} + +final StringBuilder str = new StringBuilder(decoded); +if (queryStr != null) { Review Comment: You may want to check for being `not blank` here (`StringUtils.isNotBlank(queryStr)`). Even if this is not null, it may be a blank string that makes no sense to append at the end of the decoded URI. ## gateway-spi/src/test/java/org/apache/knox/gateway/util/URLUtilsTest.java: ## @@ -0,0 +1,33 @@ +/* + * 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. + */ +package org.apache.knox.gateway.util; + +import org.junit.Test; + +import java.net.URI; + +import static org.junit.Assert.assertEquals; + +public class URLUtilsTest { Review Comment: Please add other test cases with null and empty query strings. ## gateway-spi/src/main/java/org/apache/knox/gateway/util/URLUtils.java: ## @@ -0,0 +1,48 @@ +/* + * 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. + */ +package org.apache.knox.gateway.util; + +import java.net.URI; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; + +public class URLUtils { + + /** + * A method that decode url and concat query params, return result as URI. + * + * @param encoded encoded url + * @param queryStr query params + * @return decoded URI + */ + public static URI getDecodeUri(String encoded, String queryStr) { Review Comment: nit: I think there is a typo here; it should be `getDecodedUri` (note the `d` at the end of `Decoded`)or the method name should be changed to a verb: `decodeUri` -- 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. To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure