зеркало из https://github.com/mozilla/docker-etl.git
Bundle vis-network into the app
This commit is contained in:
Родитель
0242b057cb
Коммит
11860f30e9
|
@ -771,6 +771,16 @@
|
|||
"resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz",
|
||||
"integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g=="
|
||||
},
|
||||
"vis-data": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/vis-data/-/vis-data-7.1.1.tgz",
|
||||
"integrity": "sha512-Z5+caySDqoKL9yxbI3c/CKmUcSvROSZstuvwxbOsUpdxHpxFYEUgxC1EH4lSB1ykEaM54MVMM1UcwB9oNaWFlw=="
|
||||
},
|
||||
"vis-network": {
|
||||
"version": "8.5.5",
|
||||
"resolved": "https://registry.npmjs.org/vis-network/-/vis-network-8.5.5.tgz",
|
||||
"integrity": "sha512-HH7DJjQVVkwQ/qanynBu1dXU75LLSSpG4BZ159IvLHYJaBgZb3Qjzs3U0tl8KlstqxuiEtQRcexnmNlFAIhCKw=="
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
"svelte": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"sirv-cli": "^1.0.0"
|
||||
"sirv-cli": "^1.0.0",
|
||||
"vis-data": "^7.1.1",
|
||||
"vis-network": "^8.5.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>BigQuery ETL Query Network</title>
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"
|
||||
></script>
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<link rel="stylesheet" href="/global.css" />
|
||||
<link rel="stylesheet" href="/build/bundle.css" />
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<script>
|
||||
import { onMount } from "svelte";
|
||||
import { DataSet } from "vis-data/peer";
|
||||
import { Network } from "vis-network/peer";
|
||||
|
||||
// view-source:https://visjs.github.io/vis-network/examples/network/exampleApplications/loadingBar.html
|
||||
function getDatasetId(name) {
|
||||
|
@ -29,7 +31,7 @@
|
|||
let nodeMap = new Map([...nodes, ...datasets].map((el, idx) => [el, idx]));
|
||||
|
||||
let data = {
|
||||
nodes: new vis.DataSet(
|
||||
nodes: new DataSet(
|
||||
[...nodes]
|
||||
.map((el) => ({
|
||||
id: nodeMap.get(el),
|
||||
|
@ -47,7 +49,7 @@
|
|||
}))
|
||||
)
|
||||
),
|
||||
edges: new vis.DataSet(
|
||||
edges: new DataSet(
|
||||
edges
|
||||
.map((el) => ({
|
||||
from: nodeMap.get(el.referenced),
|
||||
|
@ -97,7 +99,7 @@
|
|||
arrows: { to: true },
|
||||
},
|
||||
};
|
||||
var network = new vis.Network(container, data, options);
|
||||
var network = new Network(container, data, options);
|
||||
network.on("stabilizationProgress", function (params) {
|
||||
document.getElementById("progress").innerHTML =
|
||||
Math.round((params.iterations / params.total) * 100) + "%";
|
||||
|
|
Загрузка…
Ссылка в новой задаче