forked from apache/incubator-livy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LIVY-344][WEB UI] Create Session Log Page
[LIVY-344](https://issues.cloudera.org/browse/LIVY-344) Created a Session Log page for viewing the session log. Updated All Sessions Page and Session Page with links to the Log Page. Log Page exists for both Interactive Sessions and Batches. Tested Manually, screenshots below ![screen shot 2017-07-26 at 1 30 35 pm](https://user-images.githubusercontent.com/13952758/28643916-4668a3f0-720c-11e7-8441-526547980e7b.png) ![screen shot 2017-07-26 at 1 30 40 pm](https://user-images.githubusercontent.com/13952758/28643917-467d50ca-720c-11e7-9c08-fab578d81ad5.png) ![screen shot 2017-07-26 at 1 30 44 pm](https://user-images.githubusercontent.com/13952758/28643918-467fcfe4-720c-11e7-8d95-72fb4c57c6a8.png) Author: Alex Bozarth <[email protected]> Closes apache#25 from ajbozarth/log-ui.
- Loading branch information
Showing
8 changed files
with
94 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
server/src/main/resources/org/apache/livy/server/ui/static/js/session-log.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
function getLogPath(type, id) { | ||
if (type == "session") { | ||
return "/sessions/" + id + "/log"; | ||
} else if (type == "batch") { | ||
return "/batches/" + id + "/log"; | ||
} else { | ||
return ""; | ||
} | ||
} | ||
|
||
function parseLog(logLines) { | ||
// TODO: [LIVY-387]: Separate out stdout, stderr, and YARN Diagnostics into different viewers | ||
return preWrap(logLines.join("\n")); | ||
} | ||
|
||
$(document).ready(function () { | ||
var pathArr = getPathArray(); | ||
var type = pathArr.shift(); | ||
var id = pathArr.shift(); | ||
|
||
$.getJSON(location.origin + getLogPath(type, id), {size: -1}, function(response) { | ||
if (response) { | ||
$("#session-log").append(parseLog(response.log)); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters