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

Commit

Permalink
set default options and lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
suvigyavijay committed Jul 19, 2017
1 parent c5a5c5c commit 6c87244
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/app/index.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'useCgroupId': false, // Use container cgroup id instead of container name
'expandHostname': false, // Automatically expand hostname input when application opens
'disableHostnameInputContainerSelect': false, // Disable hostname and hostspec input when container is selected
'enableCustomWidgetFeature': false // Enable the custom widget feature to add ad-hoc widgets
'enableCustomWidgetFeature': true // Enable the custom widget feature to add ad-hoc widgets

})
.config(toastrConfig)
Expand Down
42 changes: 20 additions & 22 deletions src/app/main/main.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @name MainCtrl
* @desc Main Controller
*/
function MainCtrl($document, $rootScope, $log, $route, $routeParams, $location, $timeout, widgetDefinitions, widgets, embed, version, DashboardService, ContainerMetadataService, ModalService, CustomWidgetService, config) {
function MainCtrl($document, $rootScope, $log, $route, $routeParams, $location, $timeout, widgetDefinitions, widgets, embed, version, DashboardService, ContainerMetadataService, ModalService, CustomWidgetService) {

var vm = this,
widgetsToLoad = widgets;
Expand Down Expand Up @@ -221,11 +221,11 @@
};

CustomWidgetService.showCustomWidgetModal(customWidgetModal, {}).then(function() {
console.log('customwidgetoptions', vm.customWidgetOptions);
// console.log('customwidgetoptions', vm.customWidgetOptions);
widgetDefinitions.push(vm.customWidgetOptions);
console.log('widgetdefs', widgetDefinitions);
// console.log('widgetdefs', widgetDefinitions);
widgetsToLoad.push(vm.customWidgetOptions);
console.log('widgetstoload', widgetsToLoad);
// console.log('widgetstoload', widgetsToLoad);
vm.reload = true;
$timeout(function() {
vm.reload = false;
Expand All @@ -234,24 +234,22 @@
});
};



// vm.customWidgetOptions = {
// name: 'disk.dev.read',
// title: 'disk.dev.read',
// directive: 'line-time-series',
// dataAttrName: 'data',
// dataModelType: 'MetricDataModel',
// dataModelOptions: {
// name: 'disk.dev.read'
// },
// size: {
// width: '50%',
// height: '250px'
// },
// enableVerticalResize: false,
// group: 'Custom'
// }
vm.customWidgetOptions = {
name: '',
title: '',
directive: 'line-time-series',
dataAttrName: 'data',
dataModelType: 'MetricDataModel',
dataModelOptions: {
name: ''
},
size: {
width: '50%',
height: '250px'
},
enableVerticalResize: false,
group: 'Custom'
}

// Custom Widget Code Ends here

Expand Down

0 comments on commit 6c87244

Please sign in to comment.