Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Odajs Framework Folder #1

Open
wants to merge 223 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
223 commits
Select commit Hold shift + click to select a range
853ed2e
Add Angular example using track by
Jun 1, 2015
1fa1f94
Merge pull request #9 from slrls/angular-track-by
mathieuancelin Jun 1, 2015
0075880
add vue implementation
yyx990803 Jun 3, 2015
52adbae
Merge pull request #10 from vuejs/master
mathieuancelin Jun 4, 2015
ddb4a6c
add nuclear
yyx990803 Jun 5, 2015
ba4d587
Add Backbone DBMON
jridgewell Jun 5, 2015
93dca8f
Merge pull request #11 from jridgewell/backbone
mathieuancelin Jun 6, 2015
5ea005e
Fix pages
mathieuancelin Jun 6, 2015
b035247
Add ga
mathieuancelin Jun 6, 2015
8a6103b
Fix
mathieuancelin Jun 6, 2015
d24111c
Ooops
mathieuancelin Jun 6, 2015
65f4903
add knockout
sebprunier Jun 12, 2015
fb7fe3f
Merge pull request #12 from sebprunier/master
mathieuancelin Jun 12, 2015
8691d7e
Update reamde
mathieuancelin Jun 12, 2015
5d8c218
Fix ENV
mathieuancelin Jun 12, 2015
c8fd36f
Added the Cito framework with the t7 template library (along with the…
Jun 13, 2015
920484d
Updated readme
Jun 13, 2015
6b45b5e
Updated index.html with path to precompiled
Jun 13, 2015
5253fa9
Fixed a typo in the database name entry
Jun 13, 2015
2e057c3
Merge pull request #13 from trueadm/master
mathieuancelin Jun 14, 2015
da6abc6
Canvas: implement high resolution display support
Jun 23, 2015
5659e86
Merge pull request #14 from joelrich/master
mathieuancelin Jun 23, 2015
23ae74d
add regularjs
leeluolee Jul 9, 2015
56aa63a
Merge branch 'gh-pages' of https://github.com/leeluolee/js-repaint-pe…
leeluolee Jul 9, 2015
81b9b42
add regularjs link
leeluolee Jul 9, 2015
61907e1
Merge branch 'gh-pages'
leeluolee Jul 9, 2015
5e96434
add regularjs for compare
leeluolee Jul 13, 2015
76e38d6
Add elem-vdom
mathieuancelin Jul 20, 2015
6f0f370
Add link
mathieuancelin Jul 20, 2015
974bff1
Add link
mathieuancelin Jul 20, 2015
ba7c878
Ooops
mathieuancelin Jul 20, 2015
c5efee6
Added Inferno
Jul 20, 2015
da98f3f
added angular 2.0
ansukla Aug 20, 2015
fc02758
included Angular 2.0 in done list
ansukla Aug 20, 2015
8959c59
Merge pull request #16 from trueadm/master
mathieuancelin Sep 2, 2015
f6ea5d3
Merge pull request #17 from ansukla/master
mathieuancelin Sep 2, 2015
547b7d7
Merge pull request #15 from leeluolee/master
mathieuancelin Sep 2, 2015
7d47797
Move regular
mathieuancelin Sep 2, 2015
5d17c02
upgrade angular to alpha 37
mhevery Sep 15, 2015
e392ffb
Merge pull request #18 from mhevery/master
mathieuancelin Sep 16, 2015
1d7242f
Update elem-vdom
mathieuancelin Sep 16, 2015
84e83fc
Add link
mathieuancelin Sep 16, 2015
9d059c5
Update Riot version
mathieuancelin Sep 16, 2015
749e1df
New data generator
mathieuancelin Sep 18, 2015
30010aa
Add new example for angular
mathieuancelin Sep 18, 2015
b86281e
Fix generator and templates
mathieuancelin Sep 21, 2015
609fe9c
Angular Light version
lega911 Sep 27, 2015
38ed457
Merge pull request #20 from lega911/master
mathieuancelin Sep 28, 2015
111b84e
New landing page
mathieuancelin Sep 29, 2015
30c9c5d
Better style
mathieuancelin Sep 29, 2015
fa01184
add (MaskJS)
tenbits Sep 29, 2015
e1d1feb
Merge pull request #22 from tenbits/master
mathieuancelin Sep 29, 2015
9d77001
Fix mask example
mathieuancelin Sep 29, 2015
a602ec7
Add react optim
mathieuancelin Sep 29, 2015
e5e5e52
Better screen responsivness
mathieuancelin Sep 29, 2015
a8a18f2
Open in new tab
mathieuancelin Sep 29, 2015
79d7d06
add Matreshka.js
finom Sep 30, 2015
18993ff
repulled original repo; fixed conflicts
finom Sep 30, 2015
ea39c34
added matreshka to library-list
finom Sep 30, 2015
014bb4a
Merge pull request #23 from finom/master
mathieuancelin Sep 30, 2015
0cef56a
Change row generation
mathieuancelin Sep 30, 2015
24f69f2
deoptimized Matreshka test
finom Sep 30, 2015
e1c1cfb
Merge github.com:mathieuancelin/js-repaint-perfs
finom Sep 30, 2015
6789787
Merge pull request #24 from finom/master
mathieuancelin Oct 1, 2015
f84eefc
Create app.js
magnumjs Oct 1, 2015
d71ded7
Create index.html
magnumjs Oct 1, 2015
bc8ffcb
Create mag.min.js
magnumjs Oct 1, 2015
c469171
Update index.html
magnumjs Oct 1, 2015
00a3eef
Update app.js
magnumjs Oct 1, 2015
2f545b2
Update index.html
magnumjs Oct 1, 2015
90feea1
Update app.js
magnumjs Oct 1, 2015
1c531ba
Update library-list.js
magnumjs Oct 2, 2015
b79c0ae
Update readme.md
magnumjs Oct 2, 2015
6a31f1a
Merge pull request #25 from magnumjs/master
mathieuancelin Oct 2, 2015
89ac516
Merge pull request #27 from mathieuancelin/master
mathieuancelin Oct 5, 2015
e5762f5
Update index.html
magnumjs Oct 5, 2015
e5e2124
Update mag.min.js
magnumjs Oct 5, 2015
db51c09
Polymer 1.1.5
ebidel Oct 9, 2015
da696ef
update Vue.js to 1.0 and add optimized version
yyx990803 Oct 27, 2015
2db52d1
Angular2 alfa 0.44
valorkin Oct 27, 2015
174b805
Polymer 1.2.3
ebidel Nov 27, 2015
b13d348
Merge pull request #32 from ebidel/gh-pages
mathieuancelin Nov 29, 2015
5a1bdef
Update Knockout.js version from 3.3.0 to 3.4.0
Ky7m Dec 4, 2015
a483065
Add RotorJS (0.3.1) implementation
kuraga Dec 5, 2015
af64103
Add RotorJS (0.3.1) (with using VnodeImmutableThunk) implementation
kuraga Dec 5, 2015
5be3431
Merge pull request #35 from kuraga/gh-pages
mathieuancelin Dec 7, 2015
28b16a7
Merge pull request #34 from Ky7m/Ky7m-update-ko-3.4.0
mathieuancelin Dec 7, 2015
5795c5a
fix(env): Use null value over delete keyword
nijikokun Dec 8, 2015
591eb79
Merge pull request #37 from Nijikokun/fix/#36-delete-keyword
mathieuancelin Dec 9, 2015
feddf29
Use latest version of Matreshka.js
finom Dec 19, 2015
da7226e
Merge pull request #38 from finom/patch-1
mathieuancelin Dec 20, 2015
3b95119
Add cycle.js
TylorS Dec 23, 2015
9161f1d
Add cycle.js
TylorS Dec 23, 2015
8be1f36
Add cycle.js to front-page
TylorS Dec 23, 2015
326597c
Add motorcycle
TylorS Dec 23, 2015
e3e94df
tone down speed
TylorS Dec 23, 2015
e8b8e2c
update motorcycle
TylorS Dec 23, 2015
bee38e3
update motorcycle
TylorS Dec 23, 2015
b450cb9
update motorcycle
TylorS Dec 23, 2015
52ed1cf
update motorcycle
TylorS Dec 23, 2015
0527e67
update motorcycle
TylorS Dec 23, 2015
c9a6b8c
update motorcycle
TylorS Dec 23, 2015
b53a734
better use of Rx and Most
TylorS Dec 23, 2015
e0665a3
Updates
TylorS Dec 23, 2015
8319e6b
fix order
TylorS Dec 23, 2015
aaa83aa
fix build error
TylorS Dec 23, 2015
8129ca7
add domvm
leeoniya Jan 2, 2016
d09a4ac
Merge pull request #39 from leeoniya/add-domvm
mathieuancelin Jan 4, 2016
d233d3b
add once, ripple
Jan 23, 2016
569a0ec
remove unused style
Jan 23, 2016
a6d5281
update to latest version
Jan 24, 2016
717cf7d
Merge pull request #40 from pemrouz/gh-pages
mathieuancelin Jan 24, 2016
1d3bb6f
update to remove es6 arrow functions in component
Jan 31, 2016
2742c91
Merge pull request #41 from pemrouz/squashed
mathieuancelin Feb 1, 2016
a8f7e8f
update cycle, motorcycle and add cycle + snabbdom
TylorS Feb 2, 2016
9adb847
write motorcycle app in ~es5
TylorS Feb 2, 2016
ca4d94b
add meta viewport tags for better mobile rendering
TylorS Feb 2, 2016
bceb8ed
various attempts to improve motorcycle
TylorS Feb 2, 2016
7c61e82
fix tooltips for motorcycle and cycle-snabbdom
TylorS Feb 2, 2016
79cc105
use most-subject
TylorS Feb 2, 2016
a17ef76
fix bug related to query count not updating
Feb 7, 2016
312fb7c
Merge pull request #43 from pemrouz/squashed
mathieuancelin Feb 7, 2016
2154730
Add elm (0.16.0) implementation
toburger Feb 8, 2016
f03fae2
fix optimized version
toburger Feb 8, 2016
3d3555e
Add preact (classical & functional examples)
developit Feb 8, 2016
91920c1
Merge pull request #1 from toburger/gh-pages
TylorS Feb 8, 2016
e4324ea
Merge pull request #44 from developit/gh-pages
mathieuancelin Feb 9, 2016
c774a58
Adds in diffHTML example
tbranyen Feb 12, 2016
b908759
Merge pull request #45 from tbranyen/diffhtml-upstream
mathieuancelin Feb 12, 2016
174adce
Update RotorJS to 0.5.1
kuraga Feb 13, 2016
cb8a748
Merge pull request #46 from kuraga/rotorjs-0.5.0
mathieuancelin Feb 15, 2016
8524baf
Initial commit.
jbest84 Mar 8, 2016
a9dba66
Update view so it is clear where td terminates. Removed some
jbest84 Mar 9, 2016
c13de59
Remove json->cljs conversion. Extract directly from js instead.
jbest84 Mar 10, 2016
f75b41b
build
jbest84 Mar 10, 2016
798b059
updated: riot release and added the optimized version
GianlucaGuarini Mar 15, 2016
429fc23
Merge pull request #49 from GianlucaGuarini/gh-pages
mathieuancelin Mar 15, 2016
b567247
updated: less is more
GianlucaGuarini Mar 15, 2016
79a4324
Merge pull request #50 from GianlucaGuarini/gh-pages
mathieuancelin Mar 16, 2016
ca923ac
update Vue to 1.0.18
yyx990803 Mar 18, 2016
9b07fa9
Merge pull request #51 from vuejs/gh-pages
mathieuancelin Mar 18, 2016
9ace9af
Slightly better performance with Riot example
Mar 24, 2016
4f80ad9
adds d3 implementation
ming-codes Apr 2, 2016
00975fc
Merge pull request #54 from ming-codes/gh-pages
mathieuancelin Apr 4, 2016
a55d95b
Add elm (0.16.0) implementation
toburger Apr 8, 2016
5fb946a
Merge pull request #56 from toburger/gh-pages
mathieuancelin Apr 8, 2016
6ad793f
Merge pull request #52 from gregorypratt/gh-pages
mathieuancelin Apr 8, 2016
d0b5583
update domvm to 1.x-dev (11ba5a4)
leeoniya Apr 9, 2016
e50af15
update domvm (04dc2eb)
leeoniya Apr 9, 2016
c88eb60
Merge pull request #58 from leeoniya/gh-pages
mathieuancelin Apr 11, 2016
9f82831
Add Morphdom
whiteinge Mar 27, 2016
c8abdde
Merge pull request #53 from whiteinge/morphdom
mathieuancelin Apr 18, 2016
b2a0d9e
Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
jbest84 Apr 18, 2016
80c0b3d
Merge pull request #47 from jbest84/gh-pages
mathieuancelin Apr 18, 2016
15d8a1c
added FRZR
pakastin Apr 20, 2016
b71acfd
added FRZR
pakastin Apr 20, 2016
43f995e
updated FRZR
pakastin Apr 20, 2016
d876c50
Merge pull request #59 from pakastin/gh-pages
mathieuancelin Apr 21, 2016
2e4c001
Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
TylorS Apr 21, 2016
e447b84
chore(): remove node_modules
TylorS Apr 21, 2016
503c592
Merge pull request #60 from TylorS/gh-pages
mathieuancelin Apr 21, 2016
31cdc47
Created pure Handlebars example
Apr 25, 2016
d75cfe9
Created rivets.js example
Apr 25, 2016
c1b2f94
Merge pull request #61 from aliakakis/gh-pages
mathieuancelin Apr 25, 2016
a69a142
update ractive to 0.8
Rich-Harris May 5, 2016
19efefb
Merge pull request #62 from Rich-Harris/ractive-0.8
mathieuancelin May 5, 2016
51eb819
Polymer 1.4
ebidel May 8, 2016
2843c0e
Merge pull request #64 from ebidel/gh-pages
mathieuancelin May 9, 2016
646e209
Added Backbone-Marionette versions
jvitela May 30, 2016
9811b2b
Upgrade to React v15.1
jgaskins May 31, 2016
de0af90
Merge pull request #65 from jvitela/gh-pages
mathieuancelin May 31, 2016
5d7b599
Merge pull request #66 from jgaskins/react-15.1
mathieuancelin May 31, 2016
46e3770
v0.19.1
pakastin Jun 2, 2016
7bdaaf3
Merge pull request #67 from pakastin/patch-1
mathieuancelin Jun 2, 2016
b5f53f0
don't count bootstrap css recalc costs
lhorie Jun 7, 2016
08a6d6d
upgrade mithril to latest version
lhorie Jun 7, 2016
3f90c0e
Merge pull request #68 from lhorie/gh-pages
mathieuancelin Jun 7, 2016
ba282d1
Updated Inferno
trueadm Jun 7, 2016
befeda3
Changed from attrs class to props className
trueadm Jun 7, 2016
627536e
Merge pull request #69 from trueadm/gh-pages
mathieuancelin Jun 8, 2016
ff57c60
update domvm (1.2.5)
leeoniya Jun 9, 2016
2dee66c
Merge pull request #71 from leeoniya/gh-pages
mathieuancelin Jun 10, 2016
7862771
Add naive version of vidom implementation
dfilatov Jun 14, 2016
d825ec5
Merge pull request #73 from dfilatov/gh-pages
mathieuancelin Jun 14, 2016
2132442
Added CycleJS 7 with xstream
Jul 12, 2016
91f00d2
Renamed to cycle-xstream
Jul 12, 2016
9ef4565
Added cycle-xstream to the library list
Jul 12, 2016
413768d
Merge pull request #75 from marszall87/gh-pages
mathieuancelin Jul 13, 2016
ee5c714
Add sugar.js to test js-repaint-perfs
tangbc Jul 16, 2016
93d845d
Change file url to https
tangbc Jul 16, 2016
73e2cc2
Merge pull request #77 from tangbc/gh-pages
mathieuancelin Jul 25, 2016
12d75be
add Rionite
Riim Jul 30, 2016
bfed3bc
Merge pull request #78 from Riim/gh-pages
mathieuancelin Aug 1, 2016
4271deb
Add Monkberry
Aug 10, 2016
b37ad1d
Merge pull request #79 from Madumo/gh-pages
mathieuancelin Aug 11, 2016
38191c7
Fix Monkberry label
Aug 11, 2016
5587f9e
Add Monkberry to Readme
Aug 11, 2016
c0a2e47
Merge pull request #80 from Madumo/gh-pages
mathieuancelin Aug 12, 2016
d3378e5
add simulacra.js
Aug 15, 2016
7216978
Merge remote-tracking branch 'mathieuancelin/gh-pages' into gh-pages
pakastin Aug 25, 2016
adf19ad
updated FRZR + class -> className
pakastin Aug 25, 2016
eefe98d
updated FRZR
pakastin Aug 27, 2016
e9317ee
Merge pull request #82 from pakastin/gh-pages
mathieuancelin Aug 29, 2016
01a7cdc
use custom change function
Aug 30, 2016
8e9a586
remove unnecessary span
Aug 30, 2016
99a9df2
Merge pull request #81 from 0x8890/gh-pages
mathieuancelin Aug 30, 2016
16ab724
Create index.html
thysultan Sep 4, 2016
56c8036
Update index.html
thysultan Sep 4, 2016
14112ca
Create app.js
thysultan Sep 4, 2016
ae834c7
Update index.html
thysultan Sep 4, 2016
9e6ff1b
Update app.js
thysultan Sep 4, 2016
127cbb7
Create dio.min.js
thysultan Sep 4, 2016
0137f3c
Update index.html
thysultan Sep 4, 2016
51e3097
Add DIO.js
thysultan Sep 4, 2016
0c7b49f
Update library-list.js
thysultan Sep 4, 2016
5a0b36a
Merge pull request #83 from thysultan/gh-pages
mathieuancelin Sep 4, 2016
6d7a4c4
Update dio.min.js
thysultan Sep 15, 2016
ff59b10
Merge pull request #84 from thysultan/gh-pages
mathieuancelin Sep 17, 2016
d99033e
add optimized version of simulacra
Sep 21, 2016
986c526
Update some links, https some links
karlhorky Sep 21, 2016
d879108
Merge pull request #85 from 0x8890/gh-pages
mathieuancelin Sep 22, 2016
837af08
Merge pull request #86 from karlhorky/patch-1
mathieuancelin Sep 22, 2016
7ed43d5
Add Odajs Framework Folder
org-odajs Aug 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.DS_Store
/node_modules
.idea
node_modules/**/*


!node_modules/maskjs
!node_modules/maskjs/lib
!node_modules/maskjs/lib/mask.js
233 changes: 124 additions & 109 deletions ENV.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
var ENV = ENV || (function() {

var first = true;
var counter = 0;
var data;
var _base;

(_base = String.prototype).lpad || (_base.lpad = function(padding, toLength) {
return padding.repeat((toLength - this.length) / padding.length).concat(this);
});

function formatElapsed(value) {
str = parseFloat(value).toFixed(2);
var str = parseFloat(value).toFixed(2);
if (value > 60) {
minutes = Math.floor(value / 60);
comps = (value % 60).toFixed(2).split('.');
Expand All @@ -32,125 +34,140 @@ var ENV = ENV || (function() {
return className;
}

var lastGeneratedDatabases = [];

function getData() {
// generate some dummy data
data = {
start_at: new Date().getTime() / 1000,
databases: {}
};

for (var i = 1; i <= ENV.rows; i++) {
data.databases["cluster" + i] = {
queries: []
};

data.databases["cluster" + i + "slave"] = {
queries: []
};
function countClassName(queries) {
var countClassName = "label";
if (queries >= 20) {
countClassName += " label-important";
}

Object.keys(data.databases).forEach(function(dbname) {

if (lastGeneratedDatabases.length == 0 || Math.random() < ENV.mutations()) {
var info = data.databases[dbname];
var r = Math.floor((Math.random() * 10) + 1);
for (var i = 0; i < r; i++) {
var elapsed = Math.random() * 15;
var q = {
canvas_action: null,
canvas_context_id: null,
canvas_controller: null,
canvas_hostname: null,
canvas_job_tag: null,
canvas_pid: null,
elapsed: elapsed,
formatElapsed: formatElapsed(elapsed),
elapsedClassName: getElapsedClassName(elapsed),
query: "SELECT blah FROM something",
waiting: Math.random() < 0.5
};

if (Math.random() < 0.2) {
q.query = "<IDLE> in transaction";
}

if (Math.random() < 0.1) {
q.query = "vacuum";
}

info.queries.push(q);
}

info.queries = info.queries.sort(function (a, b) {
return b.elapsed - a.elapsed;
});
} else {
data.databases[dbname] = lastGeneratedDatabases[dbname];
}
});

lastGeneratedDatabases = data.databases;

return data;
else if (queries >= 10) {
countClassName += " label-warning";
}
else {
countClassName += " label-success";
}
return countClassName;
}

var lastDatabases = {
toArray: function() {
return Object.keys(this).filter(function(k) { return k !== 'toArray'; }).map(function(k) { return this[k]; }.bind(this))
}
};
function updateQuery(object) {
if (!object) {
object = {};
}
var elapsed = Math.random() * 15;
object.elapsed = elapsed;
object.formatElapsed = formatElapsed(elapsed);
object.elapsedClassName = getElapsedClassName(elapsed);
object.query = "SELECT blah FROM something";
object.waiting = Math.random() < 0.5;
if (Math.random() < 0.2) {
object.query = "<IDLE> in transaction";
}
if (Math.random() < 0.1) {
object.query = "vacuum";
}
return object;
}

function generateData() {
var databases = [];
var newData = getData();
Object.keys(newData.databases).forEach(function(dbname) {
var sampleInfo = newData.databases[dbname];
var database = {
dbname: dbname,
samples: []
function cleanQuery(value) {
if (value) {
value.formatElapsed = "";
value.elapsedClassName = "";
value.query = "";
value.elapsed = null;
value.waiting = null;
} else {
return {
query: "***",
formatElapsed: "",
elapsedClassName: ""
};
}
}

function countClassName(queries) {
var countClassName = "label";
if (queries.length >= 20) {
countClassName += " label-important";
}
else if (queries.length >= 10) {
countClassName += " label-warning";
function generateRow(object, keepIdentity, counter) {
var nbQueries = Math.floor((Math.random() * 10) + 1);
if (!object) {
object = {};
}
object.lastMutationId = counter;
object.nbQueries = nbQueries;
if (!object.lastSample) {
object.lastSample = {};
}
if (!object.lastSample.topFiveQueries) {
object.lastSample.topFiveQueries = [];
}
if (keepIdentity) {
// for Angular optimization
if (!object.lastSample.queries) {
object.lastSample.queries = [];
for (var l = 0; l < 12; l++) {
object.lastSample.queries[l] = cleanQuery();
}
else {
countClassName += " label-success";
}
for (var j in object.lastSample.queries) {
var value = object.lastSample.queries[j];
if (j <= nbQueries) {
updateQuery(value);
} else {
cleanQuery(value);
}
return countClassName;
}

function topFiveQueries(queries) {
var tfq = queries.slice(0, 5);
while (tfq.length < 5) {
tfq.push({ query: "" });
} else {
object.lastSample.queries = [];
for (var j = 0; j < 12; j++) {
if (j < nbQueries) {
var value = updateQuery(cleanQuery());
object.lastSample.queries.push(value);
} else {
object.lastSample.queries.push(cleanQuery());
}
return tfq;
}
}
for (var i = 0; i < 5; i++) {
var source = object.lastSample.queries[i];
object.lastSample.topFiveQueries[i] = source;
}
object.lastSample.nbQueries = nbQueries;
object.lastSample.countClassName = countClassName(nbQueries);
return object;
}

var samples = database.samples;
samples.push({
time: newData.start_at,
queries: sampleInfo.queries,
topFiveQueries: topFiveQueries(sampleInfo.queries),
countClassName: countClassName(sampleInfo.queries)
});
if (samples.length > 5) {
samples.splice(0, samples.length - 5);
function getData(keepIdentity) {
var oldData = data;
if (!keepIdentity) { // reset for each tick when !keepIdentity
data = [];
for (var i = 1; i <= ENV.rows; i++) {
data.push({ dbname: 'cluster' + i, query: "", formatElapsed: "", elapsedClassName: "" });
data.push({ dbname: 'cluster' + i + ' slave', query: "", formatElapsed: "", elapsedClassName: "" });
}
}
if (!data) { // first init when keepIdentity
data = [];
for (var i = 1; i <= ENV.rows; i++) {
data.push({ dbname: 'cluster' + i });
data.push({ dbname: 'cluster' + i + ' slave' });
}
oldData = data;
}
for (var i in data) {
var row = data[i];
if (!keepIdentity && oldData && oldData[i]) {
row.lastSample = oldData[i].lastSample;
}
var samples = database.samples;
database.lastSample = database.samples[database.samples.length - 1];
databases.push(database);
});
if (!row.lastSample || Math.random() < ENV.mutations()) {
counter = counter + 1;
if (!keepIdentity) {
row.lastSample = null;
}
generateRow(row, keepIdentity, counter);
} else {
data[i] = oldData[i];
}
}
first = false;
return {
toArray: function() {
return databases;
return data;
}
};
}
Expand Down Expand Up @@ -186,11 +203,9 @@ var ENV = ENV || (function() {
body.insertBefore( sliderContainer, theFirstChild );

return {
generateData: generateData,
generateData: getData,
rows: 50,
timeout: 0,
mutations: mutations
};
})();


13 changes: 13 additions & 0 deletions angular-light/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

alight.controllers.DBMonCtrl = function(scope) {
scope.databases = [];

var load = function() {
scope.databases = ENV.generateData().toArray();
scope.$scan();
Monitoring.renderRate.ping();

setTimeout(load, ENV.timeout);
};
load();
};
46 changes: 46 additions & 0 deletions angular-light/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="DBMON Angular Light" />
<script src="../lib/alight.min.js"></script>
<link href="../styles.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<title>dbmon (angular light)</title>
</head>
<body al-app="DBMonCtrl">
<!-- DBMon -->
<div>
<table class="table table-striped latest-data">
<tbody>
<!-- Database -->
<tr al-repeat="db in databases track by $index">
<td class="dbname">
{{db.dbname}}
</td>
<!-- Sample -->
<td class="query-count">
<span class="{{db.lastSample.countClassName}}">
{{db.lastSample.nbQueries}}
</span>
</td>
<!-- Query -->
<td al-repeat="q in db.lastSample.topFiveQueries track by $index" class="{{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="app.js"></script>
<script src="../ga.js"></script>
</body>
</html>
46 changes: 46 additions & 0 deletions angular-light/opt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="DBMON Angular Light" />
<script src="../lib/alight.min.js"></script>
<link href="../styles.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<title>dbmon (angular light)</title>
</head>
<body al-app="DBMonCtrl">
<!-- DBMon -->
<div>
<table class="table table-striped latest-data">
<tbody>
<!-- Database -->
<tr al-repeat="db in databases">
<td class="dbname">
{{db.dbname}}
</td>
<!-- Sample -->
<td class="query-count">
<span class="{{db.lastSample.countClassName}}">
{{db.lastSample.nbQueries}}
</span>
</td>
<!-- Query -->
<td al-repeat="q in db.lastSample.topFiveQueries" class="{{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="opt.js"></script>
<script src="../ga.js"></script>
</body>
</html>
Loading