Skip to content
This repository has been archived by the owner on Aug 21, 2021. It is now read-only.

Commit

Permalink
widget defs pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
suvigyavijay committed Jul 19, 2017
1 parent 4e80837 commit bed70dd
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/app/main/main.controller.js
Expand Up @@ -221,11 +221,24 @@
};

CustomWidgetService.showCustomWidgetModal(customWidgetModal, {}).then(function() {
console.log('customwidgetoptions', vm.customWidgetOptions);
widgetDefinitions.push(vm.customWidgetOptions);
// console.log('widgetdefs', widgetDefinitions);
widgetsToLoad.push(vm.customWidgetOptions);
// console.log('widgetstoload', widgetsToLoad);
var widget = {
name: vm.customWidgetOptions.name,
title: vm.customWidgetOptions.title,
directive: 'line-time-series',
dataAttrName: 'data',
dataModelType: 'MetricDataModel',
dataModelOptions: {
name: vm.customWidgetOptions.dataModelOptions.name
},
size: {
width: '50%',
height: '250px'
},
enableVerticalResize: false,
group: 'Custom'
}
widgetDefinitions.push(widget);
widgetsToLoad.push(widget);
vm.reload = true;
$timeout(function() {
vm.reload = false;
Expand Down

0 comments on commit bed70dd

Please sign in to comment.