frontend code
This commit is contained in:
0
frontend/static/.gitkeep
Normal file
0
frontend/static/.gitkeep
Normal file
22
frontend/static/dataTool.min.js
vendored
Normal file
22
frontend/static/dataTool.min.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
/*
|
||||
* 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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("echarts")):"function"==typeof define&&define.amd?define(["exports","echarts"],t):t((e=e||self).dataTool={},e.echarts)}(this,function(e,t){"use strict";var r=Array.prototype,i=r.slice,l=r.map,o=function(){}.constructor,r=o?o.prototype:null;function a(e,t,r){if(!e)return[];if(!t)return function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return i.apply(e,t)}(e);if(e.map&&e.map===l)return e.map(t,r);for(var o=[],n=0,a=e.length;n<a;n++)o.push(t.call(r,e[n],n,e));return o}r&&"function"==typeof r.bind&&r.call.bind(r.bind);function p(e,t){return e.getAttribute(t)}function c(e,t){for(var r=e.firstChild;r;){if(1===r.nodeType&&r.nodeName.toLowerCase()===t.toLowerCase())return r;r=r.nextSibling}return null}function d(e,t){for(var r=e.firstChild,o=[];r;)r.nodeName.toLowerCase()===t.toLowerCase()&&o.push(r),r=r.nextSibling;return o}o=Object.freeze({__proto__:null,parse:function(e){if(!(t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e)||t.getElementsByTagName("parsererror").length)return null;if(!(e=c(t,"gexf")))return null;for(var f,t=c(e,"graph"),r=(e=c(t,"attributes"))?a(d(e,"attribute"),function(e){return{id:p(e,"id"),title:p(e,"title"),type:p(e,"type")}}):[],o={},n=0;n<r.length;n++)o[r[n].id]=r[n];return{nodes:(e=c(t,"nodes"),f=o,e?a(d(e,"node"),function(e){var t={id:p(e,"id"),name:p(e,"label"),itemStyle:{normal:{}}},r=c(e,"viz:size"),o=c(e,"viz:position"),n=c(e,"viz:color"),e=c(e,"attvalues");if(r&&(t.symbolSize=parseFloat(p(r,"value"))),o&&(t.x=parseFloat(p(o,"x")),t.y=parseFloat(p(o,"y"))),n&&(t.itemStyle.normal.color="rgb("+[0|p(n,"r"),0|p(n,"g"),0|p(n,"b")].join(",")+")"),e){var a=d(e,"attvalue");t.attributes={};for(var i=0;i<a.length;i++){var l=a[i],u=p(l,"for"),s=p(l,"value"),l=f[u];if(l){switch(l.type){case"integer":case"long":s=parseInt(s,10);break;case"float":case"double":s=parseFloat(s);break;case"boolean":s="true"===s.toLowerCase()}t.attributes[u]=s}}}return t}):[]),links:(t=c(t,"edges"))?a(d(t,"edge"),function(e){var t={id:p(e,"id"),name:p(e,"label"),source:p(e,"source"),target:p(e,"target"),lineStyle:{normal:{}}},r=t.lineStyle.normal,o=c(e,"viz:thickness"),e=c(e,"viz:color");return o&&(r.width=parseFloat(o.getAttribute("value"))),e&&(r.color="rgb("+[0|p(e,"r"),0|p(e,"g"),0|p(e,"b")].join(",")+")"),t}):[]}}});function y(e,t){var r=(e.length-1)*t+1,o=Math.floor(r),t=+e[o-1],r=r-o;return r?t+r*(e[o]-t):t}function n(e,t){for(var r=[],o=[],n=[],a=(t=t||{}).boundIQR,i="none"===a||0===a,l=0;l<e.length;l++){n.push(l+"");var u=((g=e[l].slice()).sort(function(e,t){return e-t}),g),s=y(u,.25),f=y(u,.5),p=y(u,.75),c=u[0],d=u[u.length-1],g=(null==a?1.5:a)*(p-s),v=i?c:Math.max(c,s-g),b=i?d:Math.min(d,p+g);r.push([v,s,f,p,b]);for(var h=0;h<u.length;h++){var m=u[h];(m<v||b<m)&&(m=[l,m],"vertical"===t.layout&&m.reverse(),o.push(m))}}return{boxData:r,outliers:o,axisData:n}}r="1.0.0";t.dataTool&&(t.dataTool.version=r,t.dataTool.gexf=o,t.dataTool.prepareBoxplotData=n),e.gexf=o,e.prepareBoxplotData=n,e.version=r,Object.defineProperty(e,"__esModule",{value:!0})});
|
||||
8
frontend/static/echarts-wordcloud.min.js
vendored
Normal file
8
frontend/static/echarts-wordcloud.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
frontend/static/echarts.min.js
vendored
Normal file
12
frontend/static/echarts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
frontend/static/elements.json
Normal file
1
frontend/static/elements.json
Normal file
File diff suppressed because one or more lines are too long
1394
frontend/static/les-miserables.gexf
Normal file
1394
frontend/static/les-miserables.gexf
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/static/mail_relation.json
Normal file
1
frontend/static/mail_relation.json
Normal file
File diff suppressed because one or more lines are too long
48
frontend/static/popWin.js
Normal file
48
frontend/static/popWin.js
Normal file
@@ -0,0 +1,48 @@
|
||||
var popWin = {
|
||||
scrolling: 'auto',//是否显示滚动条 no,yes,auto
|
||||
closeCallBack:null,
|
||||
init: function() {
|
||||
this.mouseClose();
|
||||
this.closeMask();
|
||||
},
|
||||
showWin: function(src, width, height, callBackBeforeClose) {
|
||||
if(typeof callBackBeforeClose!=undefined && callBackBeforeClose!=null){
|
||||
closeCallBack=callBackBeforeClose;
|
||||
}
|
||||
var titleDivHeight=0;
|
||||
var iframeHeight = height - titleDivHeight;
|
||||
var marginLeft = width / 2;
|
||||
var marginTop = height / 2;
|
||||
var inntHtml = '';
|
||||
inntHtml += '<div id="mask" style="width:100%; height:100%; position:fixed; top:0; left:0; z-inde:1999;background:#cccccc; filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity:0.5;"></div>'
|
||||
inntHtml += '<div id="maskTop" style="width: ' + width + 'px; height: ' + height + 'px; border: #999999 1px solid; background: #fff; color: #333; position: fixed; top: 50%; left: 50%; margin-left: -' + marginLeft + 'px; margin-top: -' + marginTop + 'px; z-index: 2999; filter: progid:DXImageTransform.Microsoft.Shadow(color=#909090,direction=120,strength=4); -moz-box-shadow: 2px 2px 10px #909090; -webkit-box-shadow: 2px 2px 10px #909090; box-shadow: 2px 2px 10px #909090;">'
|
||||
inntHtml += '<div id="maskTitle" style=" height: '+titleDivHeight+'px; line-height: 50px; font-family: Microsoft Yahei; font-size: 20px; color: #333333; padding-left: 20px; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAyCAYAAABlG0p9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABvSURBVEhL1cq5DcAwDENR7T+sL9lOOoUbkCoCwwKewOJbiGe+31BkwgeDM18YgrPhxuBs4CkS4cQQZMKFwd0R+gzFJaFjcD+EfXgoMuHA4O4Iew/FJWHD4BJhwxDoYcNTIKwY3NGwYggQFgxODEt8xO1/6P+HHxEAAAAASUVORK5CYII=); border-bottom: 1px solid #999999; position: relative;">'
|
||||
inntHtml += ''
|
||||
inntHtml += '<div id="popWinClose" style="width: 28px; height: 28px; cursor: pointer; position: absolute; top: -12px; right: -9px; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJeSURBVEhLvZbPq2lRFMf9B4bSTTIxZiBSMlCI9ycoKX+Bod7w/il3YIL4NyhFmYmBKD2Sp0ix3vqes/e529n74t33Op9astevr3PO2tvxvcLtdquzfbAtyAV8IlYX6d+DG7yxvbP9Fr2fglxR8ybavAYX/GD7Jfr8NahFD9HuMZz4U9Q5jEYjqlarFA6HiVPuDD7EkOMGvTjna9xi8/mcstmsJvKVIRc1Kl+K4haIHItut0t+v9/Y+JGhBrUq6M2xT9iBAXGeGQrY/U+miqI3NNhvw4t3EbNuyXeuzG3ood5eaLDfhhfO6JueWbPZtGKFQkGLNRoN2u/3FI/HtRh6SaDBPkusLnzWpMlkaRC7XC5WfLVaUTqddmKVSoVOp5MVG4/HlEql7mph6vRCC4IfYm2Nt7vAzW63o2KxSLVaja7Xq/DatFotrR49JdCCoHNcmfZZPp+n9XotMmxwVVwnVjbD4ZAikYhWj54SaN1dgjtZWiaToe12K7J0JpOJUUyaykuCsFwuR8fjUWR+slgsKBAIGGukqbwsiGdmElwul5RIJIw10lReEsQ0ns9nkaVzOBys226qhak8HRrsM7ktJLPZjDabjVjZYLBKpZJWrw0NfzzcFvj1KtPp1HpmsVjM2iIq/X5fqzdti4cbHycINjUYDAYUCoWcGA4BHAag1+tRMBi8q4VpGx/wl4dHWzKZpHa7TdFoVIuVy2XqdDrGSTUebYAXnh/e3v49AXZ49wcs4YB3rxgStyjApGG8TfsUPsTUaZQ8FZPgFrB585oo4QLvXoTdcIP/9Krv8/0BDUSOirKWU6wAAAAASUVORK5CYII=);"></div>'
|
||||
inntHtml += '</div>'
|
||||
inntHtml += '<iframe width="' + width + '" height="' + iframeHeight + '" frameborder="0" scrolling="' + this.scrolling + '" src="' + src + '"></iframe>';
|
||||
inntHtml += '</div>'
|
||||
$("body").append(inntHtml);
|
||||
this.init();
|
||||
},
|
||||
mouseClose: function() {
|
||||
$("#popWinClose").on('mouseenter',
|
||||
function() {
|
||||
$(this).css("background-image", "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJwSURBVEhLvZbLSiNBFIb7DVyKiIgb17oQRRAXgor6CIIIeQKXMksfxYUbFbMZRh0Yb6ODMgEddCVmoWkRLzFekukxfay/+lRbqSqTVob+4CyqzuVPV59TaS8JYRhmhM0Ly5MB9tiX4fDPIQq0CpsT9sC1G4JYzmnlMskQCRPCrrnOh0EuanC5+ojAL5wXc5/LUW5qitba2ynreTWGPfgQY4JaXNaNKfZ0dkY7g4OWyHuGWOTovCuKI+AYib+8TF+bmpyF6xlykKuD2iwTITbQIPE7Q4Kr2EdMF0VtaLCcFJxjnzySzzyZaaihHy80WE4Kxq3vemcns7PStzsyYvn+zMxQUCzSRne35UMtBTSUWIb3ZKeZSRCrBoH0lwsF2u7vj32/JyepWi5L3/3hIW319dXkwvTuhRYE53kt29tMMAlub2lvdJRy09MUVqu8G3GxsGDlo6YCWhCMryvXnO0OD1PF9zkiQj5VGPIqonhwQOsdHVY+aiqgVfMIZrCy7YEBCm5uOMqmdHTkFFOmk0gQ9nNoiF4eHznyjed8nr41NztzlOkkFsQ7cwmWz89ps6fHmaNMJ5Gg7MZKhaNs/pVK8thduTCdhk2DOVNjoXg6PaW/V1e8ikBj7Y2NWflW06BVee0cC/x6nYfjY/nOfnR1yRHRucxmrXzXWNQdfNwgGGpwt79Pa21tsQ+XAC4D4K+s0GpLS00uzBp8vm3qXm1bvb1UWFyk752dlu/X+Dj5S0vOTnVebUAsUr+80/17AmIjvT9ghXCk94mhMEUBOg3t7ZpT7MGnd6OioZgCRyAsnc9EhUhI70PYRBT4T5/6nvcKYG1hElXAZggAAAAASUVORK5CYII=)");
|
||||
});
|
||||
$("#popWinClose").on('mouseleave',
|
||||
function() {
|
||||
$(this).css("background-image", "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJeSURBVEhLvZbPq2lRFMf9B4bSTTIxZiBSMlCI9ycoKX+Bod7w/il3YIL4NyhFmYmBKD2Sp0ix3vqes/e529n74t33Op9astevr3PO2tvxvcLtdquzfbAtyAV8IlYX6d+DG7yxvbP9Fr2fglxR8ybavAYX/GD7Jfr8NahFD9HuMZz4U9Q5jEYjqlarFA6HiVPuDD7EkOMGvTjna9xi8/mcstmsJvKVIRc1Kl+K4haIHItut0t+v9/Y+JGhBrUq6M2xT9iBAXGeGQrY/U+miqI3NNhvw4t3EbNuyXeuzG3ood5eaLDfhhfO6JueWbPZtGKFQkGLNRoN2u/3FI/HtRh6SaDBPkusLnzWpMlkaRC7XC5WfLVaUTqddmKVSoVOp5MVG4/HlEql7mph6vRCC4IfYm2Nt7vAzW63o2KxSLVaja7Xq/DatFotrR49JdCCoHNcmfZZPp+n9XotMmxwVVwnVjbD4ZAikYhWj54SaN1dgjtZWiaToe12K7J0JpOJUUyaykuCsFwuR8fjUWR+slgsKBAIGGukqbwsiGdmElwul5RIJIw10lReEsQ0ns9nkaVzOBys226qhak8HRrsM7ktJLPZjDabjVjZYLBKpZJWrw0NfzzcFvj1KtPp1HpmsVjM2iIq/X5fqzdti4cbHycINjUYDAYUCoWcGA4BHAag1+tRMBi8q4VpGx/wl4dHWzKZpHa7TdFoVIuVy2XqdDrGSTUebYAXnh/e3v49AXZ49wcs4YB3rxgStyjApGG8TfsUPsTUaZQ8FZPgFrB585oo4QLvXoTdcIP/9Krv8/0BDUSOirKWU6wAAAAASUVORK5CYII=)");
|
||||
});
|
||||
},
|
||||
closeMask: function() {
|
||||
$("#popWinClose").on('click', function() {
|
||||
$("#mask,#maskTop").fadeOut(function() {
|
||||
$(this).remove();
|
||||
});
|
||||
if(typeof closeCallBack!=undefined && closeCallBack!=null){
|
||||
closeCallBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
49
frontend/static/relation.json
Normal file
49
frontend/static/relation.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "根节点",
|
||||
"value": "https://baike.baidu.com/item/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/18763?fr=aladdin",
|
||||
"children": [{
|
||||
"name": "节点1",
|
||||
"value": "",
|
||||
"children": [{
|
||||
"name": "叶子节点1",
|
||||
"value": "http://www.baidu.com"
|
||||
|
||||
},
|
||||
{
|
||||
"name": "叶子节点2",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"name": "叶子节点3",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "节点",
|
||||
"value": "",
|
||||
"children": [{
|
||||
"name": "叶子节点4",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"name": "叶子节点5",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "节点3",
|
||||
"value": "",
|
||||
"children": [{
|
||||
"name": "叶子节点6",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"name": "叶子节点7",
|
||||
"value": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
22
frontend/static/test.gexf
Normal file
22
frontend/static/test.gexf
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gexf xmlns:viz="http://www.gexf.net/1.1draft/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.gephi.org/gexf/1.1draft" xmlns:ns0="xsi" version="1.1" ns0:schemaLocation="http://www.gephi.org/gexf/1.1draft http://gephi.org/gexf/1.1draft.xsd">
|
||||
<meta lastmodified="2016-04-12T02:13:40.776892">
|
||||
<creator>Gephi.org</creator>
|
||||
<description>A userid network</description>
|
||||
</meta>
|
||||
<graph defaultedgetype="directed" label="A Web network" mode="static">
|
||||
<attributes class="node" mode="static">
|
||||
<attribute id="dataclass" title="id category" type="integer"></attribute>
|
||||
<attribute id="datasize" title="id connect" type="integer"></attribute>
|
||||
</attributes>
|
||||
<nodes>
|
||||
<node id="1" label="梁勇"><attvalues><attvalue for="datasize" value="5914"/><attvalue for="dataclass" value="5"/></attvalues></node>
|
||||
<node id="2" label="子呆不呆"><attvalues><attvalue for="datasize" value="5686"/><attvalue for="dataclass" value="5"/></attvalues></node>
|
||||
<node id="3" label="冰咖啡"><attvalues><attvalue for="datasize" value="5622"/><attvalue for="dataclass" value="5"/></attvalues></node>
|
||||
</nodes>
|
||||
<edges>
|
||||
<edge id="1" source="1" target="2" weight="1"/>
|
||||
<edge id="2" source="2" target="3" weight="1"/>
|
||||
</edges>
|
||||
</graph>
|
||||
</gexf>
|
||||
Reference in New Issue
Block a user