-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from vuejs/master
add vue implementation
- Loading branch information
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var app = new Vue({ | ||
el: '#app', | ||
data: { | ||
databases: [] | ||
} | ||
}) | ||
|
||
function loadSamples() { | ||
app.databases = ENV.generateData().toArray(); | ||
Monitoring.renderRate.ping(); | ||
setTimeout(loadSamples, ENV.timeout); | ||
} | ||
|
||
loadSamples() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="description" content="dbmon vue" /> | ||
<link href="../lib/bootstrap.min.css" rel="stylesheet" type="text/css" /> | ||
<link href="../styles.css" rel="stylesheet" type="text/css" /> | ||
<title>dbmon (Vue)</title> | ||
</head> | ||
<body> | ||
<div id="app"> | ||
<table class="table table-striped lastest-data"> | ||
<tbody> | ||
<tr v-repeat="db: databases" track-by="$index"> | ||
<td class="dbname">{{db.dbname}}</td> | ||
<td class="query-count"> | ||
<span class="{{db.lastSample.countClassName}}">{{db.lastSample.queries.length}}</span> | ||
</td> | ||
<td v-repeat="q: db.lastSample.topFiveQueries" track-by="$index" class="Query {{q.elapsedClassName}}"> | ||
{{q.formatElapsed}} | ||
<div class="popover left"> | ||
<div class="popover-content">{{q.query}}</div> | ||
<div class="arrow"></div> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<script src="../ENV.js"></script> | ||
<script src="../lib/memory-stats.js"></script> | ||
<script src="../lib/monitor.js"></script> | ||
<script src="../lib/vue.min.js"></script> | ||
<script src="./app.js"></script> | ||
</body> | ||
</html> |