mirror of
https://github.com/portainer/portainer.git
synced 2025-07-31 11:19:40 +02:00
Refactoring, moved all assets into /assets, all angular files moved to /app.
This commit is contained in:
parent
2b2d4152a5
commit
a9a36323eb
18 changed files with 12 additions and 429 deletions
15
assets/js/legend.js
Normal file
15
assets/js/legend.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
function legend(parent, data) {
|
||||
parent.className = 'legend';
|
||||
var datas = data.hasOwnProperty('datasets') ? data.datasets : data;
|
||||
|
||||
datas.forEach(function(d) {
|
||||
var title = document.createElement('span');
|
||||
title.className = 'title';
|
||||
title.style.borderColor = d.hasOwnProperty('strokeColor') ? d.strokeColor : d.color;
|
||||
title.style.borderStyle = 'solid';
|
||||
parent.appendChild(title);
|
||||
|
||||
var text = document.createTextNode(d.title);
|
||||
title.appendChild(text);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue