blob: 311441c8d64c100a19232ad7e1d94a6060f0fc99 [file] [log] [blame]
<!DOCTYPE html>
<!--
~ 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.
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Workflow Designer </title>
<link rel="shortcut icon" type="image/icon" href="assets/favicon.ico" />
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> {{content-for "head"}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/oozie-designer.css"> {{content-for "head-footer"}}
<style>
body{background:#fff;}
</style>
</head>
<body>
<div style="display:none;">
<!-- preloading images for designer-->
<img src="assets/play.png"/>
<img src="assets/stop.png"/>
<img src="assets/join.png"/>
<img src="assets/sitemap.png"/>
<img src="assets/hive.png"/>
<img src="assets/hive2.png"/>
<img src="assets/sqoop.png"/>
<img src="assets/pig.png"/>
<img src="assets/sub-workflow.png"/>
<img src="assets/java.png"/>
<img src="assets/shell.png"/>
<img src="assets/distcp.png"/>
<img src="assets/map-reduce.png"/>
<img src="assets/ssh.png"/>
<img src="assets/spark.png"/>
<img src="assets/email.png"/>
<img src="assets/fs.png"/>
<img src="assets/custom.png"/>
</div>
{{content-for "body"}}
<script src="assets/vendor.js"></script>
<script src="assets/oozie-designer.js"></script>
</body>
<script type="text/javascript">
var AmbariViewHelper = {
isAmbariView: function() {
return window.location.href.indexOf("/views/") > 0;
},
getViewInfo: function() {
var tokens = window.location.href.substring(window.location.href.indexOf("/views/") + 7).split("/");
var info = {
name: tokens[0],
version: tokens[1],
instance: tokens[2]
};
info.API_URL = ["/api/v1/views/", info.name, "/versions/", info.version, "/instances/" + info.instance].join("");
return info;
},
loadInstanceInfo: function() {
var viewInfo = this.getViewInfo();
$.ajax({
dataType: "json",
url: viewInfo.API_URL,
async: false,
success: function(result) {
Ember.ENV.instanceInfo = result;
// Update the API URL pointing to Ambari View Resource
Ember.ENV.API_URL = viewInfo.API_URL + "/resources/proxy";
Ember.ENV.FILE_API_URL = viewInfo.API_URL + "/resources/proxy/fileServices";
}
});
}
};
if (AmbariViewHelper.isAmbariView()) {
$('body').addClass("ambari-view");
AmbariViewHelper.loadInstanceInfo();
}
</script>
</html>