yocto-autobuilder2/yocto_console_view/src/module/view/modal/modal.controller.js
Richard Purdie 36ae2de715 yocto_console_view: Convert to new plugin standards to match upstream buildbot
Our plugin is based on upstream buildbot's console plugin. Upstream moved
away from coffescript and made a number of other fixes and improvements.

Run decaffeinate on the coffeescript to translate to angularjs and then
convert to the new build environment and standards.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-29 18:33:03 +00:00

23 lines
685 B
JavaScript

/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
class ConsoleModal {
constructor($scope, $uibModalInstance, selectedBuild) {
this.$uibModalInstance = $uibModalInstance;
this.selectedBuild = selectedBuild;
$scope.$on('$stateChangeStart', () => {
return this.close();
});
}
close() {
return this.$uibModalInstance.close();
}
}
angular.module('yocto_console_view')
.controller('consoleModalController', ['$scope', '$uibModalInstance', 'selectedBuild', ConsoleModal]);