<commit_before>/* Copyright (C) Relevance Lab Private Limited- All Rights Reserved
 * Unauthorized copying of this file, via any medium is strictly prohibited
 * Proprietary and confidential
 * Written by Relevance UI Team,
 * Aug 2015
 */

(function(){
"use strict";
angular.module('workzone.blueprint')
	.controller('blueprintMoreInfoCtrl', ['$scope', '$modalInstance', 'items', 'workzoneServices', function($scope, $modalInstance, items, workzoneServices) {
		console.log(items);
		var blueprintName;
		switch (items.templateType) {
			case "chef":
				blueprintName = 'Software Stack';
				break;
			case "ami":
				blueprintName = 'OSImage';
				break;
			case "cft":
				blueprintName = 'cloudFormation';
				break;
			case "docker":
				blueprintName = 'Docker';
				break;
			case "arm":
				blueprintName = 'Azure ARM';
			break;
		}

		workzoneServices.blueprintInfo(items._id).then(function(response) {
			$scope.blueprintInfo = response.data;
		},
		function(error) {
			$scope.BPInfoerrorMessage = error.statusText;
		});

		angular.extend($scope, {
			cancel: function() {
				$modalInstance.dismiss('cancel');
			}
		});
	}]);<commit_msg>changed error message assignment to scope variable as per new API doc response JSON<commit_after>/* Copyright (C) Relevance Lab Private Limited- All Rights Reserved
 * Unauthorized copying of this file, via any medium is strictly prohibited
 * Proprietary and confidential
 * Written by Relevance UI Team,
 * Aug 2015
 */

(function(){
"use strict";
angular.module('workzone.blueprint')
	.controller('blueprintMoreInfoCtrl', ['$scope', '$modalInstance', 'items', 'workzoneServices', function($scope, $modalInstance, items, workzoneServices) {
		console.log(items);
		var blueprintName;
		switch (items.templateType) {
			case "chef":
				blueprintName = 'Software Stack';
				break;
			case "ami":
				blueprintName = 'OSImage';
				break;
			case "cft":
				blueprintName = 'cloudFormation';
				break;
			case "docker":
				blueprintName = 'Docker';
				break;
			case "arm":
				blueprintName = 'Azure ARM';
			break;
		}

		workzoneServices.blueprintInfo(items._id).then(function(response) {
			$scope.blueprintInfo = response.data;
		},
		function(error) {
			$scope.BPInfoerrorMessage = error.fields.errorMessage;
		});

		angular.extend($scope, {
			cancel: function() {
				$modalInstance.dismiss('cancel');
			}
		});
	}]);
{'fraction_non_alphanumeric': 0.1329140461215933, 'fraction_numerical': 0.0033542976939203353, 'mean_word_length': 4.109207708779444, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5111771', 'n_tokens_mistral': 866, 'n_tokens_neox': 717, 'n_words': 185}