Update the plugin to use the v1 api.
See title. Depends-On: Ib8211b1f0a00e2d9098c7c0eb0624781fdb212d3 Change-Id: I5f825a52638428a71630e99bde089386c339ed75
This commit is contained in:
parent
f0e82cf8b6
commit
d2c48184f3
|
@ -135,11 +135,11 @@
|
||||||
callbacks.push(callback);
|
callbacks.push(callback);
|
||||||
};
|
};
|
||||||
this.init = function(app_catalog_url) {
|
this.init = function(app_catalog_url) {
|
||||||
var heat_req = {
|
var req = {
|
||||||
url: app_catalog_url + '/static/heat_templates.json',
|
url: app_catalog_url + '/api/v1/assets',
|
||||||
headers: {'X-Requested-With': undefined}
|
headers: {'X-Requested-With': undefined}
|
||||||
}
|
}
|
||||||
$http(heat_req).success(function(data) {
|
$http(req).success(function(data) {
|
||||||
for (var i in data.assets){
|
for (var i in data.assets){
|
||||||
var asset = data.assets[i];
|
var asset = data.assets[i];
|
||||||
$scope.assets.push(asset);
|
$scope.assets.push(asset);
|
||||||
|
@ -157,14 +157,14 @@
|
||||||
notify();
|
notify();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (asset.service.type == 'heat') {
|
||||||
process(asset);
|
process(asset);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
$scope.glance_loaded = true;
|
||||||
|
$scope.murano_loaded = true;
|
||||||
update_found_assets($scope)
|
update_found_assets($scope)
|
||||||
});
|
});
|
||||||
var glance_req = {
|
|
||||||
url: app_catalog_url + '/static/glance_images.json',
|
|
||||||
headers: {'X-Requested-With': undefined}
|
|
||||||
}
|
|
||||||
glanceAPI.getImages().success(function(data) {
|
glanceAPI.getImages().success(function(data) {
|
||||||
$scope.glance_images = data;
|
$scope.glance_images = data;
|
||||||
var glance_names = {}
|
var glance_names = {}
|
||||||
|
@ -175,26 +175,6 @@
|
||||||
$scope.glance_names = glance_names;
|
$scope.glance_names = glance_names;
|
||||||
update_found_assets($scope)
|
update_found_assets($scope)
|
||||||
});
|
});
|
||||||
$http(glance_req).success(function(data) {
|
|
||||||
for (var i in data.assets){
|
|
||||||
var asset = data.assets[i];
|
|
||||||
$scope.assets.push(asset);
|
|
||||||
}
|
|
||||||
$scope.glance_loaded = true;
|
|
||||||
update_found_assets($scope);
|
|
||||||
});
|
|
||||||
var murano_req = {
|
|
||||||
url: app_catalog_url + '/static/murano_apps.json',
|
|
||||||
headers: {'X-Requested-With': undefined}
|
|
||||||
}
|
|
||||||
$http(murano_req).success(function(data) {
|
|
||||||
for (var i in data.assets){
|
|
||||||
var asset = data.assets[i];
|
|
||||||
$scope.assets.push(asset);
|
|
||||||
}
|
|
||||||
$scope.murano_loaded = true;
|
|
||||||
update_found_assets($scope);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
this.asset_filter_strings = {
|
this.asset_filter_strings = {
|
||||||
cancel: gettext('Cancel'),
|
cancel: gettext('Cancel'),
|
||||||
|
|
Loading…
Reference in New Issue