[KYUUBI #2072] Improve rest server behavior

### _Why are the changes needed?_

1. use host address rather than host name, since we also use host address in thrift server
2. remove alert in web ui, it's noisy..

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #2073 from ulysses-you/web-ui.

Closes #2072

91b6f5b3 [ulysses-you] rest

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Kent Yao <yao@apache.org>
This commit is contained in:
ulysses-you 2022-03-09 17:53:15 +08:00 committed by Kent Yao
parent 5a64e1242e
commit 746a94a7c8
No known key found for this signature in database
GPG Key ID: F7051850A0AF904D
2 changed files with 1 additions and 2 deletions

View File

@ -43,5 +43,4 @@ $(function(){
});
}
$('.item.server.version.right.padded').val(kyuubiVersion)
alert(kyuubiVersion);
});

View File

@ -39,7 +39,7 @@ class KyuubiRestFrontendService(override val serverable: Serverable)
override def initialize(conf: KyuubiConf): Unit = synchronized {
val host = conf.get(FRONTEND_REST_BIND_HOST)
.getOrElse(Utils.findLocalInetAddress.getHostName)
.getOrElse(Utils.findLocalInetAddress.getHostAddress)
server = JettyServer(getName, host, conf.get(FRONTEND_REST_BIND_PORT))
super.initialize(conf)
}