anmolbabu has posted comments on this change. Change subject: ui-plugin : Trends Tab ......................................................................
Patch Set 27: (3 comments) http://gerrit.ovirt.org/#/c/25471/27/gluster-nagios-dashboard/src/js/trends.js File gluster-nagios-dashboard/src/js/trends.js: Line 28: resultDate.setFullYear(date.getFullYear(), date.getMonth(), date.getDate()); Line 29: resultDate.setHours(time.getHours(), time.getMinutes(), time.getSeconds(), resultDate.getMilliseconds()); Line 30: return resultDate; Line 31: }, Line 32: getYesterday : function() { > is this being used? I intend to use this whereever I am explicitly doing it. Line 33: return new Date(new Date().setDate((new Date().getDate()) -1)); Line 34: } Line 35: }; Line 36: }]); Line 174: for(var i = 0 ; i < urls.length ; i++) { Line 175: tempUrls[i] = graphUtils.appendTimeToUrl(graphUtils.trimStartAndStopTimeFromUrl(urls[i]), graphUtils.formTimeInFormat(startDate), graphUtils.formTimeInFormat(endDate)); Line 176: } Line 177: return tempUrls; Line 178: }, > yes, the above function doesn't modify any local variables, so this can be Done Line 179: exposeTestDataFunction: function () { Line 180: var caller = this; Line 181: $window.setTestData = function (type, entityId, entityName, entityClusterId, pluginConfig) { Line 182: treeItemType = type; Line 443: $rootScope.startDate = new Date(yesterday); Line 444: $rootScope.startTime = new Date(yesterday); Line 445: $rootScope.stopDate = new Date(); Line 446: $rootScope.stopTime = new Date(); Line 447: graphs[i] = dataManager.getGraphUtils().trimStartAndStopTimeFromUrl($scope.graphs[i]); > graphUtils can be directly injected into this controller itself instead of No, circular dependency injections can't be done. dataManager requires graphUtils and tabController also requires graphUtils and at places I'am using the dataManager in tabController. Line 448: $scope.graphs[i] = graphs[i]; Line 449: } Line 450: }; Line 451: $scope.getCustomGraphs = function() { -- To view, visit http://gerrit.ovirt.org/25471 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7c00636e380da154f7f457066fe89475d04c9b4 Gerrit-PatchSet: 27 Gerrit-Project: samples-uiplugins Gerrit-Branch: master Gerrit-Owner: anmolbabu <[email protected]> Gerrit-Reviewer: Kanagaraj M <[email protected]> Gerrit-Reviewer: anmolbabu <[email protected]> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
