Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
78a070a8
Commit
78a070a8
authored
Apr 18, 2013
by
Zachary Tong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit 'table_documents' message so that table can update
parent
20848b13
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
51 deletions
+25
-51
panels/parallelcoordinates/module.js
+21
-51
panels/table/module.js
+4
-0
No files found.
panels/parallelcoordinates/module.js
View file @
78a070a8
...
@@ -3,6 +3,7 @@ angular.module('kibana.parallelcoordinates', [])
...
@@ -3,6 +3,7 @@ angular.module('kibana.parallelcoordinates', [])
console
.
log
(
"controller"
);
console
.
log
(
"controller"
);
$scope
.
activeDocs
=
[];
// Set and populate defaults
// Set and populate defaults
var
_d
=
{
var
_d
=
{
...
@@ -127,7 +128,6 @@ angular.module('kibana.parallelcoordinates', [])
...
@@ -127,7 +128,6 @@ angular.module('kibana.parallelcoordinates', [])
};
};
// I really don't like this function, too much dom manip. Break out into directive?
// I really don't like this function, too much dom manip. Break out into directive?
...
@@ -145,6 +145,11 @@ angular.module('kibana.parallelcoordinates', [])
...
@@ -145,6 +145,11 @@ angular.module('kibana.parallelcoordinates', [])
}
}
$scope
.
$watch
(
'activeDocs'
,
function
(
v
)
{
//console.log("Watch", $scope.activeDocs);
eventBus
.
broadcast
(
$scope
.
$id
,
$scope
.
panel
.
group
,
"table_documents"
,
{
query
:
$scope
.
panel
.
query
,
docs
:
$scope
.
activeDocs
});
});
})
})
.
directive
(
'parallelcoordinates'
,
function
()
{
.
directive
(
'parallelcoordinates'
,
function
()
{
...
@@ -154,7 +159,6 @@ angular.module('kibana.parallelcoordinates', [])
...
@@ -154,7 +159,6 @@ angular.module('kibana.parallelcoordinates', [])
console
.
log
(
"directive"
);
console
.
log
(
"directive"
);
//elem.html('')
scope
.
initializing
=
false
;
scope
.
initializing
=
false
;
...
@@ -257,12 +261,25 @@ angular.module('kibana.parallelcoordinates', [])
...
@@ -257,12 +261,25 @@ angular.module('kibana.parallelcoordinates', [])
var
actives
=
scope
.
panel
.
fields
.
filter
(
function
(
p
)
{
return
!
scope
.
y
[
p
].
brush
.
empty
();
}),
var
actives
=
scope
.
panel
.
fields
.
filter
(
function
(
p
)
{
return
!
scope
.
y
[
p
].
brush
.
empty
();
}),
extents
=
actives
.
map
(
function
(
p
)
{
return
scope
.
y
[
p
].
brush
.
extent
();
});
extents
=
actives
.
map
(
function
(
p
)
{
return
scope
.
y
[
p
].
brush
.
extent
();
});
scope
.
foregroundLines
.
classed
(
"fade"
,
function
(
d
)
{
scope
.
foregroundLines
.
classed
(
"fade"
,
function
(
d
)
{
return
!
actives
.
every
(
function
(
p
,
i
)
{
return
!
actives
.
every
(
function
(
p
,
i
)
{
return
extents
[
i
][
0
]
<=
d
[
p
]
&&
d
[
p
]
<=
extents
[
i
][
1
];
var
inside
=
extents
[
i
][
0
]
<=
d
[
p
]
&&
d
[
p
]
<=
extents
[
i
][
1
];
return
inside
;
});
});
});
});
var
activeDocs
=
_
.
filter
(
scope
.
data
,
function
(
v
)
{
return
actives
.
every
(
function
(
p
,
i
)
{
var
inside
=
extents
[
i
][
0
]
<=
v
[
p
]
&&
v
[
p
]
<=
extents
[
i
][
1
];
return
inside
;
});
})
scope
.
$apply
(
function
()
{
scope
.
activeDocs
=
activeDocs
;
});
}
}
function
dragstart
(
d
)
{
function
dragstart
(
d
)
{
...
@@ -441,55 +458,8 @@ angular.module('kibana.parallelcoordinates', [])
...
@@ -441,55 +458,8 @@ angular.module('kibana.parallelcoordinates', [])
dragend
();
dragend
();
/*
// Add a brush for each axis.
scope.brushes = scope.g.append("svg:g")
.attr("class", "brush");
scope.axisLines = scope.g.append("svg:g")
.attr("class", "axis");
//Draw the brushes
//If the field is no longer in the list of actives,
//remove the element. Sorta like a poor-man's enter() / exit()
scope.brushes
.each(function(d) {
if (typeof scope.y[d] !== 'undefined') {
console.log("brushes.each", d);
d3.select(this).attr("style", "display").call(scope.y[d].brush);
} else {
console.log("none");
d3.select(this).attr("style", "display:none");
}
})
.selectAll("rect")
.attr("x", -8)
.attr("width", 16);
//Draw the axis lines
//If the field is no longer in the list of actives,
//remove the element. Sorta like a poor-man's enter() / exit()
scope.axisLines
.each(function(d) {
if (typeof scope.y[d] !== 'undefined') {
d3.select(this).attr("style", "display").call(scope.axis.scale(scope.y[d]));
} else {
d3.select(this).attr("style", "display:none");
}
})
.append("svg:text")
.attr("text-anchor", "middle")
.attr("y", -9)
.text(String)
.call(dragend); //call dragend so that the axis reshuffle.
*/
}
}
}
}
...
...
panels/table/module.js
View file @
78a070a8
...
@@ -40,6 +40,10 @@ angular.module('kibana.table', [])
...
@@ -40,6 +40,10 @@ angular.module('kibana.table', [])
eventBus
.
register
(
$scope
,
'selected_fields'
,
function
(
event
,
fields
)
{
eventBus
.
register
(
$scope
,
'selected_fields'
,
function
(
event
,
fields
)
{
$scope
.
panel
.
fields
=
_
.
clone
(
fields
)
$scope
.
panel
.
fields
=
_
.
clone
(
fields
)
});
});
eventBus
.
register
(
$scope
,
'table_documents'
,
function
(
event
,
docs
)
{
$scope
.
panel
.
query
=
docs
.
query
;
$scope
.
data
=
docs
.
docs
;
});
}
}
$scope
.
set_sort
=
function
(
field
)
{
$scope
.
set_sort
=
function
(
field
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment