mirror of https://github.com/embarklabs/embark.git
349 lines
15 KiB
HTML
349 lines
15 KiB
HTML
<!doctype html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<meta http-equiv="Content-Language" content="en" />
|
|
<meta name="msapplication-TileColor" content="#2d89ef">
|
|
<meta name="theme-color" content="#4188c9">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="HandheldFriendly" content="True">
|
|
<meta name="MobileOptimized" content="320">
|
|
<link rel="icon" href="./favicon.ico" type="image/x-icon"/>
|
|
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
|
|
<!-- Generated: 2018-04-04 13:48:30 +0200 -->
|
|
<title>Embark</title>
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,500,500i,600,600i,700,700i&subset=latin-ext">
|
|
<!--
|
|
<script src="./assets/js/require.min.js"></script>
|
|
<script>
|
|
requirejs.config({
|
|
baseUrl: '.'
|
|
});
|
|
</script>
|
|
-->
|
|
<!-- Dashboard Core -->
|
|
<link href="./assets/css/dashboard.css" rel="stylesheet" />
|
|
|
|
<script src="./assets/js/jquery-3.3.1.min.js"></script>
|
|
|
|
<!--
|
|
<script src="./assets/js/dashboard.js"></script>
|
|
<link href="./assets/plugins/charts-c3/plugin.css" rel="stylesheet" />
|
|
<script src="./assets/plugins/charts-c3/plugin.js"></script>
|
|
<link href="./assets/plugins/maps-google/plugin.css" rel="stylesheet" />
|
|
<script src="./assets/plugins/maps-google/plugin.js"></script>
|
|
<script src="./assets/plugins/input-mask/plugin.js"></script>
|
|
|
|
-->
|
|
|
|
</head>
|
|
<body class="">
|
|
<div class="page">
|
|
<div class="page-main">
|
|
<div class="header">
|
|
<div class="container">
|
|
<div class="d-flex">
|
|
<a class="navbar-brand" href="./index.html">
|
|
<img src="./assets/images/logo.png" class="navbar-brand-img" alt="Embark">
|
|
</a>
|
|
<div class="ml-auto d-flex order-lg-2">
|
|
<div class="dropdown d-none d-md-flex">
|
|
<a class="nav-link icon" data-toggle="dropdown">
|
|
<i class="fe fe-bell"></i>
|
|
<span class="nav-unread"></span>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
|
<a href="#" class="dropdown-item d-flex">
|
|
<span class="avatar mr-3 align-self-center" style="background-image: url(demo/faces/male/41.jpg)"></span>
|
|
<div>
|
|
<strong>Nathan</strong> pushed new commit: Fix page load performance issue.
|
|
<div class="small text-muted">10 minutes ago</div>
|
|
</div>
|
|
</a>
|
|
<a href="#" class="dropdown-item d-flex">
|
|
<span class="avatar mr-3 align-self-center" style="background-image: url(demo/faces/female/1.jpg)"></span>
|
|
<div>
|
|
<strong>Alice</strong> started new task: Tabler UI design.
|
|
<div class="small text-muted">1 hour ago</div>
|
|
</div>
|
|
</a>
|
|
<a href="#" class="dropdown-item d-flex">
|
|
<span class="avatar mr-3 align-self-center" style="background-image: url(demo/faces/female/18.jpg)"></span>
|
|
<div>
|
|
<strong>Rose</strong> deployed new version of NodeJS REST Api V3
|
|
<div class="small text-muted">2 hours ago</div>
|
|
</div>
|
|
</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a href="#" class="dropdown-item text-center text-muted-dark">Mark all as read</a>
|
|
</div>
|
|
</div>
|
|
<div class="dropdown">
|
|
<a href="#" class="nav-link pr-0" data-toggle="dropdown">
|
|
<span class="avatar" style="background-image: url(./demo/faces/female/25.jpg)"></span>
|
|
<span class="ml-2 d-none d-lg-block">
|
|
<span class="text-default">Dade Murphy</span>
|
|
</span>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
|
<a class="dropdown-item" href="#">
|
|
<i class="dropdown-icon fe fe-user"></i> Profile
|
|
</a>
|
|
<a class="dropdown-item" href="#">
|
|
<i class="dropdown-icon fe fe-settings"></i> Settings
|
|
</a>
|
|
<a class="dropdown-item" href="#">
|
|
<span class="float-right"><span class="badge badge-primary">6</span></span>
|
|
<i class="dropdown-icon fe fe-mail"></i> Inbox
|
|
</a>
|
|
<a class="dropdown-item" href="#">
|
|
<i class="dropdown-icon fe fe-send"></i> Message
|
|
</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item" href="#">
|
|
<i class="dropdown-icon fe fe-help-circle"></i> Need help?
|
|
</a>
|
|
<a class="dropdown-item" href="#">
|
|
<i class="dropdown-icon fe fe-log-out"></i> Sign out
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="header-nav d-none d-lg-flex">
|
|
<div class="container">
|
|
<div class="row align-items-center">
|
|
<div class="col">
|
|
<ul class="nav nav-tabs">
|
|
<li class="nav-item">
|
|
<a href="./index.html" class="nav-link active"><i class="fe fe-home"></i> Home</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="javascript:void(0)" class="nav-link"><i class="fe fe-box"></i> Contracts</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="./docs/index.html" class="nav-link"><i class="fe fe-file-text"></i> Documentation</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-3 ml-auto">
|
|
<form class="input-icon">
|
|
<input type="search" class="form-control header-search" placeholder="Search…" tabindex="1">
|
|
<div class="input-icon-addon">
|
|
<i class="fe fe-search"></i>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="page-content">
|
|
<div class="container">
|
|
<div class="page-header">
|
|
<h1 class="page-title">
|
|
Dashboard
|
|
</h1>
|
|
</div>
|
|
<div class="row row-cards">
|
|
<div class="col-sm-6 col-lg-3">
|
|
<div class="card p-3">
|
|
<div class="d-flex align-items-center">
|
|
<span class="stamp stamp-md bg-blue mr-3">
|
|
<i class="fe fa-cube"></i>
|
|
</span>
|
|
<div>
|
|
<h4 class="m-0"><a href="javascript:void(0)">IPFS</a></h4>
|
|
<small class="text-muted">version 2.5</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-lg-3">
|
|
<div class="card p-3">
|
|
<div class="d-flex align-items-center">
|
|
<span class="stamp stamp-md bg-green mr-3">
|
|
<i class="fe fe-check"></i>
|
|
</span>
|
|
<div>
|
|
<h4 class="m-0"><a href="javascript:void(0)">Ethereum</a></h4>
|
|
<small class="text-muted">Geth 1.6.7-stable</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-lg-3">
|
|
<div class="card p-3">
|
|
<div class="d-flex align-items-center">
|
|
<span class="stamp stamp-md bg-red mr-3">
|
|
<i class="fe fe-message-square"></i>
|
|
</span>
|
|
<div>
|
|
<h4 class="m-0"><a href="javascript:void(0)">Whisper</a></h4>
|
|
<small class="text-muted">V5</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-lg-3">
|
|
<div class="card p-3">
|
|
<div class="d-flex align-items-center">
|
|
<span class="stamp stamp-md bg-yellow mr-3">
|
|
<i class="fe fe-server"></i>
|
|
</span>
|
|
<div>
|
|
<h4 class="m-0"><a href="javascript:void(0)">Webserver</a></h4>
|
|
<small class="text-muted">http://localhost:8000</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row row-cards row-deck">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Contracts</h3>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table card-table table-vcenter text-nowrap">
|
|
<thead>
|
|
<tr>
|
|
<th>Contract Name</th>
|
|
<th>Address</th>
|
|
<th>Status</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="contractsTable">
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row row-cards row-deck">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Console</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="log">
|
|
<p>Welcome!</p>
|
|
</div>
|
|
<div class="command-line">
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" name="example-text-input" placeholder="type a command (e.g help)" data-com.agilebits.onepassword.user-edited="yes">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
$.get( "/embark/contracts").done(function( data ) {
|
|
$.each(data, function(i, contract) {
|
|
|
|
let $tr = $('<tr>');
|
|
|
|
if (contract.deploy === false) {
|
|
$tr.append(
|
|
$(`<td><a href="contracts/view.html?${contract.name}">${contract.name}</a>`),
|
|
$('<td>').text('Interface or set to not deploy'),
|
|
$('<td>').text('n/a'),
|
|
);
|
|
} else if (contract.error) {
|
|
$tr.append(
|
|
$(`<td><a href="contracts/view.html?${contract.name}">${contract.name}</a>`),
|
|
$('<td>').text((contract.error).split("\n")[0].replace(/Error: /g, '').substring(0, 32)),
|
|
$('<td>').text('Error'),
|
|
);
|
|
} else {
|
|
$tr.append(
|
|
$(`<td><a href="contracts/view.html?${contract.name}">${contract.name}</a>`),
|
|
$('<td>').text(contract.address || '...'),
|
|
$('<td>').text(contract.address !== undefined ? 'Deployed' : 'Pending')
|
|
);
|
|
}
|
|
|
|
|
|
$tr.append(
|
|
$('<td class="text-right"><a href="javascript:void(0)" class="btn btn-secondary btn-sm">Manage</a><div class="dropdown"><button class="btn btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown">Actions</button></div></td>'),
|
|
$('<td><a class="icon" href="javascript:void(0)"><i class="fe fe-edit"></i></a></td>')
|
|
);
|
|
$tr.appendTo('#contractsTable');
|
|
});
|
|
});
|
|
|
|
|
|
var ws = new WebSocket("ws://localhost:8000/embark/logs");
|
|
ws.onopen = function() {
|
|
};
|
|
ws.onmessage = function (evt) {
|
|
var received_msg = evt.data;
|
|
var log = JSON.parse(received_msg);
|
|
console.log(log);
|
|
$(".log").append('<br>[' + log.logLevel + '] ' + log.msg_clear);
|
|
};
|
|
ws.onclose = function() {
|
|
console.log("Connection is closed...");
|
|
};
|
|
window.onbeforeunload = function(event) {
|
|
ws.close();
|
|
};
|
|
|
|
$(".command-line input").keypress(function(e) {
|
|
if (e.which == 13) {
|
|
let value = $(".command-line input").val();
|
|
|
|
$.post( "/embark/console", { cmd: value }).done(function( data ) {
|
|
$(".log").append('<br>' + data.replace(/\n/g, '<br>'));
|
|
});
|
|
|
|
$(".command-line input").val('');
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer class="footer">
|
|
<div class="container">
|
|
<div class="row align-items-center flex-row-reverse">
|
|
<div class="col-auto ml-auto">
|
|
<div class="row align-items-center">
|
|
<div class="col-auto">
|
|
<ul class="list-inline list-inline-dots mb-0">
|
|
<li class="list-inline-item"><a href="./docs/index.html">Documentation</a></li>
|
|
<li class="list-inline-item"><a href="./faq.html">FAQ</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-auto">
|
|
<a href="https://github.com/tabler/tabler" class="btn btn-outline-primary btn-sm">Source code</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0 text-center">
|
|
Copyright © 2018 <a href=".">Status Embark</a>.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|