Skip to content

Commit

Permalink
remove redundant telemetry line, and improve comments on URL utils
Browse files Browse the repository at this point in the history
  • Loading branch information
menishmueli committed Nov 6, 2024
1 parent 0645a05 commit 7ae6f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ object Shakespeare351 extends App {
.builder()
.appName("Shakespeare Statistics")
.config("spark.plugins", "io.dataflint.spark.SparkDataflintPlugin")
.config("spark.dataflint.telemetry.enabled", false)
.config("spark.ui.port", "10000")
.config("spark.dataflint.telemetry.enabled", value = false)
.config("spark.sql.maxMetadataStringLength", "10000")
Expand Down
8 changes: 4 additions & 4 deletions spark-ui/src/utils/UrlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ export const getProxyBasePath = (): string => {
// in cases where we are in history server mode, the API should be before the last /history part
// For example, for: http://localhost:18080/history/<application_id>/dataflint/
// the api is in http://localhost:18080/api/
// when the path is https://gateway//sparkhistory/history/<application_id>/1/dataflint/
// the api is in https://gateway//sparkhistory/api/
// when the path is https://gateway/sparkhistory/history/<application_id>/1/dataflint/
// the api is in https://gateway/sparkhistory/api/
const url = new URL(window.location.href);
const pathToRemove = /.*\/history\/[^/]+\/dataflint\/?$/;
return url.origin + url.pathname.replace(pathToRemove, '');
} else {
// in cases where we are not in history server mode, the API should be before the last /dataflint part
// for example, for: http://localhost:18080/dataflint/
// the api is in http://localhost:18080/api
// when the path is https://gateway//mysparkapp/dataflint/
// the api is in https://gateway//mysparkapp/api/
// when the path is https://gateway/mysparkapp/dataflint/
// the api is in https://gateway/mysparkapp/api/
return hrefWithoutEndSlash().substring(
0,
hrefWithoutEndSlash().lastIndexOf("/dataflint"),
Expand Down

0 comments on commit 7ae6f4e

Please sign in to comment.