"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "openstack_dashboard/static/app/core/images/steps/create-volume/create-volume.controller.js" between
horizon-22.1.0.tar.gz and horizon-23.0.0.tar.gz

About: OpenStack Horizon (Optional Service: Dashboard) provides a web-based self-service portal to interact with underlying OpenStack services, such as launching an instance, assigning IP addresses and configuring access controls.
The "Zed" series (latest release).

create-volume.controller.js  (horizon-22.1.0):create-volume.controller.js  (horizon-23.0.0)
skipping to change at line 151 skipping to change at line 151
}, },
updateVolumeType, updateVolumeType,
true true
); );
$scope.$on('$destroy', deregisterWatchers); $scope.$on('$destroy', deregisterWatchers);
init(); init();
function init() { function init() {
cinder.getVolumeTypes().success(onGetVolumeTypes); cinder.getVolumeTypes().then(onGetVolumeTypes);
cinder.getAbsoluteLimits().success(onGetAbsoluteLimits); cinder.getAbsoluteLimits().then(onGetAbsoluteLimits);
cinder.getAvailabilityZones().success(onGetAvailabilityZones); cinder.getAvailabilityZones().then(onGetAvailabilityZones);
} }
function onGetVolumeTypes(response) { function onGetVolumeTypes(response) {
ctrl.volumeTypes = response.items; ctrl.volumeTypes = response.data.items;
cinder.getDefaultVolumeType().success(onGetDefaultVolumeType); cinder.getDefaultVolumeType().then(onGetDefaultVolumeType);
} }
function onGetDefaultVolumeType(response) { function onGetDefaultVolumeType(response) {
ctrl.volumeTypes.forEach(function(volumeType) { ctrl.volumeTypes.forEach(function(volumeType) {
if (volumeType.name === response.name) { if (volumeType.name === response.data.name) {
ctrl.volumeType = volumeType; ctrl.volumeType = volumeType;
} }
}); });
} }
function onGetAvailabilityZones(response) { function onGetAvailabilityZones(response) {
ctrl.availabilityZones = response.items.map(justNames); ctrl.availabilityZones = response.data.items.map(justNames);
if (ctrl.availabilityZones.length > 0) { if (ctrl.availabilityZones.length > 0) {
ctrl.volume.availability_zone = ctrl.availabilityZones[0]; ctrl.volume.availability_zone = ctrl.availabilityZones[0];
} }
function justNames(item) { function justNames(item) {
return item.zoneName; return item.zoneName;
} }
} }
function onGetAbsoluteLimits(response) { function onGetAbsoluteLimits(response) {
ctrl.maxTotalVolumeGigabytes = response.maxTotalVolumeGigabytes; ctrl.maxTotalVolumeGigabytes = response.data.maxTotalVolumeGigabytes;
ctrl.totalGigabytesUsed = response.totalGigabytesUsed; ctrl.totalGigabytesUsed = response.data.totalGigabytesUsed;
updateStorageGraph(); updateStorageGraph();
ctrl.totalVolumesUsed = response.totalVolumesUsed; ctrl.totalVolumesUsed = response.data.totalVolumesUsed;
ctrl.maxTotalVolumes = response.maxTotalVolumes; ctrl.maxTotalVolumes = response.data.maxTotalVolumes;
updateInstanceGraph(); updateInstanceGraph();
} }
function updateStorageGraph() { function updateStorageGraph() {
if (ctrl.volume.size >= 0) { if (ctrl.volume.size >= 0) {
var totalGigabytesAllocated = ctrl.volume.size + ctrl.totalGigabytesUsed ; var totalGigabytesAllocated = ctrl.volume.size + ctrl.totalGigabytesUsed ;
ctrl.storageQuota.data[0].value = ctrl.totalGigabytesUsed; ctrl.storageQuota.data[0].value = ctrl.totalGigabytesUsed;
ctrl.storageQuota.data[1].value = ctrl.volume.size; ctrl.storageQuota.data[1].value = ctrl.volume.size;
ctrl.storageQuota.data[2].value = ctrl.storageQuota.data[2].value =
Math.max(ctrl.maxTotalVolumeGigabytes - totalGigabytesAllocated, 0); Math.max(ctrl.maxTotalVolumeGigabytes - totalGigabytesAllocated, 0);
 End of changes. 6 change blocks. 
11 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)