1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-04 17:47:00 +03:00

B #655: register hooks import host (#3835)

Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
This commit is contained in:
Jorge Lobo 2019-10-11 15:19:47 +02:00 committed by Tino Vázquez
parent ea33ca4c77
commit 6e909eeb05
2 changed files with 13 additions and 2 deletions

View File

@ -56,7 +56,7 @@ define(function(require) {
function _fillVCenterClusters(opts) {
this.opts = opts;
var path = "/vcenter";
var path = "/vcenter/hosts";
var context = $(".vcenter_import", opts.container);
context.html( TemplateHTML({}) );
@ -254,6 +254,13 @@ define(function(require) {
}
Sunstone.runAction("Host.update_template", response.HOST.ID, template_raw);
$.ajax({
url: '/vcenter/register_hooks',
type: "POST",
processData: false
});
},
error: function (request, error_json) {
VCenterCommon.importFailure({

View File

@ -111,7 +111,7 @@ helpers do
end
get '/vcenter' do
get '/vcenter/hosts' do
begin
dc_folder = VCenterDriver::DatacenterFolder.new(vcenter_client)
@ -255,3 +255,7 @@ post '/vcenter/wild' do
error 403, error.to_json
end
end
post '/vcenter/register_hooks' do
VCenterDriver::VcImporter.register_hooks
end