blob: 9eab295e42da5b8db75bee014d8bbefead0a33df [file] [log] [blame]
Iftekharul Islamcd789502017-04-19 14:37:55 -05001/**
2 * Controller for date-time
3 *
4 * @module app/configuration
5 * @exports dateTimeController
6 * @name dateTimeController
Iftekharul Islamcd789502017-04-19 14:37:55 -05007 */
8
Andrew Geisslerba5e3f32018-05-24 10:58:00 -07009window.angular && (function(angular) {
10 'use strict';
Iftekharul Islamcd789502017-04-19 14:37:55 -050011
Andrew Geisslerd27bb132018-05-24 11:07:27 -070012 angular.module('app.configuration').controller('dateTimeController', [
Gunnar Mills7de38662018-07-18 13:01:48 -050013 '$scope', '$window', 'APIUtils',
14 function($scope, $window, APIUtils) {
15 $scope.bmc_time = '';
16 $scope.loading = true;
17
18 var getBMCTimePromise = APIUtils.getBMCTime().then(
19 function(data) {
20 $scope.bmc_time = data.data.Elapsed / 1000;
21 },
22 function(error) {
23 console.log(JSON.stringify(error));
24 });
25
26 getBMCTimePromise.finally(function() {
27 $scope.loading = false;
28 });
Andrew Geisslerd27bb132018-05-24 11:07:27 -070029 }
30 ]);
Iftekharul Islamcd789502017-04-19 14:37:55 -050031})(angular);