From d316f176e2b3f6e65b9cff476ca106b5e73c9aa9 Mon Sep 17 00:00:00 2001 From: Alex Bozarth Date: Tue, 9 May 2017 14:13:19 -0700 Subject: [PATCH] added link to yarn id for appId's with associated yarnUI --- .../cloudera/livy/server/ui/static/all-sessions.js | 13 +++++++++++-- .../livy/server/ui/static/batches-table.html | 8 +++++++- .../livy/server/ui/static/sessions-table.html | 8 +++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/server/src/main/resources/com/cloudera/livy/server/ui/static/all-sessions.js b/server/src/main/resources/com/cloudera/livy/server/ui/static/all-sessions.js index b0c690460..64dd86d59 100644 --- a/server/src/main/resources/com/cloudera/livy/server/ui/static/all-sessions.js +++ b/server/src/main/resources/com/cloudera/livy/server/ui/static/all-sessions.js @@ -16,6 +16,15 @@ * limitations under the License. */ +function appIdLink(session) { + var appUiUrl = session.appInfo.sparkUiUrl; + if (appUiUrl != null) { + return '' + session.appId + ""; + } else { + return session.appId; + } +} + function tdWrap(str) { return "" + str + ""; } @@ -25,7 +34,7 @@ function loadSessionsTable(sessions) { $("#interactive-sessions .sessions-table-body").append( "" + tdWrap(session.id) + - tdWrap(session.appId) + + tdWrap(appIdLink(session)) + tdWrap(session.owner) + tdWrap(session.proxyUser) + tdWrap(session.kind) + @@ -40,7 +49,7 @@ function loadBatchesTable(sessions) { $("#batches .sessions-table-body").append( "" + tdWrap(session.id) + - tdWrap(session.appId) + + tdWrap(appIdLink(session)) + tdWrap(session.state) + "" ); diff --git a/server/src/main/resources/com/cloudera/livy/server/ui/static/batches-table.html b/server/src/main/resources/com/cloudera/livy/server/ui/static/batches-table.html index 45efbd655..18c6ad869 100644 --- a/server/src/main/resources/com/cloudera/livy/server/ui/static/batches-table.html +++ b/server/src/main/resources/com/cloudera/livy/server/ui/static/batches-table.html @@ -22,7 +22,13 @@

Batch Sessions

Batch Id - Application Id + + + Application Id + + Interactive Sessi Session Id - Application Id + + + Application Id + + Owner