mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
extension(storidge): add Storidge extension (#1581)
This commit is contained in:
parent
edadce359c
commit
7817d4bd0b
47 changed files with 2484 additions and 44 deletions
44
app/extensions/storidge/rest/cluster.js
Normal file
44
app/extensions/storidge/rest/cluster.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
angular.module('extension.storidge')
|
||||
.factory('StoridgeCluster', ['$http', 'StoridgeManager', function StoridgeClusterFactory($http, StoridgeManager) {
|
||||
'use strict';
|
||||
|
||||
var service = {};
|
||||
|
||||
service.queryEvents = function() {
|
||||
return $http({
|
||||
method: 'GET',
|
||||
url: StoridgeManager.StoridgeAPIURL() + '/events',
|
||||
skipAuthorization: true,
|
||||
timeout: 4500,
|
||||
ignoreLoadingBar: true
|
||||
});
|
||||
};
|
||||
|
||||
service.queryVersion = function() {
|
||||
return $http({
|
||||
method: 'GET',
|
||||
url: StoridgeManager.StoridgeAPIURL() + '/version',
|
||||
skipAuthorization: true
|
||||
});
|
||||
};
|
||||
|
||||
service.queryInfo = function() {
|
||||
return $http({
|
||||
method: 'GET',
|
||||
url: StoridgeManager.StoridgeAPIURL() + '/info',
|
||||
skipAuthorization: true,
|
||||
timeout: 4500,
|
||||
ignoreLoadingBar: true
|
||||
});
|
||||
};
|
||||
|
||||
service.reboot = function() {
|
||||
return $http({
|
||||
method: 'POST',
|
||||
url: StoridgeManager.StoridgeAPIURL() + '/cluster/reboot',
|
||||
skipAuthorization: true
|
||||
});
|
||||
};
|
||||
|
||||
return service;
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue