All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.extension.influxdb.module.js Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
angular.module('ontrack.extension.influxdb', [
    'ui.router',
    'ot.service.core'
])
    .config(function ($stateProvider) {
        $stateProvider.state('influxdb-status', {
            url: '/extension/influxdb/status',
            templateUrl: 'extension/influxdb/status.tpl.html',
            controller: 'InfluxDBStatusCtrl'
        });
    })
    .controller('InfluxDBStatusCtrl', function ($scope, $http, ot) {
        const view = ot.view();
        view.title = "InfluxDB status";
        view.breadcrumbs = ot.homeBreadcrumbs();
        view.commands = [
            ot.viewCloseCommand('/home')
        ];

        const loadStatus = () => {
            $scope.loadingStatus = true;
            ot.pageCall($http.get("extension/influxdb")).then(data => {
                $scope.status = data;
            }).finally(() => {
                $scope.loadingStatus = false;
            });
        };

        loadStatus();

        $scope.reset = () => {
            $scope.loadingStatus = true;
            ot.pageCall($http.post("extension/influxdb")).then(loadStatus);
        };
    })
;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy