|
@@ -25,19 +25,7 @@ function init_components_dashboard(input){
|
|
|
lineNumber : data.line
|
|
|
});
|
|
|
input.data('component',component);
|
|
|
- }
|
|
|
-
|
|
|
- if(data.scope){
|
|
|
- $.action({
|
|
|
- action: 'dashboard_widget_search',
|
|
|
- scope: data.scope,
|
|
|
- uid: data.uid
|
|
|
- },function(response){
|
|
|
- component.addWidgets(response.widgets);
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- if(data.onRefresh){
|
|
|
+ if(data.onRefresh){
|
|
|
setInterval(function(){
|
|
|
$.action({
|
|
|
action : data.onRefresh,
|
|
@@ -53,8 +41,21 @@ function init_components_dashboard(input){
|
|
|
});
|
|
|
|
|
|
},1000);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ if(data.scope){
|
|
|
+ $.action({
|
|
|
+ action: 'dashboard_widget_search',
|
|
|
+ scope: data.scope,
|
|
|
+ uid: data.uid
|
|
|
+ },function(response){
|
|
|
+ component.addWidgets(response.widgets);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/*component.addWidgets([{
|
|
|
width : 1,
|
|
|
height: 1,
|