http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a9d61e1b/dashboard/v3/lib/npm.js ---------------------------------------------------------------------- diff --git a/dashboard/v3/lib/npm.js b/dashboard/v3/lib/npm.js new file mode 100755 index 0000000..bf6aa80 --- /dev/null +++ b/dashboard/v3/lib/npm.js @@ -0,0 +1,13 @@ +// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. +require('../../js/transition.js') +require('../../js/alert.js') +require('../../js/button.js') +require('../../js/carousel.js') +require('../../js/collapse.js') +require('../../js/dropdown.js') +require('../../js/modal.js') +require('../../js/tooltip.js') +require('../../js/popover.js') +require('../../js/scrollspy.js') +require('../../js/tab.js') +require('../../js/affix.js') \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a9d61e1b/dashboard/v3/partials/graph.json ---------------------------------------------------------------------- diff --git a/dashboard/v3/partials/graph.json b/dashboard/v3/partials/graph.json new file mode 100755 index 0000000..1c6eb7b --- /dev/null +++ b/dashboard/v3/partials/graph.json @@ -0,0 +1,19 @@ +{ + "name": "sales_fact", + "children": [ + { + "name": "loadSalesDaily", "size": 3938, + "children": [ + { + "name": "sales_fact_daily_mv", + "children": [ + {"name": "loadSalesMonthly", "size": 3938, + "children": [ + {"name": "sales_fact_monthly_mv", "size": 3812} + ] + } + ] + }] + } + ] + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a9d61e1b/dashboard/v3/partials/sample.html ---------------------------------------------------------------------- diff --git a/dashboard/v3/partials/sample.html b/dashboard/v3/partials/sample.html new file mode 100755 index 0000000..fd69000 --- /dev/null +++ b/dashboard/v3/partials/sample.html @@ -0,0 +1,158 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<style> + +.node circle { + cursor: pointer; + stroke-width: 0px; +} + +.node text { + font: 13px sans-serif; + + pointer-events: none; + text-anchor: middle; +} + +line.link { + fill: none; + stroke: green; + stroke-width: 5.5px; +} + +</style> +</head> +<body> +<script src="http://d3js.org/d3.v3.min.js"></script> +<script> + +var width = 760, + height = 500, + root; + +var force = d3.layout.force() + .linkDistance(220) + .charge(-120) + .gravity(.05) + .size([width, height]) + .on("tick", tick); + +var svg = d3.select("body").append("svg") + .attr("width", width) + .attr("height", height); + +var link = svg.selectAll(".link"), + node = svg.selectAll(".node"); + +d3.json("graph.json", function(error, json) { + root = json; + update(); +}); + +function update() { + var nodes = flatten(root), + links = d3.layout.tree().links(nodes); + + // Restart the force layout. + force + .nodes(nodes) + .links(links) + .start(); + + // Update links. + link = link.data(links, function(d) { return d.target.id; }); + + link.exit().remove(); + + link.enter().insert("line", ".node") + .attr("class", "link"); + + // Update nodes. + node = node.data(nodes, function(d) { return d.id; }); + + node.exit().remove(); + + svg.append("svg:pattern").attr("id","processICO").attr("width",1).attr("height",1) + .append("svg:image").attr("xlink:href","../img/process.png").attr("x",-5.5).attr("y",-4).attr("width",42).attr("height",42); + svg.append("svg:pattern").attr("id","textICO").attr("width",1).attr("height",1) + .append("svg:image").attr("xlink:href","../img/tableicon.png").attr("x",2).attr("y",2).attr("width",25).attr("height",25); + + +//arrow + svg.append("svg:defs").append("svg:marker").attr("id", "arrow").attr("viewBox", "0 0 10 10").attr("refX", 16).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 4).attr("markerHeight", 8).attr("orient", "auto").append("svg:path").attr("d", "M 0 0 L 10 5 L 0 10 z"); +//arrow + var nodeEnter = node.enter().append("g") + .attr("class", "node") + .on("click", click) + .call(force.drag); + + + nodeEnter.append("circle") + .attr("r", function(d) { return 15; }); + + link.attr("marker-end", "url(#arrow)"); //also added attribute for arrow at end + + nodeEnter.append("text") + .attr("dy", "-1em") + .text(function(d) { return d.name; }); + + node.select("circle") + .style("fill", function(d, i) { + if(d.size==3938){ + return "url('#processICO')"; + }else{ + return "url('#textICO')"; + } + return colors(i); + }); + + +} + +function tick() { + link.attr("x1", function(d) { return d.source.x; }) + .attr("y1", function(d) { return d.source.y; }) + .attr("x2", function(d) { return d.target.x; }) + .attr("y2", function(d) { return d.target.y; }); + + node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); +} + +function color(d) { + return d._children ? "#3182bd" // collapsed package + : d.children ? "#c6dbef" // expanded package + : "#fd8d3c"; // leaf node +} + +// Toggle children on click. +function click(d) { + if (d3.event.defaultPrevented) return; // ignore drag + if (d.children) { + d._children = d.children; + d.children = null; + } else { + d.children = d._children; + d._children = null; + } + update(); +} + +// Returns a list of all nodes the root. +function flatten(root) { + var nodes = [], i = 0; + + function recurse(node) { + if (node.children) node.children.forEach(recurse); + if (!node.id) node.id = ++i; + nodes.push(node); + } + + recurse(root); + return nodes; +} + +</script> +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a9d61e1b/dashboard/v3/partials/search.html ---------------------------------------------------------------------- diff --git a/dashboard/v3/partials/search.html b/dashboard/v3/partials/search.html new file mode 100755 index 0000000..1e9bcb1 --- /dev/null +++ b/dashboard/v3/partials/search.html @@ -0,0 +1,127 @@ +<!-- +~ 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. +--> <!-- Page Content --> + + <!--right panel--> + <div class="col-lg-8 mrgl45"> + <div class="col-lg-12"> + <h4 class="greyt" ng-hide="isUndefined(SearchQuery)" style="font: 15px sans-serif">{{itemlength}} results found for {{SearchQuery}}</h4> + <h4 ng-show="isUndefined(SearchQuery)">Results</h4> + </div> + <div class="col-lg-12 rightpanal"> + <!--1--> + <div class="col-lg-12 div_ex" style="margin-top:30px" ng-repeat="(key, value) in pagedItems[currentPage]"> + <div class="row"> + + <div ng-repeat="(k, v) in configdata"> + <div class="col-xs-10" ng-if="datatype === k"> + <span ng-repeat="(key1, value1) in v"> + + <span ng-if="isString(value1)"> + <span class="resulttxt" ng-if="!(value1=='name')"> + <b> {{value1}} : </b> {{value[value1] | date:'medium'}}<span ng-show=" ! $last ">,</span> + + </span> + + </span> + + <span ng-if="value1.inputTables"> + <span class="resulttxt"> + <b> inputTables : </b> <span ng-repeat="(inkey, invalue) in value.inputTables"> <span ng-controller="GuidController"> <span ng-init="getGuidName(invalue.id)"> <span ng-repeat="x in gnew track by $index">{{x}}</span>, </span> </span> </span> + + </span> + + </span> + + <div ng-if="value1.$id$"> + + <div class="col-lg-12" style="margin-left:-40px;"> + <img src="img/arrow.png"> <span class="guidtxt"> + <a ui-sref="details({ Id: value['$id$'].id })" style="color: #636364 !important;">{{value['name']}}</a></span> + </div> + </br> + </div> + <div ng-if="value1.instanceInfo" ng-controller="GuidController"> + + <div class="col-lg-12" style="margin-left:-40px;"> + <img src="img/arrow.png"> <span class="guidtxt" ui-sref="details({ Id: value['instanceInfo'].guid })" style="color: #636364 !important;" ng-init="getGuidName(value['instanceInfo'].guid)"> + + <a ui-sref="details({ Id: value['instanceInfo'].guid })" style="color: #636364 !important;" ng-repeat="x in gnew track by $index">{{x}}</a> + + </span> + </div> + </br> + <div class="col-lg-12" style="margin-left: -15px;"> + <p>{{value['instanceInfo'].typeName}}</p> + </div> + </div> + + + <div ng-if="value1.description"> + + <div class="col-lg-12" style="margin-left: -15px;"> + <p>{{value['description']}}</p> + </div> + </br> + </div> + <div ng-if="value1.$traits$" class="col-lg-12 guidtxt2" style="margin-left: -15px;">Tags: + <b ng-if="isObject(value['$traits$'])"> + <u ng-repeat="(keytag, valtag) in value['$traits$']"> + <a ng-click="updateVars($event)" ui-sref="Search({ searchid: keytag })" style="color: #636364 !important;">{{keytag}}</a> + </u> + </b> + </div> + + </span> + </div> + + <!--1--> + + </div> + </div> + </div> + <div class="col-lg-12 img2" align="right"><img src="img/img2.png"></div> +<br/> + <br/> + <br/> + <div class="col-lg-12" > + + + <!-- DC Pagination:A1 Start --> + <ul class="tsc_pagination tsc_paginationA tsc_paginationA01" style="margin-top:-30px" ng-show="Showpaging(pagedItems.length)"> + + <li ng-class="{disabled: currentPage == 0}"><a href ng-click="firstPage()" class="first">First</a></li> + <li><a href ng-click="prevPage()" class="previous">Previous</a></li> + <li ng-repeat="n in range(pagedItems.length)" nd-class="{current: n == currentPage}" ng-click="setPage()"><a href ng-bind="n+1">1</a></li> + <li ng-class="{disabled: currentPage == pagedItems.length-1}"><a href ng-click="nextPage()" class="next">Next</a></li> + <li ng-class="{disabled: currentPage == pagedItems.length-1}"><a href ng-click="lastPage()" class="last">Last</a></li> + + + + + </ul> + </div> + </div> +</div> + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a9d61e1b/dashboard/v3/partials/wiki.html ---------------------------------------------------------------------- diff --git a/dashboard/v3/partials/wiki.html b/dashboard/v3/partials/wiki.html new file mode 100755 index 0000000..06da6e5 --- /dev/null +++ b/dashboard/v3/partials/wiki.html @@ -0,0 +1,257 @@ +<!-- + ~ 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. + --> + + <!--right panel--> + <div class="col-lg-8 mrgl45"> + + <tabset justified="true" class="col-lg-12 greyt"> + <tab heading="DETAILS"> + <div class="col-lg-12 rightpanal"> + <!--1--> + + <div class="col-xs-12"> + <div class="row"> + + <div> + <!-- name and desc --> + + <div> + + <div ng-repeat="(key, value) in details" ng-if="value && (key==='name')"> + <br/> + <br/> + <p style="font-weight:1000;font-size:18px;color:#333;"> {{value }}</p> + + <!-- <h4><b> {{value}}</b></h4> --> + + + </div> + + + + <div ng-repeat="(key, value) in details" ng-if="value && (key==='description')"> + <!-- <h4> <b>{{value}} </b> </h4> --> + + <p style="font-weight:bold;"> {{value}}</p> + </div> + <div class="sm-txt2"> + + + <p ng-repeat="(keytag, valtag) in details['$traits$']">Tags: + <a ng-click="updateDetailsVariable($event)" ui-sref="Search({ searchid: keytag })" style="color: #636364 !important;"> + {{keytag}} </a></p> + + + </div> + + </div> + <p ><b> Additional Details</b></p> + + <!-- name and desc --> + <table class="table table-bordered table-hover" style="margin-top: 20px"> + <thead> + + <tr> + <th style="border:2px solid #C9CBCC !important;">Key</th> + <th style="border:2px solid #C9CBCC !important;">Value</th> + </tr> + </thead> + <tbody> + <!-- <tr ng-repeat="(key, value) in details" ng-if="value && (key==='name')"> + <td>{{key}}</td> + <td> + {{value}}</td> + </tr> + <tr ng-repeat="(key, value) in details" ng-if="value && (key==='description')"> + <td>{{key}}</td> + <td> + {{value}}</td> + </tr> --> + + + <tr ng-repeat="(key, value) in details" ng-if="value && !(key==='columns') && !(key==='name') && !(key==='description')"> + + + <td>{{key}}</td> + <td ng-if="isString(value)"> + {{value | date:'medium'}}</td> + + <td ng-if="isObject(value)"> + <div ng-repeat="(key1, value1) in value"> + <p ng-if="key1==='id'"> + <a ng-click="updateVariable($event)" href="#/details/{{value1}}" style="color: #636364 !important;" ng-init="getGuidName(value1)">{{ gname.name }}</a></p> + <p ng-if="!(key1==='id')" class="sm-txt2"><b>{{ key1}} : </b> + {{ value.version}} + </div> + </td> + + </tr> + <!-- <tr> + + <td> + <p class="sm-txt2">Tags:</p> + </td> + <td> + <p ng-repeat="(keytag, valtag) in details['$traits$']"> + <a ng-click="updateVariable($event)" ui-sref="Search({ searchid: keytag })" style="color: #636364 !important;"> + {{keytag}} </a></p> + </td> + + </tr> + --> + </tbody> + + </table> + + </div> + + + + + + <div class="col-lg-12 img2" align="right"><img src="img/img2.png"></div> + </div> + </div> + + </div> + </tab> + + <tab heading="SCHEMA" ng-if="datatype1==='Table'"> + <div class="col-lg-12 rightpanal"> + <!--1--> + <div class="col-xs-12"> + <div class="row"> + + + <table class="table table-bordered table-hover" style="margin-top: 20px"> + <!-- <thead> + <tr> + <th style="border:2px solid #C9CBCC !important;">Value</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="(key, value) in schema.columns"> + <td>{{value}}</td> + </tr> + </tbody>--> + + + <thead> + + <tr > + <th style="border:2px solid #C9CBCC !important;">Name</th> + <th style="border:2px solid #C9CBCC !important;">DataType</th> + <th style="border:2px solid #C9CBCC !important;">Comment</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="s in schema track by $index" > + <td>{{s.name }}</td> + + + + <td> {{s.dataType }}</td> + + <td> {{s.comment }}</td> + </tr> + <!-- <tr ng-repeat="(key, value) in schema" ng-if="value"> + + <td ng-if="isString(value)"> + {{value | date:'medium'}}</td> + + <td ng-if="isObject(value)"> + <div ng-repeat="(key1, value1) in value"> + <p ng-if="key1==='id'"> + <a ng-click="updateVariable($event)" href="#/details/{{value1}}" style="color: #636364 !important;" ng-init="getGuidName(value1)">{{ gname.name }}</a> + </p> + + <p ng-if="!(key1==='id')" class="sm-txt2" > + <td><b>{{ key1 }} : </b></td> + + + + <td> {{ value1 | date:'medium' }}</td> + </tr> + </p> + + + </div> + </td> + + </tr> --> + </tbody> + + </table> + + </div> + <div class="col-lg-12 img2" align="right"><img src="img/img2.png"></div> + </div> + </div> + </tab> + <tab heading="OUTPUTS" ng-show="datatype1==='Table'"> + <div class="col-lg-12 rightpanal" > + <div class="col-xs-12"> + <div class="row"> + <div ng-if="errornodata"><h1>{{errornodata}}</h1></div> + <!--<svg ng-attr-width="{{width}}"--> + <!--ng-attr-height="{{height}}">--> + + <!--</svg>--> + + + <svg + width="700px" height="600px" overflow="hidden" style="margin:auto;vertical-align: middle;" preserveAspectRatio="none"> + + </svg> + + + <!--<div id="mybounce" style="text-align:center;">--> + + + <!--</div>--> + + <div class="col-lg-12 img2" align="right"><img src="img/img2.png"></div> + </div> + </div> + </div> + </tab> + <tab heading="INPUTS" ng-show="datatype1==='Table'"> + <div class="col-lg-12 rightpanal"> + <div class="col-xs-12"> + <div class="row"> + <div ng-if="errornodata1"><h1>{{errornodata1}}</h1></div> + <svg1 ng-attr-width="{{width}}" + ng-attr-height="{{height}}" width="700px" height="600px" overflow="hidden" style="margin:auto;vertical-align: middle;" preserveAspectRatio="none"> + + </svg1> + <!--<iframe src="partials/sample.html"style=" width:630px;height:500px;overflow-x: hidden;overflow: hidden; overflow-y='scroll';" frameborder="0" scrolling="no"></iframe>--> + + + + <div class="col-lg-12 img2" align="right"><img src="img/img2.png"></div> + </div> + </div> + </div> + </tab> + </tabset> + <div> + <!--<a ui-sref="Search" ng-click="goBack()" style="color: #636364 !important; margin-left: 15px;">Back To Results(old)</a>--> + <a ui-sref="Search" onClick="javascript:history.go(-1);" style="color: #636364 !important; margin-left: 15px;">Back To Results</a> + </div> + + </div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a9d61e1b/webapp/pom.xml ---------------------------------------------------------------------- diff --git a/webapp/pom.xml b/webapp/pom.xml index 7313fcc..6a66bea 100755 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -216,14 +216,10 @@ <configuration> <webResources> <resource> - <directory>../dashboard/v1</directory> + <directory>../dashboard/v3</directory> <targetPath>dashboard</targetPath> </resource> <resource> - <directory>../dashboard/v2</directory> - <targetPath>dashboard/v2</targetPath> - </resource> - <resource> <directory>src/main/webapp/WEB-INF</directory> <targetPath>WEB-INF</targetPath> </resource> http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/a9d61e1b/webapp/src/main/webapp/index.html ---------------------------------------------------------------------- diff --git a/webapp/src/main/webapp/index.html b/webapp/src/main/webapp/index.html index f15a3a9..c248b79 100755 --- a/webapp/src/main/webapp/index.html +++ b/webapp/src/main/webapp/index.html @@ -23,11 +23,12 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="Date-Revision-yyyymmdd" content="20130821"/> <meta http-equiv="Content-Language" content="en"/> - <title>Apache DGI - Data Governance platform</title> + <title>Apache Atlas - Data Governance for Hadoop</title> </head> <body class="topBarEnabled"> -<h1> Apache DGI </h1> -More information at: <a href="http://dgi.incubator.apache.org/index.html" title="About">Project - Website</a> +<h1> Apache Atlas </h1> +<a href="./dashboard/index.html" title="Atlas">Atlas Dashboard</a> +<br/> +More information at: <a href="http://atlas.incubator.apache.org/index.html" title="About">Project Website</a> </body> </html>
