diff options
author | 2018-01-31 17:19:00 +0200 | |
---|---|---|
committer | 2018-01-31 17:19:00 +0200 | |
commit | 1cfb08779ea0e00be69e072a940b3063e049fe6b (patch) | |
tree | 6602a900387c8393ed0dcd81c0539381632903c6 /vid-app-common/src/main/webapp/app/vid | |
parent | 2f20b001b9243e0f8b44aecc768ec265fd538732 (diff) |
org.onap migration
Change-Id: I52f0b2851f2c765752b6d21f49b32136d7d72a3d
Issue-ID: VID-86
Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid')
128 files changed, 8061 insertions, 4295 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/external/upload-file/ng-file-upload.min.js b/vid-app-common/src/main/webapp/app/vid/external/upload-file/ng-file-upload.min.js new file mode 100644 index 000000000..4bfe94221 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/external/upload-file/ng-file-upload.min.js @@ -0,0 +1,3 @@ +/*! 12.2.13 */ +!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(a){return function(b,c){if("__setXHR_"===b){var d=c(this);d instanceof Function&&d(this)}else a.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var ngFileUpload=angular.module("ngFileUpload",[]);ngFileUpload.version="12.2.13",ngFileUpload.service("UploadBase",["$http","$q","$timeout",function(a,b,c){function d(d){function e(a){j.notify&&j.notify(a),k.progressFunc&&c(function(){k.progressFunc(a)})}function h(a){return null!=d._start&&g?{loaded:a.loaded+d._start,total:d._file&&d._file.size||a.total,type:a.type,config:d,lengthComputable:!0,target:a.target}:a}function i(){a(d).then(function(a){if(g&&d._chunkSize&&!d._finished&&d._file){var b=d._file&&d._file.size||0;e({loaded:Math.min(d._end,b),total:b,config:d,type:"progress"}),f.upload(d,!0)}else d._finished&&delete d._finished,j.resolve(a)},function(a){j.reject(a)},function(a){j.notify(a)})}d.method=d.method||"POST",d.headers=d.headers||{};var j=d._deferred=d._deferred||b.defer(),k=j.promise;return d.disableProgress||(d.headers.__setXHR_=function(){return function(a){a&&a.upload&&a.upload.addEventListener&&(d.__XHR=a,d.xhrFn&&d.xhrFn(a),a.upload.addEventListener("progress",function(a){a.config=d,e(h(a))},!1),a.upload.addEventListener("load",function(a){a.lengthComputable&&(a.config=d,e(h(a)))},!1))}}),g?d._chunkSize&&d._end&&!d._finished?(d._start=d._end,d._end+=d._chunkSize,i()):d.resumeSizeUrl?a.get(d.resumeSizeUrl).then(function(a){d._start=d.resumeSizeResponseReader?d.resumeSizeResponseReader(a.data):parseInt((null==a.data.size?a.data:a.data.size).toString()),d._chunkSize&&(d._end=d._start+d._chunkSize),i()},function(a){throw a}):d.resumeSize?d.resumeSize().then(function(a){d._start=a,d._chunkSize&&(d._end=d._start+d._chunkSize),i()},function(a){throw a}):(d._chunkSize&&(d._start=0,d._end=d._start+d._chunkSize),i()):i(),k.success=function(a){return k.then(function(b){a(b.data,b.status,b.headers,d)}),k},k.error=function(a){return k.then(null,function(b){a(b.data,b.status,b.headers,d)}),k},k.progress=function(a){return k.progressFunc=a,k.then(null,null,function(b){a(b)}),k},k.abort=k.pause=function(){return d.__XHR&&c(function(){d.__XHR.abort()}),k},k.xhr=function(a){return d.xhrFn=function(b){return function(){b&&b.apply(k,arguments),a.apply(k,arguments)}}(d.xhrFn),k},f.promisesCount++,k["finally"]&&k["finally"]instanceof Function&&k["finally"](function(){f.promisesCount--}),k}function e(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var f=this;f.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var g=this.isResumeSupported();this.isUploadInProgress=function(){return f.promisesCount>0},this.rename=function(a,b){return a.ngfName=b,a},this.jsonBlob=function(a){null==a||angular.isString(a)||(a=JSON.stringify(a));var b=new window.Blob([a],{type:"application/json"});return b._ngfBlob=!0,b},this.json=function(a){return angular.toJson(a)},this.isFile=function(a){return null!=a&&(a instanceof window.Blob||a.flashId&&a.name&&a.size)},this.upload=function(a,b){function c(b,c){if(b._ngfBlob)return b;if(a._file=a._file||b,null!=a._start&&g){a._end&&a._end>=b.size&&(a._finished=!0,a._end=b.size);var d=b.slice(a._start,a._end||b.size);return d.name=b.name,d.ngfName=b.ngfName,a._chunkSize&&(c.append("_chunkSize",a._chunkSize),c.append("_currentChunkSize",a._end-a._start),c.append("_chunkNumber",Math.floor(a._start/a._chunkSize)),c.append("_totalSize",a._file.size)),d}return b}function h(b,d,e){if(void 0!==d)if(angular.isDate(d)&&(d=d.toISOString()),angular.isString(d))b.append(e,d);else if(f.isFile(d)){var g=c(d,b),i=e.split(",");i[1]&&(g.ngfName=i[1].replace(/^\s+|\s+$/g,""),e=i[0]),a._fileKey=a._fileKey||e,b.append(e,g,g.ngfName||g.name)}else if(angular.isObject(d)){if(d.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+e;d.$$ngfCircularDetection=!0;try{for(var j in d)if(d.hasOwnProperty(j)&&"$$ngfCircularDetection"!==j){var k=null==a.objectKey?"[i]":a.objectKey;d.length&&parseInt(j)>-1&&(k=null==a.arrayKey?k:a.arrayKey),h(b,d[j],e+k.replace(/[ik]/g,j))}}finally{delete d.$$ngfCircularDetection}}else b.append(e,d)}function i(){a._chunkSize=f.translateScalars(a.resumeChunkSize),a._chunkSize=a._chunkSize?parseInt(a._chunkSize.toString()):null,a.headers=a.headers||{},a.headers["Content-Type"]=void 0,a.transformRequest=a.transformRequest?angular.isArray(a.transformRequest)?a.transformRequest:[a.transformRequest]:[],a.transformRequest.push(function(b){var c,d=new window.FormData;b=b||a.fields||{},a.file&&(b.file=a.file);for(c in b)if(b.hasOwnProperty(c)){var e=b[c];a.formDataAppender?a.formDataAppender(d,c,e):h(d,e,c)}return d})}return b||(a=e(a)),a._isDigested||(a._isDigested=!0,i()),d(a)},this.http=function(b){return b=e(b),b.transformRequest=b.transformRequest||function(b){return window.ArrayBuffer&&b instanceof window.ArrayBuffer||b instanceof window.Blob?b:a.defaults.transformRequest[0].apply(this,arguments)},b._chunkSize=f.translateScalars(b.resumeChunkSize),b._chunkSize=b._chunkSize?parseInt(b._chunkSize.toString()):null,d(b)},this.translateScalars=function(a){if(angular.isString(a)){if(a.search(/kb/i)===a.length-2)return parseFloat(1024*a.substring(0,a.length-2));if(a.search(/mb/i)===a.length-2)return parseFloat(1048576*a.substring(0,a.length-2));if(a.search(/gb/i)===a.length-2)return parseFloat(1073741824*a.substring(0,a.length-2));if(a.search(/b/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/s/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/m/i)===a.length-1)return parseFloat(60*a.substring(0,a.length-1));if(a.search(/h/i)===a.length-1)return parseFloat(3600*a.substring(0,a.length-1))}return a},this.urlToBlob=function(c){var d=b.defer();return a({url:c,method:"get",responseType:"arraybuffer"}).then(function(a){var b=new Uint8Array(a.data),e=a.headers("content-type")||"image/WebP",f=new window.Blob([b],{type:e}),g=c.match(/.*\/(.+?)(\?.*)?$/);g.length>1&&(f.name=g[1]),d.resolve(f)},function(a){d.reject(a)}),d.promise},this.setDefaults=function(a){this.defaults=a||{}},this.defaults={},this.version=ngFileUpload.version}]),ngFileUpload.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(a,b,c,d,e){function f(a,b,c){var e=[i.emptyPromise()];return angular.forEach(a,function(d,f){0===d.type.indexOf("image/jpeg")&&i.attrGetter("ngfFixOrientation",b,c,{$file:d})&&e.push(i.happyPromise(i.applyExifRotation(d),d).then(function(b){a.splice(f,1,b)}))}),d.all(e)}function g(a,b,c,e){var f=i.attrGetter("ngfResize",b,c);if(!f||!i.isResizeSupported()||!a.length)return i.emptyPromise();if(f instanceof Function){var g=d.defer();return f(a).then(function(d){h(d,a,b,c,e).then(function(a){g.resolve(a)},function(a){g.reject(a)})},function(a){g.reject(a)})}return h(f,a,b,c,e)}function h(a,b,c,e,f){function g(d,g){if(0===d.type.indexOf("image")){if(a.pattern&&!i.validatePattern(d,a.pattern))return;a.resizeIf=function(a,b){return i.attrGetter("ngfResizeIf",c,e,{$width:a,$height:b,$file:d})};var j=i.resize(d,a);h.push(j),j.then(function(a){b.splice(g,1,a)},function(a){d.$error="resize",(d.$errorMessages=d.$errorMessages||{}).resize=!0,d.$errorParam=(a?(a.message?a.message:a)+": ":"")+(d&&d.name),f.$ngfValidations.push({name:"resize",valid:!1}),i.applyModelValidation(f,b)})}}for(var h=[i.emptyPromise()],j=0;j<b.length;j++)g(b[j],j);return d.all(h)}var i=e;return i.getAttrWithDefaults=function(a,b){if(null!=a[b])return a[b];var c=i.defaults[b];return null==c?c:angular.isString(c)?c:JSON.stringify(c)},i.attrGetter=function(b,c,d,e){var f=this.getAttrWithDefaults(c,b);if(!d)return f;try{return e?a(f)(d,e):a(f)(d)}catch(g){if(b.search(/min|max|pattern/i))return f;throw g}},i.shouldUpdateOn=function(a,b,c){var d=i.attrGetter("ngfModelOptions",b,c);return d&&d.updateOn?d.updateOn.split(" ").indexOf(a)>-1:!0},i.emptyPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.resolve.apply(a,c)}),a.promise},i.rejectPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.reject.apply(a,c)}),a.promise},i.happyPromise=function(a,c){var e=d.defer();return a.then(function(a){e.resolve(a)},function(a){b(function(){throw a}),e.resolve(c)}),e.promise},i.updateModel=function(c,d,e,h,j,k,l){function m(f,g,j,l,m){d.$$ngfPrevValidFiles=f,d.$$ngfPrevInvalidFiles=g;var n=f&&f.length?f[0]:null,o=g&&g.length?g[0]:null;c&&(i.applyModelValidation(c,f),c.$setViewValue(m?n:f)),h&&a(h)(e,{$files:f,$file:n,$newFiles:j,$duplicateFiles:l,$invalidFiles:g,$invalidFile:o,$event:k});var p=i.attrGetter("ngfModelInvalid",d);p&&b(function(){a(p).assign(e,m?o:g)}),b(function(){})}function n(){function a(a,b){return a.name===b.name&&(a.$ngfOrigSize||a.size)===(b.$ngfOrigSize||b.size)&&a.type===b.type}function b(b){var c;for(c=0;c<r.length;c++)if(a(b,r[c]))return!0;for(c=0;c<s.length;c++)if(a(b,s[c]))return!0;return!1}if(j){q=[],t=[];for(var c=0;c<j.length;c++)b(j[c])?t.push(j[c]):q.push(j[c])}}function o(a){return angular.isArray(a)?a:[a]}function p(){function a(){b(function(){m(w?r.concat(v):v,w?s.concat(u):u,j,t,x)},z&&z.debounce?z.debounce.change||z.debounce:0)}var f=y?q:v;g(f,d,e,c).then(function(){y?i.validate(q,w?r.length:0,c,d,e).then(function(b){v=b.validsFiles,u=b.invalidsFiles,a()}):a()},function(){for(var b=0;b<f.length;b++){var c=f[b];if("resize"===c.$error){var d=v.indexOf(c);d>-1&&(v.splice(d,1),u.push(c)),a()}}})}var q,r,s,t=[],u=[],v=[];r=d.$$ngfPrevValidFiles||[],s=d.$$ngfPrevInvalidFiles||[],c&&c.$modelValue&&(r=o(c.$modelValue));var w=i.attrGetter("ngfKeep",d,e);q=(j||[]).slice(0),("distinct"===w||i.attrGetter("ngfKeepDistinct",d,e)===!0)&&n(d,e);var x=!w&&!i.attrGetter("ngfMultiple",d,e)&&!i.attrGetter("multiple",d);if(!w||q.length){i.attrGetter("ngfBeforeModelChange",d,e,{$files:j,$file:j&&j.length?j[0]:null,$newFiles:q,$duplicateFiles:t,$event:k});var y=i.attrGetter("ngfValidateAfterResize",d,e),z=i.attrGetter("ngfModelOptions",d,e);i.validate(q,w?r.length:0,c,d,e).then(function(a){l?m(q,[],j,t,x):(z&&z.allowInvalid||y?v=q:(v=a.validFiles,u=a.invalidFiles),i.attrGetter("ngfFixOrientation",d,e)&&i.isExifSupported()?f(v,d,e).then(function(){p()}):p())})}},i}]),ngFileUpload.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(a,b,c,d){function e(a){var b=a.match(/Android[^\d]*(\d+)\.(\d+)/);if(b&&b.length>2){var c=d.defaults.androidFixMinorVersion||4;return parseInt(b[1])<4||parseInt(b[1])===c&&parseInt(b[2])<c}return-1===a.indexOf("Chrome")&&/.*Windows.*Safari.*/.test(a)}function f(a,b,c,d,f,h,i,j){function k(){return"input"===b[0].tagName.toLowerCase()&&c.type&&"file"===c.type.toLowerCase()}function l(){return t("ngfChange")||t("ngfSelect")}function m(b){if(j.shouldUpdateOn("change",c,a)){var e=b.__files_||b.target&&b.target.files,f=[];if(!e)return;for(var g=0;g<e.length;g++)f.push(e[g]);j.updateModel(d,c,a,l(),f.length?f:null,b)}}function n(a,d){function e(b){a.attr("id","ngf-"+b),d.attr("id","ngf-label-"+b)}for(var f=0;f<b[0].attributes.length;f++){var g=b[0].attributes[f];"type"!==g.name&&"class"!==g.name&&"style"!==g.name&&("id"===g.name?(e(g.value),u.push(c.$observe("id",e))):a.attr(g.name,g.value||"required"!==g.name&&"multiple"!==g.name?g.value:g.name))}}function o(){if(k())return b;var a=angular.element('<input type="file">'),c=angular.element("<label>upload</label>");return c.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),n(a,c),g.push({el:b,ref:c}),document.body.appendChild(c.append(a)[0]),a}function p(c){if(b.attr("disabled"))return!1;if(!t("ngfSelectDisabled",a)){var d=q(c);if(null!=d)return d;r(c);try{k()||document.body.contains(x[0])||(g.push({el:b,ref:x.parent()}),document.body.appendChild(x.parent()[0]),x.bind("change",m))}catch(f){}return e(navigator.userAgent)?setTimeout(function(){x[0].click()},0):x[0].click(),!1}}function q(a){var b=a.changedTouches||a.originalEvent&&a.originalEvent.changedTouches;if(b){if("touchstart"===a.type)return w=b[0].clientX,v=b[0].clientY,!0;if("touchend"===a.type){var c=b[0].clientX,d=b[0].clientY;if(Math.abs(c-w)>20||Math.abs(d-v)>20)return a.stopPropagation(),a.preventDefault(),!1}return!0}}function r(b){j.shouldUpdateOn("click",c,a)&&x.val()&&(x.val(null),j.updateModel(d,c,a,l(),null,b,!0))}function s(a){if(x&&!x.attr("__ngf_ie10_Fix_")){if(!x[0].parentNode)return void(x=null);a.preventDefault(),a.stopPropagation(),x.unbind("click");var b=x.clone();return x.replaceWith(b),x=b,x.attr("__ngf_ie10_Fix_","true"),x.bind("change",m),x.bind("click",s),x[0].click(),!1}x.removeAttr("__ngf_ie10_Fix_")}var t=function(a,b){return j.attrGetter(a,c,b)};j.registerModelChangeValidator(d,c,a);var u=[];t("ngfMultiple")&&u.push(a.$watch(t("ngfMultiple"),function(){x.attr("multiple",t("ngfMultiple",a))})),t("ngfCapture")&&u.push(a.$watch(t("ngfCapture"),function(){x.attr("capture",t("ngfCapture",a))})),t("ngfAccept")&&u.push(a.$watch(t("ngfAccept"),function(){x.attr("accept",t("ngfAccept",a))})),u.push(c.$observe("accept",function(){x.attr("accept",t("accept"))}));var v=0,w=0,x=b;k()||(x=o()),x.bind("change",m),k()?b.bind("click",r):b.bind("click touchstart touchend",p),-1!==navigator.appVersion.indexOf("MSIE 10")&&x.bind("click",s),d&&d.$formatters.push(function(a){return(null==a||0===a.length)&&x.val()&&x.val(null),a}),a.$on("$destroy",function(){k()||x.parent().remove(),angular.forEach(u,function(a){a()})}),h(function(){for(var a=0;a<g.length;a++){var b=g[a];document.body.contains(b.el[0])||(g.splice(a,1),b.ref.remove())}}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(b,x,m)}var g=[];return{restrict:"AEC",require:"?ngModel",link:function(e,g,h,i){f(e,g,h,i,a,b,c,d)}}}]),function(){function a(a){return"img"===a.tagName.toLowerCase()?"image":"audio"===a.tagName.toLowerCase()?"audio":"video"===a.tagName.toLowerCase()?"video":/./}function b(b,c,d,e,f,g,h,i){function j(a){var g=b.attrGetter("ngfNoObjectUrl",f,d);b.dataUrl(a,g)["finally"](function(){c(function(){var b=(g?a.$ngfDataUrl:a.$ngfBlobUrl)||a.$ngfDataUrl;i?e.css("background-image","url('"+(b||"")+"')"):e.attr("src",b),b?e.removeClass("ng-hide"):e.addClass("ng-hide")})})}c(function(){var c=d.$watch(f[g],function(c){var k=h;if("ngfThumbnail"===g&&(k||(k={width:e[0].naturalWidth||e[0].clientWidth,height:e[0].naturalHeight||e[0].clientHeight}),0===k.width&&window.getComputedStyle)){var l=getComputedStyle(e[0]);l.width&&l.width.indexOf("px")>-1&&l.height&&l.height.indexOf("px")>-1&&(k={width:parseInt(l.width.slice(0,-2)),height:parseInt(l.height.slice(0,-2))})}return angular.isString(c)?(e.removeClass("ng-hide"),i?e.css("background-image","url('"+c+"')"):e.attr("src",c)):void(!c||!c.type||0!==c.type.search(a(e[0]))||i&&0!==c.type.indexOf("image")?e.addClass("ng-hide"):k&&b.isResizeSupported()?(k.resizeIf=function(a,e){return b.attrGetter("ngfResizeIf",f,d,{$width:a,$height:e,$file:c})},b.resize(c,k).then(function(a){j(a)},function(a){throw a})):j(c))});d.$on("$destroy",function(){c()})})}ngFileUpload.service("UploadDataUrl",["UploadBase","$timeout","$q",function(a,b,c){var d=a;return d.base64DataUrl=function(a){if(angular.isArray(a)){var b=c.defer(),e=0;return angular.forEach(a,function(c){d.dataUrl(c,!0)["finally"](function(){if(e++,e===a.length){var c=[];angular.forEach(a,function(a){c.push(a.$ngfDataUrl)}),b.resolve(c,a)}})}),b.promise}return d.dataUrl(a,!0)},d.dataUrl=function(a,e){if(!a)return d.emptyPromise(a,a);if(e&&null!=a.$ngfDataUrl||!e&&null!=a.$ngfBlobUrl)return d.emptyPromise(e?a.$ngfDataUrl:a.$ngfBlobUrl,a);var f=e?a.$$ngfDataUrlPromise:a.$$ngfBlobUrlPromise;if(f)return f;var g=c.defer();return b(function(){if(window.FileReader&&a&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 8")||a.size<2e4)&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 9")||a.size<4e6)){var c=window.URL||window.webkitURL;if(c&&c.createObjectURL&&!e){var f;try{f=c.createObjectURL(a)}catch(h){return void b(function(){a.$ngfBlobUrl="",g.reject()})}b(function(){if(a.$ngfBlobUrl=f,f){g.resolve(f,a),d.blobUrls=d.blobUrls||[],d.blobUrlsTotalSize=d.blobUrlsTotalSize||0,d.blobUrls.push({url:f,size:a.size}),d.blobUrlsTotalSize+=a.size||0;for(var b=d.defaults.blobUrlsMaxMemory||268435456,e=d.defaults.blobUrlsMaxQueueSize||200;(d.blobUrlsTotalSize>b||d.blobUrls.length>e)&&d.blobUrls.length>1;){var h=d.blobUrls.splice(0,1)[0];c.revokeObjectURL(h.url),d.blobUrlsTotalSize-=h.size}}})}else{var i=new FileReader;i.onload=function(c){b(function(){a.$ngfDataUrl=c.target.result,g.resolve(c.target.result,a),b(function(){delete a.$ngfDataUrl},1e3)})},i.onerror=function(){b(function(){a.$ngfDataUrl="",g.reject()})},i.readAsDataURL(a)}}else b(function(){a[e?"$ngfDataUrl":"$ngfBlobUrl"]="",g.reject()})}),f=e?a.$$ngfDataUrlPromise=g.promise:a.$$ngfBlobUrlPromise=g.promise,f["finally"](function(){delete a[e?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),f},d}]),ngFileUpload.directive("ngfSrc",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfSrc",a.attrGetter("ngfResize",f,d),!1)}}}]),ngFileUpload.directive("ngfBackground",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfBackground",a.attrGetter("ngfResize",f,d),!0)}}}]),ngFileUpload.directive("ngfThumbnail",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){var g=a.attrGetter("ngfSize",f,d);b(a,c,d,e,f,"ngfThumbnail",g,a.attrGetter("ngfAsBackground",f,d))}}}]),ngFileUpload.config(["$compileProvider",function(a){a.imgSrcSanitizationWhitelist&&a.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),a.aHrefSanitizationWhitelist&&a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),ngFileUpload.filter("ngfDataUrl",["UploadDataUrl","$sce",function(a,b){return function(c,d,e){if(angular.isString(c))return b.trustAsResourceUrl(c);var f=c&&((d?c.$ngfDataUrl:c.$ngfBlobUrl)||c.$ngfDataUrl);return c&&!f?(!c.$ngfDataUrlFilterInProgress&&angular.isObject(c)&&(c.$ngfDataUrlFilterInProgress=!0,a.dataUrl(c,d)),""):(c&&delete c.$ngfDataUrlFilterInProgress,(c&&f?e?b.trustAsResourceUrl(f):f:c)||"")}}])}(),ngFileUpload.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(a,b,c){function d(a){var b="",c=[];if(a.length>2&&"/"===a[0]&&"/"===a[a.length-1])b=a.substring(1,a.length-1);else{var e=a.split(",");if(e.length>1)for(var f=0;f<e.length;f++){var g=d(e[f]);g.regexp?(b+="("+g.regexp+")",f<e.length-1&&(b+="|")):c=c.concat(g.excludes)}else 0===a.indexOf("!")?c.push("^((?!"+d(a.substring(1)).regexp+").)*$"):(0===a.indexOf(".")&&(a="*"+a),b="^"+a.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",b=b.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:b,excludes:c}}function e(a,b){null==b||a.$dirty||(a.$setDirty?a.$setDirty():a.$dirty=!0)}var f=a;return f.validatePattern=function(a,b){if(!b)return!0;var c=d(b),e=!0;if(c.regexp&&c.regexp.length){var f=new RegExp(c.regexp,"i");e=null!=a.type&&f.test(a.type)||null!=a.name&&f.test(a.name)}for(var g=c.excludes.length;g--;){var h=new RegExp(c.excludes[g],"i");e=e&&(null==a.type||h.test(a.type))&&(null==a.name||h.test(a.name))}return e},f.ratioToFloat=function(a){var b=a.toString(),c=b.search(/[x:]/i);return b=c>-1?parseFloat(b.substring(0,c))/parseFloat(b.substring(c+1)):parseFloat(b)},f.registerModelChangeValidator=function(a,b,c){a&&a.$formatters.push(function(d){if(a.$dirty){var e=d;d&&!angular.isArray(d)&&(e=[d]),f.validate(e,0,a,b,c).then(function(){f.applyModelValidation(a,e)})}return d})},f.applyModelValidation=function(a,b){e(a,b),angular.forEach(a.$ngfValidations,function(b){a.$setValidity(b.name,b.valid)})},f.getValidationAttr=function(a,b,c,d,e){var g="ngf"+c[0].toUpperCase()+c.substr(1),h=f.attrGetter(g,a,b,{$file:e});if(null==h&&(h=f.attrGetter("ngfValidate",a,b,{$file:e}))){var i=(d||c).split(".");h=h[i[0]],i.length>1&&(h=h&&h[i[1]])}return h},f.validate=function(a,c,d,e,g){function h(b,c,h){if(a){for(var i=a.length,j=null;i--;){var n=a[i];if(n){var o=f.getValidationAttr(e,g,b,c,n);null!=o&&(h(n,o,i)||(-1===k.indexOf(b)?(n.$error=b,(n.$errorMessages=n.$errorMessages||{})[b]=!0,n.$errorParam=o,-1===m.indexOf(n)&&m.push(n),l||a.splice(i,1),j=!1):a.splice(i,1)))}}null!==j&&d.$ngfValidations.push({name:b,valid:j})}}function i(c,h,i,n,o){function p(b,d,e){function f(f){if(f())if(-1===k.indexOf(c)){if(d.$error=c,(d.$errorMessages=d.$errorMessages||{})[c]=!0,d.$errorParam=e,-1===m.indexOf(d)&&m.push(d),!l){var g=a.indexOf(d);g>-1&&a.splice(g,1)}b.resolve(!1)}else{var h=a.indexOf(d);h>-1&&a.splice(h,1),b.resolve(!0)}else b.resolve(!0)}null!=e?n(d,e).then(function(a){f(function(){return!o(a,e)})},function(){f(function(){return j("ngfValidateForce",{$file:d})})}):b.resolve(!0)}var q=[f.emptyPromise(!0)];a&&(a=void 0===a.length?[a]:a,angular.forEach(a,function(a){var d=b.defer();return q.push(d.promise),!i||null!=a.type&&0===a.type.search(i)?void("dimensions"===c&&null!=f.attrGetter("ngfDimensions",e)?f.imageDimensions(a).then(function(b){p(d,a,j("ngfDimensions",{$file:a,$width:b.width,$height:b.height}))},function(){d.resolve(!1)}):"duration"===c&&null!=f.attrGetter("ngfDuration",e)?f.mediaDuration(a).then(function(b){p(d,a,j("ngfDuration",{$file:a,$duration:b}))},function(){d.resolve(!1)}):p(d,a,f.getValidationAttr(e,g,c,h,a))):void d.resolve(!0)}));var r=b.defer();return b.all(q).then(function(a){for(var b=!0,e=0;e<a.length;e++)if(!a[e]){b=!1;break}d.$ngfValidations.push({name:c,valid:b}),r.resolve(b)}),r.promise}d=d||{},d.$ngfValidations=d.$ngfValidations||[],angular.forEach(d.$ngfValidations,function(a){a.valid=!0});var j=function(a,b){return f.attrGetter(a,e,g,b)},k=(f.attrGetter("ngfIgnoreInvalid",e,g)||"").split(" "),l=f.attrGetter("ngfRunAllValidations",e,g);if(null==a||0===a.length)return f.emptyPromise({validFiles:a,invalidFiles:[]});a=void 0===a.length?[a]:a.slice(0);var m=[];h("pattern",null,f.validatePattern),h("minSize","size.min",function(a,b){return a.size+.1>=f.translateScalars(b)}),h("maxSize","size.max",function(a,b){return a.size-.1<=f.translateScalars(b)});var n=0;if(h("maxTotalSize",null,function(b,c){return n+=b.size,n>f.translateScalars(c)?(a.splice(0,a.length),!1):!0}),h("validateFn",null,function(a,b){return b===!0||null===b||""===b}),!a.length)return f.emptyPromise({validFiles:[],invalidFiles:m});var o=b.defer(),p=[];return p.push(i("maxHeight","height.max",/image/,this.imageDimensions,function(a,b){return a.height<=b})),p.push(i("minHeight","height.min",/image/,this.imageDimensions,function(a,b){return a.height>=b})),p.push(i("maxWidth","width.max",/image/,this.imageDimensions,function(a,b){return a.width<=b})),p.push(i("minWidth","width.min",/image/,this.imageDimensions,function(a,b){return a.width>=b})),p.push(i("dimensions",null,/image/,function(a,b){return f.emptyPromise(b)},function(a){return a})),p.push(i("ratio",null,/image/,this.imageDimensions,function(a,b){for(var c=b.toString().split(","),d=!1,e=0;e<c.length;e++)Math.abs(a.width/a.height-f.ratioToFloat(c[e]))<.01&&(d=!0);return d})),p.push(i("maxRatio","ratio.max",/image/,this.imageDimensions,function(a,b){return a.width/a.height-f.ratioToFloat(b)<1e-4})),p.push(i("minRatio","ratio.min",/image/,this.imageDimensions,function(a,b){return a.width/a.height-f.ratioToFloat(b)>-1e-4})),p.push(i("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(a,b){return a<=f.translateScalars(b)})),p.push(i("minDuration","duration.min",/audio|video/,this.mediaDuration,function(a,b){return a>=f.translateScalars(b)})),p.push(i("duration",null,/audio|video/,function(a,b){return f.emptyPromise(b)},function(a){return a})),p.push(i("validateAsyncFn",null,null,function(a,b){return b},function(a){return a===!0||null===a||""===a})),b.all(p).then(function(){if(l)for(var b=0;b<a.length;b++){var d=a[b];d.$error&&a.splice(b--,1)}l=!1,h("maxFiles",null,function(a,b,d){return b>c+d}),o.resolve({validFiles:a,invalidFiles:m})}),o.promise},f.imageDimensions=function(a){if(a.$ngfWidth&&a.$ngfHeight){var d=b.defer();return c(function(){d.resolve({width:a.$ngfWidth,height:a.$ngfHeight})}),d.promise}if(a.$ngfDimensionPromise)return a.$ngfDimensionPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("image")?void e.reject("not image"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].naturalWidth||h[0].clientWidth,c=h[0].naturalHeight||h[0].clientHeight;h.remove(),a.$ngfWidth=b,a.$ngfHeight=c,e.resolve({width:b,height:c})}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].clientWidth?d():i++>10?f():g())},1e3)}var h=angular.element("<img>").attr("src",b).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");h.on("load",d),h.on("error",f);var i=0;g(),angular.element(document.getElementsByTagName("body")[0]).append(h)},function(){e.reject("load error")})}),a.$ngfDimensionPromise=e.promise,a.$ngfDimensionPromise["finally"](function(){delete a.$ngfDimensionPromise}),a.$ngfDimensionPromise},f.mediaDuration=function(a){if(a.$ngfDuration){var d=b.defer();return c(function(){d.resolve(a.$ngfDuration)}),d.promise}if(a.$ngfDurationPromise)return a.$ngfDurationPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("audio")&&0!==a.type.indexOf("video")?void e.reject("not media"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].duration;a.$ngfDuration=b,h.remove(),e.resolve(b)}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].duration?d():i>10?f():g())},1e3)}var h=angular.element(0===a.type.indexOf("audio")?"<audio>":"<video>").attr("src",b).css("visibility","none").css("position","fixed");h.on("loadedmetadata",d),h.on("error",f);var i=0;g(),angular.element(document.body).append(h)},function(){e.reject("load error")})}),a.$ngfDurationPromise=e.promise,a.$ngfDurationPromise["finally"](function(){delete a.$ngfDurationPromise}),a.$ngfDurationPromise},f}]),ngFileUpload.service("UploadResize",["UploadValidate","$q",function(a,b){var c=a,d=function(a,b,c,d,e){var f=e?Math.max(c/a,d/b):Math.min(c/a,d/b);return{width:a*f,height:b*f,marginX:a*f-c,marginY:b*f-d}},e=function(a,e,f,g,h,i,j,k){var l=b.defer(),m=document.createElement("canvas"),n=document.createElement("img");return n.setAttribute("style","visibility:hidden;position:fixed;z-index:-100000"),document.body.appendChild(n),n.onload=function(){var a=n.width,b=n.height;if(n.parentNode.removeChild(n),null!=k&&k(a,b)===!1)return void l.reject("resizeIf");try{if(i){var o=c.ratioToFloat(i),p=a/b;o>p?(e=a,f=e/o):(f=b,e=f*o)}e||(e=a),f||(f=b);var q=d(a,b,e,f,j);m.width=Math.min(q.width,e),m.height=Math.min(q.height,f);var r=m.getContext("2d");r.drawImage(n,Math.min(0,-q.marginX/2),Math.min(0,-q.marginY/2),q.width,q.height),l.resolve(m.toDataURL(h||"image/WebP",g||.934))}catch(s){l.reject(s)}},n.onerror=function(){n.parentNode.removeChild(n),l.reject()},n.src=a,l.promise};return c.dataUrltoBlob=function(a,b,c){for(var d=a.split(","),e=d[0].match(/:(.*?);/)[1],f=atob(d[1]),g=f.length,h=new Uint8Array(g);g--;)h[g]=f.charCodeAt(g);var i=new window.Blob([h],{type:e});return i.name=b,i.$ngfOrigSize=c,i},c.isResizeSupported=function(){var a=document.createElement("canvas");return window.atob&&a.getContext&&a.getContext("2d")&&window.Blob},c.isResizeSupported()&&Object.defineProperty(window.Blob.prototype,"name",{get:function(){return this.$ngfName},set:function(a){this.$ngfName=a},configurable:!0}),c.resize=function(a,d){if(0!==a.type.indexOf("image"))return c.emptyPromise(a);var f=b.defer();return c.dataUrl(a,!0).then(function(b){e(b,d.width,d.height,d.quality,d.type||a.type,d.ratio,d.centerCrop,d.resizeIf).then(function(e){if("image/jpeg"===a.type&&d.restoreExif!==!1)try{e=c.restoreExif(b,e)}catch(g){setTimeout(function(){throw g},1)}try{var h=c.dataUrltoBlob(e,a.name,a.size);f.resolve(h)}catch(g){f.reject(g)}},function(b){"resizeIf"===b&&f.resolve(a),f.reject(b)})},function(a){f.reject(a)}),f.promise},c}]),function(){function a(a,c,d,e,f,g,h,i,j,k){function l(){return c.attr("disabled")||s("ngfDropDisabled",a)}function m(b,c,d){if(b){var e;try{e=b&&b.getData&&b.getData("text/html")}catch(f){}q(b.items,b.files,s("ngfAllowDir",a)!==!1,s("multiple")||s("ngfMultiple",a)).then(function(a){a.length?n(a,c):o(d,e).then(function(a){n(a,c)})})}}function n(b,c){i.updateModel(e,d,a,s("ngfChange")||s("ngfDrop"),b,c)}function o(b,c){if(!i.shouldUpdateOn(b,d,a)||"string"!=typeof c)return i.rejectPromise([]);var e=[];c.replace(/<(img src|img [^>]* src) *=\"([^\"]*)\"/gi,function(a,b,c){e.push(c)});var f=[],g=[];if(e.length){angular.forEach(e,function(a){f.push(i.urlToBlob(a).then(function(a){g.push(a)}))});var h=k.defer();return k.all(f).then(function(){h.resolve(g)},function(a){h.reject(a)}),h.promise}return i.emptyPromise()}function p(a,b,c,d){var e=s("ngfDragOverClass",a,{$event:c}),f="dragover";if(angular.isString(e))f=e;else if(e&&(e.delay&&(w=e.delay),e.accept||e.reject)){var g=c.dataTransfer.items;if(null!=g&&g.length)for(var h=e.pattern||s("ngfPattern",a,{$event:c}),j=g.length;j--;){if(!i.validatePattern(g[j],h)){f=e.reject;break}f=e.accept}else f=e.accept}d(f)}function q(b,c,e,f){function g(a,b){var c=k.defer();if(null!=a)if(a.isDirectory){var d=[i.emptyPromise()];if(m){var e={type:"directory"};e.name=e.path=(b||"")+a.name,n.push(e)}var f=a.createReader(),h=[],p=function(){f.readEntries(function(e){try{e.length?(h=h.concat(Array.prototype.slice.call(e||[],0)),p()):(angular.forEach(h.slice(0),function(c){n.length<=j&&l>=o&&d.push(g(c,(b?b:"")+a.name+"/"))}),k.all(d).then(function(){c.resolve()},function(a){c.reject(a)}))}catch(f){c.reject(f)}},function(a){c.reject(a)})};p()}else a.file(function(a){try{a.path=(b?b:"")+a.name,m&&(a=i.rename(a,a.path)),n.push(a),o+=a.size,c.resolve()}catch(d){c.reject(d)}},function(a){c.reject(a)});return c.promise}var j=i.getValidationAttr(d,a,"maxFiles");null==j&&(j=Number.MAX_VALUE);var l=i.getValidationAttr(d,a,"maxTotalSize");null==l&&(l=Number.MAX_VALUE);var m=s("ngfIncludeDir",a),n=[],o=0,p=[i.emptyPromise()];if(b&&b.length>0&&"file:"!==h.location.protocol)for(var q=0;q<b.length;q++){if(b[q].webkitGetAsEntry&&b[q].webkitGetAsEntry()&&b[q].webkitGetAsEntry().isDirectory){var r=b[q].webkitGetAsEntry();if(r.isDirectory&&!e)continue;null!=r&&p.push(g(r))}else{var t=b[q].getAsFile();null!=t&&(n.push(t),o+=t.size)}if(n.length>j||o>l||!f&&n.length>0)break}else if(null!=c)for(var u=0;u<c.length;u++){var v=c.item(u);if((v.type||v.size>0)&&(n.push(v),o+=v.size),n.length>j||o>l||!f&&n.length>0)break}var w=k.defer();return k.all(p).then(function(){if(f||m||!n.length)w.resolve(n);else{for(var a=0;n[a]&&"directory"===n[a].type;)a++;w.resolve([n[a]])}},function(a){w.reject(a)}),w.promise}var r=b(),s=function(a,b,c){return i.attrGetter(a,d,b,c)};if(s("dropAvailable")&&g(function(){a[s("dropAvailable")]?a[s("dropAvailable")].value=r:a[s("dropAvailable")]=r}),!r)return void(s("ngfHideOnDropNotAvailable",a)===!0&&c.css("display","none"));null==s("ngfSelect")&&i.registerModelChangeValidator(e,d,a);var t,u=null,v=f(s("ngfStopPropagation")),w=1;c[0].addEventListener("dragover",function(b){if(!l()&&i.shouldUpdateOn("drop",d,a)){if(b.preventDefault(),v(a)&&b.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var e=b.dataTransfer.effectAllowed;b.dataTransfer.dropEffect="move"===e||"linkMove"===e?"move":"copy"}g.cancel(u),t||(t="C",p(a,d,b,function(d){t=d,c.addClass(t),s("ngfDrag",a,{$isDragging:!0,$class:t,$event:b})}))}},!1),c[0].addEventListener("dragenter",function(b){!l()&&i.shouldUpdateOn("drop",d,a)&&(b.preventDefault(),v(a)&&b.stopPropagation())},!1),c[0].addEventListener("dragleave",function(b){!l()&&i.shouldUpdateOn("drop",d,a)&&(b.preventDefault(), +v(a)&&b.stopPropagation(),u=g(function(){t&&c.removeClass(t),t=null,s("ngfDrag",a,{$isDragging:!1,$event:b})},w||100))},!1),c[0].addEventListener("drop",function(b){!l()&&i.shouldUpdateOn("drop",d,a)&&(b.preventDefault(),v(a)&&b.stopPropagation(),t&&c.removeClass(t),t=null,m(b.dataTransfer,b,"dropUrl"))},!1),c[0].addEventListener("paste",function(b){navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&s("ngfEnableFirefoxPaste",a)&&b.preventDefault(),!l()&&i.shouldUpdateOn("paste",d,a)&&m(b.clipboardData||b.originalEvent.clipboardData,b,"pasteUrl")},!1),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&s("ngfEnableFirefoxPaste",a)&&(c.attr("contenteditable",!0),c.on("keypress",function(a){a.metaKey||a.ctrlKey||a.preventDefault()}))}function b(){var a=document.createElement("div");return"draggable"in a&&"ondrop"in a&&!/Edge\/12./i.test(navigator.userAgent)}ngFileUpload.directive("ngfDrop",["$parse","$timeout","$window","Upload","$http","$q",function(b,c,d,e,f,g){return{restrict:"AEC",require:"?ngModel",link:function(h,i,j,k){a(h,i,j,k,b,c,d,e,f,g)}}}]),ngFileUpload.directive("ngfNoFileDrop",function(){return function(a,c){b()&&c.css("display","none")}}),ngFileUpload.directive("ngfDropAvailable",["$parse","$timeout","Upload",function(a,c,d){return function(e,f,g){if(b()){var h=a(d.attrGetter("ngfDropAvailable",g));c(function(){h(e),h.assign&&h.assign(e,!0)})}}}])}(),ngFileUpload.service("UploadExif",["UploadResize","$q",function(a,b){function c(a,b,c,d){switch(b){case 2:return a.transform(-1,0,0,1,c,0);case 3:return a.transform(-1,0,0,-1,c,d);case 4:return a.transform(1,0,0,-1,0,d);case 5:return a.transform(0,1,1,0,0,0);case 6:return a.transform(0,1,-1,0,d,0);case 7:return a.transform(0,-1,-1,0,d,c);case 8:return a.transform(0,-1,1,0,0,c)}}function d(a){for(var b="",c=new Uint8Array(a),d=c.byteLength,e=0;d>e;e++)b+=String.fromCharCode(c[e]);return window.btoa(b)}var e=a;return e.isExifSupported=function(){return window.FileReader&&(new FileReader).readAsArrayBuffer&&e.isResizeSupported()},e.readOrientation=function(a){var c=b.defer(),d=new FileReader,e=a.slice?a.slice(0,65536):a;return d.readAsArrayBuffer(e),d.onerror=function(a){return c.reject(a)},d.onload=function(a){var b={orientation:1},d=new DataView(this.result);if(65496!==d.getUint16(0,!1))return c.resolve(b);for(var e=d.byteLength,f=2;e>f;){var g=d.getUint16(f,!1);if(f+=2,65505===g){if(1165519206!==d.getUint32(f+=2,!1))return c.resolve(b);var h=18761===d.getUint16(f+=6,!1);f+=d.getUint32(f+4,h);var i=d.getUint16(f,h);f+=2;for(var j=0;i>j;j++)if(274===d.getUint16(f+12*j,h)){var k=d.getUint16(f+12*j+8,h);return k>=2&&8>=k&&(d.setUint16(f+12*j+8,1,h),b.fixedArrayBuffer=a.target.result),b.orientation=k,c.resolve(b)}}else{if(65280!==(65280&g))break;f+=d.getUint16(f,!1)}}return c.resolve(b)},c.promise},e.applyExifRotation=function(a){if(0!==a.type.indexOf("image/jpeg"))return e.emptyPromise(a);var f=b.defer();return e.readOrientation(a).then(function(b){return b.orientation<2||b.orientation>8?f.resolve(a):void e.dataUrl(a,!0).then(function(g){var h=document.createElement("canvas"),i=document.createElement("img");i.onload=function(){try{h.width=b.orientation>4?i.height:i.width,h.height=b.orientation>4?i.width:i.height;var g=h.getContext("2d");c(g,b.orientation,i.width,i.height),g.drawImage(i,0,0);var j=h.toDataURL(a.type||"image/WebP",.934);j=e.restoreExif(d(b.fixedArrayBuffer),j);var k=e.dataUrltoBlob(j,a.name);f.resolve(k)}catch(l){return f.reject(l)}},i.onerror=function(){f.reject()},i.src=g},function(a){f.reject(a)})},function(a){f.reject(a)}),f.promise},e.restoreExif=function(a,b){var c={};return c.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c.encode64=function(a){var b,c,d,e,f,g="",h="",i="",j=0;do b=a[j++],c=a[j++],h=a[j++],d=b>>2,e=(3&b)<<4|c>>4,f=(15&c)<<2|h>>6,i=63&h,isNaN(c)?f=i=64:isNaN(h)&&(i=64),g=g+this.KEY_STR.charAt(d)+this.KEY_STR.charAt(e)+this.KEY_STR.charAt(f)+this.KEY_STR.charAt(i),b=c=h="",d=e=f=i="";while(j<a.length);return g},c.restore=function(a,b){a.match("data:image/jpeg;base64,")&&(a=a.replace("data:image/jpeg;base64,",""));var c=this.decode64(a),d=this.slice2Segments(c),e=this.exifManipulation(b,d);return"data:image/jpeg;base64,"+this.encode64(e)},c.exifManipulation=function(a,b){var c=this.getExifArray(b),d=this.insertExif(a,c);return new Uint8Array(d)},c.getExifArray=function(a){for(var b,c=0;c<a.length;c++)if(b=a[c],255===b[0]&225===b[1])return b;return[]},c.insertExif=function(a,b){var c=a.replace("data:image/jpeg;base64,",""),d=this.decode64(c),e=d.indexOf(255,3),f=d.slice(0,e),g=d.slice(e),h=f;return h=h.concat(b),h=h.concat(g)},c.slice2Segments=function(a){for(var b=0,c=[];;){if(255===a[b]&218===a[b+1])break;if(255===a[b]&216===a[b+1])b+=2;else{var d=256*a[b+2]+a[b+3],e=b+d+2,f=a.slice(b,e);c.push(f),b=e}if(b>a.length)break}return c},c.decode64=function(a){var b,c,d,e,f,g="",h="",i=0,j=[],k=/[^A-Za-z0-9\+\/\=]/g;k.exec(a)&&console.log("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, NaNExpect errors in decoding."),a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");do d=this.KEY_STR.indexOf(a.charAt(i++)),e=this.KEY_STR.indexOf(a.charAt(i++)),f=this.KEY_STR.indexOf(a.charAt(i++)),h=this.KEY_STR.indexOf(a.charAt(i++)),b=d<<2|e>>4,c=(15&e)<<4|f>>2,g=(3&f)<<6|h,j.push(b),64!==f&&j.push(c),64!==h&&j.push(g),b=c=g="",d=e=f=h="";while(i<a.length);return j},c.restore(a,b)},e}]);
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/icons/collapse-change-managment.svg b/vid-app-common/src/main/webapp/app/vid/icons/collapse-change-managment.svg new file mode 100644 index 000000000..7a774e123 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/icons/collapse-change-managment.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="11px" height="3px" viewBox="0 0 11 3" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> + <title>Shape</title> + <desc>Created with Sketch.</desc> + <defs></defs> + <g id="vid-" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="Change-Managment" transform="translate(-262.000000, -238.000000)" fill="#000000"> + <g id="fab-copy" transform="translate(234.000000, 230.000000)"> + <g id="add-copy" transform="translate(24.000000, 0.000000)"> + <polygon id="Shape" points="10.2857143 8.71428571 8.71428571 8.71428571 4 8.71428571 4 10.2857143 8.71428571 10.2857143 10.2857143 10.2857143 15 10.2857143 15 8.71428571"></polygon> + </g> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/icons/expand-change-managment.svg b/vid-app-common/src/main/webapp/app/vid/icons/expand-change-managment.svg new file mode 100644 index 000000000..784714839 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/icons/expand-change-managment.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="11px" height="11px" viewBox="0 0 11 11" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> + <title>add</title> + <desc>Created with Sketch.</desc> + <defs></defs> + <g id="vid-" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="Change-Managment" transform="translate(-238.000000, -234.000000)"> + <g id="fab-copy" transform="translate(234.000000, 230.000000)"> + <g id="add"> + <polygon id="bounds" points="19 0 0 0 0 19 19 19"></polygon> + <polygon id="Shape" fill="#5A5A5A" points="10.2857143 8.71428571 10.2857143 4 8.71428571 4 8.71428571 8.71428571 4 8.71428571 4 10.2857143 8.71428571 10.2857143 8.71428571 15 10.2857143 15 10.2857143 10.2857143 15 10.2857143 15 8.71428571"></polygon> + <polygon id="Shape" fill="#323943" points="10.2857143 8.71428571 10.2857143 4 8.71428571 4 8.71428571 8.71428571 4 8.71428571 4 10.2857143 8.71428571 10.2857143 8.71428571 15 10.2857143 15 10.2857143 10.2857143 15 10.2857143 15 8.71428571"></polygon> + </g> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/icons/refresh-change-managment.svg b/vid-app-common/src/main/webapp/app/vid/icons/refresh-change-managment.svg new file mode 100644 index 000000000..174a52eb8 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/icons/refresh-change-managment.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="36px" height="33px" viewBox="0 0 36 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> + <title>Group 4</title> + <desc>Created with Sketch.</desc> + <defs></defs> + <g id="vid-" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="Change-Managment" transform="translate(-1544.000000, -167.000000)" fill="#000000"> + <g id="Group-4" transform="translate(1539.000000, 161.000000)"> + <path d="M46.8694358,24.175791 C45.9994856,16.2172262 38.8825787,10.2854851 30.7284339,10.8556784 C24.5237875,11.2895496 19.2775923,15.4204556 17.3664133,21.1365857 L15.9019754,17.1882236 L14.5076414,17.7168536 L16.9050052,24.0765655 L22.9818228,21.7507351 L22.4483333,20.3733764 L18.7132068,21.8122285 C20.3736452,16.5462395 25.1585967,12.7241599 30.8313525,12.3274822 C38.1718767,11.8141827 44.5815219,17.1455631 45.3812187,24.3059932 L46.8694358,24.175791 Z" id="Combined-Shape" transform="translate(30.688539, 17.561891) scale(-1, 1) rotate(-51.000000) translate(-30.688539, -17.561891) "></path> + <path d="M31.668351,33.8536511 C30.7984008,25.8950863 23.6814939,19.9633451 15.5273491,20.5335385 C9.32270268,20.9674096 4.07650747,25.0983156 2.16532847,30.8144457 L0.700890606,26.8660837 L-0.69344337,27.3947136 L1.70392039,33.7544255 L7.78073796,31.4285952 L7.24724852,30.0512364 L3.512122,31.4900885 C5.17256042,26.2240996 9.95751192,22.4020199 15.6302677,22.0053422 C22.9707919,21.4920428 29.3804371,26.8234231 30.1801339,33.9838532 L31.668351,33.8536511 Z" id="Combined-Shape-Copy-2" transform="translate(15.487454, 27.239751) scale(-1, 1) rotate(-232.000000) translate(-15.487454, -27.239751) "></path> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/images/attach.svg b/vid-app-common/src/main/webapp/app/vid/images/attach.svg new file mode 100644 index 000000000..ff28c9d32 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/attach.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="14px" height="13px" viewBox="0 0 14 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch --> + <title>Page 1 Copy 2</title> + <desc>Created with Sketch.</desc> + <defs> + <polygon id="path-1" points="0 0 14 0 14 13 0 13"></polygon> + </defs> + <g id="vid-" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="Change-Managment" transform="translate(-1696.000000, -181.000000)"> + <g id="Page-1-Copy-2" transform="translate(1696.000000, 181.000000)"> + <mask id="mask-2" fill="white"> + <use xlink:href="#path-1"></use> + </mask> + <g id="Clip-2"></g> + <path d="M1.07738181,11.892665 C2.51371549,13.3691117 4.84984058,13.3691117 6.28634966,11.892665 L13.231757,4.75311054 C14.256081,3.70036026 14.256081,1.98141503 13.231757,0.928484448 C12.2076085,-0.124265836 10.5351892,-0.124265836 9.51104067,0.928484448 L2.56563328,8.06785861 C1.95366989,8.69691251 1.95366989,9.73361642 2.56563328,10.3628506 C3.17759667,10.9917242 4.18613479,10.9917242 4.79809819,10.3628506 L10.9992921,3.9882935 C11.2078403,3.78005124 11.2127514,3.4376685 11.0103422,3.22347646 C10.807933,3.00910412 10.4746769,3.00405582 10.2661288,3.21211779 C10.2624454,3.21590401 10.2589375,3.21969024 10.2552541,3.22347646 L4.05388475,9.59767299 C3.84130245,9.81619214 3.52242901,9.81619214 3.30984671,9.59767299 C3.09726442,9.37933413 3.09726442,9.0513751 3.30984671,8.83285595 L10.2550787,1.69348179 C10.8800215,1.05126625 11.8627762,1.05126625 12.487719,1.69348179 C13.1124865,2.33569732 13.1124865,3.34607797 12.487719,3.9882935 L5.54231162,11.1276677 C4.50518364,12.1937599 2.85854783,12.1937599 1.82141985,11.1276677 C0.78446726,10.0615755 0.78446726,8.36913378 1.82141985,7.30304157 L8.0227892,0.928484448 C8.23098655,0.720061888 8.2355469,0.377679153 8.03261149,0.163667407 C7.82985148,-0.050524636 7.4967708,-0.0550320443 7.28857345,0.153390516 C7.28524089,0.156816146 7.28190833,0.160241776 7.27857577,0.163667407 L1.07738181,6.53804423 C-0.35912727,8.01467119 -0.35912727,10.416038 1.07738181,11.892665" id="Fill-1" fill="#000000" mask="url(#mask-2)"></path> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/images/elipsis_menu_icon.svg b/vid-app-common/src/main/webapp/app/vid/images/elipsis_menu_icon.svg new file mode 100644 index 000000000..984311d1e --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/elipsis_menu_icon.svg @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"> +<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata> +<g><g transform="translate(0.000000,511.000000) scale(0.100000,-0.100000)"><path d="M671,1004.4C51.1,734.4-96.2-88.1,388.7-573c687.4-693.5,1816.7-73.6,1638.8,896.1C1916.9,900,1223.4,1249.9,671,1004.4z"/><path d="M4599.1,1004.4C3979.2,734.4,3831.9-88.1,4316.8-573c687.4-693.5,1816.7-73.6,1638.8,896.1C5845,900,5151.5,1249.9,4599.1,1004.4z"/><path d="M8527.2,1004.4C7907.3,734.4,7760-88.1,8244.9-573c399-399,963.6-399,1362.5,0C10368.5,188.1,9515.4,1434,8527.2,1004.4z"/></g></g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/images/emptyData.svg b/vid-app-common/src/main/webapp/app/vid/images/emptyData.svg new file mode 100644 index 000000000..9f639aadb --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/emptyData.svg @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="94px" height="88px" viewBox="0 0 94 88" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch --> + <title>Page 1 Copy 15</title> + <desc>Created with Sketch.</desc> + <defs> + <polygon id="path-1" points="69 88 0 88 0 44.000352 0 0.000704 69 0.000704"></polygon> + </defs> + <g id="vid-" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="Test-Environments-NO-INFO" transform="translate(-1561.000000, -357.000000)"> + <g id="Page-1-Copy-15" transform="translate(1561.000000, 357.000000)"> + <g id="Group-3"> + <mask id="mask-2" fill="white"> + <use xlink:href="#path-1"></use> + </mask> + <g id="Clip-2"></g> + <path d="M65.4615385,84.480704 L3.53846154,84.480704 L3.53846154,8.800704 L12.3846154,8.800704 L12.3846154,12.320704 C12.3846154,13.292224 13.1754615,14.080704 14.1538462,14.080704 L54.8461538,14.080704 C55.8245385,14.080704 56.6153846,13.292224 56.6153846,12.320704 L56.6153846,8.800704 L65.4615385,8.800704 L65.4615385,84.480704 Z M15.9230769,3.520704 L53.0769231,3.520704 L53.0769231,5.280704 L53.0769231,8.800704 L53.0769231,10.560704 L15.9230769,10.560704 L15.9230769,8.800704 L15.9230769,5.280704 L15.9230769,3.520704 Z M67.2307692,5.280704 L56.6153846,5.280704 L56.6153846,1.760704 C56.6153846,0.787424 55.8245385,0.000704 54.8461538,0.000704 L14.1538462,0.000704 C13.1754615,0.000704 12.3846154,0.787424 12.3846154,1.760704 L12.3846154,5.280704 L1.76923077,5.280704 C0.790846154,5.280704 0,6.067424 0,7.040704 L0,86.240704 C0,87.213984 0.790846154,88.000704 1.76923077,88.000704 L67.2307692,88.000704 C68.2091538,88.000704 69,87.213984 69,86.240704 L69,7.040704 C69,6.067424 68.2091538,5.280704 67.2307692,5.280704 L67.2307692,5.280704 Z" id="Fill-1" fill="#191919" mask="url(#mask-2)"></path> + </g> + <path d="M90.6,67.2135388 L85.5,77.7785266 L80.4,67.2135388 L80.4,14.8041564 C80.4,11.8917415 82.6882,9.52166257 85.5,9.52166257 C88.3118,9.52166257 90.6,11.8917415 90.6,14.8041564 L90.6,67.2135388 Z M85.5,6 C80.8131,6 77,9.94954458 77,14.8041564 L77,67.6308559 C77,67.9037847 77.0612,68.1731919 77.1785,68.4179474 L83.8,82.1330623 L83.8,85.2391687 C83.8,86.2129084 84.5599,87 85.5,87 C86.4401,87 87.2,86.2129084 87.2,85.2391687 L87.2,82.1330623 L93.8215,68.4179474 C93.9388,68.1731919 94,67.9037847 94,67.6308559 L94,14.8041564 C94,9.94954458 90.1869,6 85.5,6 L85.5,6 Z" id="Fill-4" fill="#191919"></path> + <path d="M14,25 C15.104,25 16,25.896 16,27 C16,28.104 15.104,29 14,29 C12.896,29 12,28.104 12,27 C12,25.896 12.896,25 14,25" id="Fill-6" fill="#191919"></path> + <path d="M52.2631579,24.1818182 L22.7368421,24.1818182 C21.7763684,24.1818182 21,25.0351818 21,26.0909091 C21,27.1466364 21.7763684,28 22.7368421,28 L52.2631579,28 C53.2236316,28 54,27.1466364 54,26.0909091 C54,25.0351818 53.2236316,24.1818182 52.2631579,24.1818182 L52.2631579,7" id="Fill-8" fill="#191919"></path> + <path d="M14,38 C15.104,38 16,38.896 16,40 C16,41.104 15.104,42 14,42 C12.896,42 12,41.104 12,40 C12,38.896 12.896,38 14,38" id="Fill-10" fill="#191919"></path> + <path d="M52.2631579,38 L22.7368421,38 C21.7763684,38 21,38.894 21,40 C21,41.106 21.7763684,42 22.7368421,42 L52.2631579,42 C53.2236316,42 54,41.106 54,40 C54,38.894 53.2236316,38 52.2631579,38" id="Fill-12" fill="#191919"></path> + <path d="M14,52 C15.104,52 16,52.896 16,54 C16,55.104 15.104,56 14,56 C12.896,56 12,55.104 12,54 C12,52.896 12.896,52 14,52" id="Fill-14" fill="#191919"></path> + <path d="M52.2631579,52 L22.7368421,52 C21.7763684,52 21,52.894 21,54 C21,55.106 21.7763684,56 22.7368421,56 L52.2631579,56 C53.2236316,56 54,55.106 54,54 C54,52.894 53.2236316,52 52.2631579,52" id="Fill-16" fill="#191919"></path> + <path d="M14,67 C15.104,67 16,67.894 16,69 C16,70.104 15.104,71 14,71 C12.896,71 12,70.104 12,69 C12,67.894 12.896,67 14,67" id="Fill-18" fill="#191919"></path> + <path d="M52.2631579,67 L22.7368421,67 C21.7763684,67 21,67.894 21,69 C21,70.106 21.7763684,71 22.7368421,71 L52.2631579,71 C53.2236316,71 54,70.106 54,69 C54,67.894 53.2236316,67 52.2631579,67" id="Fill-20" fill="#191919"></path> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/images/icon_noconnection.svg b/vid-app-common/src/main/webapp/app/vid/images/icon_noconnection.svg new file mode 100644 index 000000000..6966076d1 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/icon_noconnection.svg @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="102px" height="83px" viewBox="0 0 102 83" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch --> + <title>Group 6</title> + <desc>Created with Sketch.</desc> + <defs></defs> + <g id="vid-" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="Test-Environments-ERROR" transform="translate(-770.000000, -360.000000)" fill="#191919"> + <g id="Page-1-Copy-15" transform="translate(770.000000, 360.000000)"> + <g id="Group-6"> + <path d="M84.3719292,80.6944444 L93.618168,80.6944444 L93.618168,71.4722222 L84.3719292,71.4722222 L84.3719292,80.6944444 Z M82.0603695,69.1666667 L82.0603695,74.9305556 L18.3768996,74.9305556 C9.59297277,74.9305556 2.3115597,67.7833333 2.3115597,58.9069444 L2.3115597,58.6763889 C2.3115597,49.8 9.59297277,42.6527778 18.3768996,42.6527778 L34.6733955,42.6527778 L34.6733955,40.3472222 L18.3768996,40.3472222 C8.32161493,40.3472222 0,48.5319444 0,58.6763889 L0,58.9069444 C0,69.0513889 8.32161493,77.2361111 18.3768996,77.2361111 L82.0603695,77.2361111 L82.0603695,83 L95.9297277,83 L95.9297277,80.6944444 L95.9297277,78.3888889 L95.9297277,73.7777778 L95.9297277,71.4722222 L95.9297277,69.1666667 L82.0603695,69.1666667 Z" id="Fill-3"></path> + <path d="M9.24623881,11.5277778 L18.4924776,11.5277778 L18.4924776,2.30555556 L9.24623881,2.30555556 L9.24623881,11.5277778 Z M83.5628833,5.76388889 L20.8040373,5.76388889 L20.8040373,4.61111111 L20.8040373,2.30555556 L20.8040373,0 L6.93467911,0 L6.93467911,5.76388889 L6.93467911,8.06944444 L6.93467911,13.8333333 L20.8040373,13.8333333 L20.8040373,11.5277778 L20.8040373,9.22222222 L20.8040373,8.06944444 L83.5628833,8.06944444 C92.4623881,8.06944444 99.6282232,15.2166667 99.6282232,24.0930556 L99.6282232,24.3236111 C99.6282232,33.2 92.4623881,40.3472222 83.5628833,40.3472222 L63.5678918,40.3472222 L63.5678918,42.6527778 L83.5628833,42.6527778 C93.733746,42.6527778 101.939783,34.4680556 101.939783,24.3236111 L101.939783,24.0930556 C101.939783,13.9486111 93.618168,5.76388889 83.5628833,5.76388889 L83.5628833,5.76388889 Z" id="Fill-5"></path> + </g> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/images/refresh.svg b/vid-app-common/src/main/webapp/app/vid/images/refresh.svg new file mode 100644 index 000000000..4868d0614 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/refresh.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="36px" height="32px" viewBox="0 0 36 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> + <title>Page 1</title> + <desc>Created with Sketch.</desc> + <defs></defs> + <g id="vid-" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="Artboard-Copy-2" transform="translate(-127.000000, -48.000000)" fill="#000000"> + <g id="Page-1" transform="translate(127.000000, 47.000000)"> + <g id="Group-3" transform="translate(9.000000, 0.338800)"> + <path d="M0.7181,3.0151 C7.4501,-1.3179 16.5391,0.4801 21.2271,7.1761 C24.7951,12.2711 24.8861,18.9481 21.6461,24.0301 L25.6361,22.6831 L26.1031,24.1001 L19.6521,26.2391 L17.6351,20.0531 L19.0421,19.6001 L20.2741,23.4091 C23.3211,18.8051 23.2811,12.6811 20.0191,8.0221 C15.7991,1.9951 7.6211,0.3691 1.5531,4.2531 L0.7181,3.0151 Z" id="Fill-1"></path> + </g> + <g id="Group-6" transform="translate(0.000000, 6.338800)"> + <path d="M25.0135,23.7841 C18.2065,27.9991 9.1505,26.0421 4.5795,19.2651 C1.1015,14.1091 1.1275,7.4321 4.4545,2.4071 L0.4415,3.6831 L-0.0005,2.2591 L6.4875,0.2331 L8.3955,6.4531 L6.9825,6.8811 L5.8165,3.0521 C2.6885,7.6021 2.6225,13.7261 5.8035,18.4401 C9.9175,24.5411 18.0655,26.3091 24.2005,22.5311 L25.0135,23.7841 Z" id="Fill-4"></path> + </g> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/images/search.svg b/vid-app-common/src/main/webapp/app/vid/images/search.svg new file mode 100644 index 000000000..9dcc59086 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/search.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 17 17" style="enable-background:new 0 0 17 17;" xml:space="preserve"> +<title>Fill 1</title> +<desc>Created with Sketch.</desc> +<g id="vid-"> + <g id="Artboard-Copy-2" transform="translate(-197.000000, -61.000000)"> + <path id="Fill-1" d="M204,73.9c-1.6,0-3-0.6-4.2-1.7c-1.1-1.1-1.7-2.6-1.7-4.2s0.6-3,1.7-4.2c1.1-1.1,2.6-1.7,4.2-1.7 + c1.6,0,3,0.6,4.2,1.7c1.1,1.1,1.7,2.6,1.7,4.2s-0.6,3-1.7,4.2C207,73.3,205.6,73.9,204,73.9 M213.8,77.1l-4.5-4.5 + c1.1-1.3,1.7-2.9,1.7-4.5c0-1.9-0.7-3.6-2-4.9c-1.3-1.3-3.1-2-4.9-2c-1.9,0-3.6,0.7-4.9,2c-1.3,1.3-2,3.1-2,4.9 + c0,1.9,0.7,3.6,2,4.9c1.3,1.3,3.1,2,4.9,2c1.7,0,3.3-0.6,4.5-1.7l4.5,4.5c0.1,0.1,0.3,0.2,0.4,0.2c0.1,0,0.3-0.1,0.4-0.2 + C214.1,77.6,214.1,77.3,213.8,77.1"/> + </g> +</g> +</svg> diff --git a/vid-app-common/src/main/webapp/app/vid/images/sort_down.svg b/vid-app-common/src/main/webapp/app/vid/images/sort_down.svg new file mode 100644 index 000000000..3dfaba158 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/sort_down.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 9 13" style="enable-background:new 0 0 9 13;" xml:space="preserve"> +<title>15 copy</title> +<desc>Created with Sketch.</desc> +<g id="vid-"> + <g id="Artboard-Copy-2" transform="translate(-90.000000, -61.000000)"> + <path id="_x31_5-copy" d="M93.6,61.9v8.2l-2.1-2.1c-0.2-0.2-0.4-0.3-0.6-0.3s-0.5,0.1-0.6,0.3c-0.4,0.4-0.4,0.9,0,1.3l3.6,3.6 + c0.4,0.4,0.9,0.4,1.3,0l3.6-3.6c0.4-0.4,0.4-0.9,0-1.3c-0.4-0.4-0.9-0.4-1.3,0l-2.1,2.1v-8.2c0-0.5-0.4-0.9-0.9-0.9 + C94,61,93.6,61.4,93.6,61.9z"/> + </g> +</g> +</svg> diff --git a/vid-app-common/src/main/webapp/app/vid/images/sort_up.svg b/vid-app-common/src/main/webapp/app/vid/images/sort_up.svg new file mode 100644 index 000000000..5f597dd41 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/sort_up.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 9 13" style="enable-background:new 0 0 9 13;" xml:space="preserve"> +<title>15</title> +<desc>Created with Sketch.</desc> +<g id="vid-"> + <g id="Artboard-Copy-2" transform="translate(-53.000000, -61.000000)"> + <path id="_x31_5" d="M58.4,72.3v-8.2l2.1,2.1c0.2,0.2,0.4,0.3,0.6,0.3c0.2,0,0.5-0.1,0.6-0.3c0.4-0.4,0.4-0.9,0-1.3l-3.6-3.6 + c-0.4-0.4-0.9-0.4-1.3,0l-3.6,3.6c-0.4,0.4-0.4,0.9,0,1.3c0.4,0.4,0.9,0.4,1.3,0l2.1-2.1v8.2c0,0.5,0.4,0.9,0.9,0.9 + C58,73.2,58.4,72.8,58.4,72.3z"/> + </g> +</g> +</svg> diff --git a/vid-app-common/src/main/webapp/app/vid/images/sprite.png b/vid-app-common/src/main/webapp/app/vid/images/sprite.png Binary files differnew file mode 100644 index 000000000..26079b7c5 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/sprite.png diff --git a/vid-app-common/src/main/webapp/app/vid/images/v.svg b/vid-app-common/src/main/webapp/app/vid/images/v.svg new file mode 100644 index 000000000..b6f77b91e --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/images/v.svg @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch --> + <title>Combined Shape</title> + <desc>Created with Sketch.</desc> + <defs></defs> + <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="**POPUPS-" transform="translate(-790.000000, -457.000000)" fill="#191919"> + <g id="popup-medium-2" transform="translate(772.000000, 325.000000)"> + <path d="M26.5,149 C21.8055796,149 18,145.19442 18,140.5 C18,135.80558 21.8055796,132 26.5,132 C31.1944204,132 35,135.80558 35,140.5 C35,145.19442 31.1944204,149 26.5,149 Z M23.8535534,140.549776 C23.6582912,140.354514 23.3417088,140.354514 23.1464466,140.549776 C22.9511845,140.745038 22.9511845,141.061621 23.1464466,141.256883 L25.7146903,143.825127 C25.9311409,144.041577 26.2895239,144.01447 26.4709545,143.767924 L30.8653572,137.796384 C31.0290275,137.573973 30.9814087,137.260993 30.7589977,137.097322 C30.5365867,136.933652 30.223606,136.981271 30.0599357,137.203682 L26.0103833,142.706606 L23.8535534,140.549776 Z" id="Combined-Shape"></path> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js index 534cee505..fa9ff1c75 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js @@ -28,7 +28,9 @@ appDS2 CLOUD_REGION_ID : "cloudRegionID", COMPONENT_STATUS : "ComponentStatus", CREATE_COMPONENT : "createComponent", - DELETE_COMPONENT : "deleteComponent", + DELETE_RESUME_COMPONENT : "deleteResumeComponent", + DELETE:"Delete", + RESUME:"Resume", ENTITY : "entity", GET_COMPONENT_LIST : "getComponentList", GET_SUBS : "getSubs", @@ -43,8 +45,17 @@ appDS2 MODEL_VERSION_1 : "1", MSO_CREATE_REQ : "createInstance", MSO_DELETE_REQ : "deleteInstance", + MSO_CHANGE_CONFIG_STATUS_REQ: "changeConfigurationStatus", + MSO_CHANGE_PORT_STATUS_REQ: "changePortStatus", + MSO_CREATE_ENVIRONMENT: "createEnvironmentInstance", + MSO_DEACTIVATE_ENVIRONMENT: "deactivateEnvironmentInstance", + MSO_ACTIVATE_ENVIRONMENT: "activateEnvironmentInstance", + MSO_ACTIVATE_SERVICE_REQ: "activateServiceInstance", + MSO_DEACTIVATE_SERVICE_REQ: "deactivateServiceInstance", NAME : "name", NETWORK : "network", + CONFIGURATION : "configuration", + PORT: "port", NETWORKS : "networks", PRODUCT_NAME_TRINITY : "Trinity", QUERY_SERVICE_INSTANCE : "queryServiceInstance", @@ -69,8 +80,8 @@ appDS2 VNF_TYPE : "vnfType", VOLUME_GROUP : "volumeGroup", IS_PERMITTED: "is-permitted", - - + RESUME_STATUS: "PendingActivation", + PNF : "pnf", // IDs CIDR_MASK_1 : "255.255.255.000", //COMPONENT_LIST_NAMED_QUERY_ID : "ed0a0f5b-cf79-4784-88b2-911cd726cd3d", @@ -95,11 +106,12 @@ appDS2 SUBSCRIBER_NAME_GED12 : "General Electric Division 12", VNF_INSTANCE_ID : "VNF_INSTANCE_ID_12345", VPN_ID_1 : "1a2b3c4d5e6f", - + // PATHS - GET_WORKFLOW: "change-management/workflow?vnfs=@vnfs", + GET_WORKFLOW: "change-management/get_vnf_workflow_relation", GET_MSO_WORKFLOWS: "change-management/mso", GET_SCHEDULER_CHANGE_MANAGEMENTS: "change-management/scheduler", + CANCEL_SCHEDULE_REQUEST: "change-management/scheduler/schedules", ASSIGN : "?r=", AAI_GET_SERVICE_INSTANCE_PATH : "aai_get_service_instance/", AAI_GET_SERVICES : "aai_get_services", @@ -108,19 +120,31 @@ appDS2 AAI_GET_SERVICES_BY_TYPE : "aai_get_models_by_service_type", AAI_GET_TENANTS : "aai_get_tenants/", AAI_SUB_DETAILS_PATH : "aai_sub_details/", - AAI_GET_VERSION_BY_INVARIANT_ID:"aai_get_version_by_invariant_id/", - AAI_GET_VNF_DATA_PATH: "aai_get_vnf_data/", - AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE: "get_vnf_data_by_globalid_and_service_type/", - AAI_SUB_VIEWEDIT_PATH : "aai_sub_viewedit", + AAI_GET_VERSION_BY_INVARIANT_ID:"aai_get_version_by_invariant_id/", + SEARCH_SERVICE_INSTANCES:"search_service_instances", + AAI_GET_VNF_DATA_PATH: "aai_get_vnf_data/", + AAI_GET_VNF_BY_CUSTOMERID_AND_SERVICETYPE: "get_vnf_data_by_globalid_and_service_type/", + AAI_GET_SERVICES_BY_OWNING_ENTITY_ID: 'aai_get_services_by_owning_entity_id', + AAI_SUB_VIEWEDIT_PATH : "aai_sub_viewedit", AAI_GET_VNF_INFO : "aai_get_vnf_information", + AAI_GET_PNF_INSTANCE: "aai_get_service_instance_pnfs", + AAI_GET_VNF_INSTANCES_LIST: "aai_get_vnf_instances", + AAI_GET_PNF_INSTANCES_LIST: "aai_get_pnf_instances", + AAI_GET_BY_URI: "aai_get_by_uri/", + AAI_GET_CONFIGURATION: "aai_get_configuration/", + AAI_GET_TEST_ENVIRONMENTS: "get_operational_environments?operationalEnvironmentType=", + GET_CATEGORY_PARAMETERS : "category_parameter", + PARAMETER_STANDARDIZATION_FAMILY: "PARAMETER_STANDARDIZATION", + TENANT_ISOLATION_FAMILY: "TENANT_ISOLATION", ASDC_GETMODEL_PATH : "asdc/getModel/", - CREATE_INSTANCE_PATH : "/models/services/createInstance", + CREATE_INSTANCE_PATH : "/models/services/createInstance", AAI_GET_PNF_BY_NAME : "aai_get_pnfs/pnf/", //1710 scheduler contants POST_CREATE_NEW_VNF_CHANGE:"post_create_new_vnf_change", GET_POLICY:"get_policy", + WORKFLOW: "workflow", GET_TIME_SLOTS:"get_time_slots", SUBMIT_VNF_CHANGE_TIMESLOTS:"submit_vnf_change_timeslots", - + FORWARD_SLASH : "/", GET_SYSTEM_PROP_VNF_PROV_STATUS_PATH : "get_system_prop_vnf_prov_status", GET_USER_ID : "getuserID", @@ -128,15 +152,20 @@ appDS2 INSTANTIATE_PATH : "/instantiate", INVALID_STRING : "/INVALID_STRING/", INVALID_STRING_MSO_CREATE_SVC_INSTANCE : "INVALID_STRING_mso_create_svc_instance", + MSO: "mso", MSO_CREATE_NW_INSTANCE : "mso_create_nw_instance", MSO_CREATE_NW_INSTANCE_PATH : "mso_create_nw_instance/", MSO_CREATE_SVC_INSTANCE : "mso_create_svc_instance", MSO_DELETE_SVC_INSTANCE_PATH : "mso_delete_svc_instance/", - MSO_ACTIVATE_INSTANCE: "mso/mso_activate_service_instance/@serviceInstanceId", - SELECTED_SERVICE_SUB_PATH : "#/instances/subdetails?selectedServiceSubscription=", - SELECTED_SUB_PATH : "#/instances/subdetails?selectedSubscriber=", - SELECTEDSERVICEINSTANCE_SUB_PATH : "&selectedServiceInstance=", - SELECTEDSUBSCRIBER_SUB_PATH : "&selectedSubscriber=", + MSO_ACTIVATE_INSTANCE: "mso/mso_activate_service_instance/@serviceInstanceId", + MSO_DEACTIVATE_INSTANCE: "mso/mso_deactivate_service_instance/@serviceInstanceId", + MSO_CREATE_REALATIONSHIP : "mso_add_relationship", + MSO_REMOVE_RELATIONSHIP: "mso_remove_relationship", + SELECTED_SERVICE_SUB_PATH : "#/instances/subdetails?", + SELECTED_SERVICE_INSTANCE_SUB_PATH : "serviceInstanceIdentifier=", + SELECTED_SUBSCRIBER_SUB_PATH : "subscriberId=", + OWNING_ENTITY_SUB_PATH : "owningEntity=", + PROJECT_SUB_PATH : "project=", SERVICE_TYPE_LIST_PATH : "#/instances/serviceTypes?serviceTypeList=", SERVICE_MODLES_INSTANCES_SUBSCRIBERS_PATH : 'serviceModels.htm#/instances/subscribers', SERVICES_DIST_STATUS_PATH : "rest/models/services?distributionStatus=", @@ -150,6 +179,12 @@ appDS2 WELCOME_PATH : "welcome.htm", IS_PERMITTED_SUB_PATH: "&isPermitted=", + //Test Environment Urls: + OPERATIONAL_ENVIRONMENT_CREATE : "operationalEnvironment/create", + OPERATIONAL_ENVIRONMENT_DEACTIVATE : "operationalEnvironment/deactivate?operationalEnvironment=", + OPERATIONAL_ENVIRONMENT_ACTIVATE : "operationalEnvironment/activate?operationalEnvironment=", + OPERATIONAL_ENVIRONMENT_STATUS : "operationalEnvironment/requestStatus?requestId=", + //Template Urls AAI_GET_SUBS_URL : "app/vid/scripts/view-models/aaiGetSubs.htm", AAI_GET_SUBSCRIBER_URL : "app/vid/scripts/view-models/aaiGetSubscriberList.htm", @@ -158,9 +193,9 @@ appDS2 CREATE_INSTANCE_SERVICE_MODELS_URL : "app/vid/scripts/view-models/createInstanceServiceModels.htm", INSTANTIATE_URL : "app/vid/scripts/view-models/instantiate.htm", SERVICE_MODELS : "app/vid/scripts/view-models/serviceModels.htm", - - - + + + FULL_NAME_MAP : { "model-invariant-id" : "Model ID", "model-version-id" : "Model Version ID" @@ -174,11 +209,18 @@ appDS2 }, MANUAL_TASKS: { - "retry": "retry", - "rollback": "rollback", - "abort": "abort", - "skip": "skip" + "retry": "retry", + "rollback": "rollback", + "abort": "abort", + "skip": "skip" + }, + + WORKFLOWS: { + vnfConfigUpdate: "VNF Config Update", + vnfInPlace: "VNF In Place Software Update", + update: "update", + replace: "replace" } - + }; })()) diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js index 9e3f44cc2..d7f429a6e 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/fieldConstants.js @@ -37,6 +37,10 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { SUBSCRIBER_NAME: "subscriberName",
SUPPRESS_ROLLBACK: "suppressRollback",
TENANT: "tenant",
+ PROJECT: "project",
+ OWNING_ENTITY : "owningEntity",
+ LINE_OF_BUSINESS : "lineOfBusiness",
+ PLATFORM : "platform",
VNF_TARGETPROVSTATUS: "target",
AAI_GET_FULL_SUBSCRIBERS: "aai_get_full_subscribers",
@@ -83,7 +87,7 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { NETWORKS: "networks",
OPERATIONAL_STATUS: "operational-status",
ORCHESTRATION_STATUS: "orchestration-status",
- PERCENT_PROGRESS: "precentProgress",
+ PERCENT_PROGRESS: "percent-progress",
PERSONA_MODEL_ID: "persona-model-id",
PERSONA_MODEL_VERSION: "persona-model-version",
PERSONA_MODEL_CUSTOMIZATION_ID: "persona-model-customization-id",
@@ -129,7 +133,16 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { SUPPLEMENTORY_DATA_FILE: "supplementoryDataFile",
ZONE_ID: "zone-id",
ZONE_NAME: "zone-name",
-
+ GENERIC_CONFIGURATION: "configuration",
+ CONFIGURATIONS: "configurations",
+ CONFIGURATION: "configuration",
+ CONFIGURATION_NAME: "configuration-name",
+ CONFIGURATION_TYPE: "configuration-type",
+ CONFIGURATION_ID: "configuration-id",
+ PORT: "l-interface",
+ PORT_ID: "interface-id",
+ PORT_NAME: "interface-name",
+ PORT_MIRRORED: "is-port-mirrored"
};
var KEY = {
@@ -140,58 +153,62 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { * NAME values are displayed on GUI pages.
*/
var NAME = {
- AVAILABLE_VOLUME_GROUP: "Available Volume Group",
- INSTANCE_NAME: "Instance Name",
- CUSTOMER_ID: "Customer ID",
- LCP_REGION: "LCP Region",
- LCP_REGION_TEXT: "Legacy Region",
- MODEL_INVARIANT_UUID: "Model Invariant UUID",
- MODEL_NAME: "Model Name",
- MODEL_VERSION: "Model Version",
- MODEL_UUID: "Model UUID",
- MODEL_CUSTOMIZATION_UUID: "Model Customization UUID",
- MODEL_VNF_TYPE: "NF Type",
- MODEL_VNF_ROLE: "NF Role",
- MODEL_VNF_FUNCTION: "NF Function",
- MODEL_VNF_CODE: "NF Naming Code",
- MODEL_CUSTOMIZATION_NAME: "Resource Name",
- PRODUCT_FAMILY: "Product Family",
- AIC_ZONES: "AIC Zone",
- RESOURCE_DESCRIPTION: "Resource Description",
- RESOURCE_NAME: "Resource Name",
- SERVICE_CATEGORY: "Service Category",
- SERVICE_DESCRIPTION: "Service Description",
- SERVICE_INSTANCE_ID: "Service Instance ID",
- SERVICE_INSTANCE_Id: "Service Instance Id",
- SERVICE_INSTANCE_NAME: "Service Instance Name",
- SERVICE_INVARIANT_UUID: "Service Invariant UUID",
- SERVICE_NAME: "Service Name",
- SERVICE_TYPE: "Service Type",
- SERVICE_ROLE: "Service Role",
- SERVICE_UUID: "Service UUID",
- SERVICE_VERSION: "Service Version",
- SUBSCRIBER_NAME: "Subscriber Name",
- MOBILITY: "Mobility",
- SUPPRESS_ROLLBACK: "Suppress Rollback on Failure",
- SDN_C_PRELOAD: "SDN-C Pre-Load",
- UPLOAD_SUPPLEMENTORY_DATA_FILE: "Upload Supplementary Data file",
- SUPPLEMENTORY_DATA_FILE: "Supplementory Data file (JSON format)",
- TENANT: "Tenant",
- USER_SERVICE_INSTANCE_NAME: "User Service Instance Name",
- VF_MODULE_DESCRIPTION: "VF Module Description",
- VF_MODULE_LABEL: "VF Module Label",
- VF_MODULE_TYPE: "VF Module Type",
- VNF_ORCHESTRATION_STATUS: "Orchestration Status",
- VNF_Operational_Status: "Operational Status",
- VNF_Current_Prov_Status: "Current Prov_Status",
- VNF_Target_Prov_Status: "Target Prov Status",
- VNF_VNF_ID: "VNF ID",
- VNF_VNF_Name: "VNF Name",
- VNF_VNF_Type: "VNF Type",
- VNF_Service_ID: "Service ID",
- VNF_In_Maint: "In Maint",
- VFMDULE_CUSTOMIZATIONUUID: "VF Module Model Customization UUID",
- RESOURCE_CUSTOMIZATION_UUID: "Resource Model Customization UUID"
+ AVAILABLE_VOLUME_GROUP: "Available Volume Group",
+ INSTANCE_NAME: "Instance Name",
+ CUSTOMER_ID: "Customer ID",
+ LCP_REGION: "LCP Region",
+ LCP_REGION_TEXT: "Legacy Region",
+ MODEL_INVARIANT_UUID: "Model Invariant UUID",
+ MODEL_NAME: "Model Name",
+ MODEL_VERSION: "Model Version",
+ MODEL_UUID: "Model UUID",
+ MODEL_CUSTOMIZATION_UUID: "Model Customization UUID",
+ MODEL_VNF_TYPE: "NF Type",
+ MODEL_VNF_ROLE: "NF Role",
+ MODEL_VNF_FUNCTION: "NF Function",
+ MODEL_VNF_CODE: "NF Naming Code",
+ MODEL_CUSTOMIZATION_NAME: "Resource Name",
+ PRODUCT_FAMILY: "Product Family",
+ AIC_ZONES: "AIC Zone",
+ RESOURCE_DESCRIPTION : "Resource Description",
+ RESOURCE_NAME : "Resource Name",
+ SERVICE_CATEGORY : "Service Category",
+ SERVICE_DESCRIPTION : "Service Description",
+ SERVICE_INSTANCE_ID : "Service Instance ID",
+ SERVICE_INSTANCE_Id : "Service Instance Id",
+ SERVICE_INSTANCE_NAME : "Service Instance Name",
+ SERVICE_INVARIANT_UUID : "Service Invariant UUID",
+ SERVICE_NAME : "Service Name",
+ SERVICE_TYPE : "Service Type",
+ SERVICE_ROLE: "Service Role",
+ SERVICE_UUID : "Service UUID",
+ SERVICE_VERSION : "Service Version",
+ SUBSCRIBER_NAME : "Subscriber Name",
+ MOBILITY : "Mobility",
+ SUPPRESS_ROLLBACK : "Suppress Rollback on Failure",
+ SDN_C_PRELOAD : "SDN-C Pre-Load",
+ UPLOAD_SUPPLEMENTORY_DATA_FILE : "Upload Supplementary Data file",
+ SUPPLEMENTORY_DATA_FILE : "Supplementory Data file (JSON format)",
+ TENANT : "Tenant",
+ PROJECT : "Project",
+ OWNING_ENTITY : "Owning Entity",
+ LINE_OF_BUSINESS : "Line Of Business",
+ PLATFORM : "Platform",
+ USER_SERVICE_INSTANCE_NAME : "User Service Instance Name",
+ VF_MODULE_DESCRIPTION : "VF Module Description",
+ VF_MODULE_LABEL : "VF Module Label",
+ VF_MODULE_TYPE : "VF Module Type",
+ VNF_ORCHESTRATION_STATUS : "Orchestration Status",
+ VNF_Operational_Status: "Operational Status",
+ VNF_Current_Prov_Status: "Current Prov_Status",
+ VNF_Target_Prov_Status: "Target Prov Status",
+ VNF_VNF_ID : "VNF ID",
+ VNF_VNF_Name: "VNF Name",
+ VNF_VNF_Type: "VNF Type",
+ VNF_Service_ID: "Service ID",
+ VNF_In_Maint: "In Maint",
+ VFMDULE_CUSTOMIZATIONUUID: "VF Module Model Customization UUID",
+ RESOURCE_CUSTOMIZATION_UUID: "Resource Model Customization UUID"
};
/*
@@ -211,6 +228,10 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { SUBSCRIBER_NAME: "Select Subscriber Name",
TARGETPROVSTATUS: "Select Target Prov Status",
TENANT: "Select Tenant Name",
+ PROJECT: "Select Project Name",
+ OWNING_ENTITY: "Select Owning Entity",
+ LINE_OF_BUSINESS : "Select Line Of Business",
+ PLATFORM : "Select Platform",
TEXT_INPUT: "Enter data",
SELECT_SERVICE: "Select a service type",
SELECT_SUB: "Select a subscriber name",
@@ -244,7 +265,11 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { SUBMITTING_REQUEST: "Submitting Request",
SUCCESS_VNF_PROV_STATUS: "Successfully set the VNF's Prov_Status to ",
UNLOCKED: "Unlocked",
-
+ AAI_ACTIVE: "Active",
+ AAI_INACTIVE: "Inactive",
+ AAI_CREATED: "Created",
+ AAI_ENABLED: "Enabled",
+ AAI_DISABLED: "Disabled"
};
var STYLE = {
@@ -416,8 +441,8 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { id: ID.SUBSCRIBER_NAME,
type: PARAMETER.SELECT,
prompt: PROMPT.SUBSCRIBER_NAME,
- isRequired : true,
- isSingleOptionAutoSelected : false
+ isRequired: true,
+ isSingleOptionAutoSelected : false
},
TENANT_DISABLED: {
name: NAME.TENANT,
@@ -433,6 +458,38 @@ appDS2.factory("FIELD", ["PARAMETER", function (PARAMETER) { isEnabled: true,
prompt: PROMPT.TENANT,
isRequired: true
+ },
+ PROJECT: {
+ name: NAME.PROJECT,
+ id: ID.PROJECT,
+ type: PARAMETER.SELECT,
+ isEnabled: true,
+ prompt: PROMPT.PROJECT,
+ isRequired: false
+ },
+ OWNING_ENTITY: {
+ name: NAME.OWNING_ENTITY,
+ id: ID.OWNING_ENTITY,
+ type: PARAMETER.SELECT,
+ isEnabled: true,
+ prompt: PROMPT.OWNING_ENTITY,
+ isRequired: true
+ },
+ LINE_OF_BUSINESS: {
+ name: NAME.LINE_OF_BUSINESS,
+ id: ID.LINE_OF_BUSINESS,
+ type: PARAMETER.MULTI_SELECT,
+ isEnabled: true,
+ prompt: PROMPT.LINE_OF_BUSINESS,
+ isRequired: false
+ },
+ PLATFORM: {
+ name: NAME.PLATFORM,
+ id: ID.PLATFORM,
+ type: PARAMETER.SELECT,
+ isEnabled: true,
+ prompt: PROMPT.PLATFORM,
+ isRequired: true
}
};
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js index 693186af4..785f3caba 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js @@ -24,6 +24,7 @@ appDS2.constant("PARAMETER", (function() { return {
BOOLEAN : "boolean",
SELECT : "select",
+ MULTI_SELECT : "multi_select",
STRING : "string",
NUMBER : "number",
VALID_VALUES : "valid_values",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/version.json b/vid-app-common/src/main/webapp/app/vid/scripts/constants/version.json new file mode 100644 index 000000000..5e843e91d --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/version.json @@ -0,0 +1 @@ +{"Version": "BUILD_NUMBER"}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js index 6ed410a8f..0b69ed556 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js @@ -64,6 +64,12 @@ appDS2.constant("VIDCONFIGURATION", (function() { "orchestrationStatus": "active",
"inMaint": false,
"operationalStatus": "out-of-service-path"
+ },
+ {
+ "provStatus": "prov",
+ "orchestrationStatus": "activated",
+ "inMaint": false,
+ "operationalStatus": "out-of-service-path"
}
];
/*
@@ -96,6 +102,11 @@ appDS2.constant("VIDCONFIGURATION", (function() { */
var COMPONENT_LIST_NAMED_QUERY_ID = "0367193e-c785-4d5f-9cb8-7bc89dc9ddb7";
var MACRO_SERVICES = [];
+
+ var SCHEDULER_CALLBACK_URL = "";
+
+ var SCHEDULER_PORTAL_URL = "";
+
return {
ASDC_MODEL_STATUS : ASDC_MODEL_STATUS,
MSO_MAX_POLLS : MSO_MAX_POLLS,
@@ -106,6 +117,8 @@ appDS2.constant("VIDCONFIGURATION", (function() { VNF_VALID_STATUS_LIST : vnfValidStatusList,
UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED : UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED,
MACRO_SERVICES : MACRO_SERVICES,
- COMPONENT_LIST_NAMED_QUERY_ID : COMPONENT_LIST_NAMED_QUERY_ID
+ COMPONENT_LIST_NAMED_QUERY_ID : COMPONENT_LIST_NAMED_QUERY_ID,
+ SCHEDULER_CALLBACK_URL: SCHEDULER_CALLBACK_URL,
+ SCHEDULER_PORTAL_URL: SCHEDULER_PORTAL_URL
};
})())
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js new file mode 100644 index 000000000..458da3f75 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/AddNetworkNodeController.js @@ -0,0 +1,78 @@ +/*- +* ============LICENSE_START======================================================= +* VID +* ================================================================================ +* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +* ================================================================================ +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* ============LICENSE_END========================================================= +*/ + +/** + * The Instantiation (or View/Edit) Controller controls the instantiation/removal of + * deployable objects (Services, VNFs, VF-Modules, Networks, and Volume-Groups) + */ + +"use strict"; + +appDS2.controller("AddNetworkNodeController", ["COMPONENT", "FIELD", "PARAMETER", "DataService", "CreationService", "$scope", "$window", "$location", + function (COMPONENT, FIELD, PARAMETER, DataService, CreationService, $scope, $window, $location) { + + $scope.serviceMetadataFields = []; + $scope.tenantList = []; + $scope.nodeTemplateFields = {}; + + $scope.regexInstanceName = /^([a-z])+([0-9a-z\-_\.]*)$/i; + $scope.errorMsg = FIELD.ERROR.INSTANCE_NAME_VALIDATE; + + var handleGetParametersResponse = function(parameters) { + $scope.serviceMetadataFields = parameters.summaryList; + $scope.tenantList = DataService.getCloudRegionTenantList(); + + if(DataService.getPortMirroningConfigFields()){ + $scope.nodeTemplateFields =DataService.getPortMirroningConfigFields(); + }else { + $scope.nodeTemplateFields = angular.copy(_.keyBy(parameters.userProvidedList, 'id')); + } + + $scope.modelName = DataService.getModelInfo(COMPONENT.VNF).modelCustomizationName; + }; + + CreationService.initializeComponent(COMPONENT.VNF); + + CreationService.getParameters(handleGetParametersResponse); + + $scope.setTenant = function(field) { + $scope.nodeTemplateFields.tenant.optionList = _.filter($scope.tenantList, {'cloudRegionId': field.value, 'isPermitted': true}); + }; + + $scope.cancel = function() { + $window.history.back(); + }; + + $scope.next = function() { + // DataService.setLcpRegion($scope.nodeTemplateFields.lcpRegion.value); + // DataService.setModelInstanceName($scope.nodeTemplateFields.instanceName.value); + // DataService.setTenant($scope.nodeTemplateFields.tenant.value); + // var suppressRollback = ($scope.nodeTemplateFields.suppressRollback.value) ? true : false; + // DataService.setSuppressRollback(suppressRollback); + DataService.setPortMirroningConfigFields($scope.nodeTemplateFields); + $location.path("/serviceProxyConfig"); + }; + + $scope.$on('$routeChangeStart', function (event, next, current) { + if(next.$$route.originalPath !=="/serviceProxyConfig"){ + DataService.setPortMirroningConfigFields(null); + } + }); + }]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js index f0653f680..f1dc384c6 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js @@ -26,14 +26,18 @@ "use strict";
appDS2.requires.push('ui.tree');
-
- appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService) {
-
+
+ appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService, AaiService,PnfService, $q) {
+
$scope.popup = new Object();
$scope.defaultBaseUrl = "";
$scope.responseTimeoutMsec = 60000;
$scope.properties = UtilityService.getProperties();
- $scope.isPermitted = $location.search().isPermitted;
+ $scope.resumeStatus = COMPONENT.RESUME_STATUS;
+ //isPermitted - returned as string from url and converted into boolean
+ $scope.isPermitted = $location.search().isPermitted == "true";
+ $scope.STATUS_CONSTANTS = FIELD.STATUS;
+ $scope.pnfs = [];// PNF data init;
$scope.init = function() {
/*
@@ -63,8 +67,9 @@ // DataService.setServiceInstanceId("mmsc-test-service-instance");
// DataService.setServiceUuid("XXXX-YYYY-ZZZZ");
// DataService.setUserServiceInstanceName("USER_SERVICE_INSTANCE_NAME");
+
}
-
+
//PropertyService.setMsoBaseUrl("testmso");
$scope.convertModel = function(asdcModel) {
@@ -78,7 +83,23 @@ "convertedModel": $scope.convertModel(vidService.getModel()),
"instance": vidService.getInstance()
};
-
+
+ preparePnfs();
+
+
+ function preparePnfs(){
+ var serviceInstance = {
+ globalCustomerId: $location.search().subscriberId,
+ serviceType: $location.search().serviceType,
+ serviceInstanceId: $location.search().serviceInstanceId
+ };
+
+ _setPnf(serviceInstance).then(function(data){
+ $scope.pnfs = data;
+ });
+ }
+
+
$scope.returnVfModules = function (vnfInstance) {
var svcModel = $scope.service.convertedModel;
@@ -213,9 +234,10 @@ DataService.setServiceUuid($scope.service.model.service.uuid);
DataService.setNetworkInstanceId(network.object[FIELD.ID.NETWORK_ID]);
- $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
componentId : COMPONENT.NETWORK,
- callbackFunction : deleteCallbackFunction
+ callbackFunction : deleteOrResumeCallback,
+ dialogMethod: COMPONENT.DELETE
});
};
@@ -233,14 +255,8 @@ }
DataService.setMacro($scope.isMacro());
DataService.setInventoryItem(serviceInstance);
-
- DataService.setModelInfo(COMPONENT.SERVICE, {
- "modelInvariantId": $scope.service.model.service.invariantUuid,
- "modelVersion": $scope.service.model.service.version,
- "modelNameVersionId": $scope.service.model.service.uuid,
- "modelName": $scope.service.model.service.name,
- "inputs": ""
- });
+ setCurrentServiceModelInfoFromScope();
+
DataService.setSubscriberName(serviceObject[FIELD.ID.SUBSCRIBER_NAME]);
DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
@@ -253,105 +269,150 @@ DataService.setServiceUuid($scope.service.model.service.uuid);
- $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
componentId : COMPONENT.SERVICE,
- callbackFunction : deleteServiceInstanceCallbackFunction
+ callbackFunction : deleteServiceInstanceCallbackFunction,
+ dialogMethod: COMPONENT.DELETE
});
};
- $scope.deleteVfModule = function(serviceObject, vfModule, vnf) {
-
- console.log("Removing VF-Module " + vfModule.name);
-
+ function populate_popup_vfModule(serviceObject, vfModule, vnf){
var serviceInstance = serviceObject.object;
- DataService.setInventoryItem(vfModule.object);
-
- var svcModel = $scope.service.convertedModel;
+ DataService.setInventoryItem(vfModule.object);
- //var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];
- var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
- var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];;
- var vfModuleInstanceID = vfModule.object[FIELD.ID.VF_MODULE_ID];
- if (vfModuleInstanceID == null) {
- vfModuleInstanceID = "";
- }
-
- var vnfModel = null;
- var vfModuleModel = null;
-
- DataService.setModelInfo(COMPONENT.VF_MODULE, {
- "modelInvariantId": "",
- "modelVersion": "",
- "modelNameVersionId": "",
- "modelCustomizationName": "",
- "customizationUuid": "",
- "modelName": "",
- "inputs": ""
- });
-
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {
- if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
-
- var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
- if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) && UtilityService.hasContents(vfModuleCustomizationUuid) ) {
-
- vfModuleModel = vnfModel.vfModules[vfModuleCustomizationUuid];
-
- }
- }
- else {
- // old flow
- if (vnfModelVersionId != null ) {
- vnfModel = svcModel.vnfs[vnfModelVersionId];
- }
- //var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID];
- var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];
- if ( (!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.vfModules))) &&
- UtilityService.hasContents(vfModuleModelVersionId) ) {
- vfModuleModel = vnfModel.vfModules[vfModuleModelVersionId];
- }
- }
- if ( !($scope.isObjectEmpty(vfModuleModel)) ) {
- DataService.setModelInfo(COMPONENT.VF_MODULE, {
- "modelInvariantId": vfModuleModel.invariantUuid,
- "modelVersion": vfModuleModel.version,
- "modelNameVersionId": vfModuleModel.uuid,
- "modelCustomizationName": vfModuleModel.modelCustomizationName,
- "customizationUuid": vfModuleModel.customizationUuid,
- "modelName": vfModuleModel.name,
- "inputs": ""
- });
- }
- }
+ var svcModel = $scope.service.convertedModel;
- DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);
- DataService.setVfModuleInstanceId(vfModuleInstanceID);
-
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
-
- DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
- DataService.setServiceInstanceName($scope.service.instance.name);
-
- DataService.setServiceName($scope.service.model.service.name);
-
- DataService.setServiceUuid($scope.service.model.service.uuid);
+ //var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];
+ var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+ var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];;
+ var vfModuleInstanceID = vfModule.object[FIELD.ID.VF_MODULE_ID];
+ if (vfModuleInstanceID == null) {
+ vfModuleInstanceID = "";
+ }
+
+ var vnfModel = null;
+ var vfModuleModel = null;
+
+ DataService.setModelInfo(COMPONENT.VF_MODULE, {
+ "modelInvariantId": "",
+ "modelVersion": "",
+ "modelNameVersionId": "",
+ "modelCustomizationName": "",
+ "customizationUuid": "",
+ "modelName": "",
+ "inputs": ""
+ });
+
+ if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {
+ if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+
+ var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+ if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) && UtilityService.hasContents(vfModuleCustomizationUuid) ) {
+
+ vfModuleModel = vnfModel.vfModules[vfModuleCustomizationUuid];
+
+ }
+ }
+ else {
+ // old flow
+ if (vnfModelVersionId != null ) {
+ vnfModel = svcModel.vnfs[vnfModelVersionId];
+ }
+ //var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID];
+ var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];
+ if ( (!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.vfModules))) &&
+ UtilityService.hasContents(vfModuleModelVersionId) ) {
+ vfModuleModel = vnfModel.vfModules[vfModuleModelVersionId];
+ }
+ }
+ if ( !($scope.isObjectEmpty(vfModuleModel)) ) {
+ DataService.setModelInfo(COMPONENT.VF_MODULE, {
+ "modelInvariantId": vfModuleModel.invariantUuid,
+ "modelVersion": vfModuleModel.version,
+ "modelNameVersionId": vfModuleModel.uuid,
+ "modelCustomizationName": vfModuleModel.modelCustomizationName,
+ "customizationUuid": vfModuleModel.customizationUuid,
+ "modelName": vfModuleModel.name,
+ "inputs": ""
+ });
+ }
+ }
+
+ DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);
+ DataService.setVfModuleInstanceId(vfModuleInstanceID);
+
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+ DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+ DataService.setServiceInstanceName($scope.service.instance.name);
+
+ DataService.setServiceName($scope.service.model.service.name);
+
+ DataService.setServiceUuid($scope.service.model.service.uuid);
+ }
+
+ $scope.deleteVfModule = function(serviceObject, vfModule, vnf) {
+
+ console.log("Removing VF-Module " + vfModule.name);
+
+ populate_popup_vfModule(serviceObject, vfModule, vnf);
- $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
componentId : COMPONENT.VF_MODULE,
- callbackFunction : deleteCallbackFunction
+ callbackFunction : deleteOrResumeCallback,
+ dialogMethod: COMPONENT.DELETE
});
return;
};
- $scope.deleteVnf = function(serviceObject, vnf) {
+ function setCurrentServiceModelInfoFromScope(){
+ DataService.setModelInfo(COMPONENT.SERVICE, {
+ "modelInvariantId": $scope.service.model.service.invariantUuid,
+ "modelVersion": $scope.service.model.service.version,
+ "modelNameVersionId": $scope.service.model.service.uuid,
+ "modelName": $scope.service.model.service.name,
+ "inputs": ""
+ });
+ };
+
+ function setCurrentVNFModelInfo(vnf){
+ var svcModel = $scope.service.convertedModel;
+ var vnfModel;
+ var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+ var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+ if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {
+ if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+ }
+ else {
+ vnfModel = svcModel.vnfs[vnfModelVersionId];
+ }
+ if ( !($scope.isObjectEmpty(vnfModel) ) ) {
+
+ DataService.setModelInfo(COMPONENT.VNF, {
+ "modelInvariantId": vnfModel.invariantUuid,
+ "modelVersion": vnfModel.version,
+ "modelNameVersionId": vnfModel.uuid,
+ "modelCustomizationName": vnfModel.modelCustomizationName,
+ "customizationUuid": vnfModel.customizationUuid,
+ "modelName": vnfModel.name,
+ "inputs": ""
+ });
+ }
+ }
+
+
+
+ }
+ $scope.deleteVnf = function(serviceObject, vnf) {
console.log("Removing VNF " + vnf.name);
var serviceInstance = serviceObject.object;
@@ -424,9 +485,10 @@ DataService.setServiceUuid($scope.service.model.service.uuid);
- $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
componentId : COMPONENT.VNF,
- callbackFunction : deleteCallbackFunction
+ callbackFunction : deleteOrResumeCallback,
+ dialogMethod: COMPONENT.DELETE
});
};
@@ -517,8 +579,9 @@ DataService.setVnfInstanceId(vnf.nodeId);
DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);
- $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
componentId : COMPONENT.VOLUME_GROUP,
+ dialogMethod: COMPONENT.DELETE
});
};
@@ -585,10 +648,11 @@ DataService.setVnfInstanceId(vnf.nodeId);
DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);
- $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {
- componentId : COMPONENT.VOLUME_GROUP,
- callbackFunction : deleteCallbackFunction
- });
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+ componentId : COMPONENT.VOLUME_GROUP,
+ callbackFunction : deleteOrResumeCallback,
+ dialogMethod: COMPONENT.DELETE
+ });
};
$scope.describeNetwork = function(serviceObject, networkObject) {
@@ -783,14 +847,8 @@ "inputs": "",
"displayInputs": netModel.displayInputs
});
-
- DataService.setModelInfo(COMPONENT.SERVICE, {
- "modelInvariantId": $scope.service.model.service.invariantUuid,
- "modelVersion": $scope.service.model.service.version,
- "modelNameVersionId": $scope.service.model.service.uuid,
- "modelName": $scope.service.model.service.name,
- "inputs": ""
- });
+ setCurrentServiceModelInfoFromScope();
+
$scope.$broadcast(COMPONENT.CREATE_COMPONENT, {
componentId : COMPONENT.NETWORK,
@@ -814,6 +872,8 @@ DataService.setServiceInstanceId($scope.service.instance.id);
DataService.setServiceName($scope.service.model.service.name);
+ console.log ( "existingVnfs: " );
+ console.log (JSON.stringify ( existingVnfs, null, 4));
console.log ( "existingVnfs: " ); console.log (JSON.stringify ( existingVnfs, null, 4));
var vnf_type = "";
var vnf_role = "";
@@ -833,7 +893,7 @@ vnf_code = vnf.nfCode;
}
DataService.setModelInfo(COMPONENT.VNF, {
- "modelType": "vnf",
+ "modelType": vnf.isPnf ? "pnf" : "vnf",
"modelInvariantId": vnf.invariantUuid,
"modelVersion": vnf.version,
"modelNameVersionId": vnf.uuid,
@@ -845,23 +905,27 @@ "vnfType": vnf_type,
"vnfRole": vnf_role,
"vnfFunction": vnf_function,
- "vnfCode": vnf_code
+ "vnfCode": vnf_code,
+ "properties": vnf.properties
});
DataService.setModelInstanceName($scope.service.model.service.name);
-
- DataService.setModelInfo(COMPONENT.SERVICE, {
- "modelInvariantId": $scope.service.model.service.invariantUuid,
- "modelVersion": $scope.service.model.service.version,
- "modelNameVersionId": $scope.service.model.service.uuid,
- "modelName": $scope.service.model.service.name,
- "inputs": ""
- });
-
- $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {
- componentId : COMPONENT.VNF,
- callbackFunction : createVnfCallbackFunction
- });
+ setCurrentServiceModelInfoFromScope();
+
+ if (vnf.isConfig) {
+ DataService.setServiceProxies($scope.service.model.serviceProxies);
+ DataService.setSourceServiceProxies(vnf.sourceNodes);
+ DataService.setCollectorServiceProxies(vnf.collectorNodes);
+ DataService.setConfigurationByPolicy(vnf.isConfigurationByPolicy);
+ $location.path("/addNetworkNode");
+ } else if(vnf.isPnf){
+ $location.path("/pnfSearchAssociation");
+ } else {
+ $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {
+ componentId: COMPONENT.VNF,
+ callbackFunction: createVnfCallbackFunction
+ });
+ }
};
$scope.addVfModuleInstance = function(vnfInstance, vfModuleModel) {
@@ -898,20 +962,11 @@ availableVolumeGroupList.push({"instance": volumeGroupInstance});
});
- if (vfModuleModel.volumeGroupAllowed) {
- DataService.setAvailableVolumeGroupList(availableVolumeGroupList);
- }
-
- DataService.setModelInfo(COMPONENT.SERVICE, {
- "modelInvariantId": $scope.service.model.service.invariantUuid,
- "modelVersion": $scope.service.model.service.version,
- "modelNameVersionId": $scope.service.model.service.uuid,
- "modelName": $scope.service.model.service.name,
- "inputs": ""
- });
+ DataService.setAvailableVolumeGroupList(availableVolumeGroupList);
+ setCurrentServiceModelInfoFromScope();
DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);
-
+
DataService.setModelInfo(COMPONENT.VNF, {
"modelInvariantId": vnfModel.invariantUuid,
"modelVersion": vnfModel.version,
@@ -954,6 +1009,7 @@ DataService.setServiceInstanceName($scope.service.instance.name);
DataService.setServiceInstanceId($scope.service.instance.id);
DataService.setServiceName($scope.service.model.service.name);
+ setCurrentServiceModelInfoFromScope();
DataService.setModelInfo(COMPONENT.SERVICE, {
"modelInvariantId": $scope.service.model.service.invariantUuid,
@@ -976,7 +1032,7 @@ else {
vnfModel = svcModel.vnfs[vnfModelVersionId];
}
-
+
DataService.setModelInfo(COMPONENT.VNF, {
"modelInvariantId": vnfModel.invariantUuid,
"modelVersion": vnfModel.version,
@@ -1003,6 +1059,76 @@ });
};
+ $scope.resume = function(serviceObject, vfModule, vnfModel) {
+ populate_popup_vfModule(serviceObject, vfModule, vnfModel);
+ setCurrentVNFModelInfo(vnfModel);
+ DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);
+ setCurrentServiceModelInfoFromScope();
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+ componentId : COMPONENT.VF_MODULE,
+ callbackFunction : deleteOrResumeCallback,
+ dialogMethod: COMPONENT.RESUME
+ });
+ };
+
+ $scope.deleteConfiguration = function (serviceObject, configuration) {
+ console.log("Deleting Configuration " + configuration.name);
+
+ var serviceInstance = serviceObject.object;
+ var svcModel = $scope.service.convertedModel;
+ var configModel;
+ DataService.setInventoryItem(configuration.object);
+ // set model default and override later if found
+ DataService.setModelInfo(COMPONENT.CONFIGURATION, {});
+
+ if ( configuration.object != null ) {
+
+ //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];
+ var configModelVersionId = configuration.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid
+ var configModelCustomizationUuid = configuration.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+ //configurations added to vnfs list, in order to be part of the "Add VNF" drop-down list
+ if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {
+ if ( (svcModel.isNewFlow) && (UtilityService.hasContents(configModelCustomizationUuid) ) ) {
+ configModel = svcModel.vnfs[configModelCustomizationUuid];
+ }
+ else {
+
+ if ( UtilityService.hasContents(configModelVersionId) ) {
+ configModel = svcModel.vnfs[configModelVersionId];
+ }
+
+ }
+ }
+ }
+ if (!($scope.isObjectEmpty(configModel) ) ) {
+ DataService.setModelInfo(COMPONENT.CONFIGURATION, {
+ "modelInvariantId": configModel.invariantUuid,
+ "modelVersion": configModel.version,
+ "modelNameVersionId": configModel.uuid,
+ "modelCustomizationName": configModel.modelCustomizationName,
+ "customizationUuid": configModel.customizationUuid,
+ "modelName": configModel.name,
+ "inputs": ""
+ });
+ }
+
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+ DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+ DataService.setServiceInstanceName($scope.service.instance.name);
+ DataService.setServiceName($scope.service.model.service.name);
+ DataService.setServiceUuid($scope.service.model.service.uuid);
+ DataService.setConfigurationInstanceId(configuration.object[FIELD.ID.CONFIGURATION_ID]);
+
+ $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {
+ componentId : COMPONENT.CONFIGURATION,
+ callbackFunction : deleteCallbackFunction
+ });
+ };
+
$scope.resetProgress = function() {
$scope.percentProgress = 0;
$scope.progressClass = FIELD.STYLE.PROGRESS_BAR_INFO;
@@ -1055,7 +1181,35 @@ $scope.reloadRoute = function() {
$route.reload();
}
-
+
+
+
+ /*
+ Private metthods
+ */
+
+ /*
+ setPnf
+ * set the controller pnf param using api call
+ * return: void
+ */
+ function _setPnf(data){ // data is the $scope.service.instance object
+ return PnfService.getPnfs(data)
+ .then(
+ function success(response){
+ return response.data;
+ // * can add here changes on the data that are needed to the view ( filter, ect..)
+ },
+ function error(error){
+ console.error(error);
+ }
+ );
+ }
+
+ /*
+ Callbaks functions
+
+ */
var updateProvStatusVnfCallbackFunction = function(response) {
$scope.callbackResults = "";
var color = FIELD.ID.COLOR_NONE;
@@ -1112,7 +1266,7 @@ };
- var deleteCallbackFunction = function(response) {
+ var deleteOrResumeCallback = function(response) {
$scope.callbackResults = "";
var color = FIELD.ID.COLOR_NONE;
$scope.callbackStyle = {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js index 8844d40a8..967a39002 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceModelController.js @@ -41,14 +41,13 @@ $scope.services = [];
if (response.data && angular.isArray(response.data.services)) {
wholeData = response.data.services;
- $scope.services = $scope.filterDataWithHigerVersion(wholeData);
+ $scope.services = $scope.filterDataWithHigherVersion(wholeData);
$scope.viewPerPage=10;
$scope.totalPage=$scope.services.length/$scope.viewPerPage;
$scope.sortBy=COMPONENT.NAME;
$scope.scrollViewPerPage=2;
$scope.currentPage=1;
$scope.searchCategory;
- $scope.searchString="";
$scope.currentPageNum=1;
$scope.isSpinnerVisible = false;
$scope.isProgressVisible = false;
@@ -61,67 +60,35 @@ }, function errorCallback(response) {
console.log("Error: " + response);
});
- }
- $scope.isFiltered=function(arr,obj){
- var filtered = false;
- if(arr.length>0){
- for(var i=0;i<arr.length;i++){
- if((arr[i].name == obj.name) && (obj.invariantUUID == arr[i].invariantUUID)){
- filtered = true;
- }
- }
- }
- return filtered;
- }
+ };
+
var wholeData=[];
- $scope.filterDataWithHigerVersion = function(serviceData){
- var fiterDataServices = [];
- for(var i=0;i<serviceData.length;i++){
- var higherVersion = serviceData[i];
- if(!$scope.isFiltered(fiterDataServices,serviceData[i])){
- for(var j=i;j<serviceData.length;j++){
- if((serviceData[i].invariantUUID.trim() == serviceData[j].invariantUUID.trim()) && (serviceData[i].name.trim() == serviceData[j].name.trim()) && (parseFloat(serviceData[j].version.trim())>=parseFloat(serviceData[i].version.trim()))){
- var data = $scope.isThisHigher(fiterDataServices,serviceData[j]);
- if(data.isHigher){
- fiterDataServices[data.index] = serviceData[j];
- }
- }
- }
- }
- }
- return fiterDataServices;
- }
- $scope.isThisHigher = function(arr,obj){
- var returnObj = {
- isHigher:false,
- index:0
- };
- if(arr.length>0){
- var isNotMatched = true;
- for(var i=0;i<arr.length;i++){
- if((arr[i].name == obj.name) && (arr[i].invariantUUID == obj.invariantUUID ) && (arr[i].version<obj.version) ){
- isNotMatched = false;
- returnObj = {
- isHigher:true,
- index:i
- };
+ $scope.filterDataWithHigherVersion = function(serviceData){
+ var delimiter = '$$';
+ var fiterDataServices = {};
+ for(var i=0;i<serviceData.length;i++) {
+ var index = serviceData[i].invariantUUID.trim() + delimiter + serviceData[i].name.trim();
+ if(!fiterDataServices[index]) {
+ var hasPreviousVersion = false;
+ fiterDataServices[index] = {
+ service: serviceData[i],
+ hasPreviousVersion: false
+ };
+ }
+ else {
+ fiterDataServices[index].hasPreviousVersion = true;
+ if(parseFloat(serviceData[i].version.trim())>parseFloat(fiterDataServices[index].service.version.trim())) {
+ fiterDataServices[index].service = serviceData[i];
}
}
- if(isNotMatched && !$scope.isFiltered(arr,obj)){
- returnObj = {
- isHigher:true,
- index:arr.length
- };
- }
- }else{
- returnObj = {
- isHigher:true,
- index:0
- }
}
- return returnObj;
- }
+ return Object.keys(fiterDataServices).map(function(key) {
+ var service = fiterDataServices[key].service;
+ service.hasPreviousVersion = fiterDataServices[key].hasPreviousVersion;
+ return service;
+ });
+ };
$scope.init = function() {
var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec();
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js new file mode 100644 index 000000000..6e7ad50cf --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/ServiceProxyConfigController.js @@ -0,0 +1,342 @@ +/*- +* ============LICENSE_START======================================================= +* VID +* ================================================================================ +* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +* ================================================================================ +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* ============LICENSE_END========================================================= +*/ + +/** + * The Instantiation (or View/Edit) Controller controls the instantiation/removal of + * deployable objects (Services, VNFs, VF-Modules, Networks, and Volume-Groups) + */ + +"use strict"; + +appDS2.controller("ServiceProxyConfigController", ["COMPONENT", "$log", "FIELD", "PARAMETER", "DataService", "CreationService", "$scope", "$window", "$location", "AaiService", "$uibModal", "UtilityService", "$timeout", + function (COMPONENT, $log, FIELD, PARAMETER, DataService, CreationService, $scope, $window, $location, AaiService, $uibModal, UtilityService, $timeout) { + + $scope.selectedMetadata = {}; + + $scope.serviceMetadataFields = []; + $scope.nodeTemplateFields = {}; + + $scope.configurationByPolicy = DataService.getConfigurationByPolicy(); + + $scope.collectorType = $scope.configurationByPolicy ? 'pnf' : 'vnf'; //default + $scope.collectorInstance; + $scope.collectorInstanceName = ""; + $scope.collectorInstanceList = null; + $scope.collectorMetadata = []; + $scope.collectorNoResults = false; + + $scope.sourceInstance; + $scope.sourceInstanceName = ""; + $scope.sourceInstanceList = null; + $scope.sourceMetadata = []; + $scope.sourceNoResults = false; + + $scope.errorMsg = FIELD.ERROR.INSTANCE_NAME_VALIDATE; + + $scope.modelName = DataService.getModelInfo(COMPONENT.VNF).modelCustomizationName; + + $scope.serviceTypes = []; + + function init() { + loadServiceTypes(); + + generateMetadata(sourceServiceProxy); + generateMetadata(collectorServiceProxy); + + } + + function setDefaultCollectorServiceType() { + const configServiceType = DataService.getServiceType(); + $scope.collectorServiceType = mustFind($scope.serviceTypes, {"service-type": configServiceType}); + loadCollectorProxies(); + } + + function handleGetServiceTypesResponse(response) { + $scope.serviceTypes = response.data; + setDefaultCollectorServiceType(); + } + + var handleGetParametersResponse = function(parameters) { + $scope.serviceMetadataFields = parameters.summaryList; + $scope.nodeTemplateFields = DataService.getPortMirroningConfigFields(); + }; + + var mustFind = function (collection, predicate) { + const result = _.find(collection, predicate); + const description = "result for find " + JSON.stringify(predicate); + UtilityService.checkUndefined(description, result); + $log.debug(description, result); + return result; + }; + + + $scope.back = function() { + $window.history.back(); + }; + + + function loadServiceTypes() { + const subscriberId = DataService.getGlobalCustomerId(); + AaiService.getSubscriberServiceTypes(subscriberId) + .then(handleGetServiceTypesResponse) + .catch(function (error) { + $log.error(error); + }); + } + + var modalInstance; + + $scope.create = function() { + $scope.disableCreate= true; + var portMirroringConfigFields = DataService.getPortMirroningConfigFields(); + portMirroringConfigFields.sourceInstance = mustFind($scope.sourceInstanceList, {'id': $scope.sourceInstance}); + portMirroringConfigFields.destinationInstance = mustFind($scope.collectorInstanceList, {'id': $scope.collectorInstance}); + + var selectedVnfsList; + + if ($scope.configurationByPolicy) { + selectedVnfsList = [ + portMirroringConfigFields.sourceInstance.properties + ]; + } else { + selectedVnfsList = [ + portMirroringConfigFields.sourceInstance.properties, + portMirroringConfigFields.destinationInstance.properties + ]; + } + + AaiService.getVnfVersionsByInvariantId( + selectedVnfsList.map(function(x) { + return UtilityService.checkUndefined("model-invariant-id", x['model-invariant-id']); + }) + ) + .then(function (response) { + $log.debug("getVnfVersionsByInvariantId: response", response); + + selectedVnfsList + .map(function (inOutProperties) { + const model = mustFind(response.data.model, {'model-invariant-id': inOutProperties['model-invariant-id']}); + + const modelVer = mustFind(model["model-vers"]["model-ver"], {'model-version-id': inOutProperties['model-version-id']}); + + inOutProperties['model-version'] = modelVer['model-version']; + inOutProperties['model-name'] = modelVer['model-name']; + UtilityService.checkUndefined("model-version", modelVer); + }); + }) + + .then(function () { + var requestParams = { + configurationModelInfo: DataService.getModelInfo(COMPONENT.VNF), + relatedTopModelsInfo: DataService.getModelInfo(COMPONENT.SERVICE), + portMirroringConfigFields:portMirroringConfigFields, + attuuid: DataService.getLoggedInUserId(), + topServiceInstanceId: DataService.getServiceInstanceId(), + configurationByPolicy: $scope.configurationByPolicy, + callbackFunction: updateViewCallbackFunction + }; + + modalInstance = $uibModal.open({ + templateUrl: 'app/vid/scripts/modals/mso-commit/mso-commit.html', + controller : "msoCommitModalController", + backdrop: true, + resolve: { + msoType: function () { + return COMPONENT.MSO_CREATE_REQ; + }, + requestParams: function () { + return requestParams; + } + } + }); + }) + .catch(function (error) { + $log.error("error while configuration create", error); + $scope.disableCreate= false; + }); + }; + + $scope.openMetadataModal = function(name) { + $scope.selectedMetadata = $scope[name]; + modalInstance = $uibModal.open({ + templateUrl: 'app/vid/scripts/modals/service-metadata/service-metadata.html', + backdrop: false, + scope : $scope, + resolve: { + } + }); + }; + + $scope.cancel = function() { + modalInstance.dismiss('cancel'); + }; + + var updateViewCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + $window.history.go(-2); + } else { + $scope.disableCreate=false; + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + }; + + CreationService.initializeComponent(COMPONENT.VNF); + CreationService.initializeComponent(COMPONENT.SERVICE); + CreationService.getParameters(handleGetParametersResponse); + + var sourceServiceProxies = DataService.getSourceServiceProxies(); + var collectorServiceProxies = DataService.getCollectorServiceProxies(); + var serviceProxiesList = DataService.getServiceProxies(); + + var sourceServiceProxy = { + serviceList: sourceServiceProxies, + instanceListScopePropertyName: "sourceInstanceList", + name: "sourceInstanceName", + metadata: "sourceMetadata", + noResults: "sourceNoResults" + }; + + var collectorServiceProxy = { + serviceList: collectorServiceProxies, + instanceListScopePropertyName: "collectorInstanceList", + name: "collectorInstanceName", + metadata: "collectorMetadata", + noResults: "collectorNoResults" + }; + + $scope.onSourceServiceTypeSelected = function() { + clearSourceProxySelection(); + loadSourceProxies(); + }; + + $scope.onCollectorServiceTypeSelected = function() { + clearCollectorProxySelection(); + loadCollectorProxies(); + }; + + function clearSourceProxySelection() { + $scope.sourceInstance = undefined; + } + + function clearCollectorProxySelection() { + $scope.collectorInstance = undefined; + } + + function loadSourceProxies() { + var serviceProxy = serviceProxiesList[(sourceServiceProxy.serviceList)[0]]; + var selectedServiceType = $scope.sourceServiceType['service-type']; + loadProxyInstances(sourceServiceProxy, selectedServiceType, serviceProxy); + } + + function loadCollectorProxies() { + var serviceProxy = serviceProxiesList[(collectorServiceProxy.serviceList)[0]]; + var selectedServiceType = $scope.collectorServiceType['service-type']; + loadProxyInstances(collectorServiceProxy, selectedServiceType, serviceProxy); + } + + function loadProxyInstances(service, serviceType, serviceProxy) { + $scope[service.instanceListScopePropertyName] = null; + // $scope.collectorType = $scope.configurationByPolicy ? 'pnf' : 'vnf'; + var configNodeTemplateFields = DataService.getPortMirroningConfigFields(); + if (service.name == "collectorInstanceName" && $scope.configurationByPolicy) { + var configurationModel = DataService.getModelInfo(COMPONENT.VNF); + AaiService.getPnfInstancesList( + DataService.getGlobalCustomerId(), + serviceType, + serviceProxy.sourceModelUuid, + serviceProxy.sourceModelInvariant, + configNodeTemplateFields.lcpRegion.value, + configurationModel.properties.equip_vendor, + configurationModel.properties.equip_model + ) + .then(function (response) { + var results = response.results || []; + $scope[service.instanceListScopePropertyName] = results; + $scope[service.noResults] = (results.length === 0); + }) + .catch(function (error) { + $scope[service.noResults] = true; + $log.error("No pnf instance found for " + service.name, error); + }); + } else { + AaiService.getVnfInstancesList( + DataService.getGlobalCustomerId(), + serviceType, + serviceProxy.sourceModelUuid, + serviceProxy.sourceModelInvariant, + configNodeTemplateFields.lcpRegion.value + ) + .then(function (response) { + var results = response.results || []; + $scope[service.instanceListScopePropertyName] = results; + $scope[service.noResults] = (results.length === 0); + }) + .catch(function (error) { + $scope[service.noResults] = true; + $log.error("No vnf instance found for " + service.name, error); + }); + } + } + + function generateMetadata(service) { + const serviceProxy = serviceProxiesList[(service.serviceList)[0]]; + $scope[service.name] = serviceProxy.name; + + $scope[service.metadata] = [ + {"name" :"Name" ,"value" : serviceProxy.name}, + {"name" :"Version",value : serviceProxy.version}, + {"name" :"Description", value : serviceProxy.description}, + {"name" :"Type", value : serviceProxy.type}, + {"name" :"Invariant UUID", value : serviceProxy.invariantUuid}, + {"name" :"UUID", value : serviceProxy.uuid}, + {"name" :"Customization UUID", value : serviceProxy.customizationUuid}, + {"name" :"Source Model Uuid", value : serviceProxy.sourceModelUuid}, + {"name" :"Source Model Invariant", value : serviceProxy.sourceModelInvariant}, + {"name" :"Source Model Name", value : serviceProxy.sourceModelName} + ]; + } + + init(); + $scope.$on('$routeChangeStart', function (event, next, current) { + if(next.$$route.originalPath!=="/addNetworkNode"){ + DataService.setPortMirroningConfigFields(null); + } + }); + }]); + + diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js index b611def42..6129fd96a 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/VidApp.js @@ -20,7 +20,7 @@ (function () {
'use strict';
-
+
appDS2.config(['$routeProvider', '$locationProvider', function ($routeProvider) {
$routeProvider
.when('/models/services', {
@@ -32,30 +32,47 @@ templateUrl: 'app/vid/scripts/view-models/createInstanceServiceModels.htm'
})
.when('/instances/services', {
- templateUrl : "app/vid/scripts/view-models/aaiGetSubs.htm",
+ templateUrl : "app/vid/scripts/view-models/aaiGetSubs.htm",
controller : "aaiSubscriberController"
})
.when('/instances/subscribers', {
- templateUrl : "app/vid/scripts/view-models/aaiGetSubscriberList.htm",
+ templateUrl : "app/vid/scripts/view-models/aaiGetSubscriberList.htm",
controller : "aaiSubscriberController"
})
.when('/instances/serviceTypes', {
- templateUrl : "app/vid/scripts/view-models/aaiServiceTypes.htm",
+ templateUrl : "app/vid/scripts/view-models/aaiServiceTypes.htm",
controller : "aaiSubscriberController"
})
.when('/instances/subdetails', {
- templateUrl : "app/vid/scripts/view-models/aaiSubDetails.htm",
+ templateUrl : "app/vid/scripts/view-models/aaiSubDetails.htm",
controller : "aaiSubscriberController"
})
.when('/change-management', {
templateUrl : "app/vid/scripts/view-models/change-management.html",
controller : "changeManagementController",
controllerAs: 'vm'
- })
+ })
+ .when('/testEnvironments', {
+ templateUrl : "app/vid/scripts/view-models/testEnvironments.htm",
+ controller : "testEnvironmentsController",
+ controllerAs: 'vm'
+ })
.when('/instantiate', {
controller: 'InstantiationController',
templateUrl: 'app/vid/scripts/view-models/instantiate.htm'
})
+ .when('/addNetworkNode', {
+ controller: 'AddNetworkNodeController',
+ templateUrl: 'app/vid/scripts/view-models/addNetworkNode.htm'
+ })
+ .when('/pnfSearchAssociation', {
+ controller: 'pnfSearchAssociationController',
+ templateUrl: 'app/vid/scripts/view-models/pnfSearchAssociation.htm'
+ })
+ .when('/serviceProxyConfig', {
+ controller: 'ServiceProxyConfigController',
+ templateUrl: 'app/vid/scripts/view-models/serviceProxyConfig.htm'
+ })
.otherwise({
redirectTo: '/models/services'
});
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js index a86c1b1b4..d58b83f69 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js @@ -20,8 +20,8 @@ "use strict";
-appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", "DataService", "PropertyService", "$scope", "$http", "$timeout", "$location", "$log", "$route", "VIDCONFIGURATION", "UtilityService", "vidService", "AaiService", "MsoService",
- function (COMPONENT, FIELD, PARAMETER, DataService, PropertyService, $scope, $http, $timeout, $location, $log, $route, VIDCONFIGURATION, UtilityService, vidService, AaiService, MsoService) {
+appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", "DataService", "PropertyService", "$scope", "$http", "$timeout", "$location", "$log", "$route", "$uibModal", "VIDCONFIGURATION", "UtilityService", "vidService", "AaiService", "MsoService", "OwningEntityService", "$q",
+ function (COMPONENT, FIELD, PARAMETER, DataService, PropertyService, $scope, $http, $timeout, $location, $log, $route, $uibModal, VIDCONFIGURATION, UtilityService, vidService, AaiService, MsoService, OwningEntityService, $q) {
$scope.showVnfDetails = function (vnf) {
console.log("showVnfDetails");
@@ -121,253 +121,215 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", DataService.setSubscribers($scope.custSubList);
- if (selectedServicetype !== "" && selectedServicetype !== 'undefined') {
- $location.path(COMPONENT.CREATE_INSTANCE_PATH);
- }
- };
-
- $scope.serviceTypeName="";
- $scope.getAaiServiceModelsList = function(){
- var globalCustomerId="";
- var serviceTypeId = DataService.getGlobalCustomerId();
- $scope.serviceTypeList = DataService.getServiceIdList();
- $scope.createSubscriberName = DataService.getSubscriberName();
- $scope.status = FIELD.STATUS.FETCHING_SERVICE_CATALOG;
- $scope.custSubList = DataService.getSubscribers();
- for(var i=0; i<$scope.serviceTypeList.length;i++){
- if(parseInt(serviceTypeId) === i ){
- $scope.serviceTypeName = $scope.serviceTypeList[i].name;
+ if (selectedServicetype !== "" && selectedServicetype !== 'undefined'&& selectedServicetype !== undefined) {
+ $location.path(COMPONENT.CREATE_INSTANCE_PATH);
+ }
+ };
+
+ $scope.serviceTypeName = "";
+ $scope.getAaiServiceModelsList = function () {
+ var globalCustomerId = "";
+ var serviceTypeId = DataService.getGlobalCustomerId();
+ $scope.serviceTypeList = DataService.getServiceIdList();
+ $scope.createSubscriberName = DataService.getSubscriberName();
+ $scope.status = FIELD.STATUS.FETCHING_SERVICE_CATALOG;
+ $scope.custSubList = DataService.getSubscribers();
+ for (var i = 0; i < $scope.serviceTypeList.length; i++) {
+ if (parseInt(serviceTypeId) === i) {
+ $scope.serviceTypeName = $scope.serviceTypeList[i].name;
+ }
+ }
+ ;
+ for (var i = 0; i < $scope.custSubList.length; i++) {
+ if ($scope.createSubscriberName === $scope.custSubList[i].subscriberName) {
+ globalCustomerId = $scope.custSubList[i].globalCustomerId;
+ globalCustId = globalCustomerId;
+ }
+ }
+ ;
+ var pathQuery = "";
+
+ if (null !== globalCustomerId && "" !== globalCustomerId && undefined !== globalCustomerId
+ && null !== serviceTypeId && "" !== serviceTypeId && undefined !== serviceTypeId) {
+ pathQuery = COMPONENT.SERVICES_PATH + globalCustomerId + "/" + $scope.serviceTypeName;
+ }
+
+ var namedQueryId = '6e806bc2-8f9b-4534-bb68-be91267ff6c8';
+ AaiService.getServiceModelsByServiceType(namedQueryId, globalCustomerId, $scope.serviceTypeName, function (response) { // success
+ $scope.services = [];
+ if (angular.isArray(response.data['inventory-response-item']) && response.data['inventory-response-item'].length > 0 && response.data['inventory-response-item'][0]['inventory-response-items']) {
+ wholeData = response.data['inventory-response-item'][0]['inventory-response-items']['inventory-response-item'];
+ $scope.services = $scope.filterDataWithHigerVersion(response.data['inventory-response-item'][0]['inventory-response-items']['inventory-response-item']);
+ $scope.serviceType = response.data['inventory-response-item'][0]['service-subscription']['service-type'];
+ $scope.viewPerPage = 10;
+ $scope.totalPage = $scope.services.length / $scope.viewPerPage;
+ $scope.sortBy = "name";
+ $scope.scrollViewPerPage = 2;
+ $scope.currentPage = 1;
+ $scope.searchCategory;
+ $scope.searchString = "";
+ $scope.currentPageNum = 1;
+ $scope.isSpinnerVisible = false;
+ $scope.isProgressVisible = false;
+ } else {
+ $scope.status = "Failed to get service models from ASDC.";
+ $scope.error = true;
+ $scope.isSpinnerVisible = false;
}
- }
- ;
- for(var i=0; i<$scope.custSubList.length;i++){
- if($scope.createSubscriberName === $scope.custSubList[i].subscriberName){
- globalCustomerId = $scope.custSubList[i].globalCustomerId;
- globalCustId = globalCustomerId;
- }
- }
- ;
- var pathQuery ="";
-
- if(null !== globalCustomerId && "" !== globalCustomerId && undefined !== globalCustomerId
- && null !== serviceTypeId && "" !== serviceTypeId && undefined !== serviceTypeId){
- pathQuery = COMPONENT.SERVICES_PATH +globalCustomerId+"/"+$scope.serviceTypeName;
- }
-
- var namedQueryId='6e806bc2-8f9b-4534-bb68-be91267ff6c8';
- AaiService.getServiceModelsByServiceType(namedQueryId,globalCustomerId,$scope.serviceTypeName,function(response) { // success
- $scope.services = [];
- if (angular.isArray(response.data['inventory-response-item']) && response.data['inventory-response-item'].length > 0 && response.data['inventory-response-item'][0]['inventory-response-items']) {
- wholeData = response.data['inventory-response-item'][0]['inventory-response-items']['inventory-response-item'];
- $scope.services = $scope.filterDataWithHigerVersion(response.data['inventory-response-item'][0]['inventory-response-items']['inventory-response-item']);
- $scope.serviceType = response.data['inventory-response-item'][0]['service-subscription']['service-type'];
- $scope.viewPerPage=10;
- $scope.totalPage=$scope.services.length/$scope.viewPerPage;
- $scope.sortBy="name";
- $scope.scrollViewPerPage=2;
- $scope.currentPage=1;
- $scope.searchCategory;
- $scope.searchString="";
- $scope.currentPageNum=1;
- $scope.isSpinnerVisible = false;
- $scope.isProgressVisible = false;
- } else {
- $scope.status = "Failed to get service models from A&AI.";
- $scope.error = true;
- $scope.isSpinnerVisible = false;
- }
- DataService.setServiceIdList(response);
- }, function(response) { // failure
- $scope.showError(FIELD.ERROR.AAI);
- $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICES+ response.status;
- $scope.errorDetails = response.data;
- });
-
- };
-
- var globalCustId;// This value will be assigned only on create new service instance screen-macro
- $scope.createType = "a la carte";
- $scope.deployService = function(service,hideServiceFields) {
- hideServiceFields = hideServiceFields|| false;
- var temp = service;
- service.uuid = service['service-instance']['model-version-id'];
-
- console.log("Instantiating ASDC service " + service.uuid);
-
- $http.get('rest/models/services/' + service.uuid)
- .then(function successCallback(getServiceResponse) {
- getServiceResponse.data['service'].serviceTypeName =$scope.serviceTypeName ;
- getServiceResponse.data['service'].createSubscriberName =$scope.createSubscriberName ;
- var serviceModel = getServiceResponse.data;
- DataService.setServiceName(serviceModel.service.name);
-
- DataService.setModelInfo(COMPONENT.SERVICE, {
- "modelInvariantId": serviceModel.service.invariantUuid,
- "modelVersion": serviceModel.service.version,
- "modelNameVersionId": serviceModel.service.uuid,
- "modelName": serviceModel.service.name,
- "description": serviceModel.service.description,"serviceType": serviceModel.service.serviceType,
+ DataService.setServiceIdList(response);
+ }, function (response) { // failure
+ $scope.showError(FIELD.ERROR.AAI);
+ $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICES + response.status;
+ $scope.errorDetails = response.data;
+ });
+
+ };
+
+ var globalCustId;// This value will be assigned only on create new service instance screen-macro
+ $scope.createType = "a la carte";
+ $scope.deployService = function (service, hideServiceFields) {
+ hideServiceFields = hideServiceFields || false;
+ var temp = service;
+ service.uuid = service['service-instance']['model-version-id'];
+
+ console.log("Instantiating ASDC service " + service.uuid);
+
+ $http.get('rest/models/services/' + service.uuid)
+ .then(function successCallback(getServiceResponse) {
+ getServiceResponse.data['service'].serviceTypeName = $scope.serviceTypeName;
+ getServiceResponse.data['service'].createSubscriberName = $scope.createSubscriberName;
+ var serviceModel = getServiceResponse.data;
+ DataService.setServiceName(serviceModel.service.name);
+
+ DataService.setModelInfo(COMPONENT.SERVICE, {
+ "modelInvariantId": serviceModel.service.invariantUuid,
+ "modelVersion": serviceModel.service.version,
+ "modelNameVersionId": serviceModel.service.uuid,
+ "modelName": serviceModel.service.name,
+ "description": serviceModel.service.description,
+ "serviceType": serviceModel.service.serviceType,
"serviceRole": serviceModel.service.serviceRole,
- "category":serviceModel.service.category,
- "serviceTypeName":serviceModel.service.serviceTypeName,
- "createSubscriberName":serviceModel.service.createSubscriberName
- });
- DataService.setHideServiceFields(hideServiceFields);
- if(hideServiceFields){
- DataService.setServiceType($scope.serviceTypeName);
- DataService.setGlobalCustomerId(globalCustId);
- }
-
- DataService.setALaCarte (true);
- $scope.createType = "a la carte";
- var broadcastType = "createComponent";
-
- if (UtilityService.arrayContains (VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid )) {
- DataService.setALaCarte (false);
- $scope.createType = "Macro";
- var convertedAsdcModel = UtilityService.convertModel(serviceModel);
-
- //console.log ("display inputs ");
- //console.log (JSON.stringify ( convertedAsdcModel.completeDisplayInputs));
-
- DataService.setModelInfo(COMPONENT.SERVICE, {
- "modelInvariantId": serviceModel.service.invariantUuid,
- "modelVersion": serviceModel.service.version,
- "modelNameVersionId": serviceModel.service.uuid,
- "modelName": serviceModel.service.name,
- "description": serviceModel.service.description,
- "category":serviceModel.service.category,
- "serviceEcompNaming": serviceModel.service.serviceEcompNaming,
- "inputs": serviceModel.service.inputs,
- "displayInputs": convertedAsdcModel.completeDisplayInputs,
- "serviceTypeName":serviceModel.service.serviceTypeName,
- "createSubscriberName":serviceModel.service.createSubscriberName,
- "serviceType": serviceModel.service.serviceType,
+ "category": serviceModel.service.category,
+ "serviceTypeName": serviceModel.service.serviceTypeName,
+ "createSubscriberName": serviceModel.service.createSubscriberName
+ });
+ DataService.setHideServiceFields(hideServiceFields);
+ if (hideServiceFields) {
+ DataService.setServiceType($scope.serviceTypeName);
+ DataService.setGlobalCustomerId(globalCustId);
+ }
+
+ DataService.setALaCarte(true);
+ $scope.createType = "a la carte";
+ var broadcastType = "createComponent";
+
+ if (UtilityService.arrayContains(VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid)) {
+ DataService.setALaCarte(false);
+ $scope.createType = "Macro";
+ var convertedAsdcModel = UtilityService.convertModel(serviceModel);
+
+ //console.log ("display inputs ");
+ //console.log (JSON.stringify ( convertedAsdcModel.completeDisplayInputs));
+
+ DataService.setModelInfo(COMPONENT.SERVICE, {
+ "modelInvariantId": serviceModel.service.invariantUuid,
+ "modelVersion": serviceModel.service.version,
+ "modelNameVersionId": serviceModel.service.uuid,
+ "modelName": serviceModel.service.name,
+ "description": serviceModel.service.description,
+ "category": serviceModel.service.category,
+ "serviceEcompNaming": serviceModel.service.serviceEcompNaming,
+ "inputs": serviceModel.service.inputs,
+ "displayInputs": convertedAsdcModel.completeDisplayInputs,
+ "serviceTypeName": serviceModel.service.serviceTypeName,
+ "createSubscriberName": serviceModel.service.createSubscriberName,
+ "serviceType": serviceModel.service.serviceType,
"serviceRole": serviceModel.service.serviceRole
- });}
- ;
-
- $scope.$broadcast(broadcastType, {
- componentId : COMPONENT.SERVICE,
- callbackFunction : function(response) {
- if (response.isSuccessful) {
- vidService.setModel(serviceModel);
-
- var subscriberId = "Not Found";
- var serviceType = "Not Found";
-
- var serviceInstanceId = response.instanceId;
-
- for (var i = 0; i < response.control.length; i++) {
- if (response.control[i].id == "subscriberName") {
- subscriberId = response.control[i].value;
- } else if (response.control[i].id == "serviceType") {
- serviceType = response.control[i].value;
- }
- }
-
-
- $scope.refreshSubs(subscriberId,serviceType,serviceInstanceId);
-
- }
- }
- });
-
- }, function errorCallback(response) {
- console.log("Error: " + response);
- });
- };
- $scope.isFiltered=function(arr,obj){
- var filtered = false;
- if(arr.length>0){
- for(var i=0;i<arr.length;i++){
- if(obj['extra-properties']['extra-property'] && (obj['extra-properties']['extra-property'][2]['property-value'] == arr[i]['extra-properties']['extra-property'][2]['property-value'])
- && (obj['extra-properties']['extra-property'][4]['property-value'] == arr[i]['extra-properties']['extra-property'][4]['property-value'])){
- filtered = true;
- }
- }
- }
- return filtered;
- }
- var wholeData=[];
- $scope.filterDataWithHigerVersion = function(serviceData){
- var fiterDataServices = [];
- for(var i=0;i<serviceData.length;i++){
- var higherVersion = serviceData[i];
- if(!$scope.isFiltered(fiterDataServices,serviceData[i])){
- for(var j=i;j<serviceData.length;j++){
- if(serviceData[i]['extra-properties']['extra-property'] && serviceData[j]['extra-properties']['extra-property'] && (serviceData[i]['extra-properties']['extra-property'][4]['property-value'] == serviceData[j]['extra-properties']['extra-property'][4]['property-value'])
- && (serviceData[i]['extra-properties']['extra-property'][2]['property-value'] == serviceData[j]['extra-properties']['extra-property'][2]['property-value'])
- && (parseFloat(serviceData[j]['extra-properties']['extra-property'][6]['property-value'])>=parseFloat(serviceData[i]['extra-properties']['extra-property'][6]['property-value']))){
- var data = $scope.isThisHigher(fiterDataServices,serviceData[j]);
- if(data.isHigher){
- fiterDataServices[data.index] = serviceData[j];
- }
- }
- }
- }
- }
- return fiterDataServices;
- }
-
- $scope.isThisHigher = function(arr,obj){
- var returnObj = {
- isHigher:false,
- index:0
- };
- if(arr.length>0){
- var isNotMatched = true;
- for(var i=0;i<arr.length;i++){
- if(arr[i]['extra-properties']['extra-property'] && (arr[i]['extra-properties']['extra-property'][2]['property-value'] == obj['extra-properties']['extra-property'][2]['property-value'])
- && (arr[i]['extra-properties']['extra-property'][4]['property-value'] == obj['extra-properties']['extra-property'][4]['property-value'] )
- && (arr[i]['extra-properties']['extra-property'][6]['property-value'] < obj['extra-properties']['extra-property'][6]['property-value']) ){
- isNotMatched = false;
- returnObj = {
- isHigher:true,
- index:i
- };
- }
- }
- if(isNotMatched && !$scope.isFiltered(arr,obj)){
- returnObj = {
- isHigher:true,
- index:arr.length
- };
- }
- }else{
- returnObj = {
- isHigher:true,
- index:0
- }
- }
- return returnObj;
- }
-
- $scope.tableData=[];
- var oldData=[];
- $scope.loadPreviousVersionData=function(version,invariantUUID){
- $scope.tableData =[];
- oldData=[];
- for(var i=0;i<wholeData.length;i++){
- if(wholeData[i]['extra-properties']['extra-property'] && wholeData[i]['extra-properties']['extra-property'][4]['property-value'] == invariantUUID && version!=wholeData[i]['extra-properties']['extra-property'][6]['property-value']){
- oldData.push(wholeData[i]);
- }
- }
- $scope.tableData = oldData;
- $scope.createType = "Previous Version";
- var broadcastType = "createTableComponent";
- $scope.componentName = invariantUUID;
- $scope.$broadcast(broadcastType, {
- componentId : COMPONENT.OLDVERSION,
- callbackFunction : function(response) {
- }
- });
- }
- $scope.cancelCreateSIType = function(){
-
- window.location.href = COMPONENT.SERVICE_MODLES_INSTANCES_SUBSCRIBERS_PATH;
-
- }
+ });
+ }
+ ;
+
+ $scope.$broadcast(broadcastType, {
+ componentId: COMPONENT.SERVICE,
+ callbackFunction: function (response) {
+ if (response.isSuccessful) {
+ vidService.setModel(serviceModel);
+
+ var subscriberId = "Not Found";
+ var serviceType = "Not Found";
+
+ var serviceInstanceId = response.instanceId;
+
+ for (var i = 0; i < response.control.length; i++) {
+ if (response.control[i].id == "subscriberName") {
+ subscriberId = response.control[i].value;
+ } else if (response.control[i].id == "serviceType") {
+ serviceType = response.control[i].value;
+ }
+ }
+
+
+ $scope.refreshSubs(subscriberId, serviceType, serviceInstanceId);
+
+ }
+ }
+ });
+
+ }, function errorCallback(response) {
+ $log.error("Error: ", response);
+ });
+ };
+
+ var wholeData=[];
+ //extract all models from service instances properties and filter by the higher model version
+ $scope.filterDataWithHigerVersion = function(serviceData){
+
+ //get all service instances & models collected into array. key = model invariant id
+ var servicesByModelInvariant = _.reduce(serviceData, function(result, item) {
+ if (item['extra-properties']['extra-property']) {
+ var invariantId = item['extra-properties']['extra-property'][4];
+ if (invariantId) {
+ (result[invariantId["property-value"]] || (result[invariantId["property-value"]] = [])).push(item);
+ }
+ }
+ return result;
+ }, {});
+
+ //iterate over the array and get the highest model version for each group of services
+ var filterDataServicesByVersion = [];
+ _.forEach(servicesByModelInvariant, function(items) {
+ var maxVersionItem = _.maxBy(items, function(item) { return parseFloat(item['extra-properties']['extra-property'][6]["property-value"]); });
+ filterDataServicesByVersion.push(maxVersionItem);
+ });
+
+ return filterDataServicesByVersion;
+ };
+
+ $scope.tableData = [];
+ var oldData = [];
+ $scope.loadPreviousVersionData = function (version, invariantUUID) {
+ $scope.tableData = [];
+ oldData = [];
+ for (var i = 0; i < wholeData.length; i++) {
+ if (wholeData[i]['extra-properties']['extra-property'] && wholeData[i]['extra-properties']['extra-property'][4]['property-value'] == invariantUUID && version != wholeData[i]['extra-properties']['extra-property'][6]['property-value']) {
+ oldData.push(wholeData[i]);
+ }
+ }
+ $scope.tableData = oldData;
+ $scope.createType = "Previous Version";
+ var broadcastType = "createTableComponent";
+ $scope.componentName = invariantUUID;
+ $scope.$broadcast(broadcastType, {
+ componentId: COMPONENT.OLDVERSION,
+ callbackFunction: function (response) {
+ }
+ });
+ }
+ $scope.cancelCreateSIType = function () {
+
+ window.location.href = COMPONENT.SERVICE_MODLES_INSTANCES_SUBSCRIBERS_PATH;
+
+ }
$scope.fetchServices = function () {
var serviceIdList = [];
@@ -379,7 +341,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICES + response.status;
$scope.errorDetails = response.data;
});
- }
+ };
$scope.refreshSubs = function () {
$scope.init();
@@ -387,10 +349,20 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", $scope.fetchServices();
};
+ $scope.loadOwningEntity = function () {
+ OwningEntityService.getOwningEntityProperties(function (response) {
+ $scope.owningEntities = response.owningEntity;
+ $scope.projects = response.project;
+
+ // working project name: owning-entity-id-val-cp8128
+ // working owning entity name: owning-entity-id-val-cp8128
+ });
+ };
+
$scope.fetchSubs = function (status) {
$scope.status = status;
- AaiService.getSubList(function (response) { // sucesss
+ AaiService.getSubList(function (response) {
$scope.setProgress(100); // done
$scope.status = FIELD.STATUS.DONE;
$scope.isSpinnerVisible = false;
@@ -408,16 +380,23 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", }
- $scope.getSubDetails = function (request) {
+ $scope.getSubDetails = function () {
$scope.init();
- $scope.selectedSubscriber = $location.search().selectedSubscriber;
- $scope.selectedServiceInstance = $location.search().selectedServiceInstance;
+ //$scope.selectedSubscriber = $location.search().selectedSubscriber;
+ // $scope.selectedServiceInstance = $location.search().selectedServiceInstance;
$scope.status = FIELD.STATUS.FETCHING_SUB_DETAILS + $scope.selectedSubscriber;
+ var query = $location.url().replace($location.path(),'');
$scope.displayData = [];
- AaiService.getSubDetails($scope.selectedSubscriber, $scope.selectedServiceInstance, function (displayData, subscriberName) {
- $scope.displayData = displayData;
+ AaiService.searchServiceInstances(query).then(function (response) {
+ $scope.displayData = response.displayData;
+ if (response.displayData.length)
+ {
+ var first = response.displayData[0];
+ $scope.selectedSubscriberId = first.globalCustomerId;
+ $scope.selectedSubscriberName = first.subscriberName;
+ }
$scope.viewPerPage = 10;
$scope.totalPage = $scope.displayData.length / $scope.viewPerPage;
$scope.scrollViewPerPage = 2;
@@ -429,13 +408,13 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", $scope.setProgress(100); // done
$scope.status = FIELD.STATUS.DONE;
$scope.isSpinnerVisible = false;
- $scope.subscriberName = subscriberName;
- }, function (response) {
+
+ }).catch(function (response) {
$scope.showError(FIELD.ERROR.AAI);
$scope.errorMsg = FIELD.ERROR.AAI_FETCHING_CUST_DATA + response.status;
$scope.errorDetails = response.data;
});
- }
+ };
$scope.$on(COMPONENT.MSO_DELETE_REQ, function (event, request) {
@@ -452,7 +431,6 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", });
$scope.init = function () {
-
//PropertyService.setAaiBaseUrl("testaai");
//PropertyService.setAsdcBaseUrl("testasdc");
@@ -529,37 +507,67 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", alert(response.statusText);
}
- $scope.getAsdcModel = function (disData) {
+ function getModelVersionIdForServiceInstance(instance) {
+ if (UtilityService.hasContents(instance.aaiModelVersionId)) {
+ return $q.resolve(instance.aaiModelVersionId);
+ } else {
+ return AaiService.getModelVersionId(instance.globalCustomerId, instance.serviceInstanceId);
+ }
+ }
- console.log("disData");
- console.log(JSON.stringify(disData, null, 4));
+ $scope.onViewEditClick = function (disData) {
+ $log.debug("disData", disData, null, 4);
- // if ( !(UtilityService.hasContents (disData.aaiModelVersionId)) ) {
- // $scope.errorMsg = FIELD.ERROR.MODEL_VERSION_ID_MISSING;
- // alert($scope.errorMsg);
- // return;
- // }
+ getModelVersionIdForServiceInstance(disData)
+ .then(getAsdcModelByVersionId, handleErrorGettingModelVersion)
+ .then(navigateToViewEditPage);
- // aaiModelVersionId is the model uuid
- var pathQuery = COMPONENT.SERVICES_PATH + disData.aaiModelVersionId;
- $http({
- method: 'GET',
- url: pathQuery
- }).then(function successCallback(response) {
- vidService.setModel(response.data);
+
+ function navigateToViewEditPage() {
window.location.href =
COMPONENT.INSTANTIATE_ROOT_PATH + disData.globalCustomerId +
COMPONENT.SUBSCRIBERNAME_SUB_PATH + disData.subscriberName +
COMPONENT.SERVICETYPE_SUB_PATH + disData.serviceType +
COMPONENT.SERVICEINSTANCEID_SUB_PATH + disData.serviceInstanceId +
COMPONENT.IS_PERMITTED_SUB_PATH + disData.isPermitted;
+ }
+ };
+
+ function handleErrorGettingModelVersion(err) {
+ $log.error("aaiSubscriber getModelVersionIdForServiceInstance - " + err);
+ $scope.errorMsg = err;
+ alert($scope.errorMsg);
+ return $q.reject();
+ }
+
+ function getAsdcModelByVersionId(aaiModelVersionId) {
+ // aaiModelVersionId is the model uuid
+ var pathQuery = COMPONENT.SERVICES_PATH + aaiModelVersionId;
+ return $http({
+ method: 'GET',
+ url: pathQuery
+ }).then(function successCallback(response) {
+ vidService.setModel(response.data);
console.log("aaiSubscriber getAsdcModel DONE!!!!");
}, function errorCallback(response) {
- console.log("aaiSubscriber getAsdcModel - No matching model found matching the A&AI model version ID = " + disData.aaiModelVersionId);
- $scope.errorMsg = FIELD.ERROR.NO_MATCHING_MODEL_AAI + disData.aaiModelVersionId;
+ $log.error("aaiSubscriber getAsdcModel - " + FIELD.ERROR.NO_MATCHING_MODEL_AAI + aaiModelVersionId);
+ $scope.errorMsg = FIELD.ERROR.NO_MATCHING_MODEL_AAI + aaiModelVersionId;
alert($scope.errorMsg);
});
+ }
+ function returnMatchingServiceSubscription(serviceSubs, serviceId){
+ var orchStatus;
+ serviceSubs.forEach(function(item){
+ if (item[FIELD.ID.SERVICE_INSTANCES] != null) {
+ item[FIELD.ID.SERVICE_INSTANCES][FIELD.ID.SERVICE_INSTANCE].forEach(function (service) {
+ if (service[FIELD.ID.SERVICE_INSTANCE_ID] === serviceId) {
+ orchStatus = service['orchestration-status']
+ }
+ })
+ }
+ });
+ return orchStatus;
}
$scope.getTenants = function (globalCustomerId) {
@@ -572,10 +580,26 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", });
}
+ $scope.isActivateDeactivateEnabled = function(btnType) {
+ if ($scope.serviceOrchestrationStatus && $scope.service.model.service.serviceType.toLowerCase().indexOf('transport') != -1) {
+ switch (btnType) {
+ case "activate":
+ return $scope.serviceOrchestrationStatus === 'Created' ||
+ $scope.serviceOrchestrationStatus.toLowerCase() === 'pendingdelete' || $scope.serviceOrchestrationStatus.toLowerCase() === 'pending-delete';
+ break;
+ case "deactivate":
+ return $scope.serviceOrchestrationStatus === 'Active';
+ break;
+ }
+ }
+
+ return false;
+ };
+
$scope.handleInitialResponseInventoryItems = function (response) {
$scope.inventoryResponseItemList = response.data[FIELD.ID.INVENTORY_RESPONSE_ITEM]; // get data from json
- console.log($scope.inventoryResponseItemList.toString());
+ $log.debug($scope.inventoryResponseItemList);
$scope.displayData = [];
$scope.vnfs = [];
@@ -585,8 +609,9 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", $scope.subscriberName = "";
// just look up the subscriber name in A&AI here...
AaiService.getSubscriberName($scope.globalCustomerId, function (response) {
- $scope.subscriberName = response;
+ $scope.subscriberName = response.subscriberName;
DataService.setSubscriberName($scope.subscriberName);
+ $scope.serviceOrchestrationStatus = returnMatchingServiceSubscription(response.serviceSubscriptions[FIELD.ID.SERVICE_SUBSCRIPTION], $scope.serviceInstanceId);
angular.forEach($scope.inventoryResponseItemList, function (inventoryResponseItem, key) {
@@ -609,12 +634,13 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", "type": PARAMETER.STRING,
"description": FIELD.PROMPT.VAR_DESCRIPTION_B,
"default": FIELD.PROMPT.DEFAULT_B
- },
+ }
},
"object": $scope.inventoryResponseItem[FIELD.ID.SERVICE_INSTANCE],
"vnfs": [],
- "networks": []
- }
+ "networks": [],
+ "configurations": []
+ };
if (inventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) {
@@ -760,6 +786,44 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", });
}
}
+
+ if (subInventoryResponseItem[FIELD.ID.GENERIC_CONFIGURATION] != null) {
+ var configObject = subInventoryResponseItem[FIELD.ID.GENERIC_CONFIGURATION];
+ var config = {
+ "id": $scope.counter++,
+ "name": configObject[FIELD.ID.CONFIGURATION_NAME],
+ "itemType": FIELD.ID.CONFIGURATION,
+ "nodeId": configObject[FIELD.ID.CONFIGURATION_ID],
+ "nodeType": configObject[FIELD.ID.CONFIGURATION_TYPE],
+ "nodeStatus": configObject[FIELD.ID.ORCHESTRATION_STATUS],
+ "modelInvariantId": configObject[FIELD.ID.MODEL_INVAR_ID],
+ "modelVersionId": configObject[FIELD.ID.MODEL_VERSION_ID],
+ "modelCustomizationId": configObject[FIELD.ID.MODEL_CUSTOMIZATION_ID],
+ "object": configObject,
+ "ports": []
+ };
+
+ $scope.allowConfigurationActions = [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED].indexOf(config.nodeStatus) != -1;
+
+ if (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) {
+ angular.forEach(subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function (subSubInventoryResponseItem, key) {
+ var port = {};
+ var portObject;
+ if (subSubInventoryResponseItem[FIELD.ID.PORT] != null) {
+ portObject = subSubInventoryResponseItem[FIELD.ID.PORT];
+ port = {
+ "portId": portObject[FIELD.ID.PORT_ID],
+ "portName": portObject[FIELD.ID.PORT_NAME],
+ "portStatus": portObject[FIELD.ID.PORT_MIRRORED] === true ? FIELD.STATUS.AAI_ENABLED : FIELD.ID.AAI_DISABLED,
+ "object": portObject
+ };
+ config.ports.push(port);
+ }
+ });
+ }
+ $scope.service.instance[FIELD.ID.CONFIGURATIONS].push(config);
+ }
+
});
}
});
@@ -901,63 +965,239 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", $scope.currentPage--;
}
- $scope.activateMSOInstance = function() {
- MsoService.activateInstance($scope.service.instance, $scope.service.model)
- .then(function(response) {
- alert("Activation succeeded");
- })
- .catch(function (error) {
- $log.error(error);
+ var getAicZoneAndSendToMso = function (msoType, requestParams) {
+ AaiService.getAicZoneForPNF(
+ $scope.service.instance.globalCustomerId,
+ $scope.service.instance.serviceType,
+ $scope.service.instance.serviceInstanceId, function (aicZone) {
+
+ requestParams.aicZone = aicZone;
+
+ openMsoModal(msoType, requestParams);
});
- ;
+ };
+
+ var activateDeactivateServiceInstance = function(msoType) {
+ var requestParams = {
+ model: $scope.service.model,
+ instance: $scope.service.instance
+ };
+
+ if (DataService.getLoggedInUserId()) {
+ requestParams.userId = DataService.getLoggedInUserId();
+ getAicZoneAndSendToMso(msoType, requestParams)
+ } else {
+ AaiService.getLoggedInUserID(function (response) {
+ var userID = response.data;
+ DataService.setLoggedInUserId(userID);
+ requestParams.userId = userID;
+
+ getAicZoneAndSendToMso(msoType, requestParams);
+ });
+ }
+ };
+
+ $scope.activateMSOInstance = function() {
+
+ activateDeactivateServiceInstance(COMPONENT.MSO_ACTIVATE_SERVICE_REQ);
+ };
+
+ $scope.deactivateMSOInstance = function() {
+
+ activateDeactivateServiceInstance(COMPONENT.MSO_DEACTIVATE_SERVICE_REQ);
+ };
+
+ $scope.toggleConfigurationStatus = function (serviceObject, configuration) {
+
+
+ AaiService.getLoggedInUserID(function (response) {
+ DataService.setLoggedInUserId(response.data);
+ var requestParams = {
+ serviceModel: {
+ "modelType": "service",
+ "modelInvariantId": serviceObject.model.service.invariantUuid,
+ "modelVersionId": "uuid",
+ "modelName": serviceObject.model.service.name,
+ "modelVersion": serviceObject.model.service.version
+ },
+ configurationModel: {
+ "modelType": "configuration",
+ "modelInvariantId": configuration.modelInvariantId,
+ "modelVersionId": configuration.modelVersionId,
+ "modelCustomizationId": configuration.modelCustomizationId
+ },
+ serviceInstanceId: serviceObject.instance.serviceInstanceId,
+ configurationId: configuration.nodeId,
+ configStatus: configuration.nodeStatus,
+ userId: DataService.getLoggedInUserId()
+ };
+
+ openMsoModal(COMPONENT.MSO_CHANGE_CONFIG_STATUS_REQ, requestParams);
+ });
+
+ };
+
+ $scope.togglePortStatus = function(serviceObject, configuration, port) {
+
+ var requestParams = {
+ serviceInstanceId: serviceObject.instance.serviceInstanceId,
+ configurationId: configuration.nodeId,
+ portId: port.portId,
+ portStatus: port.portStatus,
+ serviceModel: {
+ "modelType": "service",
+ "modelInvariantId": serviceObject.model.service.invariantUuid,
+ "modelVersionId": "uuid",
+ "modelName": serviceObject.model.service.name,
+ "modelVersion": serviceObject.model.service.version
+ },
+ configurationModel: {
+ "modelType": "configuration",
+ "modelInvariantId": configuration.modelInvariantId,
+ "modelVersionId": configuration.modelVersionId,
+ "modelCustomizationId": configuration.modelCustomizationId
+ },
+ userId: DataService.getLoggedInUserId()
+ };
+
+ openMsoModal(COMPONENT.MSO_CHANGE_PORT_STATUS_REQ, requestParams);
+ };
+
+ $scope.dissociatePnf = function(pnfName) {
+
+ var jobInfo = {
+ status: "confirm",
+ message: "Are you sure you would like to dissociate " + pnfName + " from the service instance?"
+ };
+
+ var modalInstance = $uibModal.open({
+ templateUrl: 'app/vid/scripts/modals/alert-modal/alert-modal.html',
+ controller: 'alertModalController',
+ controllerAs: 'vm',
+ appendTo: angular.element("#pnfs-tree"),
+ resolve: {
+ jobInfo: function () {
+ return jobInfo;
+ }
+ }
+ });
+
+ modalInstance.result.then(function (result) {
+ console.log("This is the result of the alert modal.", result);
+
+ if (result) {
+ var requestParams = {
+ pnf: pnfName,
+ serviceModelInfo: {
+ invariantUuid: $scope.service.model.service.invariantUuid,
+ uuid: $scope.service.model.service.uuid,
+ version: $scope.service.model.service.version,
+ name: $scope.service.model.service.name
+ },
+ serviceInstanceId: $scope.service.instance.serviceInstanceId
+ };
+
+ if (DataService.getLoggedInUserId()) {
+ requestParams.attuuid = DataService.getLoggedInUserId();
+ openMsoModal(COMPONENT.MSO_REMOVE_RELATIONSHIP, requestParams);
+ } else {
+ AaiService.getLoggedInUserID(function (response) {
+ DataService.setLoggedInUserId(response.data);
+
+ requestParams.attuuid = response.data;
+ openMsoModal(COMPONENT.MSO_REMOVE_RELATIONSHIP, requestParams);
+ });
+ }
+ }
+ });
+
+
+ };
+
+ var openMsoModal = function (msoType, requestParams) {
+ var modalInstance = $uibModal.open({
+ templateUrl: 'app/vid/scripts/modals/mso-commit/mso-commit.html',
+ controller : "msoCommitModalController",
+ backdrop: false,
+ resolve: {
+ msoType: function () {
+ return msoType;
+ },
+ requestParams: function() {
+ requestParams.callbackFunction = updateViewCallbackFunction;
+ return requestParams;
+ }
+ }
+ });
+ };
+
+ var updateViewCallbackFunction = function(response) {
+ $scope.callbackResults = "";
+ var color = FIELD.ID.COLOR_NONE;
+ $scope.callbackStyle = {
+ "background-color" : color
+ };
+
+ /*
+ * This 1/2 delay was only added to visually highlight the status
+ * change. Probably not needed in the real application code.
+ */
+ $timeout(function() {
+ $scope.callbackResults = UtilityService.getCurrentTime()
+ + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;
+ if (response.isSuccessful) {
+ color = FIELD.ID.COLOR_8F8;
+ $scope.reloadRoute();
+ } else {
+ color = FIELD.ID.COLOR_F88;
+ }
+ $scope.callbackStyle = {
+ "background-color" : color
+ };
+ }, 500);
};
$scope.nextPage = function () {
$scope.currentPage++;
+ };
+
+ $scope.serviceInstanceses = [{"sinstance": FIELD.NAME.SERVICE_INSTANCE_Id}, {"sinstance": FIELD.NAME.SERVICE_INSTANCE_NAME}];
+
+ function navigateToSearchResultsPage(globalCustomerId, selectedServiceInstance, selectedProjects, selectedOwningEntities) {
+ var projectQuery = AaiService.getMultipleValueParamQueryString(_.map(selectedProjects, 'id'), COMPONENT.PROJECT_SUB_PATH);
+ var owningEntityQuery = AaiService.getMultipleValueParamQueryString(_.map(selectedOwningEntities, 'id'), COMPONENT.OWNING_ENTITY_SUB_PATH);
+ var globalCustomerIdQuery = globalCustomerId ? COMPONENT.SELECTED_SUBSCRIBER_SUB_PATH + globalCustomerId : null;
+ var serviceInstanceQuery = selectedServiceInstance ? COMPONENT.SELECTED_SERVICE_INSTANCE_SUB_PATH + selectedServiceInstance : null;
+ var query = AaiService.getJoinedQueryString([projectQuery, owningEntityQuery, globalCustomerIdQuery, serviceInstanceQuery]);
+
+ window.location.href = COMPONENT.SELECTED_SERVICE_SUB_PATH + query;
}
- $scope.serviceInstanceses = [{"sinstance": FIELD.NAME.SERVICE_INSTANCE_Id}, {"sinstance": FIELD.NAME.SERVICE_INSTANCE_NAME}]
- $scope.getSubscriberDet = function (selectedCustomer, selectedserviceinstancetype, selectedServiceInstance) {
-
- var sintype = selectedserviceinstancetype;
- if (selectedServiceInstance != "" && selectedServiceInstance != undefined) {
- selectedServiceInstance.trim();
-
- // check with A&AI
- $http.get(COMPONENT.AAI_GET_SERVICE_INSTANCE_PATH + selectedServiceInstance + "/" + sintype + "?r=" + Math.random(), {}, {
- timeout: $scope.responseTimeoutMsec
- }).then(function (response) {
- var notFound = true;
- if (angular.isArray(response.data[FIELD.ID.RESULT_DATA])) {
- var item = [];
- var urlParts = [];
- item = response.data[FIELD.ID.RESULT_DATA][0];
- var url = item[FIELD.ID.RESOURCE_LINK];
- var globalCustomerId = "";
- var serviceSubscription = "";
- // split it and find the customer Id and service-subscription
- urlParts = url.split("/");
- if (urlParts[7] === FIELD.ID.CUSTOMER) {
- globalCustomerId = urlParts[8];
- }
- if (urlParts[10] === FIELD.ID.SERVICE_SUBSCRIPTION) {
- serviceSubscription = urlParts[11];
- }
- if (globalCustomerId !== "") {
- notFound = false;
- window.location.href = COMPONENT.SELECTED_SERVICE_SUB_PATH + serviceSubscription + COMPONENT.SELECTEDSUBSCRIBER_SUB_PATH + globalCustomerId + COMPONENT.SELECTEDSERVICEINSTANCE_SUB_PATH + selectedServiceInstance;
- }
+ $scope.getServiceInstancesSearchResults =
+ function (selectedCustomer, selectedInstanceIdentifierType, selectedServiceInstance, selectedProject, selectedOwningEntity) {
+ var isSelectionValid = UtilityService.hasContents(selectedCustomer) || UtilityService.hasContents(selectedProject)
+ || UtilityService.hasContents(selectedOwningEntity) || UtilityService.hasContents(selectedServiceInstance);
+
+ if (isSelectionValid) {
+ if (UtilityService.hasContents(selectedServiceInstance)) {
+ AaiService
+ .getGlobalCustomerIdByInstanceIdentifier(selectedServiceInstance, selectedInstanceIdentifierType)
+ .then(handleCustomerIdResponse);
+ } else {
+ navigateToSearchResultsPage(selectedCustomer, null, selectedProject, selectedOwningEntity);
}
- if (notFound) {
+ } else {
+ alert(FIELD.ERROR.SELECT);
+ }
+
+ function handleCustomerIdResponse(globalCustomerId) {
+ if (UtilityService.hasContents(globalCustomerId)) {
+ navigateToSearchResultsPage(globalCustomerId, selectedServiceInstance, selectedProject, selectedOwningEntity);
+ } else {
alert(FIELD.ERROR.SERVICE_INST_DNE);
}
- }); // add a failure callback...
- } else if (selectedCustomer != null) {
- window.location.href = COMPONENT.SELECTED_SUB_PATH + selectedCustomer;
- } else {
- alert(FIELD.ERROR.SELECT);
- }
- };
+ }
+ };
}]).directive('restrictInput', function () {
return {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/change-management.controller.js index 662b10ecd..273f13017 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/change-management.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/change-management.controller.js @@ -1,12 +1,15 @@ (function () { 'use strict'; - appDS2.controller("changeManagementController", ["$uibModal", "changeManagementService", "_", "$log", changeManagementController]); + appDS2.controller("changeManagementController", ["$uibModal", "changeManagementService", "_", "$log", "SchedulerService", "$filter", changeManagementController]); - function changeManagementController($uibModal, changeManagementService, _, $log) { + function changeManagementController($uibModal, changeManagementService, _, $log, SchedulerService, $filter) { var vm = this; - var init = function() { + vm.lastTimeUpdated = ""; + + vm.init = function() { + vm.lastTimeUpdated = $filter('date')(new Date(), "MM/dd/yyyy | HH:mm:ss"); loadMSOChangeManagements(); loadSchedulerChangeManagements(); }; @@ -26,16 +29,16 @@ .then(function(response) { vm.pendingChangeManagements = response.data; _.forEach(vm.pendingChangeManagements, function(changeManagement) { - var callbackData = _.filter(changeManagement.scheduleRequest.domainData, {name: "CallbackData"}); + var callbackData = _.filter(changeManagement.scheduleRequest.domainData, {name: "WorkflowName"}); if(callbackData) { var parsedModel = {}; try { - parsedModel = JSON.parse(callbackData[0].value); + parsedModel = callbackData[0].value; } catch(exception) { $log.error(exception); } - changeManagement.workflow = parsedModel.requestType || 'No workflow'; + changeManagement.workflow = parsedModel; } }); }) @@ -57,10 +60,6 @@ }); }; - vm.openScheduler = function() { - console.log("function for opening the scheduler app") - }; - vm.searchChanges = function() { console.log("function for searching changes: " + vm.searchChangesTerm) }; @@ -74,7 +73,8 @@ jobInfo: function () { return jobInfo; } - } + }, + }); modalInstance.result.then(function (result) { @@ -115,12 +115,12 @@ console.log("This is the result of the alert change management modal.", result); }); }; - - vm.openPendingModal = function(jobInfo) { + vm.openBasicAlertModal = function(jobInfo) { var modalInstance = $uibModal.open({ - templateUrl: 'app/vid/scripts/modals/pending-change-management/pending-change-management.html', - controller: 'changeManagementManualTasksController', + templateUrl: 'app/vid/scripts/modals/alert-modal/alert-modal.html', + controller: 'alertModalController', controllerAs: 'vm', + appendTo: angular.element(".jobs-table").eq(0), resolve: { jobInfo: function () { return jobInfo; @@ -129,10 +129,51 @@ }); modalInstance.result.then(function (result) { - console.log("This is the result of the pending change management modal.", result); + console.log("This is the result of the alert change management modal.", result); }); }; + vm.openPendingModal = function($event, changeManagement) { + var modalInstance = $uibModal.open({ + templateUrl: 'app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.html', + controller: 'cancelPendingWorkflowController', + controllerAs: 'vm', + backdrop: false, + animation: true, + appendTo: angular.element($event.currentTarget).parent(), + resolve: { + changeManagement: function () { + return changeManagement; + } + } + }); + + modalInstance.result.then(function (result) { + // send to service + if(result){ + SchedulerService.cancelScheduleRequest(changeManagement.scheduleRequest.scheduleId, + function(response) { + + //success popup + var jobInfo= { + status:"success", + message: "Cancel workflow "+changeManagement.scheduleRequest.scheduleName+" succeeded."}; + vm.openBasicAlertModal(jobInfo); + + return response; + }, function(error) { + + //failed popup + var jobInfo = { + status:"failed", + message: "Cancel workflow "+changeManagement.scheduleRequest.scheduleName+" failed due to an unexpected error."}; + vm.openBasicAlertModal(jobInfo); + + }); + }}); + + }; + - init(); + vm.init(); } })();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/deletionDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js index 499a1ec02..9715484d4 100755..100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/deletionDialogController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/deleteResumeDialogController.js @@ -1,123 +1,148 @@ -/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-"use strict";
-
-var deletionDialogController = function( COMPONENT, FIELD, $scope, $http, $timeout, $log,
- DeletionService, UtilityService) {
-
- $scope.isDialogVisible = false;
- $scope.summaryControl = {};
- $scope.userProvidedControl = {};
-
- var callbackFunction = undefined;
- var componentId = undefined;
-
- $scope.$on(COMPONENT.DELETE_COMPONENT, function(event, request) {
-
- $scope.isDataVisible = false;
- $scope.isSpinnerVisible = false;
- $scope.isErrorVisible = false;
- $scope.isDialogVisible = true;
- $scope.popup.isVisible = true;
- $scope.isConfirmEnabled = false;
-
- callbackFunction = request.callbackFunction;
- componentId = request.componentId;
-
- DeletionService.initializeComponent(request.componentId);
-
- $scope.componentName = DeletionService.getComponentDisplayName();
-
- $scope.summaryControl.setList(DeletionService.getSummaryList());
-
- DeletionService.getParameters(handleGetParametersResponse);
-
- });
-
- var handleGetParametersResponse = function(parameters, dontshow) {
- $scope.summaryControl.setList(parameters.summaryList);
- $scope.userProvidedControl.setList(parameters.userProvidedList);
-
- $scope.isSpinnerVisible = false;
- if (dontshow)
- $scope.isDataVisible = false;
- else
- $scope.isDataVisible = true;
- $scope.isConfirmEnabled = true;
- };
-
- $scope.userParameterChanged = function(id) {
- DeletionService.updateUserParameterList(id, $scope.userProvidedControl);
- }
-
- $scope.confirm = function() {
-
- var requiredFields = $scope.userProvidedControl.getRequiredFields();
- if (requiredFields === "") {
- $scope.isErrorVisible = false;
- } else {
- showError(FIELD.ERROR.MISSING_DATA, requiredFields);
- return;
- }
-
-
- var requestDetails = DeletionService.getMsoRequestDetails($scope.userProvidedControl.getList());
-
- if(DeletionService.isMacro === true){
- requestDetails.requestParameters.aLaCarte = false;
- }
-
- $scope.isDialogVisible = false;
-
- $scope.$broadcast(COMPONENT.MSO_DELETE_REQ, {
- url : DeletionService.getMsoUrl(),
- requestDetails : requestDetails,
- componentId: componentId,
- callbackFunction : function(isSuccessful) {
- if (isSuccessful) {
- $scope.popup.isVisible = false;
- runCallback(true);
- } else {
- $scope.isDialogVisible = true;
- }
- }
- });
-
- }
-
- $scope.cancel = function() {
- $scope.isDialogVisible = false;
- $scope.popup.isVisible = false;
- runCallback(false);
- }
-
- var runCallback = function(isSuccessful) {
- if (angular.isFunction(callbackFunction)) {
- callbackFunction({
- isSuccessful : isSuccessful
- });
- }
- }
-}
-
-appDS2.controller("deletionDialogController", [ "COMPONENT", "FIELD", "$scope", "$http",
- "$timeout", "$log", "DeletionService", "UtilityService",
- deletionDialogController ]);
+/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var deleteResumeDialogController = function( COMPONENT, FIELD, $scope, $http, $timeout, $log, + DeleteResumeService, CreationService, UtilityService) { + + $scope.isDialogVisible = false; + $scope.summaryControl = {}; + $scope.userProvidedControl = {}; + + var callbackFunction = undefined; + var componentId = undefined; + + $scope.$on(COMPONENT.DELETE_RESUME_COMPONENT, function(event, request) { + + $scope.isDataVisible = false; + $scope.isSpinnerVisible = false; + $scope.isErrorVisible = false; + $scope.isDialogVisible = true; + $scope.popup.isVisible = true; + $scope.isConfirmEnabled = false; + $scope.dialogMethod = request.dialogMethod; + callbackFunction = request.callbackFunction; + componentId = request.componentId; + + DeleteResumeService.initializeComponent(request.componentId); + + $scope.componentName = DeleteResumeService.getComponentDisplayName(); + + $scope.summaryControl.setList(DeleteResumeService.getSummaryList()); + + DeleteResumeService.getParameters(handleGetParametersResponse); + + }); + + var handleGetParametersResponse = function(parameters, dontshow) { + $scope.summaryControl.setList(parameters.summaryList); + $scope.userProvidedControl.setList(parameters.userProvidedList); + + $scope.isSpinnerVisible = false; + if (dontshow) + $scope.isDataVisible = false; + else + $scope.isDataVisible = true; + $scope.isConfirmEnabled = true; + }; + + $scope.userParameterChanged = function(id) { + DeleteResumeService.updateUserParameterList(id, $scope.userProvidedControl); + } + + $scope.confirm = function() { + var requiredFields = $scope.userProvidedControl.getRequiredFields(); + if (requiredFields === "") { + $scope.isErrorVisible = false; + } else { + showError(FIELD.ERROR.MISSING_DATA, requiredFields); + return; + } + + + + var callbackAfterMSO = function(isSuccessful) { + if (isSuccessful) { + $scope.popup.isVisible = false; + runCallback(true); + } else { + $scope.isDialogVisible = true; + } + }; + + + $scope.isDialogVisible = false; + + if ($scope.dialogMethod == COMPONENT.DELETE) + { + + var requestDetails = DeleteResumeService.getMsoRequestDetails($scope.userProvidedControl.getList()); + + if(DeleteResumeService.isMacro === true){ + requestDetails.requestParameters.aLaCarte = false; + } + + $scope.$broadcast(COMPONENT.MSO_DELETE_REQ, { + url : DeleteResumeService.getMsoUrl(), + requestDetails : requestDetails, + componentId: componentId, + callbackFunction : callbackAfterMSO + }); + } + else + if ($scope.dialogMethod == COMPONENT.RESUME) + { + CreationService.initializeComponent(componentId); + CreationService.setInventoryInfo(); + + var requestDetails = CreationService.getMsoRequestDetails($scope.userProvidedControl.getList()); + + + $scope.$broadcast(COMPONENT.MSO_CREATE_REQ, { + url : CreationService.getMsoUrl(), + requestDetails : requestDetails, + componentId: componentId, + callbackFunction : callbackAfterMSO + }); + + + } + + } + + $scope.cancel = function() { + $scope.isDialogVisible = false; + $scope.popup.isVisible = false; + runCallback(false); + } + + var runCallback = function(isSuccessful) { + if (angular.isFunction(callbackFunction)) { + callbackFunction({ + isSuccessful : isSuccessful + }); + } + } +} + +appDS2.controller("deleteResumeDialogController", [ "COMPONENT", "FIELD", "$scope", "$http", + "$timeout", "$log", "DeleteResumeService","CreationService", "UtilityService", + deleteResumeDialogController]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js index 65fac289a..dd3ba50f0 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitController.js @@ -64,25 +64,42 @@ */
var msoCommitController = function(COMPONENT, FIELD, $scope, $http, $timeout, $window, $log,
- MsoService, PropertyService, UtilityService, DataService) {
+ MsoService, PropertyService, UtilityService, TestEnvironmentsService) {
$scope.isViewVisible = false;
$scope.progressBarControl = {};
$scope.popupWindowControl = {};
-
+ var getRequestStatusFunc = getOrchestrationRequestStatus; //default
var _this = this;
$scope.$on("createInstance", function(event, request) {
- init(request, COMPONENT.MSO_CREATE_REQ );
+ init(request, COMPONENT.MSO_CREATE_REQ, getOrchestrationRequestStatus );
MsoService.createInstance(request, handleInitialResponse);
});
$scope.$on("deleteInstance", function(event, request) {
- init(request, COMPONENT.MSO_DELETE_REQ);
+ init(request, COMPONENT.MSO_DELETE_REQ, getOrchestrationRequestStatus);
MsoService.deleteInstance(request, handleInitialResponse);
});
- var init = function(request, msoRequestType ) {
+ $scope.$on(COMPONENT.MSO_CREATE_ENVIRONMENT, function(event, request) {
+ init(request, COMPONENT.MSO_CREATE_ENVIRONMENT, getCloudResourcesRequestStatus);
+ TestEnvironmentsService.createApplicationEnv(request).then(handleInitialResponse);
+ });
+
+ $scope.$on(COMPONENT.MSO_DEACTIVATE_ENVIRONMENT, function(event, request) {
+ init(request, COMPONENT.MSO_DEACTIVATE_ENVIRONMENT, getCloudResourcesRequestStatus);
+ TestEnvironmentsService.deactivateApplicationEnv(request).then(handleInitialResponse)
+ });
+
+ $scope.$on(COMPONENT.MSO_ACTIVATE_ENVIRONMENT, function(event, request) {
+ init(request, COMPONENT.MSO_ACTIVATE_ENVIRONMENT, getCloudResourcesRequestStatus);
+ TestEnvironmentsService.activateApplicationEnv(request).then(handleInitialResponse)
+ });
+
+
+ var init = function(request, msoRequestType, getStatusRequest ) {
+ getRequestStatusFunc = getStatusRequest;
$scope.status = FIELD.STATUS.SUBMITTING_REQUEST;
$scope.isSpinnerVisible = true;
$scope.isProgressVisible = true;
@@ -109,13 +126,13 @@ var msoCommitController = function(COMPONENT, FIELD, $scope, $http, $timeout, $w showError(FIELD.ERROR.SYSTEM_FAILURE, UtilityService
.getHttpErrorMessage(response));
});
- }
+ };
var handleInitialResponse = function(response) {
try {
updateViewAfterInitialResponse(response);
- _this.timer = $timeout(getRequestStatus, PropertyService
+ _this.timer = $timeout(getRequestStatusFunc, PropertyService
.getMsoMaxPollingIntervalMsec());
$scope.instanceId = response.data.entity.instanceId;
@@ -133,11 +150,16 @@ var msoCommitController = function(COMPONENT, FIELD, $scope, $http, $timeout, $w }
}
- var getRequestStatus = function() {
- MsoService.getOrchestrationRequest(_this.requestId, handleGetResponse);
+ function getOrchestrationRequestStatus() {
+ MsoService.getOrchestrationRequest(_this.requestId, handleGetStatusResponse);
}
- var handleGetResponse = function(response) {
+ function getCloudResourcesRequestStatus() {
+ TestEnvironmentsService.getRequestStatus(_this.requestId, handleGetStatusResponse);
+ }
+
+
+ var handleGetStatusResponse = function(response) {
try {
if (isUpdateViewAfterGetResponseComplete(response)) {
return;
@@ -147,7 +169,7 @@ var msoCommitController = function(COMPONENT, FIELD, $scope, $http, $timeout, $w _this.isMsoError = true;
showError(FIELD.ERROR.MAX_POLLS_EXCEEDED);
} else {
- _this.timer = $timeout(getRequestStatus, PropertyService
+ _this.timer = $timeout(getRequestStatusFunc, PropertyService
.getMsoMaxPollingIntervalMsec());
}
} catch (error) {
@@ -296,5 +318,5 @@ var msoCommitController = function(COMPONENT, FIELD, $scope, $http, $timeout, $w }
appDS2.controller("msoCommitController", [ "COMPONENT", "FIELD", "$scope", "$http", "$timeout",
- "$window", "$log", "MsoService", "PropertyService", "UtilityService",
+ "$window", "$log", "MsoService", "PropertyService", "UtilityService", "TestEnvironmentsService",
msoCommitController ]);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js new file mode 100644 index 000000000..148b4ccec --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/msoCommitModalController.js @@ -0,0 +1,237 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var msoCommitModalController = function(COMPONENT, FIELD, $scope, $http, $timeout, $window, $log, + MsoService, PropertyService, UtilityService, DataService, $uibModalInstance, msoType, requestParams, vidService) { + + $scope.isSpinnerVisible = true; + $scope.isProgressVisible = true; + $scope.status = FIELD.STATUS.SUBMITTING_REQUEST; + $scope.error = ""; + $scope.log = ""; + $scope.progressBarControl = {}; + $scope.isCloseEnabled = false; + + var _this = this; + _this.pollAttempts = 0; + _this.callbackFunction = requestParams.callbackFunction; + _this.isMsoError = false; + + + if (angular.isFunction($scope.progressBarControl.reset)) { + $scope.progressBarControl.reset(); + } + $scope.percentProgress = 2; // Show "a little" progress + + + /* + * Updates the view and returns "true" if the MSO operation has returned a + * "Complete" status. + */ + var isUpdateViewAfterGetResponseComplete = function(response) { + //console.log("msoCommitController isUpdateViewAfterGetResponseComplete"); + updateLogFinalResponse(response); + + var requestStatus = UtilityService.checkUndefined(FIELD.ID.REQUEST_STATUS, + UtilityService.checkUndefined(FIELD.ID.REQUEST, + response.data.entity.request).requestStatus); + + var requestState = requestStatus.requestState; + console.log("msoCommitController requestState=" + requestState); + // look for "progress" or "pending" + var patt1 = /progress/i; + var patt2 = /pending/i; + var result1 = patt1.test(requestState); + var result2 = patt2.test(requestState); + if (result1 || result2) { + requestState = FIELD.STATUS.IN_PROGRESS; + } + var statusMessage = requestStatus.statusMessage; + console.log("msoCommitController statusMessage=" + statusMessage); + if (UtilityService.hasContents(statusMessage)) { + $scope.status = requestState + " - " + statusMessage; + } else { + $scope.status = requestState; + } + if (UtilityService.hasContents(requestStatus.percentProgress)) { + $scope.percentProgress = requestStatus.percentProgress; + } + + if ( (requestState.toLowerCase() === FIELD.STATUS.FAILED.toLowerCase()) || (requestState.toLowerCase() === FIELD.STATUS.UNLOCKED.toLowerCase())) { + throw { + type : FIELD.STATUS.MSO_FAILURE + }; + } + + if (requestState.toLowerCase() === FIELD.STATUS.COMPLETE.toLowerCase()) { + $scope.isSpinnerVisible = false; + return true; + } + + return false; + }; + + var handleGetResponse = function(response) { + try { + if (isUpdateViewAfterGetResponseComplete(response)) { + return; + } + if (++_this.pollAttempts > PropertyService.getMsoMaxPolls()) { + _this.isMsoError = true; + showError(FIELD.ERROR.MAX_POLLS_EXCEEDED); + } else { + _this.timer = $timeout(getRequestStatus, PropertyService + .getMsoMaxPollingIntervalMsec()); + } + } catch (error) { + _this.isMsoError = true; + MsoService.showResponseContentError(error, showError); + } + }; + + var showError = function(summary, details) { + var message = summary; + if (UtilityService.hasContents(details)) { + message += " (" + details + ")"; + } + $scope.isSpinnerVisible = false; + $scope.isProgressVisible = false; + $scope.error = message; + $scope.status = FIELD.STATUS.ERROR; + }; + + var getRequestStatus = function() { + MsoService.getOrchestrationRequest(_this.requestId, handleGetResponse); + }; + + var updateLog = function(response) { + $scope.log = MsoService.getFormattedCommonResponse(response) + + $scope.log; + UtilityService.checkUndefined("entity", response.data.entity); + UtilityService.checkUndefined("status", response.data.status); + MsoService.checkValidStatus(response); + }; + + var updateLogFinalResponse = function(response) { + $scope.log = MsoService.getFormattedSingleGetOrchestrationRequestResponse(response) + + $scope.log; + UtilityService.checkUndefined("entity", response.data.entity); + UtilityService.checkUndefined("status", response.data.status); + MsoService.checkValidStatus(response); + }; + + var updateViewAfterInitialResponse = function(response) { + $scope.isCloseEnabled = true; + updateLog(response); + + _this.requestId = UtilityService.checkUndefined(FIELD.ID.REQUEST_ID, + UtilityService.checkUndefined(FIELD.ID.REQUEST_REFERENCES, + response.data.entity.requestReferences).requestId); + + $scope.percentProgress = 4; // Show "a little more" progress + $scope.status = FIELD.STATUS.IN_PROGRESS; + }; + + var init = function(msoType) { + switch(msoType) { + case COMPONENT.MSO_CREATE_REQ: + return MsoService.createConfigurationInstance(requestParams); + case COMPONENT.MSO_CHANGE_CONFIG_STATUS_REQ: + return MsoService.toggleConfigurationStatus(requestParams); + case COMPONENT.MSO_CHANGE_PORT_STATUS_REQ: + return MsoService.togglePortStatus(requestParams); + case COMPONENT.MSO_CREATE_REALATIONSHIP: + return MsoService.associatePnf(requestParams); + case COMPONENT.MSO_REMOVE_RELATIONSHIP: + return MsoService.dissociatePnf(requestParams); + case COMPONENT.MSO_ACTIVATE_SERVICE_REQ: + return MsoService.activateInstance(requestParams); + case COMPONENT.MSO_DEACTIVATE_SERVICE_REQ: + return MsoService.deactivateInstance(requestParams); + } + }; + + var successCallbackFunction = function(response) { + try { + updateViewAfterInitialResponse(response); + _this.timer = $timeout(getRequestStatus, PropertyService + .getMsoMaxPollingIntervalMsec()); + + $scope.instanceId = response.data.entity.instanceId; + if ($scope.instanceId == null) { + $scope.instanceId = response.data.entity.requestReferences.instanceId; + } + } catch (error) { + if ( response.data != null && response.data.status != null ) { + if (response.data.status > 299 || response.data.status < 200 ) { + // MSO returned an error + _this.isMsoError = true; + } + } + MsoService.showResponseContentError(error, showError); + } + }; + + var errorCallbackFunction = function (error) { + UtilityService.setHttpErrorHandler(function(error) { + $scope.isCloseEnabled = true; + _this.isMsoError = true; + showError(FIELD.ERROR.SYSTEM_FAILURE, UtilityService + .getHttpErrorMessage(error)); + }); + }; + + $scope.close = function() { + $uibModalInstance.dismiss('cancel'); + + if (_this.timer !== undefined) { + $timeout.cancel(_this.timer); + } + + if (angular.isFunction(_this.callbackFunction)) { + if ($scope.error === "") { + _this.callbackFunction({ + isSuccessful : true, + instanceId : $scope.instanceId + }); + } else { + _this.callbackFunction({ + isSuccessful : false + }); + } + } + }; + + _this.msoRequestType = msoType; + + init(_this.msoRequestType) + .then(function (response) { + successCallbackFunction(response); + }) + .catch(function (error) { + errorCallbackFunction(error); + }); +}; + +appDS2.controller("msoCommitModalController", [ "COMPONENT", "FIELD", "$scope", "$http", "$timeout", + "$window", "$log", "MsoService", "PropertyService", "UtilityService", "DataService", "$uibModalInstance", "msoType", "requestParams", "vidService", + msoCommitModalController ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/pnfSearchAssociationController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/pnfSearchAssociationController.js new file mode 100644 index 000000000..22a20abf8 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/pnfSearchAssociationController.js @@ -0,0 +1,138 @@ +/*- +* ============LICENSE_START======================================================= +* VID +* ================================================================================ +* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +* ================================================================================ +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* ============LICENSE_END========================================================= +*/ + +/** + * The Instantiation (or View/Edit) Controller controls the instantiation/removal of + * deployable objects (Services, VNFs, VF-Modules, Networks, and Volume-Groups) + */ + +"use strict"; + +appDS2.controller("pnfSearchAssociationController", ["COMPONENT", "$log", "FIELD", "PARAMETER", "DataService", "CreationService", "$scope", "$window", "$location", "AaiService", "$uibModal", "UtilityService", "vidService", "$timeout", + function (COMPONENT, $log, FIELD, PARAMETER, DataService, CreationService, $scope, $window, $location, AaiService, $uibModal, UtilityService, vidService, $timeout) { + + var requestParams = {}; + + $scope.selectedMetadata = {}; + + $scope.serviceMetadataFields = []; + $scope.nodeTemplateFields = {}; + + $scope.pnfInstance= false; + $scope.notFound= false; + + $scope.pnfMetadata = []; + + $scope.errorMsg = FIELD.ERROR.INSTANCE_NAME_VALIDATE; + + $scope.modelName = DataService.getModelInfo(COMPONENT.VNF).modelCustomizationName; + + var handleGetParametersResponse = function(parameters) { + $scope.serviceMetadataFields = parameters.summaryList; + $scope.serviceMetadataFields.forEach(function (t, number) { + $scope.serviceMetadataFields[number].key = $scope.serviceMetadataFields[number].name.split(' ').join('') + }) + $scope.nodeTemplateFields = _.keyBy(parameters.userProvidedList, 'id'); + }; + + CreationService.initializeComponent(COMPONENT.VNF); + + CreationService.getParameters(handleGetParametersResponse); + + $scope.back = function() { + $window.history.back(); + }; + + $scope.searchPnf = function(pnfName) { + $scope.pnfInstance= false; + $scope.notFound=false; + + AaiService.getPnfByName(pnfName) + .then(function (response) { + $scope.pnfInstance = response.data; + requestParams.pnf = response.data.pnfName; + }) + .catch(function (error) { + $scope.pnfNameNotFound= pnfName; + $scope.notFound= true; + }); + + } + var modalInstance; + + $scope.associate = function() { + + requestParams.serviceModelInfo = vidService.getModel().service; + requestParams.attuuid = DataService.getLoggedInUserId(); + requestParams.instanceId = DataService.getServiceInstanceId(); + + modalInstance = $uibModal.open({ + templateUrl: 'app/vid/scripts/modals/mso-commit/mso-commit.html', + controller: "msoCommitModalController", + backdrop: false, + resolve: { + msoType: function () { + return COMPONENT.MSO_CREATE_REALATIONSHIP; + }, + requestParams: function () { + requestParams.callbackFunction = updateViewCallbackFunction; + return requestParams; + } + } + }) + + + }; + + var updateViewCallbackFunction = function(response) { + $scope.callbackResults = ""; + var color = FIELD.ID.COLOR_NONE; + $scope.callbackStyle = { + "background-color" : color + }; + + /* + * This 1/2 delay was only added to visually highlight the status + * change. Probably not needed in the real application code. + */ + $timeout(function() { + $scope.callbackResults = UtilityService.getCurrentTime() + + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful; + if (response.isSuccessful) { + color = FIELD.ID.COLOR_8F8; + $scope.back(); + } else { + color = FIELD.ID.COLOR_F88; + } + $scope.callbackStyle = { + "background-color" : color + }; + }, 500); + }; + + + $scope.cancel = function() { + modalInstance.dismiss('cancel'); + }; + + + }]); + + diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js new file mode 100644 index 000000000..f5c3a0e0a --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/testEnvironmentsController.js @@ -0,0 +1,102 @@ +(function () { + 'use strict'; + + appDS2.controller("testEnvironmentsController", ["$uibModal", "TestEnvironmentsService", "$log", "$rootScope", "$scope", "COMPONENT", testEnvironmentsController]); + + function testEnvironmentsController($uibModal, TestEnvironmentsService, $log, $rootScope, $scope, COMPONENT) { + var vm = this; + + var toggleValue; + + var init = function() { + vm.loadAAIestEnvironments(); + }; + + vm.loadAAIestEnvironments = function() { + TestEnvironmentsService.loadAAIestEnvironments("VNF") + .then(function(response) { + vm.environments = response.operationalEnvironment; + vm.connectError = false; + if(!vm.environments.length) { + vm.emptyData = true; + } + }) + .catch(function (error) { + vm.connectError = error.message || "Unknown error"; + $log.error(error); + }); + }; + + function handleEnvActionComplete(result) { + if (result.isSuccessful) { + vm.loadAAIestEnvironments(); + } + $scope.popup.isVisible = false; + } + + vm.onTestEnvActivateClick = function(testEnv) { + var modalInstance = $uibModal.open({ + templateUrl: 'app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.html', + controller: 'attachTestEnvManifestController', + controllerAs: 'vm', + resolve: {} + }); + + modalInstance.result.then(function (result) { + if (result) { + + var relatedEcompEnv = _.find(testEnv.relationshipList.relationship, { relatedTo: "operational-environment" }); + + var manifest = result; + var envId = testEnv.operationalEnvironmentId; + var relatedInstanceId = + _.find(relatedEcompEnv.relationshipData, {"relationshipKey": "operational-environment.operational-environment-id"}) + .relationshipValue; + var relatedInstanceName = + _.find(relatedEcompEnv.relatedToProperty, {"propertyKey": "operational-environment.operational-name"}) + .propertyValue; + var workloadContext = testEnv.workloadContext; + + $rootScope.$broadcast(COMPONENT.MSO_ACTIVATE_ENVIRONMENT, { + url: COMPONENT.MSO_ACTIVATE_ENVIRONMENT, + envId: envId, + relatedInstanceId: relatedInstanceId, + relatedInstanceName: relatedInstanceName, + workloadContext: workloadContext, + manifest: manifest, + callbackFunction: handleEnvActionComplete + }); + + } + }); + }; + + vm.onTestEnvDeactivateClick = function(testEnv) { + var envId = testEnv.operationalEnvironmentId; + $rootScope.$broadcast(COMPONENT.MSO_DEACTIVATE_ENVIRONMENT, { + url : COMPONENT.MSO_DEACTIVATE_ENVIRONMENT, + envId : envId, + callbackFunction: handleEnvActionComplete + }); + }; + + vm.isEnvActive = function(testEnv) { + return testEnv.operationalEnvironmentStatus==='Activate'; + }; + + vm.getEnvStatus = function (testEnv) { + return this.isEnvActive(testEnv) ? "Active" : "Inactive"; + }; + + vm.createNewTestEnvironment = function() { + var modalInstance = $uibModal.open({ + templateUrl: 'app/vid/scripts/modals/new-test-environment/new-test-environment.html', + controller: 'newTestEnvironmentModalController', + controllerAs: 'vm', + resolve: {} + }); + }; + + init(); + } +})();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/messageViewer.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/messageViewer.js new file mode 100644 index 000000000..8ff67fac1 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/messageViewer.js @@ -0,0 +1,17 @@ +"use strict"; + +appDS2.directive('messageViewer', function() { + return { + restrict : "E", + templateUrl: 'app/vid/scripts/view-models/messageViewer.htm', + scope: { + primaryMessage:'@', + icon:'@', + secondaryMessage:'@', + tryAgain:'&' + }, + link: function(scope, elem, attrs) { + scope.showTryAgain = angular.isDefined(attrs.tryAgain); + } + } +});
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js index e57b43ec4..d36b3823f 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js @@ -20,7 +20,7 @@ "use strict";
-var parameterBlockDirective = function($log, PARAMETER, UtilityService) {
+var parameterBlockDirective = function($log, PARAMETER, UtilityService, $compile) {
/*
* If "IS_SINGLE_OPTION_AUTO_SELECTED" is set to "true" ...
*
@@ -221,6 +221,9 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) { + additionalStyle + "'>" + getOptionListHtml(parameter)
+ "</select>";
break;
+ case PARAMETER.MULTI_SELECT:
+ return '<multiselect id="' + parameter.id + '"' + attributeString + ' ng-model="multiselectModel.' + parameter.id + '" options="getOptionsList(\'' + parameter.id + '\')" display-prop="name" id-prop="id"></multiselect>';
+ break;
case PARAMETER.STRING:
default:
var value = "";
@@ -255,9 +258,7 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) { }
if (UtilityService.hasContents(parameter.prompt)) {
- if (!(IS_SINGLE_OPTION_AUTO_SELECTED && parameter.optionList.length === 1) || !(parameter.isSingleOptionAutoSelected && parameter.optionList.length === 1)) {
html += "<option value=''>" + parameter.prompt + "</option>";
- }
}
for (var i = 0; i < parameter.optionList.length; i++) {
@@ -298,7 +299,7 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) { var getParameter = function(element, expectedId) {
var id = $(element).attr("parameter-id");
- if (expectedId !== undefined && expectedId !== id) {
+ if (!id || (expectedId !== undefined && expectedId !== id)) {
return undefined;
}
var parameter = {
@@ -327,14 +328,20 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) { };
var getRequiredField = function(element) {
- if ($(element).prop("type") === "text") {
- $(element).val($(element).val().trim());
+ if($(element).is("multiselect")) {
+ if(!$(element).find(".active").text().trim()) {
+ return '"' + $(element).attr("parameter-name") + '"';
+ }
}
- if ($(element).val() === "" || $(element).val() === null) {
- return '"' + $(element).attr("parameter-name") + '"';
- } else {
- return "";
+ else {
+ if ($(element).prop("type") === "text") {
+ $(element).val($(element).val().trim());
+ }
+ if ($(element).val() === "" || $(element).val() === null) {
+ return '"' + $(element).attr("parameter-name") + '"';
+ }
}
+ return "";
};
var callback = function(element, scope) {
@@ -354,13 +361,20 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) { link : function(scope, element, attrs) {
var control = scope.control || {};
+ scope.multiselectModel = {};
+ scope.getOptionsList = function (parameterId) {
+ return _.find(scope.parameterList, {'id': parameterId})["optionList"];
+ };
control.setList = function(parameterList) {
+ scope.parameterList = parameterList;
+ scope.multiselectModel = {};
var html = "";
for (var i = 0; i < parameterList.length; i++) {
html += getParameterHtml(parameterList[i], attrs.editable);
}
- element.html(html);
+ element.replaceWith($compile(element.html(html))(scope));
+
element.find("input, select").bind("change", function() {
callback(this, scope);
});
@@ -390,13 +404,16 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) { parameterList.push(parameter);
}
});
+ angular.forEach(scope.multiselectModel, function(value, key) {
+ parameterList.push({id: key, value: value});
+ });
return parameterList;
}
control.getRequiredFields = function() {
var requiredFields = "";
var count = 0;
- element.find("input, select").each(function() {
+ element.find("input, select, multiselect").each(function() {
if ($(this).attr("is-required") === "true") {
var requiredField = getRequiredField(this);
if (requiredField !== "") {
@@ -418,7 +435,7 @@ var parameterBlockDirective = function($log, PARAMETER, UtilityService) { }
}
-appDS2.directive('parameterBlock', [ "$log", "PARAMETER", "UtilityService",
+appDS2.directive('parameterBlock', [ "$log", "PARAMETER", "UtilityService", "$compile",
parameterBlockDirective ]);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js.orig b/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js.orig deleted file mode 100644 index 0e937826a..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/directives/parameterBlockDirective.js.orig +++ /dev/null @@ -1,507 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -"use strict"; - -var parameterBlockDirective = function($log, PARAMETER, UtilityService) { - /* - * If "IS_SINGLE_OPTION_AUTO_SELECTED" is set to "true" ... - * - * IF these 3 conditions all exist: - * - * 1) The parameter type is PARAMETER.SELECT - * - * 2) AND the "prompt" attribute is set to a string. - * - * 3) AND the optionList" only contains a single entry - * - * THEN the "prompt" will not be displayed as an initial select option. - */ - - var IS_SINGLE_OPTION_AUTO_SELECTED = true; - - /* - * Optionally remove "nameStyle" and "valueStyle" "width" entries to set - * dynamic sizing. - */ - var tableStyle = "width: auto; margin: 0 auto; border-collapse: collapse; border: none;"; - var nameStyle = "width: 220px; text-align: left; vertical-align: middle; font-weight: bold; padding: 3px 5px; border: none;"; - var valueStyle = "width: 400px; text-align: left; vertical-align: middle; padding: 3px 5px; border: none;"; - var checkboxValueStyle = "width: 400px; text-align: center; vertical-align: middle; padding: 3px 5px; border: none;" - var textInputStyle = "height: 25px; padding: 2px 5px;"; - var checkboxInputStyle = "height: 18px; width: 18px; padding: 2px 5px;"; - var selectStyle = "height: 25px; padding: 2px; text-align: center;"; - var requiredLabelStyle = "width: 25px; padding: 5px 10px 10px 5px;"; - - - var getParameterHtml = function(parameter, editable) { - var style = valueStyle; - var attributeString = ""; - if (parameter.type === PARAMETER.BOOLEAN) { - style = checkboxValueStyle; - } - if (UtilityService.hasContents(parameter.description)) { - attributeString += " title=' " + parameter.description + " '"; - } - var rowstyle=''; - if(parameter.type == 'file' && !parameter.isVisiblity){ - rowstyle = ' style="display:none;"'; - } - var html = "<tr"+rowstyle+"><td style='" + nameStyle + "'" + attributeString + ">" - + getNameHtml(parameter) + "</td>"; - if (editable === undefined) { - if (UtilityService.hasContents(parameter.value)) { - html += "<td data-tests-id='" + getParameterName(parameter) + "' style='" + style + "'>" + parameter.value; - } else { - html += "<td data-tests-id='" + getParameterName(parameter) + "' style='" + style + "'>"; - } - } else { - html += "<td style='" + style + "'>" + getValueHtml(parameter); - } - html += "</td></tr>"; - return html; - }; - - var updateParameter = function(parameter, element, editable) { - $(element).parent().parent().children("td").first().html( - getNameHtml(parameter)); - if (editable === undefined) { - $(element).html(parameter.value); - } else { - $(element).parent().html(getValueHtml(parameter)); - } - }; - - var getNameHtml = function(parameter) { - if (parameter.isVisible === false) { - return ""; - } - var name = getParameterName(parameter); - - var requiredLabel = ""; - if (parameter.isRequired) { - requiredLabel = "<img src='app/vid/images/asterisk.png' style='" - + requiredLabelStyle + "'></img>"; - } - return name + ":" + requiredLabel; - }; - - var getParameterName = function(parameter) { - var name = ""; - if (UtilityService.hasContents(parameter.name)) { - name = parameter.name; - } else { - name = parameter.id; - } - return name; - } - - var getValueHtml = function(parameter) { - - var textInputPrompt = "Enter data"; - var attributeString = " data-tests-id='" + parameter.id +"' parameter-id='" + parameter.id + "'"; - var additionalStyle = ""; - if (parameter.isEnabled === false) { - attributeString += " disabled='disabled'"; - } - if (parameter.isRequired) { - attributeString += " is-required='true'"; - } - if (UtilityService.hasContents(parameter.description)) { - attributeString += " title=' " + parameter.description + " '"; - } - if (UtilityService.hasContents(parameter.isReadOnly) && (parameter.isReadOnly === true)) { - attributeString += " readonly"; - } - if ( (UtilityService.hasContents(parameter.maxLength)) && (UtilityService.hasContents(parameter.minLength)) ) { - attributeString += " pattern='.{" + parameter.minLength + "," + parameter.maxLength + "}' required"; - } - else if (UtilityService.hasContents(parameter.maxLength)) { - attributeString += " maxlength='" + parameter.maxLength + "'"; - } - else if (UtilityService.hasContents(parameter.minLength)) { - attributeString += " pattern='.{" + parameter.minLength + ",}'" - } - if (parameter.isVisible === false) { - additionalStyle = " visibility: hidden;"; - } - - var name = ""; - if (UtilityService.hasContents(parameter.name)) { - name = parameter.name; - } else { - name = parameter.id; - } - attributeString += " parameter-name='" + name + "'"; - - if ( parameter.type === PARAMETER.MAP ) { - textInputPrompt = "{<key1>: <value1>,\.\.\.,<keyN>: <valueN>}"; - } - - if ( parameter.type === PARAMETER.LIST ) { - textInputPrompt = "[<value1>,\.\.\.,<valueN>]"; - } - - switch (parameter.type) { - case PARAMETER.BOOLEAN: - if (parameter.value) { - return "<select" + attributeString + " style='" + selectStyle - + additionalStyle + "'>" + "<option value=true>true</option>" - + "<option value=false>false</option>"; - + "</select>"; - }else{ - return "<select" + attributeString + " style='" + selectStyle - + additionalStyle + "'>" + "<option value=false>false</option>" - + "<option value=true>true</option>" - + "</select>"; - } - break; - case PARAMETER.CHECKBOX: - if (parameter.value) { - return "<input type='checkbox' "+attributeString+ " checked='checked' style='"+checkboxInputStyle+"'" - + " value='true'/>"; - }else{ - return "<input type='checkbox' "+attributeString+ "' style='"+checkboxInputStyle+"'" - + " value='false'/>"; - } - break; - case PARAMETER.FILE: - return "<input type='file' "+attributeString+ " id='"+parameter.id+"' value='"+parameter.value+"'/>"; - break; - case PARAMETER.NUMBER: - var value=parameter.value; - var parameterSpec = "<input type='number'" + attributeString + " style='" + textInputStyle + additionalStyle + "'"; - - if ( UtilityService.hasContents(parameter.min) ) { - parameterSpec += " min='" + parameter.min + "'"; - } - if ( UtilityService.hasContents(parameter.max) ) { - parameterSpec += " max='" + parameter.max + "'"; - } - if (UtilityService.hasContents(value)) { - parameterSpec += " value='" + value + "'"; - } - parameterSpec += ">"; - - /*if(!isNaN(value) && value.toString().index('.') != -1){ - //float - return "<input type='text'" + attributeString + " style='" - + textInputStyle + additionalStyle + "' only-integers" + value - + "></input>"; - } else { - //integer - return "<input type='text'" + attributeString + " style='" - + textInputStyle + additionalStyle + "' only-float" + value - + "></input>"; - }*/ - return (parameterSpec); - break; - case PARAMETER.SELECT: - if (UtilityService.hasContents(parameter.prompt)) { - attributeString += " prompt='" + parameter.prompt + "'"; - } - return "<select" + attributeString + " style='" + selectStyle - + additionalStyle + "'>" + getOptionListHtml(parameter) - + "</select>"; - break; - case PARAMETER.STRING: - default: - var value = ""; - if (UtilityService.hasContents(parameter.value)) { - value = " value='" + parameter.value + "'"; - } - if (UtilityService.hasContents(parameter.prompt)) { - attributeString += " placeholder='" + parameter.prompt + "'"; - } else if (textInputPrompt !== "") { - attributeString += " placeholder='" + textInputPrompt + "'"; - } - var finalString = "<input type='text'" + attributeString + " style='" - + textInputStyle + additionalStyle + "'" + value - + ">"; - return finalString; - } - }; - - - var getBooleanListHtml = function(parameter){ - var html = ""; - - }; - - var getOptionListHtml = function(parameter) { - -<<<<<<< HEAD - var html = ""; - - if (!angular.isArray(parameter.optionList) - || parameter.optionList.length === 0) { - return ""; - } - - if (UtilityService.hasContents(parameter.prompt)) { - if (!(IS_SINGLE_OPTION_AUTO_SELECTED && parameter.optionList.length === 1) || !(parameter.isSingleOptionAutoSelected && parameter.optionList.length === 1)) { - html += "<option value=''>" + parameter.prompt + "</option>"; - } - } - - for (var i = 0; i < parameter.optionList.length; i++) { - var option = parameter.optionList[i]; - var name = option.name; - var value = ""; - if (option.id === undefined) { - value = option.name; - } else { - if (name === undefined) { - name = option.id; - } - value = option.id; - } - if (option.isDefault === undefined || option.isDefault === false ) { - html += "<option value='" + value + "'>" + name + "</option>"; - } - else { - html += "<option value='" + value + "' selected>" + name + "</option>"; - } - } - return html; -======= - var html = ""; - - if (!angular.isArray(parameter.optionList) - || parameter.optionList.length === 0) { - return ""; - } - - if (UtilityService.hasContents(parameter.prompt)) { - if (!(IS_SINGLE_OPTION_AUTO_SELECTED && parameter.optionList.length === 1)) { - html += "<option value=''>" + parameter.prompt + "</option>"; - } - } - - for (var i = 0; i < parameter.optionList.length; i++) { - var option = parameter.optionList[i]; - var name = option.name; - var value = ""; - if (option.id === undefined) { - value = option.name; - } else { - if (name === undefined) { - name = option.id; - } - value = option.id; - } - html += getOptionHtml(option.isPermitted, option.isDataLoading, value, name, parameter); - } - return html; ->>>>>>> 7e45cad... merge - }; - - function getOptionHtml(isPermitted, isDefault, value, name, parameter) { - var html = ""; - if (isDefault === undefined || isDefault === false ) { - if(isPermitted) - html = "<option class='" + parameter.id + "Option' value='" + value + "'>" + name + "</option>"; - else { - html = "<option class='" + parameter.id + "Option' value='" + value + "' disabled>" + name + "</option>"; - } - } - else { - if(isPermitted) - html = "<option class='" + parameter.id + "Option' value='" + value + "'>" + "' selected>" + name + "</option>"; - else { - html = "<option class='" + parameter.id + "Option' value='" + value + "' disabled>" + "' selected>" + name + "</option>"; - } - } - return html; - } - - var getParameter = function(element, expectedId) { - var id = $(element).attr("parameter-id"); - if (expectedId !== undefined && expectedId !== id) { - return undefined; - } - var parameter = { - id : id - }; - if ($(element).prop("type") === "checkbox") { - parameter.value = $(element).prop("checked"); - }else if ($(element).prop("type") === "file") { - parameter.value = $('#'+id).attr("value"); - - } else { - if ($(element).prop("type") === "text") { - $(element).val($(element).val().trim()); - } - parameter.value = $(element).val(); - } - if ($(element).prop("selectedIndex") === undefined) { - parameter.selectedIndex = -1; - } else { - parameter.selectedIndex = $(element).prop("selectedIndex"); - if (UtilityService.hasContents($(element).attr("prompt"))) { - parameter.selectedIndex--; - } - } - return parameter; - }; - - var getRequiredField = function(element) { - if ($(element).prop("type") === "text") { - $(element).val($(element).val().trim()); - } - if ($(element).val() === "" || $(element).val() === null) { - return '"' + $(element).attr("parameter-name") + '"'; - } else { - return ""; - } - }; - - var callback = function(element, scope) { - scope.callback({ - id : $(element).attr("parameter-id") - }); - }; - - return { - restrict : "EA", - replace : true, - template : "<div><table style='" + tableStyle + "'></table></div>", - scope : { - control : "=", - callback : "&" - }, - link : function(scope, element, attrs) { - - var control = scope.control || {}; - - control.setList = function(parameterList) { - var html = ""; - for (var i = 0; i < parameterList.length; i++) { - html += getParameterHtml(parameterList[i], attrs.editable); - } - element.html(html); - element.find("input, select").bind("change", function() { - callback(this, scope); - }); - } - - control.updateList = function(parameterList) { - element.find("input, select").each( - function() { - for (var i = 0; i < parameterList.length; i++) { - if (parameterList[i].id === $(this).attr( - "parameter-id")) { - updateParameter(parameterList[i], this, - attrs.editable); - } - } - }); - element.find("input, select").bind("change", function() { - callback(this, scope); - }); - } - - control.getList = function(expectedId) { - var parameterList = new Array(); - element.find("input, select").each(function() { - var parameter = getParameter(this, expectedId); - if (parameter !== undefined) { - parameterList.push(parameter); - } - }); - return parameterList; - } - - control.getRequiredFields = function() { - var requiredFields = ""; - var count = 0; - element.find("input, select").each(function() { - if ($(this).attr("is-required") === "true") { - var requiredField = getRequiredField(this); - if (requiredField !== "") { - if (++count == 1) { - requiredFields = requiredField; - } - } - } - }); - if (--count <= 0) { - return requiredFields; - } else if (count == 1) { - return requiredFields + " and 1 other field"; - } else { - return requiredFields + " and " + count + " other fields"; - } - } - } - } -} - -appDS2.directive('parameterBlock', [ "$log", "PARAMETER", "UtilityService", - parameterBlockDirective ]); - - -appDS2.directive('onlyIntegers', function () { - return { - restrict: 'A', - link: function (scope, elm, attrs, ctrl) { - elm.on('keydown', function (event) { - if(event.shiftKey){event.preventDefault(); return false;} - //console.log(event.which); - if ([8, 13, 27, 37, 38, 39, 40].indexOf(event.which) > -1) { - // backspace, enter, escape, arrows - return true; - } else if (event.which >= 49 && event.which <= 57) { - // numbers - return true; - } else if (event.which >= 96 && event.which <= 105) { - // numpad number - return true; - } - // else if ([110, 190].indexOf(event.which) > -1) { - // // dot and numpad dot - // return true; - // } - else { - event.preventDefault(); - return false; - } - }); - } - } -}); - -appDS2.directive('onlyFloat', function () { - return { - restrict: 'A', - link: function (scope, elm, attrs, ctrl) { - elm.on('keydown', function (event) { - if ([110, 190].indexOf(event.which) > -1) { - // dot and numpad dot - event.preventDefault(); - return true; - } - else{ - return false; - } - }); - } - } -}); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js index ed71436bb..76585f4bc 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/progressBarDirective.js @@ -58,7 +58,7 @@ * called immediately after HTML is rendered. This is due to a timing-related
* behavior.
*
- * 3) The progress bar displays values of "0" and "100" if precentProgress is,
+ * 3) The progress bar displays values of "0" and "100" if percentProgress is,
* respectively, less than 0 or greater than 100.
*
* CUSTOM STYLING:
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/search.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/search.js new file mode 100644 index 000000000..05ae1211c --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/search.js @@ -0,0 +1,11 @@ +"use strict"; + +appDS2.directive('searchText', function() { + return { + restrict : "E", + templateUrl: 'app/vid/scripts/view-models/search.htm', + scope: { + searchString : '=' + } + } +});
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/directives/serviceMetadata.js b/vid-app-common/src/main/webapp/app/vid/scripts/directives/serviceMetadata.js new file mode 100644 index 000000000..1c15f7034 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/directives/serviceMetadata.js @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +appDS2.directive('serviceMetadata', function() { + return { + restrict : "E", + templateUrl: 'app/vid/scripts/view-models/serviceMetadata.htm', + scope: { + serviceMetadataFields : '=', + titleTxt: '@' + }, + link : function(scope, element, attrs) { + } + } +});
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html index bdc95c98e..60596f499 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-change-management/alert-change-management.html @@ -1,4 +1,4 @@ -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/new-change-management/new-change-management.css" /> +<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" /> <link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/alert-change-management/alert-change-management.css" /> <div class="modal-header"> <h3 class="modal-title" id="alert-modal-header">On Hold</h3> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.controller.js new file mode 100644 index 000000000..6cb3f9c89 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.controller.js @@ -0,0 +1,33 @@ +(function () { + 'use strict'; + + appDS2.controller("alertModalController", ["$uibModalInstance", "jobInfo", + "$log", alertModalController]); + + function alertModalController($uibModalInstance, jobInfo, $log) { + var vm = this; + var init = function() { + if (jobInfo) { + vm.content = jobInfo.message; + vm.mode = jobInfo.status; + if (vm.mode == "failed") { + vm.Header = "Failed" + } else if (vm.mode == "confirm") { + vm.Header = "Confirm" + } else { + vm.Header = "Success" + } + } + }; + + vm.close = function () { + $uibModalInstance.close(); + }; + + vm.ok = function () { + $uibModalInstance.close(true); + }; + + init(); + } +})();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.css new file mode 100644 index 000000000..85382b0ee --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.css @@ -0,0 +1,15 @@ +.modal-header { + border-bottom-color: #ffb81c; +} +.modal-header.success { + border-bottom: 3px solid #4ca90c; +} +.modal-header.failed { + border-bottom: 3px solid #cf2a2a; +} +.modal-header.confirm { + border-bottom: 3px solid #009FDB; +} +.modal-footer { + border-radius: 0 0 6px 6px; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.html new file mode 100644 index 000000000..4fa9d4587 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-modal/alert-modal.html @@ -0,0 +1,15 @@ +<link rel="stylesheet" type="text/css" href="app/vid/styles/modals.css"> +<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/alert-modal/alert-modal.css" /> +<div class="modal-header" ng-class="vm.mode"> + <span class="modal-title" id="alert-modal-header">{{vm.Header}}</span> + <span id="cancel" ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span> +</div> +<div class="modal-body"> + <span id="failed-modal-content">{{vm.content}}</span> +</div> +<div class="modal-footer"> + <div class="pull-right"> + <button data-tests-id="ok" id="ok-button" name="ok" class="btn" + ng-click="vm.ok()">OK</button> + </div> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.controller.js deleted file mode 100644 index 2c5eabed9..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.controller.js +++ /dev/null @@ -1,33 +0,0 @@ -(function () { - 'use strict'; - - appDS2.controller("alertNewSchedulerController", ["$uibModalInstance", "jobInfo", "MsoService", "COMPONENT", - "$log", alertNewSchedulerController]); - - function alertNewSchedulerController($uibModalInstance, jobInfo, MsoService, COMPONENT, $log) { - var vm = this; - - vm.manualTasks = []; - vm.MANUAL_TASKS = COMPONENT.MANUAL_TASKS; - var init = function() { - if (jobInfo) { - vm.content = jobInfo; - } else { - vm.content = "Successfully"; - } - - - - }; - - - - - - vm.close = function () { - $uibModalInstance.close(); - }; - - init(); - } -})();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.css deleted file mode 100644 index 316c2e46e..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.css +++ /dev/null @@ -1,3 +0,0 @@ -.modal-header h3 { - border-bottom: 3px solid #ffb81c; -}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.html deleted file mode 100644 index e6255cf36..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.html +++ /dev/null @@ -1,12 +0,0 @@ -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/new-change-management/new-change-management.css" /> -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/alert-change-management/alert-change-management.css" /> -<div class="modal-header"> - <h3 class="modal-title" id="alert-modal-header">Response From Server</h3> - <span id="cancel" ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span> -</div> -<div class="modal-body"> - <span id="alert-modal-content">{{vm.content}}</span> -</div> -<div class="modal-footer"> -<!-- <div ng-include="'app/vid/scripts/modals/change-management-manual-tasks-controller/change-management-manual-tasks.html'"></div> --> -</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.controller.js new file mode 100644 index 000000000..930240437 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.controller.js @@ -0,0 +1,58 @@ +(function () { + 'use strict'; + + appDS2.controller("attachTestEnvManifestController", ["$uibModalInstance", "$uibModal", "$log", "$scope", + attachTestEnvManifestController]); + + function attachTestEnvManifestController($uibModalInstance, $uibModal, $log, $scope) { + var vm = this; + + var init = function () { + vm.manifest = ""; + vm.error=""; + }; + + vm.close = function () { + $uibModalInstance.close(); + }; + + vm.submit = function () { + $uibModalInstance.close(vm.manifest); + }; + + vm.isSubmitDisabled = function () { + return !(vm.manifest); + }; + + + + /* + Must be $scope because we bind to the onchange of the html (cannot attached to vm variable). + We use scope because angular doesn't support ng-change on input file + https://github.com/angular/angular.js/issues/1375 + https://stackoverflow.com/questions/17922557/angularjs-how-to-check-for-changes-in-file-input-fields + */ + $scope.selectAttachmentManifest = function (fileInput) { + if (fileInput && fileInput.id) { + vm.manifest = ""; + vm.error=""; + var file = fileInput.files[0]; + vm.filename=file.name; + var fileReader = new FileReader(); + fileReader.onload = function (load) { + try { + var lines = load.target.result; + vm.manifest = JSON.parse(lines); + } catch (error) { + $log.error(error); + vm.error = "file: " + vm.filename + " is not a valid JSON" + } + $scope.$apply(); + }; + fileReader.readAsText(file); + } + }; + + init(); + } +})();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.css new file mode 100644 index 000000000..ff06addbb --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.css @@ -0,0 +1,109 @@ +.modal-header { + border: none!important; + padding: 10px 20px 0px 20px!important; + font-family: "OpenSans-Light"; + font-size: 22px; + color: #000000; +} + +.modal-header h3 { + font-family: "OpenSans-Light"; + color: #000000; + color: #000000; + font-size: 22px; + font-weight: 300; + line-height: 16px; + padding-bottom: 20px; + border-bottom: 3px solid #009fdb; + +} + +.control-label { + font-family: "OpenSans-Light"; + color: #5a5a5a; + font-size: 13px; + font-weight: 400; +} + +.modal-content { + width: 468px; + height: 242px; + border-radius: 8px; + background-color: #ffffff; +} + +body .modal-body { + padding-bottom: 0; + padding-top: 0; + padding-left: 20px; + padding-right: 20px; + width: 468px; + height: 91px; +} + +.modal-footer { + margin-top: 0; + background-color: #fff; +} + + +.modal-close { + margin: -60px 5px 0 0; + color: #5a5a5a; + font-size: 20px; + cursor: pointer; +} + +.inputfile { + width: 0.1px; + height: 0.1px; + opacity: 0; + overflow: hidden; + position: absolute; + z-index: -1; +} + +.manifestName{ + font-family: OpenSans-Semibold; + font-size: 12px; + color: #191919; +} + +.manifestFileName { + width: 389px; + height: 37px; + background: #FFFFFF; + border: 1px solid #D2D2D2; + border-radius: 2px; + display: inline-block; + line-height: 37px; + font-weight: normal !important; + padding-left: 3px; + border-bottom-right-radius: 0; + border-top-right-radius: 0; +} + +.elipsisImg { + width: 37px; + padding: 10px; + background: #FFFFFF; + border: 1px solid #D2D2D2; + display: inline-block; + cursor: pointer; + vertical-align: top; + border-radius: 2px; + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} + +.labelForImage { + vertical-align: top; +} + +.errorLabel { + color: red; +} + + + + diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.html new file mode 100644 index 000000000..12e0ab33f --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.html @@ -0,0 +1,26 @@ +<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-buttons.css"> +<link rel="stylesheet" type="text/css" + href="app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.css"/> +<div class="modal-header"> + <h3 id="modal-title">Attach Manifest</h3> + <span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span> +</div> +<form name="Attach Manifest" ng-submit="vm.submit()"> + <div class="modal-body"> + <label id="manifestName" class="manifestName">Manifest Name</label> + <input onchange="angular.element(this).scope().selectAttachmentManifest(this)" type="file" + id="testEnvManifestFileInput" class="inputfile" accept=".json"/> + <label id="manifestFileName" class="manifestFileName">{{vm.filename}}</label><label for="testEnvManifestFileInput" class="labelForImage" > + <span class="icon-browse"></span> + </label><label id="errorLabel" class="errorLabel">{{vm.error}}</label> + + </div> + <div class="modal-footer"> + <div class="pull-right"> + <button type="submit" id="submit" name="submit" class="btn btn-primary" + ng-disabled="vm.isSubmitDisabled()">Attach + </button> + <button type="button" id="cancel" name="cancel" class="btn btn-white" ng-click="vm.close()">Cancel</button> + </div> + </div> +</form> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.controller.js new file mode 100644 index 000000000..a04e127db --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.controller.js @@ -0,0 +1,29 @@ +(function () { + 'use strict'; + + appDS2.controller("cancelPendingWorkflowController", ["$scope", "$uibModalInstance", "changeManagement", + "$log", cancelPendingWorkflowController]); + + function cancelPendingWorkflowController($scope, $uibModalInstance, changeManagement, $log) { + var vm = this; + + function init() { + if (changeManagement) { + vm.workflow = changeManagement; + } else { + console.log("Pending Workflow is undefined: ", changeManagement); + vm.workflow = null; + } + } + + vm.close = function () { + $uibModalInstance.close(); + }; + + vm.ok = function () { + $uibModalInstance.close(true); + }; + + init(); + } +})();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.css new file mode 100644 index 000000000..daf86538a --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.css @@ -0,0 +1,16 @@ +.modal { + position: inherit; + text-align: left; +} +.modal-dialog { + position: absolute; + right: 0; + display: inline; + margin-top: -243px; +} +.modal-header { + border-bottom-color: #009FDB; +} +.modal-content { + width: 540px; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.html new file mode 100644 index 000000000..6dca76d25 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.html @@ -0,0 +1,14 @@ +<link rel="stylesheet" type="text/css" href="app/vid/styles/modals.css"> +<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.css"/> +<div class="modal-header"> + <span class="modal-title" id="pending-modal-header">Pending</span> + <span id="cancel" ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span> +</div> +<div class="modal-body" id="modal-body"> + Are you sure you want to delete workflow + <br/> + {{vm.workflow.scheduleRequest.scheduleName}}? +</div> +<div class="modal-footer"> + <button class="btn btn-cancel-workflow" data-tests-id="cancel" ng-click="vm.ok()">Cancel Workflow</button> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/failed-change-management/failed-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/failed-change-management/failed-change-management.html index 0deaf93d2..d51620d0c 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/failed-change-management/failed-change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/failed-change-management/failed-change-management.html @@ -1,4 +1,4 @@ -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/new-change-management/new-change-management.css" /> +<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" /> <link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/failed-change-management/failed-change-management.css" /> <div class="modal-header"> <h3 class="modal-title" id="failed-modal-header">Failed</h3> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/in-progress-modal-management/in-progress-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/in-progress-modal-management/in-progress-change-management.html index 9b40db2a5..615c95ceb 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/in-progress-modal-management/in-progress-change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/in-progress-modal-management/in-progress-change-management.html @@ -1,4 +1,4 @@ -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/new-change-management/new-change-management.css" /> +<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" /> <link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/in-progress-modal-management/in-progress-change-management.css" /> <div class="modal-header"> <h3 class="modal-title" id="in-progress-modal-header">In Progress</h3> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.css new file mode 100644 index 000000000..6af5a66ec --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.css @@ -0,0 +1,6 @@ +.modal-dialog .popupContents .log { + width: 560px; +} +.modal-dialog .cancel-btn { + width: 120px; +} diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.html new file mode 100644 index 000000000..7698981c3 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/mso-commit/mso-commit.html @@ -0,0 +1,48 @@ +<!-- + ============LICENSE_START======================================================= + VID + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> +<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/mso-commit/mso-commit.css"/> + +<div class="modal-wrapper popupContents" data-tests-id="msoPopup"> + + <div class="statusLine"> + <img src="app/vid/images/spinner.gif" + ngx-visible="{{isSpinnerVisible}}"> </img> <label>Status:</label><span + class="status" data-tests-id="msoRequestStatus">{{status}}</span> + </div> + + <div class="feedback"> + + <div progress-bar control="progressBarControl" + value="{{percentProgress}}" increases-only="true" + ngx-show="{{isProgressVisible}}"></div> + + <div class="error" ng-hide="isProgressVisible"> + <img src="app/vid/images/error.png"></img>{{error}} + </div> + + </div> + + <pre class="log">{{log}}</pre> + + <div class="buttonRow"> + <button data-tests-id="msoCommitDialogCloseButton" ngx-enabled="{{isCloseEnabled}}" att-button size="small" + ng-click="close();">Close</button> + </div> +</div> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js index 14ca43b56..f0b85a6e3 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js @@ -1,11 +1,16 @@ (function () { 'use strict'; - appDS2.controller("newChangeManagementModalController", ["$uibModalInstance", "$uibModal", "AaiService", "changeManagementService", - "$log", "$scope", "_", newChangeManagementModalController]); + appDS2.controller("newChangeManagementModalController", ["$uibModalInstance", "$uibModal",'$q', "AaiService", "changeManagementService", "Upload", + "$log", "$scope", "_", "COMPONENT", "VIDCONFIGURATION", newChangeManagementModalController]); + + function newChangeManagementModalController($uibModalInstance, $uibModal,$q, AaiService, changeManagementService, Upload, $log, $scope, _, COMPONENT, VIDCONFIGURATION) { - function newChangeManagementModalController($uibModalInstance, $uibModal, AaiService, changeManagementService, $log, $scope, _) { var vm = this; + vm.configUpdatePatternError = "Invalid file type. Please select a file with a CSV extension."; + vm.configUpdateContentError = "Invalid file structure."; + + vm.softwareVersionRegex = "[-a-zA-Z0-9\.]+"; var init = function () { vm.changeManagement = {}; @@ -46,8 +51,8 @@ availableVersions.push(extractVNFModel(vnf, response.data.service, newVNFName)); } }); - var versions = _.uniqBy(availableVersions, ['modelInfo.modelVersion']); - newVNFName.availableVersions = _.uniq(versions, response.data.service, true); + var versions = _.uniqBy(availableVersions, 'modelInfo.modelVersion'); + newVNFName.availableVersions = _.sortBy(_.uniq(versions, response.data.service, true),"modelInfo.modelVersion"); }).catch(function (error) { $log.error(error); }); @@ -107,23 +112,41 @@ $uibModalInstance.close(); }; - vm.schedule = function () { - $uibModalInstance.close(vm.changeManagement); - - var modalInstance = $uibModal.open({ - templateUrl: 'app/vid/scripts/modals/new-scheduler/new-scheduler.html', - controller: 'newSchedulerController', - controllerAs: 'vm', - resolve: { - changeManagement: function () { - return vm.changeManagement; - } - } + vm.uploadConfigFile = function (file) { + var defer = $q.defer(); + Upload.upload({ + url: "change-management/uploadConfigUpdateFile", + file: file, + transformResponse: [function (data) { + return data; + }] + }) + .then(function (configUpdateResponse) { + vm.changeManagement.configUpdateFile = configUpdateResponse && JSON.parse(configUpdateResponse.data).payload; + defer.resolve(true); + }) + .catch(function (error) { + defer.resolve(false); }); + return defer.promise; + }; - modalInstance.result.then(function (result) { - console.log("This is the result of the new change management modal.", result); - }) + + vm.openModal = function () { + $scope.widgetParameter = ""; // needed by the scheduler? + + // properties needed by the scheduler so it knows whether to show + // policy or sniro related features on the scheduler UI or not. + vm.changeManagement.policyYN = "Y"; + vm.changeManagement.sniroYN = "Y"; + + var data = { + widgetName: 'Portal-Common-Scheduler', + widgetData: vm.changeManagement, + widgetParameter: $scope.widgetParameter + }; + + window.parent.postMessage(data, VIDCONFIGURATION.SCHEDULER_PORTAL_URL); }; vm.loadSubscribers = function () { @@ -165,11 +188,11 @@ if (vnfsData[i]) { const nodeType = vnfsData[i]['node-type']; if (nodeType === "generic-vnf") { - _.forEach(vnfsData[i]['related-to'], function (node) { - if (node['node-type'] === 'vserver') { - vm.vnfs.push(vnfsData[i]); - } - }) + if (_.find(vnfsData[i]['related-to'], function (node) { + return node['node-type'] === 'vserver' + }) !== undefined) { + vm.vnfs.push(vnfsData[i]); + } } else if (nodeType === "service-instance") { vm.serviceInstances.push(vnfsData[i]); } @@ -197,63 +220,50 @@ ); }; + var fromVNFVersions = []; + vm.loadVNFVersions = function () { - vm.fromVNFVersions = []; + fromVNFVersions = []; vm.serviceInstancesToGetVersions = []; var versions = []; _.forEach(vm.vnfs, function (vnf) { if (vnf.properties['nf-role'] === vm.changeManagement['vnfType']) { - vm.serviceInstancesToGetVersions.push(vnf); - - versions.push(vnf.properties["model-invariant-id"]); - + vm.serviceInstancesToGetVersions.push({ + "model-invariant-id": vnf.properties["model-invariant-id"], + "model-version-id": vnf.properties["model-version-id"] } + ); + versions.push(vnf.properties["model-invariant-id"]); } }); - AaiService.getVnfVersionsByInvariantId(versions).then(function (response) { - if (response.data) { - var key = response.data.model["0"]["model-invariant-id"]; - var value = response.data.model["0"]["model-vers"]["model-ver"]["0"]["model-version"]; - var element = {"key": key, "value": value}; - vm.fromVNFVersions.push(element); - } - //TODO promise all and call the new api to get the versions. - // vm.fromVNFVersions.push(response.data.model["0"]["model-vers"]["model-ver"]["0"]["model-version"]); - // if(vm.serviceInstancesToGetVersions.length > 0){ - // - // var promiseArrOfGetVnfs = preparePromiseArrOfGetVersions('a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb'); - // - // Promise.all(promiseArrOfGetVnfs).then(function (allData) { - // vm.vnfs = _.flattenDeep(_.without(allData, null)); - // var filteredVnfs = _.sortedUniqBy(vm.vnfs, function (vnf) { - // return vnf.properties.vnfType; - // }); - // - // _.forEach(filteredVnfs, function (vnf) { - // vm.vnfTypes.push(vnf.properties.vnfType) - // }); - // - // }).catch(function (error) { - // $log(error); - // }); - // } - }) - // debugger; + if (versions.length > 0) { + AaiService.getVnfVersionsByInvariantId(versions).then(function (response) { + if (response.data) { + + $log.debug("getVnfVersionsByInvariantId: response", response); + + fromVNFVersions = vm.serviceInstancesToGetVersions + .map(function (serviceInstanceToGetVersion) { + const model = _.find(response.data.model, {'model-invariant-id': serviceInstanceToGetVersion['model-invariant-id']}); + $log.debug("getVnfVersionsByInvariantId: model for " + serviceInstanceToGetVersion['model-invariant-id'], model); + + const modelVer = _.find(model["model-vers"]["model-ver"], {'model-version-id': serviceInstanceToGetVersion['model-version-id']}); + $log.debug("getVnfVersionsByInvariantId: modelVer for " + serviceInstanceToGetVersion['model-version-id'], modelVer); + + var modelVersionId = serviceInstanceToGetVersion["model-version-id"]; + var modelVersion = modelVer["model-version"]; + return {"key": modelVersionId, "value": modelVersion}; + }); + + vm.fromVNFVersions = _.uniqBy(fromVNFVersions, 'value'); + } + }) + } }; - // function preparePromiseArrOfGetVersions(serviceInstances) { - // var promiseArr = []; - // for (var i = 0; i < serviceInstances.length; i++) { - // var modelInvariantId = serviceInstances[i].properties["model-invariant-id"]; - // promiseArr.push( - // getVnfs(modelInvariantId) - // ); - // } - // return promiseArr; - // } function getVnfs(modelInvariantId) { return new Promise(function (resolve, reject) { @@ -281,12 +291,20 @@ }); } + var getVersionNameForId = function(versionId) { + var version = _.find(fromVNFVersions, {"key": versionId}); + return version.value; + }; + vm.loadVNFNames = function () { vm.vnfNames = []; + const vnfs = vm.changeManagement.fromVNFVersion ? vm.vnfs : []; + _.forEach(vnfs, function (vnf) { - _.forEach(vm.vnfs, function (vnf) { + var selectedVersionNumber = getVersionNameForId(vm.changeManagement.fromVNFVersion); - if (vnf.properties['nf-role'] === vm.changeManagement.vnfType) { + if (vnf.properties['nf-role'] === vm.changeManagement.vnfType && + selectedVersionNumber === getVersionNameForId(vnf.properties["model-version-id"])) { var vServer = {}; _.forEach(vnf['related-to'], function (node) { @@ -295,11 +313,27 @@ } }); + var serviceInstancesIds = + _.filter(vnf['related-to'], {'node-type': 'service-instance'}) + .map(function (serviceInstance) { return serviceInstance.id }); + + var serviceInstances = _.filter(vm.serviceInstances, function(serviceInstance) { + return _.includes(serviceInstancesIds, serviceInstance.id); + }); + + // logging only + if (serviceInstancesIds.length === 0) { + $log.error("loadVNFNames: no serviceInstancesIds for vnf", vnf); + } else { + $log.debug("loadVNFNames: serviceInstancesIds", serviceInstancesIds); + $log.debug("loadVNFNames: serviceInstances", serviceInstances); + } + vm.vnfNames.push({ "id": vnf.properties["vnf-id"], "name": vnf.properties["vnf-name"], "invariant-id": vnf.properties["model-invariant-id"], - "service-instance-node": _.filter(vm.serviceInstances, {id: vnf["related-to"][0].id}), + "service-instance-node": serviceInstances, "modelVersionId": vnf.properties["model-version-id"], "properties": vnf.properties, 'cloudConfiguration': vServer, @@ -316,30 +350,32 @@ tenantId: '' }; - var splitedUrlByDash = _.split(url, '/', 100); + /* + e.g., in both URLs below - + Â - lcpCloudRegionId == 'rdm5b' + Â - tenantId == '0675e0709bd7444a9e13eba8b40edb3c' - cloudConfiguration.lcpCloudRegionId = splitedUrlByDash[7]; - cloudConfiguration.tenantId = splitedUrlByDash[10]; + "url": "https://aai-conexus-e2e.ecomp.cci.att.com:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/0675e0709bd7444a9e13eba8b40edb3c/vservers/vserver/932b330d-733e-427d-a519-14eebd261f70" + "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/0675e0709bd7444a9e13eba8b40edb3c/vservers/vserver/932b330d-733e-427d-a519-14eebd261f70" + */ + + var cloudRegionMatch = url.match(/\/cloud-regions\/cloud-region\/[^\/]+\/([^\/]+)/); + var tenantMatch = url.match(/\/tenants\/tenant\/([^\/]+)/); + + cloudConfiguration.lcpCloudRegionId = cloudRegionMatch[1]; + cloudConfiguration.tenantId = tenantMatch[1]; return cloudConfiguration; }; vm.loadWorkFlows = function () { - var vnfs = []; - angular.forEach(vm.changeManagement.vnfNames, function (vnfName) { - vnfs.push(vnfName.name) - }); - - //TODO: When we'll have the mappings, use the backend call to get the workflows - // changeManagementService.getWorkflows(vnfs) - // .then(function(response) { - // vm.workflows = response.data; - // }) - // .catch(function(error) { - // $log.error(error); - // }); - - vm.workflows = ["Update", "Replace"]; + changeManagementService.getWorkflows(vm.changeManagement.vnfNames) + .then(function(response) { + vm.workflows = response.data.workflows; + }) + .catch(function(error) { + $log.error(error); + }); }; //Must be $scope because we bind to the onchange of the html (cannot attached to vm variable). @@ -364,6 +400,14 @@ console.log("Will add version for selected vnf name: " + vnfName.name); }; + vm.isConfigUpdate = function () { + return vm.changeManagement.workflow === COMPONENT.WORKFLOWS.vnfConfigUpdate; + } + + vm.shouldShowVnfInPlaceFields = function () { + return vm.changeManagement.workflow === COMPONENT.WORKFLOWS.vnfInPlace; + }; + init(); } })();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css deleted file mode 100644 index 9d270987a..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css +++ /dev/null @@ -1,130 +0,0 @@ -.btn-white { - font-family: "Open Sans"; - border-radius: 2px; - border: 1px solid #d8d8d8; - background-color: #ffffff; - width: 94px; - height: 30px; - color: #5a5a5a; - font-size: 13px; - font-weight: 400; - line-height: 36px; - text-align: center; - padding: 4px 12px !important; -} - -.btn-primary { - font-family: "Open Sans"; - border-radius: 2px; - border: 1px solid #0091c8; - background-color: #009fdb; - width: 94px; - height: 30px; - color: #ffffff; - font-size: 13px; - font-weight: 400; - line-height: 36px; - text-align: center; - padding: 4px 12px !important; -} - -.modal-header { - border: none!important; - padding: 15px 15px 0px 15px!important; -} - -.modal-header h3 { - font-family: "Open Sans"; - color: #191919; - font-size: 22px; - font-weight: 300; - line-height: 16px; - padding-bottom: 20px; - border-bottom: 3px solid #009fdb; - -} - -.control-label { - font-family: "Open Sans"; - color: #5a5a5a; - font-size: 13px; - font-weight: 400; -} - -.modal-footer { - background-color: #eaeaea; -} - -.modal-dialog { - width: 587px; - border-radius: 8px; -} - -.modal-content { - width: 587px; - border-radius: 8px; - background-color: #ffffff; -} - -button.dropdown-toggle { - text-align: left; -} - -button[disabled].dropdown-toggle { - opacity: 1; - cursor: not-allowed; - background-color: #eee; - border: 1px solid #aaa; - color: #a0a0a0; -} - -multiselect[disabled] { - cursor: not-allowed; -} - -a.item-unselected:before { - font-family: "icomoon"!important; - content: "\e90c"; - color: #4ca90c; -} - -.modal-close { - margin: -40px 5px 0 0; - color: #5a5a5a; - font-size: 20px; - cursor: pointer; -} - -.vnf-versions-container .table { - position: relative; - background-color: #f8f8f8; - background-clip: padding-box; - border-radius: 6px; - outline: 0; -} - -.vnf-versions-name { - padding-top: 6px; - font-family: "Open Sans"; - position: absolute; -} - -.vnf-versions-select-as-text { - font-family: "Open Sans"; - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; - border: none; - overflow:hidden; - background-color: #f8f8f8; - height: 31px; -} - -.vnf-files-select { - z-index: 999; - opacity: 0.0; - position: absolute; - width: 23%; - cursor: pointer; - height:100%; -} diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html index 71c7eb331..4473ee3b8 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html @@ -1,51 +1,51 @@ -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/new-change-management/new-change-management.css" /> +<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" /> <div class="modal-header"> <h3 class="modal-title" id="modal-title">New VNF Change</h3> <span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span> </div> -<form name="newChangeManagement" ng-submit="vm.schedule()"> +<form class="form-create" name="newChangeManagement" ng-submit="vm.openModal();vm.close();" novalidate> <div class="modal-body"> <div class="form-group"> <label class="control-label">Subscriber</label> <select class="form-control" ng-model="vm.changeManagement.subscriberId" ng-change="vm.loadServiceTypes()" name="subscriber" id="subscriber" data-tests-id="subscriberName" required> <option value="" disabled>Select subscriber</option> - <option data-tests-id="subscriberNameOption" ng-repeat="item in vm.subscribers" ng-value="item['global-customer-id']">{{item['subscriber-name']}}</option> + <option data-tests-id="subscriberNameOption" class="subscriberNameOption" ng-repeat="item in vm.subscribers" ng-value="item['global-customer-id']" ng-disabled="!(item['is-permitted'])">{{item['subscriber-name']}}</option> </select> </div> <div class="form-group"> <label class="control-label">Service type</label> - <select class="form-control" ng-model="vm.changeManagement.serviceType" ng-change="vm.loadVNFTypes()" name="serviceType" id="serviceType" ng-options="item['service-type'] for item in vm.serviceTypes" required data-ng-disabled="newChangeManagement.subscriber.$pristine"> + <select class="form-control" ng-model="vm.changeManagement.serviceType" ng-change="vm.loadVNFTypes()" name="serviceType" id="serviceType" ng-options="item['service-type'] disable when !(item['is-permitted']) for item in vm.serviceTypes" required data-ng-disabled="newChangeManagement.subscriber.$pristine" data-tests-id="serviceType"> <option value="" disabled>Select service type</option> </select> </div> <div class="form-group"> - <label class="control-label">VNF type</label> + <label class="control-label">NF Role</label> <select class="form-control" ng-model="vm.changeManagement.vnfType" ng-change="vm.loadVNFVersions()" name="vnfType" id="vnfType" ng-options="item for item in vm.vnfTypes" required data-ng-disabled="newChangeManagement.serviceType.$pristine"> - <option value="" disabled>Select VNF type</option> + <option value="" disabled>NF Role</option> </select> </div> <div class="form-group"> - <label class="control-label">Source Version</label> + <label class="control-label">Source VNF Model Version</label> <select class="form-control" ng-model="vm.changeManagement.fromVNFVersion" ng-change="vm.loadVNFNames()" name="fromVNFVersion" id="fromVNFVersion" ng-options="item.key as item.value for item in vm.fromVNFVersions" required data-ng-disabled="newChangeManagement.vnfType.$pristine"> - <option value="" disabled>Select from VNF version</option> + <option value="" disabled>Select VNF Model Version</option> </select> </div> <div class="form-group"> - <label class="control-label">VNF name</label> + <label class="control-label">Available VNF</label> <multiselect ng-model="vm.changeManagement.vnfNames" ng-change="vm.loadWorkFlows()" name="vnfName" id="vnfName" options="vm.vnfNames" display-prop="name" id-prop="id" required data-ng-disabled="newChangeManagement.fromVNFVersion.$pristine"></multiselect> </div> <div ng-show="vm.changeManagement.vnfNames && vm.changeManagement.vnfNames.length > 0" class="form-group vnf-versions-container"> <table class="table table-bordered"> <tbody> <tr ng-repeat="vnfName in vm.changeManagement.vnfNames"> - <td class="col-md-6"><span class="vnf-versions-name">{{vnfName.name}}</span></td> - <td class="col-md-3"> - <select ng-model="vnfName.version" ng-change="vm.selectVersionForVNFName(vnfName)" class="vnf-versions-select-as-text"> - <option value="" disabled="" selected="selected">Select Target Version</option> + <td class="col-md-2"><span class="vnf-versions-name">{{vnfName.name}}</span></td> + <td class="col-md-2"> + <select ng-model="vnfName.version" ng-change="vm.selectVersionForVNFName(vnfName)" class="vnf-versions-select-as-text" id="{{vnfName['invariant-id']}}-target-version-select"> + <option value="" disabled="" selected="selected">Select Target VNF Model Version</option> <option ng-repeat="version in vnfName.availableVersions">{{version.modelInfo.modelVersion}}</option> </select> </td> - <td class="col-md-3 vnf-versions-name"> + <td class="col-md-1 vnf-versions-name"> <input ng-model="vnfName.filePath" onchange="angular.element(this).scope().selectFileForVNFName(this)" type="file" id="{{vnfName['invariant-id']}}" class="vnf-files-select" /> <span class="vnf-versions-name">Select File<span class="caret"></span></span></td> </tr> @@ -58,6 +58,32 @@ <option value="" disabled>Select workflow</option> </select> </div> + <div class="form-group" ng-if="vm.isConfigUpdate()"> + <label class="control-label">Attach configuration file</label> + <div class="file-wrapper"> + <input id="config-update-input" class="file-input" type="file" ngf-select ng-model="vm.configUpdateFile" ngf-validate-async-fn="vm.uploadConfigFile($file)" name="configUpdateFile" + accept=".csv" ngf-pattern=".csv" required> </input> + <label id="config-update-label" class="file-input-label">{{vm.configUpdateFile&&vm.configUpdateFile.name||"Select File"}} </label> + <label for="config-update-input"><span class="icon-browse"></span></label> + </div> + <label id="errorLabel" class="icon-alert error" ng-if="newChangeManagement.configUpdateFile.$error.pattern">{{vm.configUpdatePatternError}}</label> + <label id="errorContentLabel" class="icon-alert error" ng-if="newChangeManagement.configUpdateFile.$error.validateAsyncFn">{{vm.configUpdateContentError}}</label> + </div> + <div ng-if="vm.shouldShowVnfInPlaceFields()"> + <div class="form-group"> + <label class="control-label">operations-timeout</label> + <input class="form-control" ng-model="vm.changeManagement.operationTimeout" name="operationTimeout" type="text" id="operations-timeout" pattern="[0-9]+" required> + </div> + <div class="form-group"> + <label class="control-label">existing-software-version</label> + <input class="form-control" ng-model="vm.changeManagement.existingSoftwareVersion" name="existingSoftwareVersion" type="text" id="existing-software-version" pattern="{{vm.softwareVersionRegex}}" required> + </div> + <div class="form-group"> + <label class="control-label">new-software-version</label> + <input class="form-control" ng-model="vm.changeManagement.newSoftwareVersion" name="newSoftwareVersion" type="text" id="new-software-version" pattern="{{vm.softwareVersionRegex}}" required> + </div> + + </div> </div> <div class="modal-footer"> <div class="pull-right"> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.controller.js deleted file mode 100644 index c8f44c715..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.controller.js +++ /dev/null @@ -1,455 +0,0 @@ -(function () { - 'use strict'; - - appDS2.controller("newSchedulerController", ["$scope", "$uibModal", "$uibModalInstance", "AaiService", "SchedulerService", "_", - "$log", "changeManagement", "$timeout", "$interval", "$filter", "VIDCONFIGURATION", "changeManagementService", newSchedulerController]); - - function newSchedulerController($scope, $uibModal, $uibModalInstance, AaiService, SchedulerService, _, $log, changeManagement, $timeout, $interval, $filter, VIDCONFIGURATION, changeManagementService) { - var vm = this; - var pollpromise; - - var init = function () { - vm.scheduler = {}; - vm.schedulingInfo = {}; - var callbackData = extractChangeManagementCallbackDataStr(changeManagement); - vm.vnfObject = changeManagement; - vm.schedulerObj = { - domain: 'ChangeManagement', - scheduleId: '', - scheduleName: 'VnfUpgrade/DWF', - userId: '', - domainData: [{ - 'WorkflowName': vm.scheduler.policy, - 'CallbackUrl': 'http://127.0.0.1:8989/scheduler/v1/loopbacktest/vid', - 'CallbackData': callbackData - }], - - schedulingInfo: { - normalDurationInSeconds: '', - additionalDurationInSeconds: '', - concurrencyLimit: '', - policyId: '', - vnfDetails: [ - { - groupId: "", - node: [], - changeWindow: [{ - startTime: '', - endTime: '' - }] - - } - ] - }, - - } - vm.schedulerObj1 = { - "domain": "ChangeManagement", - "scheduleName": "VnfUpgrade/DWF", - "userId": "su7376", - "domainData": [ - { - "WorkflowName": "HEAT Stack Software Update for vNFs", - "CallbackUrl": "http://127.0.0.1:8989/scheduler/v1/loopbacktest/vid", - "CallbackData": "testing" - } - ], - "schedulingInfo": { - "normalDurationInSeconds": 60, - "additionalDurationInSeconds": 60, - "concurrencyLimit": 60, - "policyId": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_zone_localTime.1.xml", - "vnfDetails": [ - { - "groupId": "group1", - "node": ["satmo415vbc", "satmo455vbc"], - "changeWindow": [ - { - "startTime": "2017-08-08T16:37:30.521Z", - "endTime": "2017-08-08T16:37:30.521Z" - } - ] - } - ] - } - }; - - - vm.format = 'yyyy/MM/dd'; - vm.todate = new Date(); - vm.checkboxSelection = 'false'; - vm.fromDate = ''; - vm.toDate = ''; - vm.timeSlots = []; - - vm.changeManagement = {}; - - vm.subscribers = []; - - AaiService.getSubscribers(function (response) { - vm.subscribers = response; - }); - - vm.serviceTypes = []; - AaiService.getServices(function (response) { - vm.serviceTypes = response.data.service; - }); - - changeManagementService.getWorkflows() - .then(function (response) { - vm.workflows = response.data; - }) - .catch(function (error) { - $log.error(error); - }); - - //TODO: Get the VNF names from backend dynamically - vm.vnfNames = []; - - //TODO: Get the VNF types from backend dynamically - vm.vnfTypes = []; - - AaiService.getLoggedInUserID(function (response) { - vm.userID = response.data; - }); - vm.policys = []; - - var policyName = JSON.stringify({ - policyName: "SNIRO_1710.*", - configAttributes: { - service: "PlacementOptimizationPolicy" - } - }); - SchedulerService.getPolicyInfo(policyName, function (response) { - vm.policys = response.data.entity; - }); - }; - - vm.radioSelections = function (test) { - if (vm.checkboxSelection == "true") { - vm.fromDate = ''; - vm.toDate = '' - } - } - vm.close = function () { - $uibModalInstance.close(); - }; - - - function convertToSecs(number) { - var totalSecs; - if (vm.selectedOption === 'hours') { - totalSecs = number * 3600; - - } - else if (vm.selectedOption === 'minutes') { - totalSecs = number * 60; - } else { - totalSecs = number; - } - return totalSecs; - } - - vm.submit = function () { - vm.schedulingInfo = { - scheduleId: vm.schedulerID, - approvalDateTime: '2017-08-08T16:37:30.521Z', - approvalUserId: "sy6266", - approvalStatus: 'Accepted', - approvalType: 'Tier 2' - }; - - var approvalObj = JSON.stringify(vm.schedulingInfo); - SchedulerService.getSubmitForapprovedTimeslots(approvalObj, function (response) { - if (response.status == 200) { - openConfirmationModal("Successfully Sent for Approval"); - } - - }); - }; - - vm.reject = function () { - vm.schedulingInfo = { - scheduleId: vm.schedulerID, - approvalDateTime: '2017-08-08T16:37:30.521Z', - approvalUserId: "sy6266", - approvalStatus: 'Rejected', - approvalType: 'Tier 2' - } - - var approvalObj = JSON.stringify(vm.schedulingInfo) - SchedulerService.getSubmitForapprovedTimeslots(approvalObj, function (response) { - if (response.status == 200) { - openConfirmationModal("Successfully sent for Rejection"); - } - - }); - }; - - vm.schedule = function (myForm) { - $scope.$watch('fromDate', validateDates(myForm)); - $scope.$watch('toDate', validateDates(myForm)); - if (myForm.$valid) { - sendSchedulerReq() - } - }; - - - function sendSchedulerReq() { - var changeWindow = [{ - startTime: '', - endTime: '' - }]; - vm.timeSlots = []; - var fromDate = $filter('date')(new Date(vm.fromDate), "yyyy-MM-ddTHH:mmZ", "UTC"); - var toDate = $filter('date')(new Date(vm.toDate), "yyyy-MM-ddTHH:mmZ", "UTC"); - - changeWindow[0].startTime = fromDate; - changeWindow[0].endTime = toDate; - vm.schedulerObj.userId = vm.userID; - vm.schedulerObj.domainData[0].WorkflowName = changeManagement.workflow; - vm.schedulerObj.schedulingInfo.normalDurationInSeconds = convertToSecs(vm.scheduler.duration); - vm.schedulerObj.schedulingInfo.additionalDurationInSeconds = convertToSecs(vm.scheduler.fallbackDuration); - vm.schedulerObj.schedulingInfo.concurrencyLimit = vm.scheduler.concurrency; - vm.schedulerObj.schedulingInfo.policyId = vm.scheduler.policy.policyName; - vm.schedulerObj.schedulingInfo['vnfDetails'][0].groupId = 'groupId'; - vm.schedulerObj.schedulingInfo['vnfDetails'][0].node = getVnfData(changeManagement.vnfNames); - - vm.schedulerObj.schedulingInfo['vnfDetails'][0].changeWindow = changeWindow; - if (vm.checkboxSelection == "true") { //When Scheduled now we remove the changeWindow - delete vm.schedulerObj.schedulingInfo['vnfDetails'][0].changeWindow; - } - vm.schedulerObj.schedulingInfo['vnfDetails'][0].changeWindow = changeWindow; - delete vm.schedulerObj.schedulingInfo['vnfDetails'][0].changeWindow; - - var requestScheduler = JSON.stringify(vm.schedulerObj); - console.log(requestScheduler); - SchedulerService.getStatusSchedulerId(requestScheduler, function (response) { - vm.schedulerID = response.data.uuid; - vm.isSpinnerVisible = true; - if (vm.schedulerID) { - var scheduledID = JSON.stringify({scheduleId: vm.schedulerID}); - seviceCallToGetTimeSlots(); - } - }); - } - - function seviceCallToGetTimeSlots() { - - SchedulerService.getTimeSotsForSchedulerId(vm.schedulerID, function (response) { - if (vm.checkboxSelection == "false") { - if (response.data.entity.schedule) { - var scheduleColl = JSON.parse(response.data.entity.schedule); - if (scheduleColl.length > 0) { - vm.timeSlots = scheduleColl; - vm.isSpinnerVisible = false; - hasvaluereturnd = false; - $scope.stopPoll(); - openConfirmationModal(response.data.entity.scheduleId + " Successfully Returned TimeSlots."); - } - - } - else { - if (vm.timeSlots.length == 0 && hasthresholdreached == false) { - var polltime = VIDCONFIGURATION.SCHEDULER_POLLING_INTERVAL_MSECS; - pollpromise = poll(polltime, function () { - if (vm.timeSlots.length == 0) { - hasvaluereturnd = true; - seviceCallToGetTimeSlots() - } - else { - hasvaluereturnd = false; - } - - }); - - } else { - openConfirmationModal("Timeout error.") - } - } - - } - else { - if (response.data.entity) { - vm.isSpinnerVisible = false; - openConfirmationModal(response.data.entity.scheduleId + " Successfully Ready for Schedule.") - } - } - - }); - - } - - function openConfirmationModal(jobInfo) { - var modalInstance = $uibModal.open({ - templateUrl: 'app/vid/scripts/modals/alert-new-scheduler/alert-new-scheduler.html', - controller: 'alertNewSchedulerController', - controllerAs: 'vm', - resolve: { - jobInfo: function () { - return jobInfo; - } - } - }); - } - - var hasvaluereturnd = true; // Flag to check - var hasthresholdreached = false; - var thresholdvalue = VIDCONFIGURATION.SCHEDULER_MAX_POLLS; // interval threshold value - - function poll(interval, callback) { - return $interval(function () { - if (hasvaluereturnd) { //check flag before start new call - callback(hasvaluereturnd); - } - - thresholdvalue = thresholdvalue - 1; //Decrease threshold value - if (thresholdvalue == 0) { - $scope.stopPoll(); // Stop $interval if it reaches to threshold - } - }, interval) - } - - -// stop interval. - $scope.stopPoll = function () { - $interval.cancel(pollpromise); - thresholdvalue = 0; //reset all flags. - hasvaluereturnd = false; - hasthresholdreached = true; - vm.isSpinnerVisible = false; - } - - function getVnfData(arrColl) { - var vnfcolletion = []; - - for (var i = 0; i < arrColl.length; i++) { - vnfcolletion.push(arrColl[i].name); - } - - return vnfcolletion - } - - function validateDates(form) { - if (vm.checkboxSelection == "false") { - - if (form.startDate.$error.invalidDate || form.endDate.$error.invalidDate) { - form.startDate.$setValidity("endBeforeStart", true); //already invalid (per validDate directive) - } else { - //depending on whether the user used the date picker or typed it, this will be different (text or date type). - //creating a new date object takes care of that. - var endDate = new Date(vm.toDate); - var startDate = new Date(vm.fromDate); - form.startDate.$setValidity("endBeforeStart", endDate >= startDate); - } - } - } - - - function extractChangeManagementCallbackDataStr(changeManagement) { - var result = {}; - - result.requestType = changeManagement.workflow; - result.requestDetails = []; - - _.forEach(changeManagement.vnfNames, function (vnf) { - - var data = { - vnfName: vnf.name, - vnfInstanceId: vnf.id, - modelInfo: { - modelType: 'vnf', - modelInvariantId: vnf.properties['model-invariant-id'], - modelVersionId: vnf.modelVersionId, - modelName: vnf.properties['vnf-name'], - modelVersion: vnf.version, - modelCustomizationName: vnf.properties['model-customization-name'], - modelCustomizationId: vnf.properties['model-customization-id'] - }, - cloudConfiguration: { - lcpCloudRegionId: vnf.availableVersions[0].cloudConfiguration.lcpCloudRegionId, - tenantId: vnf.availableVersions[0].cloudConfiguration.tenantId - }, - requestInfo: { - source: vnf.availableVersions[0].requestInfo.source, - suppressRollback: vnf.availableVersions[0].requestInfo.suppressRollback, - requestorId: vnf.availableVersions[0].requestInfo.requestorId - }, - relatedInstanceList: [], - requestParameters: { - usePreload: vnf.availableVersions[0].requestParameters.usePreload - } - }; - - var serviceInstanceId = ''; - _.forEach(vnf['service-instance-node'], function (instanceNode) { - if(instanceNode['node-type'] === 'service-instance'){ - serviceInstanceId = instanceNode.properties['service-instance-id']; - } - }); - - - _.forEach(vnf.availableVersions[0].relatedInstanceList, function (related) { - - var rel = related.relatedInstance; - - var relatedInstance = { - instanceId: serviceInstanceId, - modelInfo: { - modelType: rel.modelInfo.modelType, - modelInvariantId: rel.modelInfo.modelInvariantId, - modelVersionId: rel.modelInfo.modelVersionId, - modelName: rel.modelInfo.modelName, - modelVersion: rel.modelInfo.modelVersion, - modelCustomizationName: rel.modelInfo.modelCustomizationName, - modelCustomizationId: rel.modelInfo.modelCustomizationId - } - }; - - if (rel.vnfInstanceId) - relatedInstance.instanceId = rel.vnfInstanceId; - - data.relatedInstanceList.push({relatedInstance: relatedInstance}); - }); - - - result.requestDetails.push(data); - } - ); - - - // _.forEach(changeManagement.vnfNames, function (vnfName) { - // if (vnfName && vnfName.version) { - // if (vnfName.selectedFile) { - // vnfName.version.requestParameters.userParams = vnfName.selectedFile; - // } - // result.requestDetails.push(vnfName.version) - // } - // }); - - return JSON.stringify(result); - } - - init(); - }; - - appDS2.directive('validDate', function () { - return { - restrict: 'A', - require: 'ngModel', - link: function (scope, element, attrs, control) { - control.$parsers.push(function (viewValue) { - var newDate = model.$viewValue; - control.$setValidity("invalidDate", true); - if (typeof newDate === "object" || newDate == "") return newDate; // pass through if we clicked date from popup - if (!newDate.match(/^\d{1,2}\/\d{1,2}\/((\d{2})|(\d{4}))$/)) - control.$setValidity("invalidDate", false); - return viewValue; - }); - } - }; - }) - - -})(); - diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.css deleted file mode 100644 index 8da5c55c5..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.css +++ /dev/null @@ -1,145 +0,0 @@ -.btn-white { - font-family: OpenSans; - border-radius: 2px; - border: 1px solid #d8d8d8; - background-color: #ffffff; - width: 94px; - height: 30px; - color: #5a5a5a; - font-size: 13px; - font-weight: 400; - line-height: 36px; - text-align: center; -} - -.btn-primary { - font-family: OpenSans; - border-radius: 2px; - border: 1px solid #0091c8; - background-color: #009fdb; - width: 94px; - height: 30px; - color: #ffffff; - font-size: 13px; - font-weight: 400; - line-height: 36px; - text-align: center; -} - -.modal-header { - border: none!important; - padding: 15px 15px 0px 15px!important; -} - -.modal-header h3 { - font-family: OpenSans; - color: #5a5a5a; - font-size: 22px; - font-weight: 300; - line-height: 16px; - padding-bottom: 20px; - border-bottom: 3px solid #009fdb; - -} - -.modal-footer { - background-color: #eaeaea; -} - -.modal-dialog { - width: 587px; - border-radius: 8px; -} - -.modal-content { - width: 587px; - border-radius: 8px; - background-color: #ffffff; -} -.label-font{ - font-size: 1em; -} -.calender-icon{ - background-image: url(../../../../../app/fusion/external/ebz/images/Calendar.svg); - background-repeat:no-repeat; - background-position:98%; - border-radius: 6px; - border: 1px solid #888; - color: #444; - font-family: clearview_att_regular; - width: 100%; - outline: 0; - padding: 7px 10px; - text-transform: none; - z-index: 0; - height: 40px; - position: relative; - -} - -input.calender-icon:focus{ - background-image: url(../../../../../app/fusion/external/ebz/images/Calendar_blue.svg); - background-repeat:no-repeat; -} - - - -.timeslots-content{ - margin-top: 0px; - margin-bottom: 0px; - height: 10em; -} -.find-block{ - float:5em; -} -.timeslots-block{ -/* margin-top: 1em; */ - height: 85px; - } - .policy-combo{ - background-image: none; - } - - div[ng-controller=newSchedulerController] .schedulerVisible { - visibility: visible; -} -div[ng-controller=newSchedulerController] .schedulerHidden { - visibility: hidden; -} - -.table { - border: 1px solid #eaeaea; - box-sizing: border-box; - background-color: #ffffff; - box-shadow: 0px 2px 7px 0px rgba(34, 31, 31, 0.17); - font-family: OpenSans; - color: #5a5a5a; - font-size: 14px; - font-weight: 400; -} -.table>thead { - background-color: #d2d2d2; - font-family: OpenSans; - color: #191919; - font-size: 13px; - font-weight: 600; - line-height: 40px; -} - -.table-headline-row { - font-family: OpenSans; - color: #5a5a5a; - font-size: 14px; - font-weight: 600; - background-color: #eaeaea; - box-shadow: 0px 1px 1px 0px rgba(34, 31, 31, 0.19); -} - -.table-bordered{border:1px solid #eaeaea;} -.table-bordered>tbody>tr>td, -.table-bordered>tbody>tr>th, -.table-bordered>tfoot>tr>td, -.table-bordered>tfoot>tr>th, -.table-bordered>thead>tr>td, -.table-bordered>thead>tr>th{border:1px solid #eaeaea;} - diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.html deleted file mode 100644 index 498ff2ec4..000000000 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-scheduler/new-scheduler.html +++ /dev/null @@ -1,101 +0,0 @@ -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/new-scheduler/new-scheduler.css" /> -<div class="modal-header"> - <h3 class="modal-title" id="modal-title">Scheduler Change</h3> -</div> -<form name="newschedulermodalForm" ng-submit="vm.schedule(newschedulermodalForm)"> - <div class="modal-body"> - - <div class="form-group" > - <label><input type="radio" ng-model="vm.checkboxSelection" ng-change="vm.radioSelections()" value="true">Now</label> - <label><input type="radio" ng-model="vm.checkboxSelection" ng-change="vm.radioSelections()" value="false">Range</label> - </div> -<!-- <div class="form-group"> --> -<!-- <input type="radio" ng-model="checkboxSelection" value="false" ><label>Range</label> --> -<!-- </div> --> - - - <div class="form-group" > - <label class="control-label">From Date</label> - <input ng-disabled="(vm.checkboxSelection=='true')? true:false" valid-date name="startDate" ng-model="vm.fromDate" id="startDate" datetime-picker ng-required="false" hour="23" minute='59' class="calender-icon"/> - - </div> - <div class="form-group" > - <label class="control-label">To Date</label> - <input ng-disabled="(vm.checkboxSelection=='true')? true:false" valid-date name="endDate" ng-model="vm.toDate" id="endDate" datetime-picker ng-required="false" hour="23" minute='59' class="calender-icon" /> - <span ng-show="newschedulermodalForm.startDate.$error.endBeforeStart">To date must be on or after From date.</span> - <span ng-show="newschedulermodalForm.startDate.$error.invalidDate || newschedulermodalForm.endDate.$error.invalidDate">Check dates for validity</span> - <span ng-show="newschedulermodalForm.startDate.$error.required || newschedulermodalForm.endDate.$error.required">A required date is missing</span> - </div> - - <div class="form-group" > - <label>Please Select Option For Duration and FallBack</label> - - <select class="form-control" name="selecttime" data-tests-id="timeUnitSelect" ng-model="vm.selectedOption" ng-change="vm.updateMinMax()"> - <option value="hours">HOURS</option> - <option value="minutes">MINUTES</option> - <option value="seconds">SECONDS</option> - </select> - </div> - <div class="row"> - <div class="form-group col-md-6 col-xs-12"> - <label class="control-label">Duration</label> - <input type="number" style="font-size: 1em;" data-tests-id="durationInput" name="durationinput" ng-model="vm.scheduler.duration" ng-required="true"> - - </div> - <div class="form-group col-md-6 col-xs-12" > - <label class="control-label">Fallback Duration</label> - <input type="number" style="font-size: 1em;" name="fallbackinput" data-tests-id="fallbackInput" ng-model="vm.scheduler.fallbackDuration" ng-required="true"> - - - </div> - </div> - <div class="form-group"> - <label class="control-label">Concurrency Limit</label> - <input type="number" style="font-size: 1em;" name="input" data-tests-id="concurrencyLimitInput" ng-model="vm.scheduler.concurrency" min="1" max="30" ng-required="true"> - </div> - <div class="form-group"> - <label class="control-label">Policy</label> - <select class="policy-combo" ng-model="vm.scheduler.policy" id="policy" ng-options="item.policyName for item in vm.policys"> - <option value="">Select Policy</option> - </select> - </div> - <div class="form-group"> - <button type="submit" id="find" name="Find" ng-disabled="vm.isClicked" class="btn btn-primary find-block">Find</button> - <span class="spinner" ng-show="vm.isSpinnerVisible"> - <img src="app/vid/images/spinner.gif"> - </img> - - </span> - - </div> - - <div class="form-group" ng-show="(vm.checkboxSelection=='false')? true:false"> -<!-- <label class="control-label">Time Slots</label> --> -<!-- <textarea rows="10" cols="50" class="timeslots-block" ></textarea> --> - <table class="table table-bordered"> - <thead class="thead-default"> - <tr> - <th>Start Time</th> - <th>End Time</th> - </tr> - </thead> - <tbody> - - <tr class="table-headline-row" ng-repeat="timeslot in vm.timeSlots"> - <td>{{timeslot.startTime}}</td> - <td>{{timeslot.finishTime}}</td> - </tr> - </tbody> - </table> - </div> - - </div> - <div class="modal-footer"> - <div class="pull-right"> - <button type="button" id="btn" name="submit" class="btn btn-primary" ng-click="vm.submit()">Schedule</button> - <button type="button" id="btn" name="submit" class="btn btn-primary" ng-click="vm.reject()">Reject</button> - <button type="button" id="cancel" name="cancel" class="btn btn-white" ng-click="vm.close()">Cancel</button> - </div> - </div> -</form> - diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js new file mode 100644 index 000000000..daec9b2e9 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.controller.js @@ -0,0 +1,65 @@ +(function () { + 'use strict'; + + appDS2.controller("newTestEnvironmentModalController", ["$uibModalInstance", "$uibModal", "AaiService", "TestEnvironmentsService","OwningEntityService", + "$log", "$scope", "_", "COMPONENT","$rootScope", newTestEnvironmentsModalController]); + + function newTestEnvironmentsModalController($uibModalInstance, $uibModal, AaiService, TestEnvironmentsService,OwningEntityService, $log, $scope, _, COMPONENT, $rootScope) { + var vm = this; + vm.newEnvironment = {}; + + var init = function () { + vm.newEnvironment.operationalEnvironmentType = "VNF"; + loadCategoryParameters(); + loadEcompEnvironmentsList(); + }; + + var loadEcompEnvironmentsList = function () { + TestEnvironmentsService.loadAAIestEnvironments("ECOMP") + .then(function(response) { + vm.environments = response.operationalEnvironment; + }) + .catch(function (error) { + vm.aaiConnectError = error.message; + $log.error(error); + }); + }; + + var loadCategoryParameters = function () { + OwningEntityService.getOwningEntityProperties(function(response){ + vm.environmentsTypesList = response["operational-environment-type"].map(function (x){ + return x.name;}); + vm.workloadContextList = response["workload-context"].map(function (x){ + return x.name;}); + },COMPONENT.TENANT_ISOLATION_FAMILY); + } + + + vm.setEcompEnvironment = function (selectedIndex) { + var ecompEnvironment = vm.environments[selectedIndex]; + vm.newEnvironment.ecompInstanceId = ecompEnvironment.operationalEnvironmentId; + vm.newEnvironment.ecompInstanceName = ecompEnvironment.operationalEnvironmentName; + vm.newEnvironment.tenantContext = ecompEnvironment.tenantContext; + }; + + vm.close = function () { + $uibModalInstance.close(); + }; + + vm.createEnvironment = function () { + if($scope.newTestEnvironment.$valid) { + vm.newEnvironment.workloadContext = vm.newEnvironment.operationalEnvironmentType + '_' + vm.newEnvironment.workloadContext; + var requestDetails = vm.newEnvironment; + $rootScope.$broadcast(COMPONENT.MSO_CREATE_ENVIRONMENT, { + url : COMPONENT.OPERATIONAL_ENVIRONMENT_CREATE, + requestDetails : requestDetails + }); + vm.close(); + } + }; + + + + init(); + } +})();
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html new file mode 100644 index 000000000..cd14a76cb --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-test-environment/new-test-environment.html @@ -0,0 +1,50 @@ +<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" /> +<div class="modal-header"> + <h3 class="modal-title" id="modal-title">New Test Environment</h3> + <span ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span> +</div> +<form class="form-create" data-tests-id="test-new-environment-form" name="newTestEnvironment" ng-submit="vm.createEnvironment()"> + <div class="modal-body"> + <div class="form-group"> + <label class="control-label" for="environmentName">Environment Name</label> + <input id="environmentName" class="form-control" ng-model="vm.newEnvironment.instanceName" name="instanceName" data-tests-id="environment-name" placeholder="Enter environment name" required> + </div> + <div class="form-group"> + <label class="control-label" for="ecompInstanceId">ECOMP Environment ID</label> + <select class="form-control" ng-class="{'grayedOut': !selectedIndex, 'connect-error': vm.aaiConnectError}" ng-model="selectedIndex" name="ecompInstanceId" id="ecompInstanceId" data-tests-id="ecomp-instance-id" required ng-change="vm.setEcompEnvironment(selectedIndex)"> + <option value="" disabled selected hidden>Select environment ID</option> + <option data-tests-id="environment-id-option" class="environmentIdOption" ng-repeat="item in vm.environments" ng-value="$index">{{item.operationalEnvironmentId}}</option> + </select> + </div> + <div class="form-group"> + <label class="control-label" for="ecompInstanceName">ECOMP Environment Name</label> + <input id="ecompInstanceName" class="form-control" ng-model="vm.newEnvironment.ecompInstanceName" name="ecompInstanceName" data-tests-id="ecomp-instance-name" required disabled> + </div> + <div class="form-group"> + <label class="control-label" for="tenantContext">Select VSP</label> + <input id="tenantContext" class="form-control" ng-model="vm.newEnvironment.tenantContext" name="tenantContext" data-tests-id="tenant-context" required disabled> + </div> + <div class="form-group"> + <label class="control-label" for="operationalEnvironmentType">Environment Type</label> + <select class="form-control" ng-class="{'grayedOut': !vm.newEnvironment.operationalEnvironmentType}" ng-model="vm.newEnvironment.operationalEnvironmentType" name="operationalEnvironmentType" id="operationalEnvironmentType" data-tests-id="operational-environment-type" required> + <option value="" disabled selected hidden>Enter environment type</option> + <option data-tests-id="environment-type-option" class="environmentTypeOption" ng-repeat="item in vm.environmentsTypesList" ng-value="item">{{item}}</option> + </select> + </div> + <div class="form-group"> + <label class="control-label" for="workloadContext">Workload Context</label> + <select class="form-control" ng-class="{'grayedOut': !vm.newEnvironment.workloadContext}" ng-model="vm.newEnvironment.workloadContext" name="workloadContext" id="workloadContext" data-tests-id="workload-context" required> + <option value="" disabled selected hidden>Select workload context</option> + <option data-tests-id="workload-context-option" class="workloadContextOption" ng-repeat="item in vm.workloadContextList" ng-value="item">{{vm.newEnvironment.operationalEnvironmentType + '_' + item}}</option> + </select> + </div> + <div data-tests-id="test-new-environment-error" class="connect-error" ng-if="vm.aaiConnectError">{{vm.aaiConnectError}}</div> + </div> + <div class="modal-footer"> + <div class="pull-right"> + <button data-tests-id="submit-button" type="submit" id="submit" name="submit" class="btn btn-primary" data-ng-disabled="newTestEnvironment.$invalid">Create</button> + <button data-tests-id="cancel-button" type="button" id="cancel" name="cancel" class="btn btn-white" ng-click="vm.close()">Cancel</button> + </div> + </div> +</form> + diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/pending-change-management/pending-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/pending-change-management/pending-change-management.html index 911e86c24..59c30c54d 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/pending-change-management/pending-change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/pending-change-management/pending-change-management.html @@ -1,4 +1,4 @@ -<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/new-change-management/new-change-management.css" /> +<link rel="stylesheet" type="text/css" href="app/vid/styles/modal-create-new.css" /> <link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/pending-change-management/pending-change-management.css" /> <div class="modal-header"> <h3 class="modal-title" id="pending-modal-header">Pending</h3> @@ -8,5 +8,5 @@ <span id="pending-modal-content">{{vm.content}}</span> </div> <div class="modal-footer"> - <div ng-include="'app/vid/scripts/modals/change-management-manual-tasks-controller/change-management-manual-tasks.html'"></div> + <!--<div ng-include="'app/vid/scripts/modals/change-management-manual-tasks-controller/change-management-manual-tasks.html'"></div>--> </div> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.css new file mode 100644 index 000000000..2c7f3a106 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.css @@ -0,0 +1,37 @@ +.modal-dialog * { + font-family: OpenSans-Regular, sans-serif; +} +.modal-dialog { + width: 540px; +} +.modal-dialog service-metadata{ + background: white; +} +.modal-dialog .modal-footer { + background: #F8F8F8; + border-radius: 0 0 8px 8px; +} +.modal-dialog .cancel-btn { + width: 120px; +} +.modal-dialog .title { + font-size: 22px; + color: #000000; +} +.modal-dialog .top { + margin: 15px 20px; + border-bottom: 3px solid #009FDB; + padding-bottom: 15px; +} +.modal-dialog .modal-x { + float: right; + margin-top: 10px; + height: 15px; + cursor:pointer; +} +.modal-dialog service-metadata label { + margin-bottom: 3px; +} +.modal-dialog service-metadata .field { + margin-top: 11px; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.html new file mode 100644 index 000000000..47ed3e424 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/service-metadata/service-metadata.html @@ -0,0 +1,12 @@ +<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/service-metadata/service-metadata.css"/> +<div class="top"> + <span class="title">{{selectedMetadata[0].value}}</span> + <span class="top-btn sprite modal-x" data-ng-click="cancel()"></span> +</div> + +<div class="meatadata-modal-body" id="modal-body"> + <service-metadata service-metadata-fields="selectedMetadata"></service-metadata> +</div> +<div class="modal-footer"> + <button class="cancel-btn grey" data-tests-id="cancel" data-ng-click="cancel()">Close</button> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js new file mode 100644 index 000000000..ef48aa939 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/OwningEntityService.js @@ -0,0 +1,40 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var OwningEntityService = function ($http, $log, PropertyService, UtilityService, COMPONENT) { + return { + getOwningEntityProperties: function ( successCallbackFunction, familyName) { + $log.debug("OwningEntityService:getOwningEntityProperties"); + familyName = familyName || COMPONENT.PARAMETER_STANDARDIZATION_FAMILY; + var url = COMPONENT.GET_CATEGORY_PARAMETERS+"?familyName=" + familyName+ "&r=" + Math.random(); + var config = { timeout: PropertyService.getServerResponseTimeoutMsec() }; + + $http.get(url, config) + .then(function (response) { + successCallbackFunction(response.data.categoryParameters); + }).catch(UtilityService.runHttpErrorHandler); + } + } +}; + +appDS2.factory("OwningEntityService", ["$http", "$log", "PropertyService", + "UtilityService", "COMPONENT", "FIELD", OwningEntityService]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js index a10f602bf..53a941bfb 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js @@ -21,6 +21,70 @@ "use strict";
var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONENT, FIELD, $q) {
+
+ function getServiceInstance(serviceInstanceIdentifier, findBy) {
+ serviceInstanceIdentifier.trim();
+
+ return $http.get(COMPONENT.AAI_GET_SERVICE_INSTANCE_PATH + serviceInstanceIdentifier + "/" + findBy + "?r=" + Math.random(), {}, {
+ timeout: PropertyService.getServerResponseTimeoutMsec()
+ });
+ }
+
+ function getPnfByName(pnfName) {
+ var deferred = $q.defer();
+ var url = COMPONENT.AAI_GET_PNF_BY_NAME+ encodeURIComponent(pnfName) ;
+ var config = { timeout: PropertyService.getServerResponseTimeoutMsec() };
+
+ $http.get(url, config)
+ .success(function (response) {
+ deferred.resolve({data: response});
+ })
+ .error(function(data, status, headers, config) {
+ deferred.reject({message: data, status: status});
+ });
+
+ return deferred.promise;
+ };
+
+
+ function getGlobalCustomerIdFromServiceInstanceResponse(response) {
+ var globalCustomerId = "";
+ if (angular.isArray(response.data[FIELD.ID.RESULT_DATA])) {
+ var customerIndex = 5;
+ var customerIdIndex = 6;
+ var itemIndex = 0;
+
+ var item = response.data[FIELD.ID.RESULT_DATA][itemIndex];
+ var url = item[FIELD.ID.RESOURCE_LINK];
+ var urlParts = url.split("/");
+ if (urlParts[customerIndex] === FIELD.ID.CUSTOMER) {
+ globalCustomerId = urlParts[customerIdIndex];
+ }
+ }
+ return globalCustomerId;
+ }
+
+ function searchServiceInstances(query) {
+ return $http.get( COMPONENT.SEARCH_SERVICE_INSTANCES + query, {}, {
+ timeout : PropertyService.getServerResponseTimeoutMsec()
+ }).then(function (response) {
+ var displayData = response.data[FIELD.ID.SERVICE_INSTANCES];
+ if (!displayData.length) {
+ displayData = [{
+ globalCustomerId : null,
+ subscriberName : null,
+ serviceType : FIELD.PROMPT.NO_SERVICE_SUB,
+ serviceInstanceId : FIELD.PROMPT.NO_SERVICE_INSTANCE
+ }];
+ }
+ return {displayData: displayData};
+ })
+ }
+
+ function getJoinedQueryString(queries) {
+ return queries.filter(function (val) {return val;}).join("&");
+ }
+
return {
getSubscriberName : function(globalCustomerId,
successCallbackFunction) {
@@ -34,16 +98,16 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE timeout : PropertyService
.getServerResponseTimeoutMsec()
}).then(function(response) {
- var subName = "";
+ var result = {};
if (response.data) {
- subName = response.data[FIELD.ID.SUBNAME];
+ result.subscriberName = response.data[FIELD.ID.SUBNAME];
+ result.serviceSubscriptions = response.data[FIELD.ID.SERVICE_SUBSCRIPTIONS];
}
- successCallbackFunction(subName);
+ successCallbackFunction(result);
})["catch"]
(UtilityService.runHttpErrorHandler);
},
-
runNamedQuery : function (namedQueryId, globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
var url = COMPONENT.AAI_SUB_VIEWEDIT_PATH +
@@ -86,6 +150,48 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE });
},
+ getPNFInformationByServiceTypeAndId : function (globalCustomerId, serviceType, serviceInstanceId, successCallback, errorCallback) {
+
+ var url = COMPONENT.AAI_GET_PNF_INSTANCE +
+ COMPONENT.FORWARD_SLASH + encodeURIComponent(globalCustomerId) +
+ COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceType) +
+ COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceInstanceId);
+ $http.get(url, {}, {
+ timeout : PropertyService.getServerResponseTimeoutMsec()
+ }).then(function(response) {
+ if (response.data != null) {
+ successCallback(response);
+ } else {
+ errorCallback(response);
+ }
+ }, function(response) {
+ errorCallback(response);
+ });
+ },
+
+ searchServiceInstances: searchServiceInstances,
+
+ getModelVersionId: function (subscriberId, instanceId) {
+ var globalCustomerIdQuery = COMPONENT.SELECTED_SUBSCRIBER_SUB_PATH + subscriberId;
+ var serviceInstanceQuery = COMPONENT.SELECTED_SERVICE_INSTANCE_SUB_PATH + instanceId;
+
+ var query = "?" + getJoinedQueryString([globalCustomerIdQuery, serviceInstanceQuery]);
+
+ var deferred = $q.defer();
+
+ searchServiceInstances(query).then(function (response) {
+ var displayData = response.displayData;
+ if (displayData[0] && displayData[0].aaiModelVersionId) {
+ deferred.resolve(displayData[0].aaiModelVersionId);
+ } else {
+ deferred.reject(FIELD.ERROR.MODEL_VERSION_ID_MISSING);
+ }
+ }).catch(function (err) {
+ deferred.reject(err);
+ });
+
+ return deferred.promise;
+ },
getSubDetails : function(selectedSubscriber, selectedServiceInstance, successCallback, errorCallback) {
var subscriber;
@@ -124,9 +230,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE }
});
} else {
- if (serviceInstanceId == []) {
- serviceInstanceId = [ FIELD.PROMPT.NO_SERVICE_INSTANCE ];
- }
+ serviceInstanceId = [ FIELD.PROMPT.NO_SERVICE_INSTANCE ];
}
angular.forEach(serviceInstanceId, function(subVal, subKey) {
displayData.push({
@@ -145,7 +249,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE } else {
displayData.push({
globalCustomerId : selectedSubscriber,
- subscriberName : selectedSubscriberName,
+ subscriberName : subscriberName,
serviceType : FIELD.PROMPT.NO_SERVICE_SUB,
serviceInstanceId : FIELD.PROMPT.NO_SERVICE_INSTANCE
});
@@ -178,6 +282,26 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE });
},
+ getServiceInstance : getServiceInstance,
+ getPnfByName : getPnfByName,
+
+ getGlobalCustomerIdByInstanceIdentifier : function(serviceInstanceIdentifier, findBy) {
+ serviceInstanceIdentifier.trim();
+
+ return getServiceInstance(serviceInstanceIdentifier, findBy)
+ .then(function (response) {
+ return getGlobalCustomerIdFromServiceInstanceResponse(response);
+ });
+ },
+
+ getMultipleValueParamQueryString: function(values, paramSubPath) {
+ if (values.length) {
+ return paramSubPath + values.filter(function (val) {return val;}).join("&" + paramSubPath);
+ }
+ },
+
+ getJoinedQueryString: getJoinedQueryString,
+
getServices2 : function(successCallback, errorCallback ) {
$http.get( FIELD.ID.AAI_GET_SERVICES, {}, {
@@ -252,12 +376,6 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE var lcpCloudRegionTenants = [];
var aaiLcpCloudRegionTenants = response.data;
- lcpCloudRegionTenants.push({
- "cloudRegionId": "",
- "tenantName": FIELD.PROMPT.REGION,
- "tenantId": ""
- });
-
for (var i = 0; i < aaiLcpCloudRegionTenants.length; i++) {
lcpCloudRegionTenants.push({
"cloudRegionId": aaiLcpCloudRegionTenants[i][COMPONENT.CLOUD_REGION_ID],
@@ -267,8 +385,9 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE }
successCallbackFunction(lcpCloudRegionTenants);
- })["catch"]
- (UtilityService.runHttpErrorHandler);
+ }).catch(function(error) {
+ (UtilityService.runHttpErrorHandler(error.data, error.status));
+ })
},
getSubscribers : function(successCallbackFunction) {
$log
@@ -306,7 +425,7 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE })["catch"]
(UtilityService.runHttpErrorHandler);
},
- getLoggedInUserID : function(successCallbackFunction) {
+ getLoggedInUserID : function(successCallbackFunction, catchCallbackFunction) {
$log
.debug("AaiService:getLoggedInUserID");
var url = COMPONENT.GET_USER_ID;
@@ -325,6 +444,9 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE successCallbackFunction([]);
}
},function(failure){console.log("failure")})["catch"]
+ if(catchCallbackFunction) {
+ catchCallbackFunction();
+ }
(UtilityService.runHttpErrorHandler);
},
getServices : function(successCallbackFunction) {
@@ -459,6 +581,8 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE return deferred.promise;
},
+
+
getSubscriberServiceTypes: function(subscriberUuid) {
var deferred = $q.defer();
$log.debug("AaiService:getSubscriberServiceTypes: subscriberUuid: " + subscriberUuid);
@@ -477,6 +601,61 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE }
return deferred.promise;
+ },
+ getVnfInstancesList: function(globalSubscriberId, serviceType, modelVersionId ,modelInvariantId, cloudRegionId) {
+ var deferred = $q.defer();
+ $http.get([COMPONENT.AAI_GET_VNF_INSTANCES_LIST,
+ globalSubscriberId,
+ serviceType,
+ modelVersionId,
+ modelInvariantId,
+ cloudRegionId]
+ .join(COMPONENT.FORWARD_SLASH))
+ .success(function (response) {
+ deferred.resolve(response);
+ }).error(function (data, status) {
+ deferred.reject({message: data, status: status});
+ });
+ return deferred.promise;
+ },
+ getPnfInstancesList: function (globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegionId, equipVendor, equipModel) {
+ var deferred = $q.defer();
+ $http.get([COMPONENT.AAI_GET_PNF_INSTANCES_LIST,
+ globalCustomerId, serviceType,
+ modelVersionId, modelInvariantId,
+ cloudRegionId,
+ equipVendor, equipModel
+ ].join(COMPONENT.FORWARD_SLASH))
+ .success(function (response) {
+ deferred.resolve(response);
+ }).error(function (data, status) {
+ deferred.reject({message: data, status: status});
+ });
+ return deferred.promise;
+ },
+ getByUri: function(uri) {
+ var deferred = $q.defer();
+
+ $http.get(COMPONENT.AAI_GET_BY_URI + uri)
+ .success(function (response) {
+ deferred.resolve({data: []});
+ }).error(function (data, status, headers, config) {
+ deferred.reject({message: data, status: status});
+ });
+
+ return deferred.promise;
+ },
+ getConfiguration: function(configurationId) {
+ var deferred = $q.defer();
+
+ $http.get(COMPONENT.AAI_GET_CONFIGURATION + configurationId)
+ .success(function (response) {
+ deferred.resolve({data: []});
+ }).error(function (data, status, headers, config) {
+ deferred.reject({message: data, status: status});
+ });
+
+ return deferred.promise;
}
}};
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js index f2282d69a..fdab6564b 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js @@ -5,16 +5,20 @@ function changeManagementService($http, $q, COMPONENT, VIDCONFIGURATION) { this.getWorkflows = function (vnfs) { - var deferred = $q.defer(); - - $http.get(COMPONENT.GET_WORKFLOW.replace("@vnfs", vnfs)) - .success(function (response) { - deferred.resolve({data: response}); - }).error(function (data, status, headers, config) { - deferred.reject({message: data, status: status}); + var requestVnfs = _.map(vnfs, function (vnf) { + return { + UUID: vnf["modelVersionId"], + invariantUUID: vnf["invariant-id"] + }; }); - - return deferred.promise; + var requestDetails = {vnfsDetails: requestVnfs}; + return $http.post(COMPONENT.GET_WORKFLOW, requestDetails) + .success(function (response) { + return {data: response}; + }) + .catch(function (err) { + return {data: []}; + }); }; this.getMSOChangeManagements = function() { diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js index ea46dcb9b..615f25ec2 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/componentService.js @@ -25,22 +25,26 @@ var ComponentService = function($log, COMPONENT, UtilityService) { var _this = this;
var componentList = [ {
- id : COMPONENT.NETWORK,
- displayName : "Network"
+ id : COMPONENT.NETWORK,
+ displayName : "Network"
}, {
- id : COMPONENT.SERVICE,
- displayName : "Service Instance"
- }, {id : COMPONENT.OLDVERSION,
- displayName : "Previous Version"
+ id : COMPONENT.SERVICE,
+ displayName : "Service Instance"
+ }, {
+ id : COMPONENT.OLDVERSION,
+ displayName : "Previous Version"
}, {
- id : COMPONENT.VNF,
- displayName : "Virtual Network Function"
+ id : COMPONENT.VNF,
+ displayName : "Virtual Network Function"
+ }, {
+ id : COMPONENT.VF_MODULE,
+ displayName : "VF Module"
}, {
- id : COMPONENT.VF_MODULE,
- displayName : "VF Module"
+ id: COMPONENT.VOLUME_GROUP,
+ displayName: "Volume Group"
}, {
- id : COMPONENT.VOLUME_GROUP,
- displayName : "Volume Group"
+ id : COMPONENT.CONFIGURATION,
+ displayName : "Port Mirroring Configuration"
} ];
var getInventoryInfo = function(suffix, inventoryItem) {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js index e171e2856..838ab3719 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/creationService.js @@ -30,345 +30,355 @@ */
var CreationService = function($log, AaiService, AsdcService, DataService,VIDCONFIGURATION,
- ComponentService, COMPONENT, FIELD, PARAMETER, UtilityService) {
-
- var _this = this;
-
- var getAsyncOperationList = function() {
- if (DataService.getLoggedInUserId() == null)
- getLoggedInUserID();
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- return [ getSubscribers, getServices,getAicZones ];
- case COMPONENT.NETWORK:
- return [ getLcpCloudRegionTenantList ];
- case COMPONENT.VNF:
- return [ getLcpCloudRegionTenantList ];
- case COMPONENT.VF_MODULE:
- return [ getLcpCloudRegionTenantList ];
- case COMPONENT.VOLUME_GROUP:
- return [ getLcpCloudRegionTenantList ];
- }
- };
-
- /*
- * "getSummaryList" and "getUserProvidedList" return parameters that should
- * be displayed in the summary and user provided sections, respectively. The
- * functions are expected to return lists that are in the format needed by
- * the parameter-block directive.
- */
-
- var getSummaryList = function() {
-
- /*
- * These placeholders should be removed and their usage in
- * "getSummaryList" should be replaced by appropriate code as the
- * requirements and interfaces firm up.
- */
-
- var PLACEHOLDER_RESOURCE_DESCRIPTION = "Resource Description (PLACEHOLDER)";
- var PLACEHOLDER_SERVICE_CATEGORY = "Service Category (PLACEHOLDER)";
- var PLACEHOLDER_VF_MODULE_DESCRIPTION = "VF Module Description (PLACEHOLDER)";
- var PLACEHOLDER_VF_MODULE_LABEL = "VF Module Label (PLACEHOLDER)";
- var PLACEHOLDER_VF_MODULE_TYPE = "VF Module Type (PLACEHOLDER)";
-
- _this.parameterList = new Array();
-
- /*
- * Common fields displayed at the top of all create instance screens.
- */
- if(DataService.getModelInfo(_this.componentId)["serviceTypeName"]==null
- || DataService.getModelInfo(_this.componentId)["serviceTypeName"]==undefined
- || DataService.getModelInfo(_this.componentId)["serviceTypeName"]==''){
- addToList(FIELD.NAME.SERVICE_NAME, DataService.getServiceName());
- }
-
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- if ( !DataService.getALaCarte() ) {
- // for macro instantiation need to add the resource names under the node template list
- // this field is called modelCustomizationName in the asdc client code
- var p;
- var rlist = DataService.getResources();
- var res;
- if ( rlist != null ) {
- for (var i = 0; i < rlist.length; i++) {
- res = rlist[i];
-
- p = FIELD.NAME.RESOURCE_NAME.concat(" " + (i+1));
- addToList(p, res.name );
- p = FIELD.NAME.RESOURCE_DESCRIPTION.concat(" " + (i+1));
- addToList(p, res.description );
- }
- }
- }
- if(DataService.getModelInfo(_this.componentId)["createSubscriberName"]!=null && DataService.getModelInfo(_this.componentId)["createSubscriberName"]!=''){
- addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
- .getModelInfo(_this.componentId)["createSubscriberName"]);
- }
- if(DataService.getModelInfo(_this.componentId)["serviceTypeName"]!=null && DataService.getModelInfo(_this.componentId)["serviceTypeName"]!=''){
- addToList(FIELD.NAME.SERVICE_TYPE, DataService
- .getModelInfo(_this.componentId)["serviceTypeName"]);
- addToList(FIELD.NAME.SERVICE_NAME, DataService.getServiceName());
- }
- addToList(FIELD.NAME.SERVICE_INVARIANT_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
- addToList(FIELD.NAME.SERVICE_VERSION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
- addToList(FIELD.NAME.SERVICE_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
- addToList(FIELD.NAME.SERVICE_DESCRIPTION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.DESCRIPTION]);
- addToList(FIELD.NAME.SERVICE_CATEGORY, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.CATEGORY]);
- if (DataService.getModelInfo(_this.componentId)[FIELD.ID.SERVICE_TYPE] != "null") {
- addToList(FIELD.NAME.SERVICE_TYPE, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.SERVICE_TYPE]);
- addToList(FIELD.NAME.SERVICE_ROLE, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.SERVICE_ROLE]);
- }
-
- break;
- case COMPONENT.VF_MODULE:
- addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
- .getSubscriberName());
- addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
- .getServiceInstanceName());
- addToList(FIELD.NAME.MODEL_NAME, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
- addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
- addToList(FIELD.NAME.MODEL_VERSION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
- addToList(FIELD.NAME.MODEL_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
- addToList(FIELD.NAME.MODEL_CUSTOMIZATION_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.CUSTOMIZATION_UUID]);
- break;
- case COMPONENT.VNF:
- addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
- .getSubscriberName());
- addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
- .getServiceInstanceName());
- addToList(FIELD.NAME.MODEL_NAME, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
- addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
- addToList(FIELD.NAME.MODEL_VERSION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
- addToList(FIELD.NAME.MODEL_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
- addToList(FIELD.NAME.MODEL_CUSTOMIZATION_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.CUSTOMIZATION_UUID]);
- addToList(FIELD.NAME.MODEL_CUSTOMIZATION_NAME, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_CUSTOMIZATION_NAME]);
- addToList(FIELD.NAME.MODEL_VNF_TYPE, DataService
- .getModelInfo(_this.componentId)[COMPONENT.VNF_TYPE]);
- addToList(FIELD.NAME.MODEL_VNF_ROLE, DataService
- .getModelInfo(_this.componentId)[COMPONENT.VNF_ROLE]);
- addToList(FIELD.NAME.MODEL_VNF_FUNCTION, DataService
- .getModelInfo(_this.componentId)[COMPONENT.VNF_FUNCTION]);
- addToList(FIELD.NAME.MODEL_VNF_CODE, DataService
- .getModelInfo(_this.componentId)[COMPONENT.VNF_CODE]);
- break;
- case COMPONENT.NETWORK:
- case COMPONENT.VOLUME_GROUP:
- addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
- .getSubscriberName());
- addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
- .getServiceInstanceName());
- addToList(FIELD.NAME.MODEL_NAME, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
- addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
- addToList(FIELD.NAME.MODEL_VERSION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
- addToList(FIELD.NAME.MODEL_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
- addToList(FIELD.NAME.MODEL_CUSTOMIZATION_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.CUSTOMIZATION_UUID]);
- break;
- }
-
- return _this.parameterList;
- };
-
- var getUserProvidedList = function() {
- var parameterList = [];
- var isUserProvidedNaming = false;
- if ( (DataService.getModelInfo(_this.componentId).serviceEcompNaming != null)
- && (DataService.getModelInfo(_this.componentId).serviceEcompNaming === "false") ) {
- isUserProvidedNaming = true;
- }
-
- var isInTop = DataService.getHideServiceFields() || false;
- if (_this.componentId === COMPONENT.SERVICE) {
- if ( DataService.getALaCarte() ) {
- parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ];
- if(!isInTop){
- parameterList = parameterList.concat([ getSubscribersParameter(),
- FIELD.PARAMETER.SERVICE_TYPE_DISABLED ]);
- }
- }
- else {
- // macro
-
- if(!isInTop){
- if (isUserProvidedNaming) {
- parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ];
-
- }
- parameterList = parameterList.concat([ getSubscribersParameter() ]);
- parameterList = parameterList.concat([ getServiceId(),
- FIELD.PARAMETER.SERVICE_TYPE,
- FIELD.PARAMETER.LCP_REGION,
- FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED,
- ]);
- parameterList = parameterList.concat([ getAICZones() ]);
-
-
- }else{
- parameterList = parameterList.concat([ getServiceId(),
- FIELD.PARAMETER.LCP_REGION,
- FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED ]);
- }
- }
- }
- else {
- parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ];
- switch (_this.componentId) {
- case COMPONENT.NETWORK:
- case COMPONENT.VNF:
- parameterList = parameterList.concat([ getServiceId(),
- getLcpRegion(), FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED ]);
- break;
- case COMPONENT.VF_MODULE:
- parameterList = parameterList.concat([
- getLcpRegion(),
- FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED
- ]);
-
- var availableVolumeGroupList = DataService.getAvailableVolumeGroupList();
-
- if (availableVolumeGroupList && availableVolumeGroupList.length > 0) {
- var availableVolumeGroupNames = [FIELD.STATUS.NONE];
-
- for (var i = 0; i < availableVolumeGroupList.length; i++) {
- availableVolumeGroupNames.push(availableVolumeGroupList[i].instance.name);
- }
-
- parameterList.push(addOptionList(
- FIELD.PARAMETER.AVAILABLE_VOLUME_GROUP,
- availableVolumeGroupNames));
- }
- break;
- case COMPONENT.VOLUME_GROUP:
- parameterList = parameterList.concat([ getLcpRegion(),
- FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED ]);
- }
- }
- parameterList.push(FIELD.PARAMETER.SUPPRESS_ROLLBACK);
- if(_this.componentId === COMPONENT.VF_MODULE ){
- parameterList.push({name: FIELD.NAME.SDN_C_PRELOAD,
- id: FIELD.ID.SDN_C_PRELOAD,
- type: "checkbox",
- isEnabled: true,
- isRequired: false,
- hideFieldAndLabel: true
- }
- );
- parameterList.push({name: FIELD.NAME.UPLOAD_SUPPLEMENTORY_DATA_FILE,
- id: FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE,
- type: "checkbox",
- isEnabled: true,
- isRequired: false,
- value:false
- }
- );
-
- parameterList.push({name: FIELD.NAME.SUPPLEMENTORY_DATA_FILE,
- id: FIELD.ID.SUPPLEMENTORY_DATA_FILE,
- type: "file",
- isRequired: false,
- isVisiblity: false
- }
- );
- }
-
- if( VIDCONFIGURATION.UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED && _this.componentId === COMPONENT.VOLUME_GROUP){
- parameterList.push({name: FIELD.NAME.UPLOAD_SUPPLEMENTORY_DATA_FILE,
- id: FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE,
- type: "checkbox",
- isEnabled: true,
- isRequired: false
- }
- );
-
- parameterList.push({name: FIELD.NAME.SUPPLEMENTORY_DATA_FILE,
- id: FIELD.ID.SUPPLEMENTORY_DATA_FILE,
- type: "file",
- isRequired: false,
- isVisiblity: false
- }
- );
- }
-
- addArbitraryParameters(parameterList);
-
- return parameterList;
- };
+ ComponentService, COMPONENT, FIELD, PARAMETER, UtilityService, OwningEntityService) {
+
+ var _this = this;
+
+ var getAsyncOperationList = function() {
+ if (DataService.getLoggedInUserId() == null) {
+ getLoggedInUserID();
+ } else {
+ UtilityService.startNextAsyncOperation();
+ }
+ switch (_this.componentId) {
+ case COMPONENT.SERVICE:
+ return [ getSubscribers, getServices, getAicZones, getOwningEntityProperties ];
+ case COMPONENT.NETWORK:
+ return [ getLcpCloudRegionTenantList, getOwningEntityProperties ];
+ case COMPONENT.VNF:
+ return [ getLcpCloudRegionTenantList, getOwningEntityProperties ];
+ case COMPONENT.VF_MODULE:
+ return [ getLcpCloudRegionTenantList ];
+ case COMPONENT.VOLUME_GROUP:
+ return [ getLcpCloudRegionTenantList ];
+ }
+ };
+
+ /*
+ * "getSummaryList" and "getUserProvidedList" return parameters that should
+ * be displayed in the summary and user provided sections, respectively. The
+ * functions are expected to return lists that are in the format needed by
+ * the parameter-block directive.
+ */
+
+ var getSummaryList = function() {
+
+ /*
+ * These placeholders should be removed and their usage in
+ * "getSummaryList" should be replaced by appropriate code as the
+ * requirements and interfaces firm up.
+ */
+
+ var PLACEHOLDER_RESOURCE_DESCRIPTION = "Resource Description (PLACEHOLDER)";
+ var PLACEHOLDER_SERVICE_CATEGORY = "Service Category (PLACEHOLDER)";
+ var PLACEHOLDER_VF_MODULE_DESCRIPTION = "VF Module Description (PLACEHOLDER)";
+ var PLACEHOLDER_VF_MODULE_LABEL = "VF Module Label (PLACEHOLDER)";
+ var PLACEHOLDER_VF_MODULE_TYPE = "VF Module Type (PLACEHOLDER)";
+
+ _this.parameterList = new Array();
+
+ /*
+ * Common fields displayed at the top of all create instance screens.
+ */
+ if(DataService.getModelInfo(_this.componentId)["serviceTypeName"]==null
+ || DataService.getModelInfo(_this.componentId)["serviceTypeName"]==undefined
+ || DataService.getModelInfo(_this.componentId)["serviceTypeName"]==''){
+ addToList(FIELD.NAME.SERVICE_NAME, DataService.getServiceName());
+ }
+
+ switch (_this.componentId) {
+ case COMPONENT.SERVICE:
+ if ( !DataService.getALaCarte() ) {
+ // for macro instantiation need to add the resource names under the node template list
+ // this field is called modelCustomizationName in the asdc client code
+ var p;
+ var rlist = DataService.getResources();
+ var res;
+ if ( rlist != null ) {
+ for (var i = 0; i < rlist.length; i++) {
+ res = rlist[i];
+
+ p = FIELD.NAME.RESOURCE_NAME.concat(" " + (i+1));
+ addToList(p, res.name );
+ p = FIELD.NAME.RESOURCE_DESCRIPTION.concat(" " + (i+1));
+ addToList(p, res.description );
+ }
+ }
+ }
+ if(DataService.getModelInfo(_this.componentId)["createSubscriberName"]!=null && DataService.getModelInfo(_this.componentId)["createSubscriberName"]!=''){
+ addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
+ .getModelInfo(_this.componentId)["createSubscriberName"]);
+ }
+ if(DataService.getModelInfo(_this.componentId)["serviceTypeName"]!=null && DataService.getModelInfo(_this.componentId)["serviceTypeName"]!=''){
+ addToList(FIELD.NAME.SERVICE_TYPE, DataService
+ .getModelInfo(_this.componentId)["serviceTypeName"]);
+ addToList(FIELD.NAME.SERVICE_NAME, DataService.getServiceName());
+ }
+ addToList(FIELD.NAME.SERVICE_INVARIANT_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
+ addToList(FIELD.NAME.SERVICE_VERSION, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
+ addToList(FIELD.NAME.SERVICE_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
+ addToList(FIELD.NAME.SERVICE_DESCRIPTION, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.DESCRIPTION]);
+ addToList(FIELD.NAME.SERVICE_CATEGORY, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.CATEGORY]);
+ if (DataService.getModelInfo(_this.componentId)[FIELD.ID.SERVICE_TYPE] != "null") {
+ addToList(FIELD.NAME.SERVICE_TYPE, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.SERVICE_TYPE]);
+ addToList(FIELD.NAME.SERVICE_ROLE, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.SERVICE_ROLE]);
+ }
+
+ break;
+ case COMPONENT.VF_MODULE:
+ addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
+ .getSubscriberName());
+ addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
+ .getServiceInstanceName());
+ addToList(FIELD.NAME.MODEL_NAME, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
+ addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
+ addToList(FIELD.NAME.MODEL_VERSION, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
+ addToList(FIELD.NAME.MODEL_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
+ addToList(FIELD.NAME.MODEL_CUSTOMIZATION_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.CUSTOMIZATION_UUID]);
+ break;
+ case COMPONENT.VNF:
+ addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
+ .getSubscriberName());
+ addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
+ .getServiceInstanceName());
+ addToList(FIELD.NAME.MODEL_NAME, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
+ addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
+ addToList(FIELD.NAME.MODEL_VERSION, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
+ addToList(FIELD.NAME.MODEL_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
+ addToList(FIELD.NAME.MODEL_CUSTOMIZATION_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.CUSTOMIZATION_UUID]);
+ addToList(FIELD.NAME.MODEL_CUSTOMIZATION_NAME, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_CUSTOMIZATION_NAME]);
+ addToList(FIELD.NAME.MODEL_VNF_TYPE, DataService
+ .getModelInfo(_this.componentId)[COMPONENT.VNF_TYPE]);
+ addToList(FIELD.NAME.MODEL_VNF_ROLE, DataService
+ .getModelInfo(_this.componentId)[COMPONENT.VNF_ROLE]);
+ addToList(FIELD.NAME.MODEL_VNF_FUNCTION, DataService
+ .getModelInfo(_this.componentId)[COMPONENT.VNF_FUNCTION]);
+ addToList(FIELD.NAME.MODEL_VNF_CODE, DataService
+ .getModelInfo(_this.componentId)[COMPONENT.VNF_CODE]);
+ break;
+ case COMPONENT.NETWORK:
+ case COMPONENT.VOLUME_GROUP:
+ addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
+ .getSubscriberName());
+ addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
+ .getServiceInstanceName());
+ addToList(FIELD.NAME.MODEL_NAME, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
+ addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
+ addToList(FIELD.NAME.MODEL_VERSION, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
+ addToList(FIELD.NAME.MODEL_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
+ addToList(FIELD.NAME.MODEL_CUSTOMIZATION_UUID, DataService
+ .getModelInfo(_this.componentId)[FIELD.ID.CUSTOMIZATION_UUID]);
+ break;
+ }
+
+ return _this.parameterList;
+ };
+
+ var getUserProvidedList = function() {
+ var parameterList = [];
+ var isUserProvidedNaming = false;
+ if ( (DataService.getModelInfo(_this.componentId).serviceEcompNaming != null)
+ && (DataService.getModelInfo(_this.componentId).serviceEcompNaming === "false") ) {
+ isUserProvidedNaming = true;
+ }
+
+ var isInTop = DataService.getHideServiceFields() || false;
+ if (_this.componentId === COMPONENT.SERVICE) {
+ if ( DataService.getALaCarte() ) {
+ parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ];
+ if(!isInTop){
+ parameterList = parameterList.concat([ getSubscribersParameter(),
+ FIELD.PARAMETER.SERVICE_TYPE_DISABLED ]);
+ }
+ }
+ else {
+ // macro
+
+ if(!isInTop){
+ if (isUserProvidedNaming) {
+ parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ];
- var addArbitraryParameters = function(parameterList) {
- if ( DataService.getModelInfo(_this.componentId).displayInputs != null ) {
- var inputs = DataService.getModelInfo(_this.componentId).displayInputs;
- for ( var key in inputs) {
- var parameter = {
- id : key,
- type : PARAMETER.STRING,
- name : ComponentService.getFieldDisplayName(key),
- value : inputs[key][PARAMETER.DEFAULT],
- isRequired : inputs[key][PARAMETER.REQUIRED],
- description : inputs[key][PARAMETER.DESCRIPTION]
- };
- if ( DataService.getALaCarte() ) {
- parameter.name = ComponentService.getFieldDisplayName(inputs[key][PARAMETER.DISPLAY_NAME]);
- }
- switch (inputs[key][PARAMETER.TYPE]) {
- case PARAMETER.INTEGER:
- parameter.type = PARAMETER.NUMBER;
- break;
- case PARAMETER.BOOLEAN:
- parameter.type = PARAMETER.BOOLEAN;
- break;
- case PARAMETER.RANGE:
- break;
- case PARAMETER.LIST:
- parameter.type = PARAMETER.LIST;
- break;
- case PARAMETER.MAP:
- parameter.type = PARAMETER.MAP;
- break;
- }
-
- if ( UtilityService.hasContents(inputs[key][PARAMETER.CONSTRAINTS])
- && ( inputs[key][PARAMETER.CONSTRAINTS].length > 0 ) ) {
- var constraintsArray = inputs[key][PARAMETER.CONSTRAINTS];
- //console.log ("Calling addConstraintParameters for input name=" + key);
- addConstraintParameters (parameterList, constraintsArray, key, inputs, parameter);
- }
- else {
-
- parameterList.push(parameter);
- }
- }
- DataService.setArbitraryParameters (parameterList);
- }
- };
+ }
+ parameterList = parameterList.concat([ getSubscribersParameter() ]);
+ parameterList = parameterList.concat([ getServiceId(),
+ FIELD.PARAMETER.SERVICE_TYPE,
+ FIELD.PARAMETER.LCP_REGION,
+ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
+ FIELD.PARAMETER.TENANT_DISABLED
+ ]);
+ parameterList = parameterList.concat([ getAicZonesParameter() ]);
+
+
+ }else{
+ parameterList = parameterList.concat([ getServiceId(),
+ FIELD.PARAMETER.LCP_REGION,
+ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
+ FIELD.PARAMETER.TENANT_DISABLED ]);
+ }
+ }
+
+ parameterList = parameterList.concat([ getProjectParameter() ]);
+ parameterList = parameterList.concat([ getOwningEntityParameter() ]);
+
+ }
+ else {
+ parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ];
+ switch (_this.componentId) {
+ case COMPONENT.NETWORK:
+ case COMPONENT.VNF:
+ parameterList = parameterList.concat([ getServiceId(),
+ getLcpRegionParameter(), FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
+ FIELD.PARAMETER.TENANT_DISABLED ]);
+ parameterList = parameterList.concat([ getLineOfBusinessParameter() ]);
+ parameterList = parameterList.concat([ getPlatformParameter() ]);
+
+ break;
+ case COMPONENT.VF_MODULE:
+ parameterList = parameterList.concat([
+ getLcpRegionParameter(),
+ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
+ FIELD.PARAMETER.TENANT_DISABLED
+ ]);
+
+ var availableVolumeGroupList = DataService.getAvailableVolumeGroupList();
+
+ if (availableVolumeGroupList && availableVolumeGroupList.length > 0) {
+ var availableVolumeGroupNames = [FIELD.STATUS.NONE];
+
+ for (var i = 0; i < availableVolumeGroupList.length; i++) {
+ availableVolumeGroupNames.push(availableVolumeGroupList[i].instance.name);
+ }
+
+ parameterList.push(addOptionList(
+ FIELD.PARAMETER.AVAILABLE_VOLUME_GROUP,
+ availableVolumeGroupNames));
+ }
+ break;
+ case COMPONENT.VOLUME_GROUP:
+ parameterList = parameterList.concat([ getLcpRegionParameter(),
+ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
+ FIELD.PARAMETER.TENANT_DISABLED ]);
+ }
+ }
+ parameterList.push(FIELD.PARAMETER.SUPPRESS_ROLLBACK);
+ if(_this.componentId === COMPONENT.VF_MODULE ){
+ parameterList.push({name: FIELD.NAME.SDN_C_PRELOAD,
+ id: FIELD.ID.SDN_C_PRELOAD,
+ type: "checkbox",
+ isEnabled: true,
+ isRequired: false,
+ hideFieldAndLabel: true
+ }
+ );
+ parameterList.push({name: FIELD.NAME.UPLOAD_SUPPLEMENTORY_DATA_FILE,
+ id: FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE,
+ type: "checkbox",
+ isEnabled: true,
+ isRequired: false,
+ value:false
+ }
+ );
+
+ parameterList.push({name: FIELD.NAME.SUPPLEMENTORY_DATA_FILE,
+ id: FIELD.ID.SUPPLEMENTORY_DATA_FILE,
+ type: "file",
+ isRequired: false,
+ isVisiblity: false
+ }
+ );
+ }
+
+ if( VIDCONFIGURATION.UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED && _this.componentId === COMPONENT.VOLUME_GROUP){
+ parameterList.push({name: FIELD.NAME.UPLOAD_SUPPLEMENTORY_DATA_FILE,
+ id: FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE,
+ type: "checkbox",
+ isEnabled: true,
+ isRequired: false
+ }
+ );
+
+ parameterList.push({name: FIELD.NAME.SUPPLEMENTORY_DATA_FILE,
+ id: FIELD.ID.SUPPLEMENTORY_DATA_FILE,
+ type: "file",
+ isRequired: false,
+ isVisiblity: false
+ }
+ );
+ }
+
+ addArbitraryParameters(parameterList);
+
+ return parameterList;
+ };
+
+ var addArbitraryParameters = function(parameterList) {
+ if ( DataService.getModelInfo(_this.componentId).displayInputs != null ) {
+ var inputs = DataService.getModelInfo(_this.componentId).displayInputs;
+ for ( var key in inputs) {
+ var parameter = {
+ id : key,
+ type : PARAMETER.STRING,
+ name : ComponentService.getFieldDisplayName(key),
+ value : inputs[key][PARAMETER.DEFAULT],
+ isRequired : inputs[key][PARAMETER.REQUIRED],
+ description : inputs[key][PARAMETER.DESCRIPTION]
+ };
+ if ( DataService.getALaCarte() ) {
+ parameter.name = ComponentService.getFieldDisplayName(inputs[key][PARAMETER.DISPLAY_NAME]);
+ }
+ switch (inputs[key][PARAMETER.TYPE]) {
+ case PARAMETER.INTEGER:
+ parameter.type = PARAMETER.NUMBER;
+ break;
+ case PARAMETER.BOOLEAN:
+ parameter.type = PARAMETER.BOOLEAN;
+ break;
+ case PARAMETER.RANGE:
+ break;
+ case PARAMETER.LIST:
+ parameter.type = PARAMETER.LIST;
+ break;
+ case PARAMETER.MAP:
+ parameter.type = PARAMETER.MAP;
+ break;
+ }
+
+ if ( UtilityService.hasContents(inputs[key][PARAMETER.CONSTRAINTS])
+ && ( inputs[key][PARAMETER.CONSTRAINTS].length > 0 ) ) {
+ var constraintsArray = inputs[key][PARAMETER.CONSTRAINTS];
+ //console.log ("Calling addConstraintParameters for input name=" + key);
+ addConstraintParameters (parameterList, constraintsArray, key, inputs, parameter);
+ }
+ else {
+
+ parameterList.push(parameter);
+ }
+ }
+ DataService.setArbitraryParameters (parameterList);
+ }
+ };
var addConstraintParameters = function(parameterList, constraintsArray, key, inputs, parameter) {
// If there are constraints and the operator is "valid_values",
@@ -485,614 +495,697 @@ var CreationService = function($log, AaiService, AsdcService, DataService,VIDCON value : value
});
};
-
- /*
- * The "*Mso*" functions return URL and request details that can be passed
- * to the MSO controller. The request details defines the info passed as
- * part of the POST body.
- */
-
- var getMsoUrl = function() {
- switch (_this.componentId) {
- case COMPONENT.NETWORK:
- return "mso_create_nw_instance/"
- + DataService.getServiceInstanceId();
- case COMPONENT.SERVICE:
- return "mso_create_svc_instance";
- case COMPONENT.VNF:
- return "mso_create_vnf_instance/"
- + DataService.getServiceInstanceId();
- case COMPONENT.VF_MODULE:
- return "mso_create_vfmodule_instance/"
- + DataService.getServiceInstanceId() + "/vnfs/"
- + DataService.getVnfInstanceId();
- case COMPONENT.VOLUME_GROUP:
- return "mso_create_volumegroup_instance/"
- + DataService.getServiceInstanceId() + "/vnfs/"
- + DataService.getVnfInstanceId();
- }
- };
-
- var getMsoRequestDetails = function(parameterList) {
- console.log("getMsoRequestDetails invoked, parameterList="); console.log(JSON.stringify(parameterList,null,4));
- //console.log("getMsoRequestDetails invoked, DataService.getArbitraryParameters()=");
- //console.log(JSON.stringify(DataService.getArbitraryParameters(),null,4));
-
- var modelInfo = DataService.getModelInfo(_this.componentId);
- var requestorloggedInId = DataService.getLoggedInUserId();
- if (requestorloggedInId == null)
- requestorloggedInId = "";
- var isSupRollback = false;
- if (getValueFromList(FIELD.ID.SUPPRESS_ROLLBACK,parameterList) === "true") {
- isSupRollback = true;
- }
- var requestDetails = {
- requestInfo : {
- instanceName : getValueFromList(FIELD.ID.INSTANCE_NAME,
- parameterList),
- source : FIELD.ID.VID,
- suppressRollback : isSupRollback,
- requestorId: requestorloggedInId
- },
- modelInfo : {
- modelType : _this.componentId,
- modelInvariantId : modelInfo.modelInvariantId,
- modelVersionId : modelInfo.modelNameVersionId,
- modelName : modelInfo.modelName,
- modelVersion : modelInfo.modelVersion,
- modelCustomizationId: modelInfo.customizationUuid,
- modelCustomizationName : modelInfo.modelCustomizationName
- },
- requestParameters : {
- userParams : getArbitraryParameters(parameterList)
- }
- };
- if ( (_this.componentId != COMPONENT.SERVICE) || ( !DataService.getALaCarte() ) ) {
- // include cloud region for everything but service create alacarte
- var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
- if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
- lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
- parameterList);
- }
- requestDetails.cloudConfiguration = {
- lcpCloudRegionId : lcpRegion,
- tenantId : getValueFromList(FIELD.ID.TENANT, parameterList)
- };
- }
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- requestDetails.subscriberInfo = {
- globalSubscriberId : DataService.getGlobalCustomerId(),
- subscriberName : DataService.getSubscriberName()
- };
- var isInTop = DataService.getHideServiceFields() || false;
- if(isInTop){
- requestDetails.requestParameters.subscriptionServiceType = DataService.getModelInfo(_this.componentId)["serviceTypeName"];
- }else{
- requestDetails.requestParameters.subscriptionServiceType = getValueFromList(
- FIELD.ID.SERVICE_TYPE, parameterList);
- }
- requestDetails.requestParameters.aLaCarte = DataService.getALaCarte();
- if ( !DataService.getALaCarte() ) {
- requestDetails.requestInfo.productFamilyId = getValueFromList(
- FIELD.ID.PRODUCT_FAMILY, parameterList);
- }
- var svcModelInfo = {
- modelType : _this.componentId,
- modelInvariantId : modelInfo.modelInvariantId,
- modelVersionId : modelInfo.modelNameVersionId,
- modelName : modelInfo.modelName,
- modelVersion : modelInfo.modelVersion
- };
- requestDetails.modelInfo = svcModelInfo;
- break;
- case COMPONENT.VNF:
-
- requestDetails.requestInfo.productFamilyId = getValueFromList(
- FIELD.ID.PRODUCT_FAMILY, parameterList);
- break;
- case COMPONENT.NETWORK:
- requestDetails.requestInfo.productFamilyId = getValueFromList(
- FIELD.ID.PRODUCT_FAMILY, parameterList);
-
- break;
- case COMPONENT.VF_MODULE:
- requestDetails.requestParameters.usePreload = getValueFromList(
- FIELD.ID.SDN_C_PRELOAD, parameterList);
- if(_this.componentId == COMPONENT.VF_MODULE &&(requestDetails.requestParameters.usePreload== null || requestDetails.requestParameters.usePreload === '')){
- requestDetails.requestParameters.usePreload = false;
- }
- break;
- case COMPONENT.VOLUME_GROUP:
- break;
- }
-
- var relatedInstanceList = getRelatedInstanceList(parameterList);
-
- if (relatedInstanceList !== undefined) {
- requestDetails.relatedInstanceList = relatedInstanceList;
- }
-
- return requestDetails;
- };
-
- var getRelatedInstanceList = function(parameterList) {
- var relatedInstanceList = new Array();
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- return undefined;
- case COMPONENT.NETWORK:
- case COMPONENT.VNF:
- addRelatedInstance(relatedInstanceList, COMPONENT.SERVICE,
- DataService.getServiceInstanceId());
- break;
- case COMPONENT.VF_MODULE:
- addRelatedInstance(relatedInstanceList, COMPONENT.SERVICE,
- DataService.getServiceInstanceId());
- addRelatedInstance(relatedInstanceList, COMPONENT.VNF, DataService
- .getVnfInstanceId());
-
- var availableVolumeGroup = getValueFromList(
- FIELD.ID.AVAILABLE_VOLUME_GROUP, parameterList);
-
- if (UtilityService.hasContents(availableVolumeGroup) && availableVolumeGroup !== "None") {
- var availableVolumeGroups = DataService.getAvailableVolumeGroupList();
-
- for (var i = 0; i < availableVolumeGroups.length; i++) {
- if (availableVolumeGroups[i].instance.name == availableVolumeGroup) {
- DataService.setModelInfo(COMPONENT.VOLUME_GROUP, DataService.getModelInfo(COMPONENT.VF_MODULE));
- DataService.setVolumeGroupInstanceId(availableVolumeGroups[i].instance.object["volume-group-id"]);
- break;
- }
- }
-
- addRelatedInstance(relatedInstanceList, COMPONENT.VOLUME_GROUP,
- DataService.getVolumeGroupInstanceId());
- }
- break;
- case COMPONENT.VOLUME_GROUP:
- addRelatedInstance(relatedInstanceList, COMPONENT.SERVICE,
- DataService.getServiceInstanceId());
- addRelatedInstance(relatedInstanceList, COMPONENT.VNF, DataService
- .getVnfInstanceId());
- break;
- }
-
- return relatedInstanceList;
- };
-
- var addRelatedInstance = function(relatedInstanceList, componentId,
- instanceId) {
- var modelInfo = DataService.getModelInfo(componentId);
- var relatedInstance;
- if (modelInfo !== undefined) {
- if (componentId === COMPONENT.SERVICE) {
- relatedInstance = {
- "instanceId" : instanceId,
- "modelInfo" : {
- "modelType" : componentId,
- "modelName" : modelInfo.modelName,
- "modelInvariantId" : modelInfo.modelInvariantId,
- "modelVersion" : modelInfo.modelVersion,
- "modelVersionId" : modelInfo.modelNameVersionId,
-
- }
- };
- }
- else {
- relatedInstance = {
- "instanceId" : instanceId,
- "modelInfo" : {
- "modelType" : componentId,
- "modelName" : modelInfo.modelName,
- "modelInvariantId" : modelInfo.modelInvariantId,
- "modelVersion" : modelInfo.modelVersion,
- "modelVersionId" : modelInfo.modelNameVersionId,
- "modelCustomizationId": modelInfo.customizationUuid,
- "modelCustomizationName": modelInfo.modelCustomizationName
- }
- }
- }
- relatedInstanceList.push({
- relatedInstance : relatedInstance
- });
- }
- };
-
- /*
- * var getArbitraryParameters = function(parameterList) { var
- * arbitraryParameters = new Object(); for (var i = 0; i <
- * parameterList.length; i++) { var parameter = parameterList[i]; switch
- * (parameter.id) { case FIELD.ID.INSTANCE_NAME: case
- * FIELD.ID.PRODUCT_FAMILY: case FIELD.ID.LCP_REGION: case
- * FIELD.ID.LCP_REGION_TEXT: case FIELD.ID.SERVICE_TYPE: case
- * FIELD.ID.TENANT: case FIELD.ID.SUPPRESS_ROLLBACK: break; default:
- * arbitraryParameters[parameter.id] = parameter.value; } } return
- * arbitraryParameters; }
- */
- var getArbitraryParameters = function(parameterList) {
- var arbitraryParameters = new Object();
- var arbitraryArray = new Array();
- for (var i = 0; i < parameterList.length; i++) {
- var parameter = parameterList[i];
- switch (parameter.id) {
- case FIELD.ID.AVAILABLE_VOLUME_GROUP:
- break;
- case FIELD.ID.INSTANCE_NAME:
- break;
- case FIELD.ID.PRODUCT_FAMILY:
- break;
- case FIELD.ID.LCP_REGION:
- break;
- case FIELD.ID.LCP_REGION_TEXT:
- break;
- case FIELD.ID.SERVICE_TYPE:
- break;
- case FIELD.ID.TENANT:
- break;
- case FIELD.ID.SUPPRESS_ROLLBACK:
- break;
- case FIELD.ID.SUBSCRIBER_NAME:
- break;
- case FIELD.ID.SDN_C_PRELOAD:
- break;
- case FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE:
- break;
- case FIELD.ID.SUPPLEMENTORY_DATA_FILE:
- arbitraryParameters = FIELD.PARAMETER.SUPPLEMENTORY_DATA_FILE['value'];
- arbitraryArray=arbitraryParameters;
- FIELD.PARAMETER.SUPPLEMENTORY_DATA_FILE['value']=[];
- break;
-
- default:
- if (parameter.value != '') {
- arbitraryParameters = {
- name: parameter.id,
- value: parameter.value
- }
- arbitraryArray.push(arbitraryParameters);
- }
- }
- }
- return (arbitraryArray);
+ var setInventoryInfo = function(){
+ var inventoryItem = DataService.getInventoryItem();
+ var inventoryInfo = ComponentService.getInventoryInfo(
+ _this.componentId, inventoryItem);
}
- var getModel = function() {
- AsdcService.getModel(DataService.getModelId(), function(response) {
- DataService.setModelInfo(_this.componentId, {
- modelInvariantId : response.data.invariantUUID,
- modelNameVersionId : response.data.uuid,
- modelName : response.data.name,
- modelVersion : response.data.version,
- inputs : response.data.inputs
- });
- UtilityService.startNextAsyncOperation();
- });
- };
-
- var getSubscriptionServiceTypeList = function() {
- AaiService.getSubscriptionServiceTypeList(DataService
- .getGlobalCustomerId(), function(response) {
- DataService.setSubscriptionServiceTypeList(response);
- UtilityService.startNextAsyncOperation();
- });
- };
-
- var getLoggedInUserID = function() {
- AaiService.getLoggedInUserID(function(response) {
- DataService.setLoggedInUserId(response.data);
- UtilityService.startNextAsyncOperation();
- });
- };
-
- var getSubscribers = function() {
- AaiService.getSubscribers(function(response) {
- DataService.setSubscribers(response);
- UtilityService.startNextAsyncOperation();
- });
- };
- var getServices = function() {
- AaiService.getServices(function(response) {
- var serviceIdList = [];
- angular.forEach(response.data, function(value, key) {
- angular.forEach(value, function(subVal, key) {
- var newVal = {
- "id" : subVal[FIELD.ID.SERVICE_ID],
- "description" : subVal[FIELD.ID.SERVICE_DESCRIPTION],
- "isPermitted" : subVal[FIELD.ID.IS_PERMITTED],
- };
- serviceIdList.push(newVal);
- DataService.setServiceIdList(serviceIdList);
- });
- });
-
- UtilityService.startNextAsyncOperation();
- });
- };
- var getAicZones = function() {
- AaiService.getAicZones(function(response) {
- var serviceIdList = [];
- angular.forEach(response.data, function(value, key) {
- angular.forEach(value, function(subVal, key) {
- var newVal = {
- "id" : subVal[FIELD.ID.ZONE_ID],
- "name" : subVal[FIELD.ID.ZONE_NAME],
- };
- serviceIdList.push(newVal);
- DataService.setAicZones(serviceIdList);
- });
- });
-
- UtilityService.startNextAsyncOperation();
- });
-
- };
-
-
-
- var getLcpCloudRegionTenantList = function() {
- AaiService.getLcpCloudRegionTenantList(DataService
- .getGlobalCustomerId(), DataService.getServiceType(), function(
- response) {
- DataService.setCloudRegionTenantList(response);
- UtilityService.startNextAsyncOperation();
- });
- };
+ /*
+ * The "*Mso*" functions return URL and request details that can be passed
+ * to the MSO controller. The request details defines the info passed as
+ * part of the POST body.
+ */
+
+ var getMsoUrl = function() {
+ switch (_this.componentId) {
+ case COMPONENT.NETWORK:
+ return "mso_create_nw_instance/"
+ + DataService.getServiceInstanceId();
+ case COMPONENT.SERVICE:
+ return "mso_create_svc_instance";
+ case COMPONENT.VNF:
+ return "mso_create_vnf_instance/"
+ + DataService.getServiceInstanceId();
+ case COMPONENT.VF_MODULE:
+ return "mso_create_vfmodule_instance/"
+ + DataService.getServiceInstanceId() + "/vnfs/"
+ + DataService.getVnfInstanceId();
+ case COMPONENT.VOLUME_GROUP:
+ return "mso_create_volumegroup_instance/"
+ + DataService.getServiceInstanceId() + "/vnfs/"
+ + DataService.getVnfInstanceId();
+ }
+ };
+
+ var getMsoRequestDetails = function(parameterList) {
+ console.log("getMsoRequestDetails invoked, parameterList="); console.log(JSON.stringify(parameterList,null,4));
+ //console.log("getMsoRequestDetails invoked, DataService.getArbitraryParameters()=");
+ //console.log(JSON.stringify(DataService.getArbitraryParameters(),null,4));
+
+ var modelInfo = DataService.getModelInfo(_this.componentId);
+ var requestorloggedInId = DataService.getLoggedInUserId();
+ var owningEntityId = getValueFromList(FIELD.ID.OWNING_ENTITY, parameterList);
+ if (requestorloggedInId == null)
+ requestorloggedInId = "";
+ var isSupRollback = false;
+ if (getValueFromList(FIELD.ID.SUPPRESS_ROLLBACK,parameterList) === "true") {
+ isSupRollback = true;
+ }
+ var requestDetails = {
+ requestInfo : {
+ instanceName : getValueFromList(FIELD.ID.INSTANCE_NAME,
+ parameterList) || DataService.getVfModuleInstanceName(),
+ source : FIELD.ID.VID,
+ suppressRollback : isSupRollback,
+ requestorId: requestorloggedInId
+ },
+ modelInfo : {
+ modelType : _this.componentId,
+ modelInvariantId : modelInfo.modelInvariantId,
+ modelVersionId : modelInfo.modelNameVersionId,
+ modelName : modelInfo.modelName,
+ modelVersion : modelInfo.modelVersion,
+ modelCustomizationId: modelInfo.customizationUuid,
+ modelCustomizationName : modelInfo.modelCustomizationName
+ },
+ requestParameters : {
+ userParams : getArbitraryParameters(parameterList)
+ }
+ };
+ if ( (_this.componentId != COMPONENT.SERVICE) || ( !DataService.getALaCarte() ) ) {
+ // include cloud region for everything but service create alacarte
+ var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
+ if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
+ lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
+ parameterList);
+ }
+ requestDetails.cloudConfiguration = {
+ lcpCloudRegionId : lcpRegion,
+ tenantId : getValueFromList(FIELD.ID.TENANT, parameterList)
+ };
+ }
+ switch (_this.componentId) {
+ case COMPONENT.SERVICE:
+ requestDetails.subscriberInfo = {
+ globalSubscriberId : DataService.getGlobalCustomerId(),
+ subscriberName : DataService.getSubscriberName()
+ };
+ var isInTop = DataService.getHideServiceFields() || false;
+ if(isInTop){
+ requestDetails.requestParameters.subscriptionServiceType = DataService.getModelInfo(_this.componentId)["serviceTypeName"];
+ }else{
+ requestDetails.requestParameters.subscriptionServiceType = getValueFromList(
+ FIELD.ID.SERVICE_TYPE, parameterList);
+ }
+ requestDetails.requestParameters.aLaCarte = DataService.getALaCarte();
+ if ( !DataService.getALaCarte() ) {
+ requestDetails.requestInfo.productFamilyId = getValueFromList(
+ FIELD.ID.PRODUCT_FAMILY, parameterList);
+ }
+ var svcModelInfo = {
+ modelType : _this.componentId,
+ modelInvariantId : modelInfo.modelInvariantId,
+ modelVersionId : modelInfo.modelNameVersionId,
+ modelName : modelInfo.modelName,
+ modelVersion : modelInfo.modelVersion
+ };
+ requestDetails.modelInfo = svcModelInfo;
+
+ var selectedProject = getValueFromList(FIELD.ID.PROJECT, parameterList);
+
+ if (selectedProject) {
+ requestDetails.project = {
+ projectName: getValueFromList(FIELD.ID.PROJECT, parameterList)
+ };
+ }
+
+ requestDetails.owningEntity = {
+ owningEntityId: owningEntityId,
+ owningEntityName: getOwningEntityNameById(owningEntityId)
+ };
+
+ break;
+ case COMPONENT.VNF:
+
+ requestDetails.requestInfo.productFamilyId = getValueFromList(
+ FIELD.ID.PRODUCT_FAMILY, parameterList);
+
+ var lineOfBusiness = getValueFromList(FIELD.ID.LINE_OF_BUSINESS, parameterList);
+
+ if(lineOfBusiness) {
+ var lineOfBusinessNamesString = _.map(lineOfBusiness, "name").join(", ");
+
+ requestDetails.lineOfBusiness = {
+ lineOfBusinessName: lineOfBusinessNamesString
+ }
+ }
- var internalGetParametersHandler = function() {
- if (angular.isFunction(_this.getParametersHandler)) {
- _this.getParametersHandler({
- summaryList : getSummaryList(),
- userProvidedList : getUserProvidedList()
- });
- }
- };
+ requestDetails.platform = {
+ platformName: getValueFromList(FIELD.ID.PLATFORM, parameterList)
+ };
- var getSubscribersParameter = function() {
- var subscribers = DataService.getSubscribers();
- var parameter = FIELD.PARAMETER.SUBSCRIBER_NAME;
- if ( UtilityService.hasContents(subscribers)) {
- parameter.optionList = [];
-
- for (var i = 0; i < subscribers.length; i++) {
- parameter.optionList.push({
- id : subscribers[i][FIELD.ID.GLOBAL_CUSTOMER_ID],
- name : subscribers[i][FIELD.ID.SUBNAME],
- isPermitted : subscribers[i][FIELD.ID.IS_PERMITTED]
- })
- }
- }
- return parameter;
- };
+ break;
+ case COMPONENT.NETWORK:
+ requestDetails.requestInfo.productFamilyId = getValueFromList(
+ FIELD.ID.PRODUCT_FAMILY, parameterList);
+ var lineOfBusiness = getValueFromList(FIELD.ID.LINE_OF_BUSINESS, parameterList);
- var getServiceId = function() {
- var serviceIdList = DataService.getServiceIdList();
- //var serviceTypeList = DataService.getSubscriptionServiceTypeList();
- var parameter = FIELD.PARAMETER.PRODUCT_FAMILY;
- parameter.optionList = new Array();
- if ( UtilityService.hasContents(serviceIdList) ) {
- // load them all
- for (var i = 0; i < serviceIdList.length; i++) {
- parameter.optionList.push({
- id : serviceIdList[i].id,
- name : serviceIdList[i].description,
- isPermitted : serviceIdList[i].isPermitted
- });
- }
- }
-
- return parameter;
- };
-
- var getAICZones = function() {
- var aicList = DataService.getAicZones();
- var parameter = FIELD.PARAMETER.AIC_ZONES;
- parameter.optionList = new Array();
- if ( UtilityService.hasContents(aicList) ) {
- // load them all
- for (var i = 0; i < aicList.length; i++) {
- parameter.optionList.push({
- id : aicList[i].id,
- name : aicList[i].name,
- isPermitted : true
-
- });
- }
- }
-
- return parameter;
- };
+ if(lineOfBusiness) {
+ var lineOfBusinessNamesString = _.map(lineOfBusiness, "name").join(", ");
+ requestDetails.lineOfBusiness = {
+ lineOfBusinessName: lineOfBusinessNamesString
+ }
+ }
+
+ requestDetails.platform = {
+ platformName: getValueFromList(FIELD.ID.PLATFORM, parameterList)
+ };
+ break;
+ case COMPONENT.VF_MODULE:
+ requestDetails.requestParameters.usePreload = getValueFromList(
+ FIELD.ID.SDN_C_PRELOAD, parameterList);
+ if(_this.componentId == COMPONENT.VF_MODULE &&(requestDetails.requestParameters.usePreload== null || requestDetails.requestParameters.usePreload === '')){
+ requestDetails.requestParameters.usePreload = false;
+ }
+ break;
+ case COMPONENT.VOLUME_GROUP:
+ break;
+ }
+
+ var relatedInstanceList = getRelatedInstanceList(parameterList);
+
+ if (relatedInstanceList !== undefined) {
+ requestDetails.relatedInstanceList = relatedInstanceList;
+ }
+
+ return requestDetails;
+ };
+
+ var getRelatedInstanceList = function(parameterList) {
+ var relatedInstanceList = new Array();
+ switch (_this.componentId) {
+ case COMPONENT.SERVICE:
+ return undefined;
+ case COMPONENT.NETWORK:
+ case COMPONENT.VNF:
+ addRelatedInstance(relatedInstanceList, COMPONENT.SERVICE,
+ DataService.getServiceInstanceId());
+ break;
+ case COMPONENT.VF_MODULE:
+ addRelatedInstance(relatedInstanceList, COMPONENT.SERVICE,
+ DataService.getServiceInstanceId());
+ addRelatedInstance(relatedInstanceList, COMPONENT.VNF, DataService
+ .getVnfInstanceId());
+
+ var availableVolumeGroup = getValueFromList(
+ FIELD.ID.AVAILABLE_VOLUME_GROUP, parameterList);
+
+ if (UtilityService.hasContents(availableVolumeGroup) && availableVolumeGroup !== "None") {
+ var availableVolumeGroups = DataService.getAvailableVolumeGroupList();
+
+ for (var i = 0; i < availableVolumeGroups.length; i++) {
+ if (availableVolumeGroups[i].instance.name == availableVolumeGroup) {
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, DataService.getModelInfo(COMPONENT.VF_MODULE));
+ DataService.setVolumeGroupInstanceId(availableVolumeGroups[i].instance.object["volume-group-id"]);
+ break;
+ }
+ }
- var getLcpRegion = function() {
- var cloudRegionTenantList = DataService.getCloudRegionTenantList();
- console.log ( "cloudRegionTenantList=");
- console.log ( JSON.stringify (cloudRegionTenantList, null, 4 ));
+ addRelatedInstance(relatedInstanceList, COMPONENT.VOLUME_GROUP,
+ DataService.getVolumeGroupInstanceId());
+ }
+ break;
+ case COMPONENT.VOLUME_GROUP:
+ addRelatedInstance(relatedInstanceList, COMPONENT.SERVICE,
+ DataService.getServiceInstanceId());
+ addRelatedInstance(relatedInstanceList, COMPONENT.VNF, DataService
+ .getVnfInstanceId());
+ break;
+ }
+
+ return relatedInstanceList;
+ };
+
+ var addRelatedInstance = function(relatedInstanceList, componentId,
+ instanceId) {
+ var modelInfo = DataService.getModelInfo(componentId);
+ var relatedInstance;
+ if (modelInfo !== undefined) {
+ if (componentId === COMPONENT.SERVICE) {
+ relatedInstance = {
+ "instanceId" : instanceId,
+ "modelInfo" : {
+ "modelType" : componentId,
+ "modelName" : modelInfo.modelName,
+ "modelInvariantId" : modelInfo.modelInvariantId,
+ "modelVersion" : modelInfo.modelVersion,
+ "modelVersionId" : modelInfo.modelNameVersionId,
- var parameter = FIELD.PARAMETER.LCP_REGION;
- if ( UtilityService.hasContents (cloudRegionTenantList) ) {
- parameter.optionList = new Array();
- for (var i = 0; i < cloudRegionTenantList.length; i++) {
- for (var j = 0; j < parameter.optionList.length; j++) {
- if (parameter.optionList[j].id === cloudRegionTenantList[i].cloudRegionId) {
+ }
+ };
+ }
+ else {
+ relatedInstance = {
+ "instanceId" : instanceId,
+ "modelInfo" : {
+ "modelType" : componentId,
+ "modelName" : modelInfo.modelName,
+ "modelInvariantId" : modelInfo.modelInvariantId,
+ "modelVersion" : modelInfo.modelVersion,
+ "modelVersionId" : modelInfo.modelNameVersionId,
+ "modelCustomizationId": modelInfo.customizationUuid,
+ "modelCustomizationName": modelInfo.modelCustomizationName
+ }
+ }
+ }
+ relatedInstanceList.push({
+ relatedInstance : relatedInstance
+ });
+ }
+ };
+
+ /*
+ * var getArbitraryParameters = function(parameterList) { var
+ * arbitraryParameters = new Object(); for (var i = 0; i <
+ * parameterList.length; i++) { var parameter = parameterList[i]; switch
+ * (parameter.id) { case FIELD.ID.INSTANCE_NAME: case
+ * FIELD.ID.PRODUCT_FAMILY: case FIELD.ID.LCP_REGION: case
+ * FIELD.ID.LCP_REGION_TEXT: case FIELD.ID.SERVICE_TYPE: case
+ * FIELD.ID.TENANT: case FIELD.ID.SUPPRESS_ROLLBACK: break; default:
+ * arbitraryParameters[parameter.id] = parameter.value; } } return
+ * arbitraryParameters; }
+ */
+ var getArbitraryParameters = function(parameterList) {
+ var arbitraryParameters = new Object();
+ var arbitraryArray = new Array();
+ for (var i = 0; i < parameterList.length; i++) {
+ var parameter = parameterList[i];
+ switch (parameter.id) {
+ case FIELD.ID.AVAILABLE_VOLUME_GROUP:
+ case FIELD.ID.INSTANCE_NAME:
+ case FIELD.ID.PRODUCT_FAMILY:
+ case FIELD.ID.LCP_REGION:
+ case FIELD.ID.LCP_REGION_TEXT:
+ case FIELD.ID.SERVICE_TYPE:
+ case FIELD.ID.TENANT:
+ case FIELD.ID.SUPPRESS_ROLLBACK:
+ case FIELD.ID.SUBSCRIBER_NAME:
+ case FIELD.ID.SDN_C_PRELOAD:
+ case FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE:
+ case FIELD.ID.OWNING_ENTITY:
+ case FIELD.ID.PLATFORM:
+ case FIELD.ID.LINE_OF_BUSINESS:
+ case FIELD.ID.PROJECT:
+ break;
+ case FIELD.ID.SUPPLEMENTORY_DATA_FILE:
+ arbitraryParameters = FIELD.PARAMETER.SUPPLEMENTORY_DATA_FILE['value'];
+ arbitraryArray=arbitraryParameters;
+ FIELD.PARAMETER.SUPPLEMENTORY_DATA_FILE['value']=[];
+ break;
+
+ default:
+ if (parameter.value != '') {
+ arbitraryParameters = {
+ name: parameter.id,
+ value: parameter.value
+ }
+ arbitraryArray.push(arbitraryParameters);
+ }
+ }
+ }
+ return (arbitraryArray);
+ }
+
+ var getModel = function() {
+ AsdcService.getModel(DataService.getModelId(), function(response) {
+ DataService.setModelInfo(_this.componentId, {
+ modelInvariantId : response.data.invariantUUID,
+ modelNameVersionId : response.data.uuid,
+ modelName : response.data.name,
+ modelVersion : response.data.version,
+ inputs : response.data.inputs
+ });
+ UtilityService.startNextAsyncOperation();
+ });
+ };
+
+ var getSubscriptionServiceTypeList = function() {
+ AaiService.getSubscriptionServiceTypeList(DataService
+ .getGlobalCustomerId(), function(response) {
+ DataService.setSubscriptionServiceTypeList(response);
+ UtilityService.startNextAsyncOperation();
+ });
+ };
+
+ var getLoggedInUserID = function() {
+ AaiService.getLoggedInUserID(function(response) {
+ DataService.setLoggedInUserId(response.data);
+ UtilityService.startNextAsyncOperation();
+ });
+ };
+
+ var getSubscribers = function() {
+ AaiService.getSubscribers(function(response) {
+ DataService.setSubscribers(response);
+ UtilityService.startNextAsyncOperation();
+ });
+ };
+ var getServices = function() {
+ AaiService.getServices(function(response) {
+ var serviceIdList = [];
+ angular.forEach(response.data, function(value, key) {
+ angular.forEach(value, function(subVal, key) {
+ var newVal = {
+ "id" : subVal[FIELD.ID.SERVICE_ID],
+ "description" : subVal[FIELD.ID.SERVICE_DESCRIPTION],
+ "isPermitted" : subVal[FIELD.ID.IS_PERMITTED],
+ };
+ serviceIdList.push(newVal);
+ DataService.setServiceIdList(serviceIdList);
+ });
+ });
+
+ UtilityService.startNextAsyncOperation();
+ });
+ };
+ var getAicZones = function() {
+ AaiService.getAicZones(function(response) {
+ var serviceIdList = [];
+ angular.forEach(response.data, function(value, key) {
+ angular.forEach(value, function(subVal, key) {
+ var newVal = {
+ "id" : subVal[FIELD.ID.ZONE_ID],
+ "name" : subVal[FIELD.ID.ZONE_NAME],
+ };
+ serviceIdList.push(newVal);
+ DataService.setAicZones(serviceIdList);
+ });
+ });
+
+ UtilityService.startNextAsyncOperation();
+ });
+ };
+
+ var getOwningEntityProperties = function() {
+ OwningEntityService.getOwningEntityProperties(function(owningEntityProperties) {
+ DataService.setOwningEntityProperties(owningEntityProperties);
+ UtilityService.startNextAsyncOperation();
+ });
+
+ };
+
+ var getLcpCloudRegionTenantList = function() {
+ AaiService.getLcpCloudRegionTenantList(DataService
+ .getGlobalCustomerId(), DataService.getServiceType(), function(
+ response) {
+ DataService.setCloudRegionTenantList(response);
+ UtilityService.startNextAsyncOperation();
+ });
+ };
+
+ var internalGetParametersHandler = function() {
+ if (angular.isFunction(_this.getParametersHandler)) {
+ _this.getParametersHandler({
+ summaryList : getSummaryList(),
+ userProvidedList : getUserProvidedList()
+ });
+ }
+ };
+
+ var getSubscribersParameter = function() {
+ var subscribers = DataService.getSubscribers();
+ var parameter = FIELD.PARAMETER.SUBSCRIBER_NAME;
+ if ( UtilityService.hasContents(subscribers)) {
+ parameter.optionList = [];
+
+ for (var i = 0; i < subscribers.length; i++) {
+ parameter.optionList.push({
+ id : subscribers[i][FIELD.ID.GLOBAL_CUSTOMER_ID],
+ name : subscribers[i][FIELD.ID.SUBNAME],
+ isPermitted : subscribers[i][FIELD.ID.IS_PERMITTED]
+ })
+ }
+ }
+ return parameter;
+ };
+
+ var getServiceId = function() {
+ var serviceIdList = DataService.getServiceIdList();
+ //var serviceTypeList = DataService.getSubscriptionServiceTypeList();
+ var parameter = FIELD.PARAMETER.PRODUCT_FAMILY;
+ parameter.optionList = new Array();
+ if ( UtilityService.hasContents(serviceIdList) ) {
+ // load them all
+ for (var i = 0; i < serviceIdList.length; i++) {
+ parameter.optionList.push({
+ id : serviceIdList[i].id,
+ name : serviceIdList[i].description,
+ isPermitted : serviceIdList[i].isPermitted
+ });
+ }
+ }
+
+ return parameter;
+ };
+
+ var getAicZonesParameter = function() {
+ var aicList = DataService.getAicZones();
+ var parameter = FIELD.PARAMETER.AIC_ZONES;
+ parameter.optionList = new Array();
+ if ( UtilityService.hasContents(aicList) ) {
+ // load them all
+ for (var i = 0; i < aicList.length; i++) {
+ parameter.optionList.push({
+ id : aicList[i].id,
+ name : aicList[i].name,
+ isPermitted : true
+
+ });
+ }
+ }
+
+ return parameter;
+ };
+
+ var getProjectParameter = function() {
+ return getOwningEntityParameterWithOptions(FIELD.PARAMETER.PROJECT);
+ };
+
+ var getOwningEntityParameter = function() {
+ return getOwningEntityParameterWithOptions(FIELD.PARAMETER.OWNING_ENTITY);
+ };
+
+ var getLineOfBusinessParameter = function() {
+ return getOwningEntityParameterWithOptions(FIELD.PARAMETER.LINE_OF_BUSINESS);
+ };
+
+ var getPlatformParameter = function() {
+ return getOwningEntityParameterWithOptions(FIELD.PARAMETER.PLATFORM);
+ };
+
+ var getOwningEntityNameById = function (id) {
+ var properties = DataService.getOwningEntityProperties();
+ var parameter = _.find(properties[FIELD.ID.OWNING_ENTITY], {"id": id});
+ return parameter && parameter.name;
+ };
+
+ var getOwningEntityParameterWithOptions = function(parameter) {
+ var properties = DataService.getOwningEntityProperties();
+ if (properties && properties[parameter.id]) {
+ parameter.optionList = _.map(properties[parameter.id], function(parameter) {
+ return {
+ "id" : parameter.id,
+ "name" : parameter.name,
+ "isPermitted": true
+ };
+ });
+ }
+
+ return parameter;
+ };
+
+ var getLcpRegionParameter = function() {
+ var cloudRegionTenantList = DataService.getCloudRegionTenantList();
+ console.log ( "cloudRegionTenantList=");
+ console.log ( JSON.stringify (cloudRegionTenantList, null, 4 ));
+
+ var parameter = FIELD.PARAMETER.LCP_REGION;
+ if ( UtilityService.hasContents (cloudRegionTenantList) ) {
+ parameter.optionList = new Array();
+ for (var i = 0; i < cloudRegionTenantList.length; i++) {
+ for (var j = 0; j < parameter.optionList.length; j++) {
+ if (parameter.optionList[j].id === cloudRegionTenantList[i].cloudRegionId) {
parameter.optionList[j].isPermitted =
- parameter.optionList[j].isPermitted || cloudRegionTenantList[i].isPermitted;
+ parameter.optionList[j].isPermitted || cloudRegionTenantList[i].isPermitted;
break;
}
- }
- if (j < parameter.optionList.length) {
- continue;
- }
- parameter.optionList.push({
- id : cloudRegionTenantList[i].cloudRegionId,
- isPermitted : cloudRegionTenantList[i].isPermitted
- });
- }
- }
- return parameter;
- };
-
- var getTenantList = function(cloudRegionId) {
- var cloudRegionTenantList = DataService.getCloudRegionTenantList();
- var parameter = "";
- if ( UtilityService.hasContents (cloudRegionTenantList) ) {
- parameter = FIELD.PARAMETER.TENANT_ENABLED;
- parameter.optionList = new Array();
- for (var i = 0; i < cloudRegionTenantList.length; i++) {
- if (cloudRegionTenantList[i].cloudRegionId === cloudRegionId) {
- parameter.optionList.push({
- id : cloudRegionTenantList[i].tenantId,
- name : cloudRegionTenantList[i].tenantName,
+ }
+ if (j < parameter.optionList.length) {
+ continue;
+ }
+ parameter.optionList.push({
+ id : cloudRegionTenantList[i].cloudRegionId,
+ isPermitted : cloudRegionTenantList[i].isPermitted
+ });
+ }
+ }
+ return parameter;
+ };
+
+ var getTenantList = function(cloudRegionId) {
+ var cloudRegionTenantList = DataService.getCloudRegionTenantList();
+ var parameter = "";
+ if ( UtilityService.hasContents (cloudRegionTenantList) ) {
+ parameter = FIELD.PARAMETER.TENANT_ENABLED;
+ parameter.optionList = new Array();
+ for (var i = 0; i < cloudRegionTenantList.length; i++) {
+ if (cloudRegionTenantList[i].cloudRegionId === cloudRegionId) {
+ parameter.optionList.push({
+ id : cloudRegionTenantList[i].tenantId,
+ name : cloudRegionTenantList[i].tenantName,
isPermitted : cloudRegionTenantList[i].isPermitted
});
- }
- }
- }
- return parameter;
-
- };
-
- var addOptionList = function(parameter, optionSimpleArray) {
- var optionList = new Array();
- if (!angular.isArray(optionSimpleArray)) {
- return optionList;
- }
- for (var i = 0; i < optionSimpleArray.length; i++) {
- optionList.push({
- name : optionSimpleArray[i],
+ }
+ }
+ }
+ return parameter;
+
+ };
+
+ var addOptionList = function(parameter, optionSimpleArray) {
+ var optionList = new Array();
+ if (!angular.isArray(optionSimpleArray)) {
+ return optionList;
+ }
+ for (var i = 0; i < optionSimpleArray.length; i++) {
+ optionList.push({
+ name : optionSimpleArray[i],
isPermitted :true,
- });
- }
- parameter.optionList = optionList;
- return parameter;
- };
-
- var getValueFromList = function(id, parameterList) {
- for (var i = 0; i < parameterList.length; i++) {
- if (parameterList[i].id === id) {
- return parameterList[i].value;
- }
- }
- };
- var updateUserParameterList = function(updatedId, parameterListControl) {
- console.log ("updateUserParameterList() updatedId=" + updatedId);
- if (updatedId === FIELD.ID.PRODUCT_FAMILY && DataService.getHideServiceFields()) {
- var cloudRegionTenantList = new Array();
- AaiService.getLcpCloudRegionTenantList(DataService.getGlobalCustomerId(), DataService.getServiceType(), function(cloudRegionTenantList) {
- DataService.setCloudRegionTenantList(cloudRegionTenantList);
- parameterListControl.updateList([ getLcpRegion() ]);
- });
- }else if (updatedId === FIELD.ID.SDN_C_PRELOAD) {
- var list = parameterListControl.getList(updatedId);
- if($('input[parameter-id="'+updatedId+'"]').is(':checked')){
- FIELD.PARAMETER.SDN_C_PRELOAD_CHECKED.value=true;
- parameterListControl
- .updateList([ FIELD.PARAMETER.SDN_C_PRELOAD_CHECKED ]);
- }else{
- parameterListControl
- .updateList([ FIELD.PARAMETER.SDN_C_PRELOAD_UNCHECKED ]);
- }
- }else if (updatedId === FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE) {
- if($('input[parameter-id="'+updatedId+'"]').is(':checked')){
- $('input[parameter-id="'+FIELD.ID.SUPPLEMENTORY_DATA_FILE+'"]').closest('tr').show();
- FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_CHECKED.value=true;
- parameterListControl
- .updateList([ FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_CHECKED ]);
- }else{
- $('input[parameter-id="'+FIELD.ID.SUPPLEMENTORY_DATA_FILE+'"]').closest('tr').hide();
- FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_CHECKED.value=false;
- parameterListControl
- .updateList([ FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_UNCHECKED ]);
- }
- } else if (updatedId === FIELD.ID.SUPPLEMENTORY_DATA_FILE) {
- var filePath = $('input[parameter-id="'+updatedId+'"]').val();
- var arr =filePath.split('.');
- var fileExt = arr[arr.length-1];
- if(fileExt!='' && fileExt.toLowerCase()!='json'){
- $('input[parameter-id="'+updatedId+'"]').val('');
- alert("Invalid file format. Please select *.json format file.");
- return false;
- }
- } else if (updatedId === FIELD.ID.LCP_REGION) {
- var list = parameterListControl.getList(updatedId);
- if (list[0].selectedIndex >= 0) {
- parameterListControl
- .updateList([ getTenantList(list[0].value) ]);
- } else {
- parameterListControl
- .updateList([ FIELD.PARAMETER.TENANT_DISABLED ]);
- }
- if (list[0].value === FIELD.KEY.LCP_REGION_TEXT) {
- parameterListControl
- .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]);
- } else {
- parameterListControl
- .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN ]);
- }
- } else if (updatedId === FIELD.ID.SUBSCRIBER_NAME) {
- var list = parameterListControl.getList(updatedId);
- if (list[0].selectedIndex >= 0) {
- DataService.setGlobalCustomerId(list[0].value);
-
- AaiService.getSubscriptionServiceTypeList(DataService
- .getGlobalCustomerId(), function(response) {
- DataService.setSubscriptionServiceTypeList(response);
- var serviceTypeParameters = FIELD.PARAMETER.SERVICE_TYPE;
- serviceTypeParameters.optionList = [];
-
- for (var i = 0; i < response.length; i++) {
- serviceTypeParameters.optionList.push({
- "id" : response[i].name,
- "name" : response[i].name,
+ });
+ }
+ parameter.optionList = optionList;
+ return parameter;
+ };
+
+ var getValueFromList = function(id, parameterList) {
+ for (var i = 0; i < parameterList.length; i++) {
+ if (parameterList[i].id === id) {
+ return parameterList[i].value;
+ }
+ }
+ };
+ var updateUserParameterList = function(updatedId, parameterListControl) {
+ console.log ("updateUserParameterList() updatedId=" + updatedId);
+ if (updatedId === FIELD.ID.PRODUCT_FAMILY && DataService.getHideServiceFields()) {
+ var cloudRegionTenantList = new Array();
+ AaiService.getLcpCloudRegionTenantList(DataService.getGlobalCustomerId(), DataService.getServiceType(), function(cloudRegionTenantList) {
+ DataService.setCloudRegionTenantList(cloudRegionTenantList);
+ parameterListControl.updateList([ getLcpRegionParameter() ]);
+ });
+ }else if (updatedId === FIELD.ID.SDN_C_PRELOAD) {
+ var list = parameterListControl.getList(updatedId);
+ if($('input[parameter-id="'+updatedId+'"]').is(':checked')){
+ FIELD.PARAMETER.SDN_C_PRELOAD_CHECKED.value=true;
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.SDN_C_PRELOAD_CHECKED ]);
+ }else{
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.SDN_C_PRELOAD_UNCHECKED ]);
+ }
+ }else if (updatedId === FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE) {
+ if($('input[parameter-id="'+updatedId+'"]').is(':checked')){
+ $('input[parameter-id="'+FIELD.ID.SUPPLEMENTORY_DATA_FILE+'"]').closest('tr').show();
+ FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_CHECKED.value=true;
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_CHECKED ]);
+ }else{
+ $('input[parameter-id="'+FIELD.ID.SUPPLEMENTORY_DATA_FILE+'"]').closest('tr').hide();
+ FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_CHECKED.value=false;
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.UPLOAD_SUPPLEMENTORY_DATA_FILE_UNCHECKED ]);
+ }
+ } else if (updatedId === FIELD.ID.SUPPLEMENTORY_DATA_FILE) {
+ var filePath = $('input[parameter-id="'+updatedId+'"]').val();
+ var arr =filePath.split('.');
+ var fileExt = arr[arr.length-1];
+ if(fileExt!='' && fileExt.toLowerCase()!='json'){
+ $('input[parameter-id="'+updatedId+'"]').val('');
+ alert("Invalid file format. Please select *.json format file.");
+ return false;
+ }
+ } else if (updatedId === FIELD.ID.LCP_REGION) {
+ var list = parameterListControl.getList(updatedId);
+ if (list[0].selectedIndex >= 0) {
+ parameterListControl
+ .updateList([ getTenantList(list[0].value) ]);
+ } else {
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.TENANT_DISABLED ]);
+ }
+ if (list[0].value === FIELD.KEY.LCP_REGION_TEXT) {
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]);
+ } else {
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN ]);
+ }
+ } else if (updatedId === FIELD.ID.SUBSCRIBER_NAME) {
+ var list = parameterListControl.getList(updatedId);
+ if (list[0].selectedIndex >= 0) {
+ DataService.setGlobalCustomerId(list[0].value);
+
+ AaiService.getSubscriptionServiceTypeList(DataService
+ .getGlobalCustomerId(), function(response) {
+ DataService.setSubscriptionServiceTypeList(response);
+ var serviceTypeParameters = FIELD.PARAMETER.SERVICE_TYPE;
+ serviceTypeParameters.optionList = [];
+
+ for (var i = 0; i < response.length; i++) {
+ serviceTypeParameters.optionList.push({
+ "id" : response[i].name,
+ "name" : response[i].name,
"isPermitted" :response[i].isPermitted
});
- }
- console.log ( "updateUserParameterList: service type parameters " );
- console.log ( JSON.stringify (serviceTypeParameters, null, 4));
- parameterListControl.updateList([ serviceTypeParameters ]);
- });
-
- }
- } else if ( updatedId === FIELD.ID.SERVICE_TYPE ) {
- var list = parameterListControl.getList(updatedId);
- if (list[0].selectedIndex >= 0) {
-
- DataService.setServiceType(list[0].value);
- var cloudRegionTenantList = new Array();
- AaiService.getLcpCloudRegionTenantList(DataService.getGlobalCustomerId(), DataService.getServiceType(), function(cloudRegionTenantList) {
- DataService.setCloudRegionTenantList(cloudRegionTenantList);
- parameterListControl.updateList([ getLcpRegion() ]);
- });
- } else {
- parameterListControl
- .updateList([ FIELD.PARAMETER.SERVICE_TYPE_DISABLED ]);
- }
- }
-
- };
-
- return {
- initializeComponent : function(componentId) {
- _this.componentId = ComponentService.initialize(componentId);
- },
- setHttpErrorHandler : function(httpErrorHandler) {
- _this.httpErrorHandler = httpErrorHandler;
- },
- getComponentDisplayName : ComponentService.getComponentDisplayName,
- getParameters : function(getParametersHandler) {
- _this.getParametersHandler = getParametersHandler;
- UtilityService.setHttpErrorHandler(_this.httpErrorHandler);
- UtilityService.startAsyncOperations(getAsyncOperationList(),
- internalGetParametersHandler);
- },
- updateUserParameterList : updateUserParameterList,
- getMsoRequestDetails : getMsoRequestDetails,
- getMsoUrl : getMsoUrl
- }
+ }
+ console.log ( "updateUserParameterList: service type parameters " );
+ console.log ( JSON.stringify (serviceTypeParameters, null, 4));
+ parameterListControl.updateList([ serviceTypeParameters ]);
+ });
+
+ }
+ } else if ( updatedId === FIELD.ID.SERVICE_TYPE ) {
+ var list = parameterListControl.getList(updatedId);
+ if (list[0].selectedIndex >= 0) {
+
+ DataService.setServiceType(list[0].value);
+ var cloudRegionTenantList = new Array();
+ AaiService.getLcpCloudRegionTenantList(DataService.getGlobalCustomerId(), DataService.getServiceType(), function(cloudRegionTenantList) {
+ DataService.setCloudRegionTenantList(cloudRegionTenantList);
+ parameterListControl.updateList([ getLcpRegionParameter() ]);
+ });
+ } else {
+ parameterListControl
+ .updateList([ FIELD.PARAMETER.SERVICE_TYPE_DISABLED ]);
+ }
+ }
+
+ };
+
+ return {
+ initializeComponent : function(componentId) {
+ _this.componentId = ComponentService.initialize(componentId);
+ },
+ setHttpErrorHandler : function(httpErrorHandler) {
+ _this.httpErrorHandler = httpErrorHandler;
+ },
+ getComponentDisplayName : ComponentService.getComponentDisplayName,
+ getParameters : function(getParametersHandler) {
+ _this.getParametersHandler = getParametersHandler;
+ UtilityService.setHttpErrorHandler(_this.httpErrorHandler);
+ UtilityService.startAsyncOperations(getAsyncOperationList(),
+ internalGetParametersHandler);
+ },
+ updateUserParameterList : updateUserParameterList,
+ getMsoRequestDetails : getMsoRequestDetails,
+ getMsoUrl : getMsoUrl,
+ setInventoryInfo: setInventoryInfo
+ }
}
appDS2.factory("CreationService", [ "$log", "AaiService", "AsdcService",
- "DataService","VIDCONFIGURATION", "ComponentService", "COMPONENT", "FIELD", "PARAMETER",
- "UtilityService", CreationService ]);
+ "DataService","VIDCONFIGURATION", "ComponentService", "COMPONENT", "FIELD", "PARAMETER",
+ "UtilityService", "OwningEntityService", CreationService ]);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js index 2d7fa6ca7..716854edb 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js @@ -100,6 +100,12 @@ var DataService = function($log, DataService) { getAicZones : function(){
return _this.aicZones;
},
+ setAicZoneForPNF: function(aicZone) {
+ _this.aicZone = aicZone;
+ },
+ getAicZoneForPNF : function(){
+ return _this.aicZone;
+ },
getServiceInstanceId : function() {
return _this.serviceInstanceId;
},
@@ -214,6 +220,12 @@ var DataService = function($log, DataService) { setVnfInstanceId : function(vnfInstanceId) {
_this.vnfInstanceId = vnfInstanceId;
},
+ getVfModuleInstanceName : function() {
+ return _this.vfModuleInstanceName;
+ },
+ setVfModuleInstanceName : function(vfModuleInstanceName) {
+ _this.vfModuleInstanceName = vfModuleInstanceName;
+ },
getVolumeGroupInstanceId : function() {
return _this.volumeGroupInstanceId;
},
@@ -293,8 +305,81 @@ var DataService = function($log, DataService) { },
getHideServiceFields:function(){
return _this.hideServiceFields;
- }
+ },
+ getServiceProxies:function(){
+ return _this.serviceProxies;
+ },
+ setServiceProxies:function(serviceProxies){
+ _this.serviceProxies = serviceProxies;
+ },
+ getSourceServiceProxies:function(){
+ return _this.sourceServiceProxies;
+ },
+ setSourceServiceProxies:function(sourceServiceProxies){
+ _this.sourceServiceProxies = sourceServiceProxies;
+ },
+ getCollectorServiceProxies:function(){
+ return _this.collectorServiceProxies;
+ },
+ setCollectorServiceProxies:function(collectorServiceProxies){
+ _this.collectorServiceProxies = collectorServiceProxies;
+ },
+ getConfigurationByPolicy:function() {
+ return _this.configurationByPolicy;
+ },
+ setConfigurationByPolicy:function (configurationByPolicy) {
+ _this.configurationByPolicy = configurationByPolicy;
+ },
+ getSuppressRollback:function(){
+ return _this.suppressRollback;
+ },
+ setSuppressRollback:function(suppressRollback){
+ _this.suppressRollback = suppressRollback;
+ },
+ getPortMirroningConfigFields:function(){
+ return _this.portMirroningConfigFields;
+ },
+ setPortMirroningConfigFields:function(portMirroningConfigFields){
+ _this.portMirroningConfigFields = portMirroningConfigFields;
+ },
+ getConfigurationInstanceId : function() {
+ return _this.configurationInstanceId;
+ },
+ setConfigurationInstanceId : function(configurationInstanceId) {
+ _this.configurationInstanceId = configurationInstanceId;
+ },
+ getConfigurationStatus: function () {
+ return _this.configurationStatus;
+ },
+ setConfigurationStatus: function (configurationStatus) {
+ _this.configurationStatus = configurationStatus;
+ },
+ getPortStatus: function () {
+ return _this.portStatus;
+ },
+ setPortStatus: function (portStatus) {
+ _this.portStatus = portStatus;
+ },
+ getPortId: function () {
+ return _this.portId;
+ },
+ setPortId: function (portId) {
+ _this.portId = portId;
+ },
+ getPnf: function () {
+ return _this.pnf;
+ },
+ setPnf: function (pnf) {
+ _this.pnf = pnf;
+ },
+ getOwningEntityProperties: function () {
+ return _this.owningEntityProperties;
+ },
+ setOwningEntityProperties: function (properties) {
+ _this.owningEntityProperties = properties;
+ }
+
}
-}
+};
appDS2.factory("DataService", [ "$log", DataService ]);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/deletionService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js index 79282997b..90daf3550 100755..100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/deletionService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/deleteResumeService.js @@ -1,508 +1,518 @@ -/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-"use strict";
-
-var DeletionService = function($log, AaiService, AsdcService, DataService,
- ComponentService, COMPONENT, FIELD, UtilityService) {
-
- var _this = this;
-
- var getAsyncOperationList = function() {
- if (DataService.getLoggedInUserId() == null)
- getLoggedInUserID();
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- return [ getSubscribers, getLcpCloudRegionTenantList ];
- case COMPONENT.NETWORK:
- return [ getLcpCloudRegionTenantList ];
- case COMPONENT.VNF:
- return [ getLcpCloudRegionTenantList ];
- case COMPONENT.VF_MODULE:
- return [ getLcpCloudRegionTenantList ];
- case COMPONENT.VOLUME_GROUP:
- return [ getLcpCloudRegionTenantList ];
- }
- };
-
- var getLcpCloudRegionTenantList = function() {
- //console.log ( "global customer id: " );
- //console.log ( JSON.stringify (DataService.getGlobalCustomerId()) );
-
- //console.log ( "service type: " );
- //console.log ( JSON.stringify (DataService.getServiceType()) );
-
- AaiService.getLcpCloudRegionTenantList(DataService
- .getGlobalCustomerId(), DataService.getServiceType(), function(
- response) {
- DataService.setCloudRegionTenantList(response);
- UtilityService.startNextAsyncOperation();
- });
- };
-
- var getLoggedInUserID = function() {
- AaiService.getLoggedInUserID(function(response) {
- DataService.setLoggedInUserId(response.data);
- UtilityService.startNextAsyncOperation();
- });
- };
-
- var getSubscribers = function() {
- AaiService.getSubscribers(function(response) {
- DataService.setSubscribers(response);
- UtilityService.startNextAsyncOperation();
- });
- };
-
- var internalGetParametersHandler = function() {
- if (angular.isFunction(_this.getParametersHandler)) {
- if (_this.componentId == COMPONENT.SERVICE) {
- if ( DataService.getALaCarte() ) {
- _this.getParametersHandler({
- summaryList : getSummaryList(),
- userProvidedList : getUserProvidedList()
- }, true);
- }
- else {
- _this.getParametersHandler({
- summaryList : getSummaryList(),
- userProvidedList : getUserProvidedList()
- }, false);
- }
- }
- else {
- _this.getParametersHandler({
- summaryList : getSummaryList(),
- userProvidedList : getUserProvidedList()
- }, false);
- }
- }
- };
-
- var getSubscribersParameter = function() {
- var subscribers = DataService.getSubscribers();
- var parameter = FIELD.PARAMETER.SUBSCRIBER_NAME;
- parameter.optionList = [];
-
- for (var i = 0; i < subscribers.length; i++) {
- parameter.optionList.push({
- id : subscribers[i][FIELD.ID.GLOBAL_CUSTOMER_ID],
- name : subscribers[i][FIELD.ID.SUBNAME]
- })
- }
- return parameter;
- };
-
- var getServiceId = function() {
- var serviceIdList = DataService.getServiceIdList();
- var parameter = FIELD.PARAMETER.PRODUCT_FAMILY;
- parameter.optionList = new Array();
- for (var i = 0; i < serviceIdList.length; i++) {
- parameter.optionList.push({
- id : serviceIdList[i].id,
- name : serviceIdList[i].description
- });
- }
- return parameter;
- };
-
- var getUserProvidedList = function() {
-
- //var parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ];
-
- var parameterList = [];
-
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- if ( DataService.getALaCarte() ) {
- parameterList = [];
- }
- else {
- parameterList = parameterList.concat ([getLcpRegion(),
- FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED ]);
- }
- break;
- case COMPONENT.NETWORK:
- case COMPONENT.VNF:
- parameterList = parameterList.concat([ //getServiceId(),
- getLcpRegion(), FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED ]);
- break;
- case COMPONENT.VF_MODULE:
- parameterList = parameterList.concat([
- getLcpRegion(),
- FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED
- ]);
-
- break;
- case COMPONENT.VOLUME_GROUP:
- parameterList = parameterList.concat([ getLcpRegion(),
- FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN,
- FIELD.PARAMETER.TENANT_DISABLED ]);
- }
-
- //parameterList.push(FIELD.PARAMETER.SUPPRESS_ROLLBACK);
-
- //addArbitraryParameters(parameterList);
-
- return parameterList;
- };
- var getSummaryList = function() {
- switch (_this.componentId) {
- case COMPONENT.NETWORK:
- case COMPONENT.SERVICE:
- case COMPONENT.VNF:
- case COMPONENT.VF_MODULE:
- case COMPONENT.VOLUME_GROUP:
- var summaryList = [ {
- name : FIELD.NAME.SUBSCRIBER_NAME,
- value : DataService.getSubscriberName()
- }, {
- name : FIELD.NAME.CUSTOMER_ID,
- value : DataService.getGlobalCustomerId()
- }, {
- name : FIELD.NAME.SERVICE_UUID,
- value : DataService.getServiceUuid()
- }, {
- name : FIELD.NAME.SERVICE_NAME,
- value : DataService.getServiceName()
- /* }, {
- name : FIELD.NAME.USER_SERVICE_INSTANCE_NAME,
- value : DataService.getUserServiceInstanceName()*/
- } ];
-
- _this.parameterList = new Array();
-
- addToList(FIELD.NAME.SERVICE_NAME, DataService.getServiceName());
-
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- addToList(FIELD.NAME.SERVICE_INVARIANT_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
- addToList(FIELD.NAME.SERVICE_VERSION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
- addToList(FIELD.NAME.SERVICE_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
- addToList(FIELD.NAME.SERVICE_DESCRIPTION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.DESCRIPTION]);
- addToList(FIELD.NAME.SERVICE_CATEGORY, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.CATEGORY]);
- break;
- case COMPONENT.VF_MODULE:
- addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
- .getSubscriberName());
- addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
- .getServiceInstanceName());
- addToList(FIELD.NAME.MODEL_NAME, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
- addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
- addToList(FIELD.NAME.MODEL_VERSION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
- addToList(FIELD.NAME.MODEL_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
- break;
- case COMPONENT.NETWORK:
- case COMPONENT.VNF:
- case COMPONENT.VOLUME_GROUP:
- addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService
- .getSubscriberName());
- addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService
- .getServiceInstanceName());
- addToList(FIELD.NAME.MODEL_NAME, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]);
- addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]);
- addToList(FIELD.NAME.MODEL_VERSION, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]);
- addToList(FIELD.NAME.MODEL_UUID, DataService
- .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]);
- break;
- }
-
- /*var additionalList = ComponentService.getInventoryParameterList(
- _this.componentId, DataService.getInventoryItem());*/
- var additionalList = ComponentService.getDisplayNames(ComponentService
- .getInventoryParameterList(_this.componentId, DataService
- .getInventoryItem(), true ));
-
- return summaryList.concat(ComponentService
- .getDisplayNames(additionalList));
- }
- };
-
- var getMsoUrl = function() {
- switch (_this.componentId) {
- case COMPONENT.NETWORK:
- return "mso_delete_nw_instance/"
- + DataService.getServiceInstanceId() + "/networks/"
- + DataService.getNetworkInstanceId();
- case COMPONENT.SERVICE:
- return "mso_delete_svc_instance/"
- + DataService.getServiceInstanceId();
- case COMPONENT.VNF:
- return "mso_delete_vnf_instance/"
- + DataService.getServiceInstanceId() + "/vnfs/"
- + DataService.getVnfInstanceId();
- case COMPONENT.VF_MODULE:
- return "mso_delete_vfmodule_instance/"
- + DataService.getServiceInstanceId() + "/vnfs/"
- + DataService.getVnfInstanceId() + "/vfModules/"
- + DataService.getVfModuleInstanceId();
- case COMPONENT.VOLUME_GROUP:
- return "mso_delete_volumegroup_instance/"
- + DataService.getServiceInstanceId() + "/vnfs/"
- + DataService.getVnfInstanceId() + "/volumeGroups/"
- + DataService.getVolumeGroupInstanceId();
- }
- }
-
- var addToList = function(name, value) {
- _this.parameterList.push({
- name : name,
- value : value
- });
- };
-
- var getMsoRequestDetails = function(parameterList) {
- console.log("getMsoRequestDetails invoked");
- var inventoryInfo = ComponentService.getInventoryInfo(
- _this.componentId, DataService.getInventoryItem());
- var modelInfo = DataService.getModelInfo(_this.componentId);
- var requestorloggedInId = DataService.getLoggedInUserId();
- if (requestorloggedInId == null)
- requestorloggedInId = "";
- var requestDetails = {
- modelInfo : {
- modelType : _this.componentId,
- modelInvariantId : modelInfo.modelInvariantId,
- modelVersionId : modelInfo.modelNameVersionId,
- modelName : modelInfo.modelName,
- modelCustomizationName : modelInfo.modelCustomizationName,
- modelCustomizationId : modelInfo.customizationUuid,
- modelVersion : modelInfo.modelVersion
- },
- requestInfo : {
- source : FIELD.ID.VID,
- requestorId: requestorloggedInId
- }
- };
-
- switch (_this.componentId) {
- case COMPONENT.SERVICE:
- requestDetails.requestParameters = {
- aLaCarte : DataService.getALaCarte()
- };
- if ( !(DataService.getALaCarte()) ) {
- // for macro delete include cloud config.
- var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
- if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
- lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
- parameterList);
- }
- requestDetails.cloudConfiguration = {
- lcpCloudRegionId : lcpRegion,
- tenantId : getValueFromList(FIELD.ID.TENANT, parameterList)
- };
- }
- break;
- case COMPONENT.VNF:
- console.log("getMsoRequestDetails COMPONENT.VNF");
- var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
- if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
- lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
- parameterList);
- }
- requestDetails.cloudConfiguration = {
- lcpCloudRegionId : lcpRegion,
- tenantId : getValueFromList(FIELD.ID.TENANT, parameterList)
- };
-
- break;
- case COMPONENT.VF_MODULE:
- case COMPONENT.NETWORK:
- var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
- if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
- lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
- parameterList);
- }
- requestDetails.cloudConfiguration = {
- lcpCloudRegionId : lcpRegion,
- tenantId : getValueFromList(FIELD.ID.TENANT, parameterList)
- };
- break;
- case COMPONENT.VOLUME_GROUP:
- var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
- if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) {
- lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT,
- parameterList);
- }
- requestDetails.cloudConfiguration = {
- lcpCloudRegionId : lcpRegion,
- tenantId : getValueFromList(FIELD.ID.TENANT, parameterList)
- };
-
- break;
- default:
- requestDetails.cloudConfiguration = {
- lcpCloudRegionId : DataService.getLcpRegion(),
- tenantId : DataService.getTenant()
- };
- }
- return requestDetails;
- }
-
- var getLcpRegion = function() {
- var cloudRegionTenantList = DataService.getCloudRegionTenantList();
- var parameter = "";
- if ( UtilityService.hasContents (cloudRegionTenantList) ) {
- parameter = FIELD.PARAMETER.LCP_REGION;
- parameter.optionList = new Array();
- for (var i = 0; i < cloudRegionTenantList.length; i++) {
- for (var j = 0; j < parameter.optionList.length; j++) {
- if (parameter.optionList[j].id === cloudRegionTenantList[i].cloudRegionId) {
- parameter.optionList[j].isPermitted =
- parameter.optionList[j].isPermitted || cloudRegionTenantList[i].isPermitted;
- break;
- }
- }
- if (j < parameter.optionList.length) {
- continue;
- }
- parameter.optionList.push({
- id : cloudRegionTenantList[i].cloudRegionId,
- isPermitted : cloudRegionTenantList[i].isPermitted
-
- });
- }
- }
- return parameter;
- };
-
- var getTenantList = function(cloudRegionId) {
- var parameter = "";
- var cloudRegionTenantList = DataService.getCloudRegionTenantList();
- if ( UtilityService.hasContents (cloudRegionTenantList) ) {
- var parameter = FIELD.PARAMETER.TENANT_ENABLED;
- parameter.optionList = new Array();
- for (var i = 0; i < cloudRegionTenantList.length; i++) {
- if (cloudRegionTenantList[i].cloudRegionId === cloudRegionId) {
- parameter.optionList.push({
- id : cloudRegionTenantList[i].tenantId,
- name : cloudRegionTenantList[i].tenantName,
- isPermitted : cloudRegionTenantList[i].isPermitted
- });
- }
- }
- }
- return parameter;
-
- };
-
- var addOptionList = function(parameter, optionSimpleArray) {
- var optionList = new Array();
- if (!angular.isArray(optionSimpleArray)) {
- return optionList;
- }
- for (var i = 0; i < optionSimpleArray.length; i++) {
- optionList.push({
- name : optionSimpleArray[i]
- });
- }
- parameter.optionList = optionList;
- return parameter;
- };
-
- var getValueFromList = function(id, parameterList) {
- for (var i = 0; i < parameterList.length; i++) {
- if (parameterList[i].id === id) {
- return parameterList[i].value;
- }
- }
- };
-
- var updateUserParameterList = function(updatedId, parameterListControl) {
- if (updatedId === FIELD.ID.LCP_REGION) {
- var list = parameterListControl.getList(updatedId);
- if (list[0].selectedIndex >= 0) {
- parameterListControl
- .updateList([ getTenantList(list[0].value) ]);
- } else {
- parameterListControl
- .updateList([ FIELD.PARAMETER.TENANT_DISABLED ]);
- }
- if (list[0].value === FIELD.KEY.LCP_REGION_TEXT) {
- parameterListControl
- .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]);
- } else {
- parameterListControl
- .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN ]);
- }
- } else if (updatedId === FIELD.ID.SUBSCRIBER_NAME) {
- var list = parameterListControl.getList(updatedId);
- if (list[0].selectedIndex >= 0) {
- DataService.setGlobalCustomerId(list[0].value);
-
- AaiService.getSubscriptionServiceTypeList(DataService
- .getGlobalCustomerId(), function(response) {
- DataService.setSubscriptionServiceTypeList(response);
- var serviceTypeParameters = FIELD.PARAMETER.SERVICE_TYPE;
- serviceTypeParameters.optionList = [];
-
- for (var i = 0; i < response.length; i++) {
- serviceTypeParameters.optionList.push({
- "id" : response[i].name,
- "name" : response[i].name
- });
- }
- parameterListControl.updateList([ serviceTypeParameters ]);
- });
-
- } else {
- parameterListControl
- .updateList([ FIELD.PARAMETER.SERVICE_TYPE_DISABLED ]);
- }
- }
- };
-
- return {
- initializeComponent : function(componentId) {
- _this.componentId = ComponentService.initialize(componentId);
- },
- getComponentDisplayName : ComponentService.getComponentDisplayName,
- getSummaryList : getSummaryList,
- getParameters : function(getParametersHandler) {
- _this.getParametersHandler = getParametersHandler;
- UtilityService.setHttpErrorHandler(_this.httpErrorHandler);
- UtilityService.startAsyncOperations(getAsyncOperationList(),
- internalGetParametersHandler);
- },
- updateUserParameterList : updateUserParameterList,
- getMsoRequestDetails : getMsoRequestDetails,
- getMsoUrl : getMsoUrl,
- isMacro : DataService.getMacro()
- }
-}
-
-appDS2.factory("DeletionService", [ "$log", "AaiService", "AsdcService",
- "DataService", "ComponentService", "COMPONENT", "FIELD",
- "UtilityService", DeletionService ]);
+/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var DeleteResumeService = function($log, AaiService, AsdcService, DataService, + ComponentService, COMPONENT, FIELD, UtilityService) { + + var _this = this; + + var getAsyncOperationList = function() { + if (DataService.getLoggedInUserId() == null) + getLoggedInUserID(); + switch (_this.componentId) { + case COMPONENT.SERVICE: + return [ getSubscribers, getLcpCloudRegionTenantList ]; + case COMPONENT.NETWORK: + return [ getLcpCloudRegionTenantList ]; + case COMPONENT.VNF: + return [ getLcpCloudRegionTenantList ]; + case COMPONENT.VF_MODULE: + return [ getLcpCloudRegionTenantList ]; + case COMPONENT.VOLUME_GROUP: + return [ getLcpCloudRegionTenantList ]; + case COMPONENT.CONFIGURATION: + return [ getLcpCloudRegionTenantList ]; + } + }; + + var getLcpCloudRegionTenantList = function() { + //console.log ( "global customer id: " ); + //console.log ( JSON.stringify (DataService.getGlobalCustomerId()) ); + + //console.log ( "service type: " ); + //console.log ( JSON.stringify (DataService.getServiceType()) ); + + AaiService.getLcpCloudRegionTenantList(DataService + .getGlobalCustomerId(), DataService.getServiceType(), function( + response) { + DataService.setCloudRegionTenantList(response); + UtilityService.startNextAsyncOperation(); + }); + }; + + var getLoggedInUserID = function() { + AaiService.getLoggedInUserID(function(response) { + DataService.setLoggedInUserId(response.data); + UtilityService.startNextAsyncOperation(); + }); + }; + + var getSubscribers = function() { + AaiService.getSubscribers(function(response) { + DataService.setSubscribers(response); + UtilityService.startNextAsyncOperation(); + }); + }; + + var internalGetParametersHandler = function() { + if (angular.isFunction(_this.getParametersHandler)) { + if (_this.componentId == COMPONENT.SERVICE) { + if ( DataService.getALaCarte() ) { + _this.getParametersHandler({ + summaryList : getSummaryList(), + userProvidedList : getUserProvidedList() + }, true); + } + else { + _this.getParametersHandler({ + summaryList : getSummaryList(), + userProvidedList : getUserProvidedList() + }, false); + } + } + else { + _this.getParametersHandler({ + summaryList : getSummaryList(), + userProvidedList : getUserProvidedList() + }, false); + } + } + }; + + var getSubscribersParameter = function() { + var subscribers = DataService.getSubscribers(); + var parameter = FIELD.PARAMETER.SUBSCRIBER_NAME; + parameter.optionList = []; + + for (var i = 0; i < subscribers.length; i++) { + parameter.optionList.push({ + id : subscribers[i][FIELD.ID.GLOBAL_CUSTOMER_ID], + name : subscribers[i][FIELD.ID.SUBNAME] + }) + } + return parameter; + }; + + var getServiceId = function() { + var serviceIdList = DataService.getServiceIdList(); + var parameter = FIELD.PARAMETER.PRODUCT_FAMILY; + parameter.optionList = new Array(); + for (var i = 0; i < serviceIdList.length; i++) { + parameter.optionList.push({ + id : serviceIdList[i].id, + name : serviceIdList[i].description + }); + } + return parameter; + }; + + var getUserProvidedList = function() { + + //var parameterList = [ FIELD.PARAMETER.INSTANCE_NAME ]; + + var parameterList = []; + + switch (_this.componentId) { + case COMPONENT.SERVICE: + if ( DataService.getALaCarte() ) { + parameterList = []; + } + else { + parameterList = parameterList.concat ([getLcpRegion(), + FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN, + FIELD.PARAMETER.TENANT_DISABLED ]); + } + break; + case COMPONENT.NETWORK: + case COMPONENT.CONFIGURATION: + case COMPONENT.VNF: + parameterList = parameterList.concat([ //getServiceId(), + getLcpRegion(), FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN, + FIELD.PARAMETER.TENANT_DISABLED ]); + break; + case COMPONENT.VF_MODULE: + parameterList = parameterList.concat([ + getLcpRegion(), + FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN, + FIELD.PARAMETER.TENANT_DISABLED + ]); + + break; + case COMPONENT.VOLUME_GROUP: + parameterList = parameterList.concat([ getLcpRegion(), + FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN, + FIELD.PARAMETER.TENANT_DISABLED ]); + } + + //parameterList.push(FIELD.PARAMETER.SUPPRESS_ROLLBACK); + + //addArbitraryParameters(parameterList); + + return parameterList; + }; + var getSummaryList = function() { + switch (_this.componentId) { + case COMPONENT.CONFIGURATION: + case COMPONENT.NETWORK: + case COMPONENT.SERVICE: + case COMPONENT.VNF: + case COMPONENT.VF_MODULE: + case COMPONENT.VOLUME_GROUP: + var summaryList = [ { + name : FIELD.NAME.SUBSCRIBER_NAME, + value : DataService.getSubscriberName() + }, { + name : FIELD.NAME.CUSTOMER_ID, + value : DataService.getGlobalCustomerId() + }, { + name : FIELD.NAME.SERVICE_UUID, + value : DataService.getServiceUuid() + }, { + name : FIELD.NAME.SERVICE_NAME, + value : DataService.getServiceName() + /* }, { + name : FIELD.NAME.USER_SERVICE_INSTANCE_NAME, + value : DataService.getUserServiceInstanceName()*/ + } ]; + + _this.parameterList = new Array(); + + addToList(FIELD.NAME.SERVICE_NAME, DataService.getServiceName()); + + switch (_this.componentId) { + case COMPONENT.SERVICE: + addToList(FIELD.NAME.SERVICE_INVARIANT_UUID, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]); + addToList(FIELD.NAME.SERVICE_VERSION, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]); + addToList(FIELD.NAME.SERVICE_UUID, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]); + addToList(FIELD.NAME.SERVICE_DESCRIPTION, DataService + .getModelInfo(_this.componentId)[FIELD.ID.DESCRIPTION]); + addToList(FIELD.NAME.SERVICE_CATEGORY, DataService + .getModelInfo(_this.componentId)[FIELD.ID.CATEGORY]); + break; + case COMPONENT.VF_MODULE: + addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService + .getSubscriberName()); + addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService + .getServiceInstanceName()); + addToList(FIELD.NAME.MODEL_NAME, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]); + addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]); + addToList(FIELD.NAME.MODEL_VERSION, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]); + addToList(FIELD.NAME.MODEL_UUID, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]); + break; + case COMPONENT.CONFIGURATION: + case COMPONENT.NETWORK: + case COMPONENT.VNF: + case COMPONENT.VOLUME_GROUP: + addToList(FIELD.NAME.SUBSCRIBER_NAME, DataService + .getSubscriberName()); + addToList(FIELD.NAME.SERVICE_INSTANCE_NAME, DataService + .getServiceInstanceName()); + addToList(FIELD.NAME.MODEL_NAME, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME]); + addToList(FIELD.NAME.MODEL_INVARIANT_UUID, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_INVARIANT_ID]); + addToList(FIELD.NAME.MODEL_VERSION, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_VERSION]); + addToList(FIELD.NAME.MODEL_UUID, DataService + .getModelInfo(_this.componentId)[FIELD.ID.MODEL_NAME_VERSION_ID]); + break; + } + + /*var additionalList = ComponentService.getInventoryParameterList( + _this.componentId, DataService.getInventoryItem());*/ + var additionalList = ComponentService.getDisplayNames(ComponentService + .getInventoryParameterList(_this.componentId, DataService + .getInventoryItem(), true )); + + return summaryList.concat(ComponentService + .getDisplayNames(additionalList)); + } + }; + + var getMsoUrl = function() { + switch (_this.componentId) { + case COMPONENT.CONFIGURATION: + return "mso_delete_configuration/" + + DataService.getServiceInstanceId() + "/configurations/" + + DataService.getConfigurationInstanceId(); + case COMPONENT.NETWORK: + return "mso_delete_nw_instance/" + + DataService.getServiceInstanceId() + "/networks/" + + DataService.getNetworkInstanceId(); + case COMPONENT.SERVICE: + return "mso_delete_svc_instance/" + + DataService.getServiceInstanceId(); + case COMPONENT.VNF: + return "mso_delete_vnf_instance/" + + DataService.getServiceInstanceId() + "/vnfs/" + + DataService.getVnfInstanceId(); + case COMPONENT.VF_MODULE: + return "mso_delete_vfmodule_instance/" + + DataService.getServiceInstanceId() + "/vnfs/" + + DataService.getVnfInstanceId() + "/vfModules/" + + DataService.getVfModuleInstanceId(); + case COMPONENT.VOLUME_GROUP: + return "mso_delete_volumegroup_instance/" + + DataService.getServiceInstanceId() + "/vnfs/" + + DataService.getVnfInstanceId() + "/volumeGroups/" + + DataService.getVolumeGroupInstanceId(); + } + }; + + var addToList = function(name, value) { + _this.parameterList.push({ + name : name, + value : value + }); + }; + + var getMsoRequestDetails = function(parameterList) { + console.log("getMsoRequestDetails invoked"); + var inventoryInfo = ComponentService.getInventoryInfo( + _this.componentId, DataService.getInventoryItem()); + var modelInfo = DataService.getModelInfo(_this.componentId); + var requestorloggedInId = DataService.getLoggedInUserId(); + if (requestorloggedInId == null) + requestorloggedInId = ""; + var requestDetails = { + modelInfo : { + modelType : _this.componentId, + modelInvariantId : modelInfo.modelInvariantId, + modelVersionId : modelInfo.modelNameVersionId, + modelName : modelInfo.modelName, + modelCustomizationName : modelInfo.modelCustomizationName, + modelCustomizationId : modelInfo.customizationUuid, + modelVersion : modelInfo.modelVersion + }, + requestInfo : { + source : FIELD.ID.VID, + requestorId: requestorloggedInId + } + }; + + switch (_this.componentId) { + case COMPONENT.SERVICE: + requestDetails.requestParameters = { + aLaCarte : DataService.getALaCarte() + }; + if ( !(DataService.getALaCarte()) ) { + // for macro delete include cloud config. + var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList); + if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) { + lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT, + parameterList); + } + requestDetails.cloudConfiguration = { + lcpCloudRegionId : lcpRegion, + tenantId : getValueFromList(FIELD.ID.TENANT, parameterList) + }; + } + break; + case COMPONENT.VNF: + case COMPONENT.CONFIGURATION: + console.log("getMsoRequestDetails COMPONENT.VNF"); + var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList); + if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) { + lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT, + parameterList); + } + requestDetails.cloudConfiguration = { + lcpCloudRegionId : lcpRegion, + tenantId : getValueFromList(FIELD.ID.TENANT, parameterList) + }; + + break; + case COMPONENT.VF_MODULE: + case COMPONENT.NETWORK: + var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList); + if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) { + lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT, + parameterList); + } + requestDetails.cloudConfiguration = { + lcpCloudRegionId : lcpRegion, + tenantId : getValueFromList(FIELD.ID.TENANT, parameterList) + }; + break; + case COMPONENT.VOLUME_GROUP: + var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList); + if (lcpRegion === FIELD.KEY.LCP_REGION_TEXT) { + lcpRegion = getValueFromList(FIELD.ID.LCP_REGION_TEXT, + parameterList); + } + requestDetails.cloudConfiguration = { + lcpCloudRegionId : lcpRegion, + tenantId : getValueFromList(FIELD.ID.TENANT, parameterList) + }; + + break; + default: + requestDetails.cloudConfiguration = { + lcpCloudRegionId : DataService.getLcpRegion(), + tenantId : DataService.getTenant() + }; + } + return requestDetails; + } + + var getLcpRegion = function() { + var cloudRegionTenantList = DataService.getCloudRegionTenantList(); + var parameter = ""; + if ( UtilityService.hasContents (cloudRegionTenantList) ) { + parameter = FIELD.PARAMETER.LCP_REGION; + parameter.optionList = new Array(); + for (var i = 0; i < cloudRegionTenantList.length; i++) { + for (var j = 0; j < parameter.optionList.length; j++) { + if (parameter.optionList[j].id === cloudRegionTenantList[i].cloudRegionId) { + parameter.optionList[j].isPermitted = + parameter.optionList[j].isPermitted || cloudRegionTenantList[i].isPermitted; + break; + } + } + if (j < parameter.optionList.length) { + continue; + } + parameter.optionList.push({ + id : cloudRegionTenantList[i].cloudRegionId, + isPermitted : cloudRegionTenantList[i].isPermitted + + }); + } + } + return parameter; + }; + + var getTenantList = function(cloudRegionId) { + var parameter = ""; + var cloudRegionTenantList = DataService.getCloudRegionTenantList(); + if ( UtilityService.hasContents (cloudRegionTenantList) ) { + var parameter = FIELD.PARAMETER.TENANT_ENABLED; + parameter.optionList = new Array(); + for (var i = 0; i < cloudRegionTenantList.length; i++) { + if (cloudRegionTenantList[i].cloudRegionId === cloudRegionId) { + parameter.optionList.push({ + id : cloudRegionTenantList[i].tenantId, + name : cloudRegionTenantList[i].tenantName, + isPermitted : cloudRegionTenantList[i].isPermitted + }); + } + } + } + return parameter; + + }; + + var addOptionList = function(parameter, optionSimpleArray) { + var optionList = new Array(); + if (!angular.isArray(optionSimpleArray)) { + return optionList; + } + for (var i = 0; i < optionSimpleArray.length; i++) { + optionList.push({ + name : optionSimpleArray[i] + }); + } + parameter.optionList = optionList; + return parameter; + }; + + var getValueFromList = function(id, parameterList) { + for (var i = 0; i < parameterList.length; i++) { + if (parameterList[i].id === id) { + return parameterList[i].value; + } + } + }; + + var updateUserParameterList = function(updatedId, parameterListControl) { + if (updatedId === FIELD.ID.LCP_REGION) { + var list = parameterListControl.getList(updatedId); + if (list[0].selectedIndex >= 0) { + parameterListControl + .updateList([ getTenantList(list[0].value) ]); + } else { + parameterListControl + .updateList([ FIELD.PARAMETER.TENANT_DISABLED ]); + } + if (list[0].value === FIELD.KEY.LCP_REGION_TEXT) { + parameterListControl + .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_VISIBLE ]); + } else { + parameterListControl + .updateList([ FIELD.PARAMETER.LCP_REGION_TEXT_HIDDEN ]); + } + } else if (updatedId === FIELD.ID.SUBSCRIBER_NAME) { + var list = parameterListControl.getList(updatedId); + if (list[0].selectedIndex >= 0) { + DataService.setGlobalCustomerId(list[0].value); + + AaiService.getSubscriptionServiceTypeList(DataService + .getGlobalCustomerId(), function(response) { + DataService.setSubscriptionServiceTypeList(response); + var serviceTypeParameters = FIELD.PARAMETER.SERVICE_TYPE; + serviceTypeParameters.optionList = []; + + for (var i = 0; i < response.length; i++) { + serviceTypeParameters.optionList.push({ + "id" : response[i].name, + "name" : response[i].name + }); + } + parameterListControl.updateList([ serviceTypeParameters ]); + }); + + } else { + parameterListControl + .updateList([ FIELD.PARAMETER.SERVICE_TYPE_DISABLED ]); + } + } + }; + + return { + initializeComponent : function(componentId) { + _this.componentId = ComponentService.initialize(componentId); + }, + getComponentDisplayName : ComponentService.getComponentDisplayName, + getSummaryList : getSummaryList, + getParameters : function(getParametersHandler) { + _this.getParametersHandler = getParametersHandler; + UtilityService.setHttpErrorHandler(_this.httpErrorHandler); + UtilityService.startAsyncOperations(getAsyncOperationList(), + internalGetParametersHandler); + }, + updateUserParameterList : updateUserParameterList, + getMsoRequestDetails : getMsoRequestDetails, + getMsoUrl : getMsoUrl, + isMacro : DataService.getMacro() + } +} + +appDS2.factory("DeleteResumeService", [ "$log", "AaiService", "AsdcService", + "DataService", "ComponentService", "COMPONENT", "FIELD", + "UtilityService", DeleteResumeService ]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js index 68c8503dc..67211d48b 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/msoService.js @@ -20,7 +20,7 @@ "use strict";
-var MsoService = function($http, $log, PropertyService, AaiService, UtilityService, COMPONENT, FIELD, $q) {
+var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityService, COMPONENT, FIELD) {
var _this = this;
@@ -55,49 +55,60 @@ var MsoService = function($http, $log, PropertyService, AaiService, UtilityServi }
};
- var activateInstance = function(instance, model) {
- var deferred = $q.defer();
+ var buildPayloadForServiceActivateDeactivate = function (model, userId, aicZone) {
+ var requestDetails = {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": model.service.invariantUuid,
+ "modelVersionId": model.service.uuid,
+ "modelName": model.service.name,
+ "modelVersion": model.service.version
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": userId
+ },
+ "requestParameters": {
+ "userParams": [{
+ "name": "aic_zone",
+ "value": aicZone
+ }]
+ }
+ };
- AaiService.getLoggedInUserID(function (response) {
- var userID = response.data;
+ $log.debug("Service Activate/Deactivate payload", requestDetails);
- AaiService.getAicZoneForPNF(instance.globalCustomerId, model.service.serviceType, instance.serviceInstanceId, function (aicZone) {
+ return requestDetails;
- var requestDetails = {
- "modelInstanceId": serviceInstanceId,
- "requestDetails": {
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": model.service.invariantUuid,
- "modelVersionId": model.service.uuid,
- "modelName": model.service.name,
- "modelVersion": model.service.version
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": userID
- },
- "requestParameters": {
- "userParams": {
- "name": "aic_zone",
- "value": aicZone
- }
- }
- }
- };
+ };
- console.log("requestDetails", requestDetails);
+ var activateInstance = function(requestParams) {
+ var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId, requestParams.aicZone);
- $http.post(COMPONENT.MSO_ACTIVATE_INSTANCE.replace('@serviceInstanceId', requestDetails.modelInstanceId),
- requestDetails.requestDetails)
- .success(function (response) {
- deferred.resolve({data: response});
- })
- .error(function(data, status, headers, config) {
- deferred.reject({message: data, status: status});
- });
+ return sendPostRequest(COMPONENT.MSO_ACTIVATE_INSTANCE.replace('@serviceInstanceId', requestParams.instance.serviceInstanceId),
+ requestDetails);
+ };
+
+ var deactivateInstance = function(requestParams) {
+ var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId, requestParams.aicZone);
+
+ return sendPostRequest(COMPONENT.MSO_DEACTIVATE_INSTANCE.replace('@serviceInstanceId', requestParams.instance.serviceInstanceId),
+ requestDetails);
+ };
+
+ var sendPostRequest = function(url, requestDetails) {
+ var deferred = $q.defer();
+ if (url) {
+ $http.post(url, {
+ requestDetails: requestDetails
+ }, {
+ timeout: PropertyService.getServerResponseTimeoutMsec()
+ }).success(function (response) {
+ deferred.resolve({data: response});
+ }).error(function (data, status) {
+ deferred.reject({message: data, status: status});
});
- });
+ }
return deferred.promise;
};
@@ -177,9 +188,12 @@ var MsoService = function($http, $log, PropertyService, AaiService, UtilityServi getFormattedSingleGetOrchestrationRequestResponse : function (response) {
UtilityService.checkUndefined(COMPONENT.ENTITY, response.data.entity);
UtilityService.checkUndefined(COMPONENT.STATUS, response.data.status);
- checkValidStatus(response);
+ //checkValidStatus(response);
var message = "";
+ if (! (response && response.data && response.data.entity)) {
+ return message;
+ }
if ( UtilityService.hasContents (response.data.entity.request) ) {
var request = response.data.entity.request;
message += addListEntry(FIELD.ID.REQUEST_ID, request.requestId) + ",\n";
@@ -201,6 +215,11 @@ var MsoService = function($http, $log, PropertyService, AaiService, UtilityServi + "\n\n";
}
}
+ else {
+ if (UtilityService.hasContents(response.data.status) && UtilityService.hasContents(response.data.entity)) {
+ message = this.getFormattedCommonResponse(response) + "\n";
+ }
+ }
return message;
},
getManualTasks : function(requestId) {
@@ -215,29 +234,37 @@ var MsoService = function($http, $log, PropertyService, AaiService, UtilityServi .catch(UtilityService.runHttpErrorHandler);
},
completeTask: function(taskId, taskToComplete) {
- $log.debug("MsoService:completeTask: taskId: "
- + taskId);
- AaiService.getLoggedInUserID(function (response) {
- var attuid = response.data;
- var source = "VID";
- var data = {
- requestDetails: {
- requestInfo: {
- source: source,
- responseValue: taskToComplete,
- requestorId: attuid
+ var promise = new Promise(function (resolve, reject) {
+ $log.debug("MsoService:completeTask: taskId: "
+ + taskId);
+ AaiService.getLoggedInUserID(function (response) {
+ var attuid = response.data;
+ var source = "VID";
+ var data = {
+ requestDetails: {
+ requestInfo: {
+ source: source,
+ responseValue: taskToComplete,
+ requestorId: attuid
+ }
}
- }
- };
+ };
- return $http.post(
- "mso/mso_post_man_task/" + taskId, data,
- {
- timeout: PropertyService
- .getServerResponseTimeoutMsec()
+ return $http.post(
+ "mso/mso_post_man_task/" + taskId, data,
+ {
+ timeout: PropertyService
+ .getServerResponseTimeoutMsec()
+ }).then(function (response) {
+ resolve(response);
})
- .catch(UtilityService.runHttpErrorHandler);
+ .catch(UtilityService.runHttpErrorHandler);
+ }, function () {
+ reject();
+ });
});
+
+ return promise;
},
showResponseContentError : function(error, showFunction) {
switch (error.type) {
@@ -251,9 +278,233 @@ var MsoService = function($http, $log, PropertyService, AaiService, UtilityServi showFunction(FIELD.ERROR.SYSTEM_FAILURE);
}
},
- activateInstance: activateInstance
+ activateInstance: activateInstance,
+ deactivateInstance: deactivateInstance,
+
+
+ createConfigurationInstance: function(requestParams) {
+
+ const modelInfoOf = function (instance) {
+ const modelInfo = {
+ "modelType": "vnf",
+ "modelInvariantId": instance.properties['model-invariant-id'],
+ "modelVersionId": instance.properties['model-version-id'],
+ "modelName": instance.properties['model-name'],
+ "modelVersion": instance.properties['model-version'],
+ "modelCustomizationId": instance.properties['model-customization-id']
+ };
+
+ $log.debug("model info from instance", instance);
+ $log.debug("model info to model", modelInfo);
+
+ return modelInfo
+ };
+
+ var payload = {
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": requestParams.configurationModelInfo.modelInvariantId,
+ "modelVersionId": requestParams.configurationModelInfo.modelNameVersionId,
+ "modelName": requestParams.configurationModelInfo.modelName, // "Port Mirroring Configuration"
+ "modelVersion": requestParams.configurationModelInfo.modelVersion,
+ "modelCustomizationId": requestParams.configurationModelInfo.customizationUuid,
+ "modelCustomizationName": requestParams.configurationModelInfo.modelCustomizationName
+ },
+ "cloudConfiguration": {
+ // "tenantId": ????
+ "lcpCloudRegionId": requestParams.portMirroringConfigFields.lcpRegion.value
+ },
+ "requestInfo": {
+ "instanceName": requestParams.portMirroringConfigFields.instanceName.value,
+ "source": "VID",
+ "requestorId": requestParams.attuuid
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": requestParams.topServiceInstanceId,
+ "modelInfo": {
+ "modelType": "service", // relatedTopModelsInfo.modelType
+ "modelInvariantId": requestParams.relatedTopModelsInfo.modelInvariantId,
+ "modelVersionId": requestParams.relatedTopModelsInfo.modelNameVersionId,
+ "modelName": requestParams.relatedTopModelsInfo.modelName,
+ "modelVersion": requestParams.relatedTopModelsInfo.modelVersion
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": requestParams.portMirroringConfigFields.sourceInstance.properties['vnf-id'],
+ "instanceDirection": "source",
+ "modelInfo": modelInfoOf(requestParams.portMirroringConfigFields.sourceInstance)
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": requestParams.configurationByPolicy ?
+ requestParams.portMirroringConfigFields.destinationInstance.properties['pnfName']:
+ requestParams.portMirroringConfigFields.destinationInstance.properties['vnf-id'],
+ "instanceDirection": "destination",
+ "modelInfo":
+ requestParams.configurationByPolicy ?
+ {"modelType": "pnf"} :
+ modelInfoOf(requestParams.portMirroringConfigFields.destinationInstance)
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+ };
+
+ $log.debug("payload", payload);
+
+ var deferred = $q.defer();
+ $http.post([
+ 'mso','mso_create_configuration_instance',
+ requestParams.topServiceInstanceId,
+ 'configurations',''
+ ].join(COMPONENT.FORWARD_SLASH),
+ payload)
+ .success(function (response) {
+ deferred.resolve({data : response});
+ }).error(function (data, status) {
+ deferred.reject({message: data, status: status});
+ });
+ return deferred.promise;
+ },
+
+ toggleConfigurationStatus: function(requestParams) {
+
+ var requestDetails = {
+ "modelInfo": requestParams.configurationModel,
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": requestParams.userId
+ },
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": requestParams.serviceInstanceId,
+ "modelInfo": requestParams.serviceModel
+ }
+ }],
+ "requestParameters": {
+ "userParams": []
+ }
+ };
+
+ var url;
+ switch (requestParams.configStatus) {
+ case FIELD.STATUS.AAI_CREATED:
+ case FIELD.STATUS.AAI_INACTIVE:
+ url = "mso/mso_activate_configuration/"+requestParams.serviceInstanceId+"/configurations/"+requestParams.configurationId;
+ break;
+ case FIELD.STATUS.AAI_ACTIVE:
+ url = "mso/mso_deactivate_configuration/"+requestParams.serviceInstanceId+"/configurations/"+requestParams.configurationId;
+ break;
+ }
+
+ return sendPostRequest(url, requestDetails);
+ },
+
+ togglePortStatus: function(requestParams) {
+ var requestDetails = {
+ "modelInfo": requestParams.configurationModel,
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": requestParams.userId
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": requestParams.serviceInstanceId,
+ "modelInfo": requestParams.serviceModel
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": requestParams.portId,
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "connectionPoint"
+ }
+ }
+ }
+ ]
+ };
+
+ var url;
+ switch (requestParams.portStatus) {
+ case FIELD.STATUS.AAI_ENABLED:
+ url = "mso/mso_disable_port_configuration/"+requestParams.serviceInstanceId+"/configurations/"+requestParams.configurationId;
+ break;
+ case FIELD.STATUS.AAI_DISABLED:
+ url = "mso/mso_enable_port_configuration/"+requestParams.serviceInstanceId+"/configurations/"+requestParams.configurationId;
+ break;
+ }
+
+ return sendPostRequest(url, requestDetails);
+ },
+
+ buildPayloadForAssociateDissociate: function(serviceModelInfo, attuuid, instanceId, pnf) {
+ var payload = {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": serviceModelInfo.invariantUuid,
+ "modelVersionId": serviceModelInfo.uuid,
+ "modelName": serviceModelInfo.name,
+ "modelVersion": serviceModelInfo.version
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": attuuid
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": pnf,
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }],
+ "requestParameters": {
+ "aLaCarte": true
+ }
+ };
+
+ $log.debug("payload", payload);
+
+ return payload;
+ },
+ associatePnf: function(requestParams) {
+
+ var payload = this.buildPayloadForAssociateDissociate(requestParams.serviceModelInfo, requestParams.attuuid, requestParams.instanceId, requestParams.pnf);
+ return sendPostRequest([
+ COMPONENT.MSO, COMPONENT.MSO_CREATE_REALATIONSHIP,
+ requestParams.instanceId,
+ ''
+ ].join(COMPONENT.FORWARD_SLASH), payload);
+ },
+ dissociatePnf: function(requestParams) {
+
+ var payload = this.buildPayloadForAssociateDissociate(requestParams.serviceModelInfo, requestParams.attuuid, requestParams.serviceInstanceId, requestParams.pnf);
+
+ return sendPostRequest([
+ COMPONENT.MSO, COMPONENT.MSO_REMOVE_RELATIONSHIP,
+ requestParams.serviceInstanceId,
+ ''
+ ].join(COMPONENT.FORWARD_SLASH), payload);
+ }
}
};
-appDS2.factory("MsoService", [ "$http", "$log", "PropertyService",
- "AaiService", "UtilityService", "COMPONENT", "FIELD", "$q", MsoService ]);
+appDS2.factory("MsoService", MsoService );
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/pnfService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/pnfService.js new file mode 100644 index 000000000..39a2e2d90 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/pnfService.js @@ -0,0 +1,43 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +"use strict"; + +var PnfService = function ($q, AaiService) { + return { + getPnfs: function (instance) { + var deferred = $q.defer(); + + AaiService.getPNFInformationByServiceTypeAndId( + instance.globalCustomerId, + instance.serviceType, + instance.serviceInstanceId, + function (response) { + deferred.resolve(response); + }, + function (error) { + deferred.reject(error); + }); + return deferred.promise; + } + }; +}; + +appDS2.factory("PnfService", ["$q", "AaiService", PnfService]); diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/schedulerService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/schedulerService.js index 83cc4ddac..cd0c45e7d 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/schedulerService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/schedulerService.js @@ -22,81 +22,24 @@ var SchedulerService = function($http, $log, PropertyService, UtilityService, COMPONENT, FIELD) { return { - - getStatusSchedulerId : function(schedulerInfo,successCallbackFunction) { - $log - .debug("SchedulerService:getSchedulerStatusAndSchedulerId"); - var url = COMPONENT.POST_CREATE_NEW_VNF_CHANGE+COMPONENT.ASSIGN + Math.random(); - - $http.post(url, schedulerInfo, - { - timeout : PropertyService - .getServerResponseTimeoutMsec() - }).then(function(response) { - if (response.data) { - successCallbackFunction(response); - } else { - successCallbackFunction([]); - } - })["catch"] - (UtilityService.runHttpErrorHandler); - }, - - getTimeSotsForSchedulerId:function(schedulerID,successCallbackFunction){ - $log - .debug("SchedulerService:getTimeSlotsForSchedulerID"); - var url = COMPONENT.GET_TIME_SLOTS+COMPONENT.FORWARD_SLASH +schedulerID+COMPONENT.ASSIGN; - - $http.get(url, - { - timeout : PropertyService - .getServerResponseTimeoutMsec() - }).then(function(response) { - if (response.data) { - successCallbackFunction(response); - } else { - successCallbackFunction([]); - } - })["catch"] - - (UtilityService.runHttpErrorHandler); - }, - getSubmitForapprovedTimeslots: function(ApprovedTimeSlotsObj,successCallbackFunction) { - $log - .debug("SchedulerService:getSchedulerStatusAndSchedulerId"); - var url = COMPONENT.SUBMIT_VNF_CHANGE_TIMESLOTS+COMPONENT.ASSIGN + Math.random(); - - $http.post(url, ApprovedTimeSlotsObj, - { - timeout : PropertyService - .getServerResponseTimeoutMsec() - }).then(function(response) { - if (response.data) { - successCallbackFunction(response); - } else { - successCallbackFunction([]); - } - })["catch"] - (UtilityService.runHttpErrorHandler); - }, - getPolicyInfo:function(policyName,successCallbackFunction){ - $log - .debug("SchedulerService:getPolicyInfo"); - var url = COMPONENT.GET_POLICY +COMPONENT.ASSIGN + Math.random(); - - $http.post(url, policyName, - { - timeout : PropertyService - .getServerResponseTimeoutMsec() - }).then(function(response) { - if (response.data) { - successCallbackFunction(response); - } else { - successCallbackFunction([]); - } - })["catch"] - (UtilityService.runHttpErrorHandler); - } + cancelScheduleRequest: function(schedulerID, successCallbackFunction, errorCallbackFunction) { + $log.debug("SchedulerService:cancelPendingBySchedulerId"); + var url = COMPONENT.CANCEL_SCHEDULE_REQUEST + COMPONENT.FORWARD_SLASH + schedulerID + COMPONENT.ASSIGN; + + $http.delete(url, + { + timeout : PropertyService + .getServerResponseTimeoutMsec() + }).then(function(response) { + if (response.data) { + successCallbackFunction(response); + } else { + successCallbackFunction([]); + } + }).catch(function(error) { + errorCallbackFunction(error); + }); + } } } diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/testEnvironmentsService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/testEnvironmentsService.js new file mode 100644 index 000000000..6ae675a01 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/testEnvironmentsService.js @@ -0,0 +1,79 @@ +(function () { + 'use strict'; + + appDS2.service('TestEnvironmentsService', ['$q', '$http', '$log', 'COMPONENT', 'UtilityService', testEnvironmentsService]); + + function testEnvironmentsService($q, $http, $log, COMPONENT, UtilityService) { + this.loadAAIestEnvironments = function(type) { + var deferred = $q.defer(); + $http.get(COMPONENT.AAI_GET_TEST_ENVIRONMENTS + type) + .success(function (response) { + if(response.httpCode == 200) { + deferred.resolve({operationalEnvironment: response.t.operationalEnvironment}); + } + else { + deferred.reject({message: response.errorMessage, status: response.httpCode}); + } + }) + .error(function(data, status, headers, config) { + deferred.reject({message: data, status: status}); + }); + + return deferred.promise; + }; + + this.createApplicationEnv = function(request) { + var deferred = $q.defer(); + + $http.post(COMPONENT.OPERATIONAL_ENVIRONMENT_CREATE, JSON.stringify(request.requestDetails)) + .success(function (response) { + deferred.resolve({data: response}); + }).error(function (data, status) { + deferred.reject({message: data, status: status}); + }); + + return deferred.promise; + } + + this.deactivateApplicationEnv = function(request) { + var deferred = $q.defer(); + + $http.post(COMPONENT.OPERATIONAL_ENVIRONMENT_DEACTIVATE + request.envId, JSON.stringify({})) + .success(function (response) { + deferred.resolve({data: response}); + }).error(function (data, status) { + deferred.reject({message: data, status: status}); + }); + + return deferred.promise; + }; + + this.activateApplicationEnv = function(request) { + var deferred = $q.defer(); + + $http.post(COMPONENT.OPERATIONAL_ENVIRONMENT_ACTIVATE + request.envId, JSON.stringify({ + "relatedInstanceId": request.relatedInstanceId + , "relatedInstanceName": request.relatedInstanceName + , "workloadContext": request.workloadContext + , "manifest": request.manifest + })) + .success(function (response) { + deferred.resolve({data: response}); + }).error(function (response, status) { + UtilityService.runHttpErrorHandler({data:response, status:status}); + }); + return deferred.promise; + }; + + this.getRequestStatus = function(requestId, successCallback) { + $http.get(COMPONENT.OPERATIONAL_ENVIRONMENT_STATUS + requestId) + .success(function(response) { + successCallback({data: response}); + } ) + .catch(UtilityService.runHttpErrorHandler); + }; + } + + +})(); + diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js index 4e4d12302..8577e9930 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/utilityService.js @@ -67,31 +67,31 @@ var UtilityService = function($log, DataService, PARAMETER) { var _this = this;
var convertModel = function (serviceModel) {
-
- var isNewFlow = false;
-
- for (var networkCustomizationName in serviceModel.networks) {
- var networkModel = serviceModel.networks[networkCustomizationName];
- if ( networkModel.customizationUuid != null ) {
- isNewFlow = true;
- break;
- }
- }
- if ( !isNewFlow ) {
- for (var vnfCustomizationName in serviceModel.vnfs) {
- var vnfModel = serviceModel.vnfs[vnfCustomizationName];
- if ( vnfModel.customizationUuid != null ) {
- isNewFlow = true;
- break;
- }
- }
- }
- if ( isNewFlow ) {
- return (convertNewModel (serviceModel) );
- }
- else {
- return (convertOldModel (serviceModel) );
- }
+
+ var isNewFlow = false;
+
+ for (var networkCustomizationName in serviceModel.networks) {
+ var networkModel = serviceModel.networks[networkCustomizationName];
+ if ( networkModel.customizationUuid != null ) {
+ isNewFlow = true;
+ break;
+ }
+ }
+ if ( !isNewFlow ) {
+ for (var vnfCustomizationName in serviceModel.vnfs) {
+ var vnfModel = serviceModel.vnfs[vnfCustomizationName];
+ if ( vnfModel.customizationUuid != null ) {
+ isNewFlow = true;
+ break;
+ }
+ }
+ }
+ if ( isNewFlow ) {
+ return (convertNewModel (serviceModel) );
+ }
+ else {
+ return (convertOldModel (serviceModel) );
+ }
};
var convertNewModel = function (serviceModel ) {
var completeResources = new Array();
@@ -100,6 +100,8 @@ var UtilityService = function($log, DataService, PARAMETER) { "service": serviceModel.service,
"networks": {},
"vnfs": {},
+ "pnfs": serviceModel.pnfs,
+ "serviceProxies": serviceModel.serviceProxies,
"completeDisplayInputs": {},
"isNewFlow": true
};
@@ -164,9 +166,18 @@ var UtilityService = function($log, DataService, PARAMETER) { }
}
-
- for (var vnfCustomizationName in serviceModel.vnfs) {
- var vnfModel = serviceModel.vnfs[vnfCustomizationName];
+
+ _.forEach(serviceModel.configurations, function(element, key) {
+ element.isConfig = true;
+ });
+ _.forEach(serviceModel.pnfs, function(element, key) {
+ element.isPnf= true;
+ element.modelCustomizationName= key;
+ });
+ var mergedVnfs = Object.assign(serviceModel.vnfs, serviceModel.configurations, serviceModel.pnfs);
+
+ for (var vnfCustomizationName in mergedVnfs) {
+ var vnfModel = mergedVnfs[vnfCustomizationName];
var vnfCustomizationUuid = vnfModel.customizationUuid;
convertedAsdcModel.vnfs[vnfModel.customizationUuid] = {
"uuid": vnfModel.uuid,
@@ -183,8 +194,13 @@ var UtilityService = function($log, DataService, PARAMETER) { "displayInputs": {},
"properties": {},
"nfRole": "",
- "nfType": ""
- }
+ "nfType": "",
+ "sourceNodes": vnfModel.sourceNodes,
+ "collectorNodes": vnfModel.collectorNodes,
+ "isConfigurationByPolicy": vnfModel.configurationByPolicy ? vnfModel.configurationByPolicy : false,
+ "isConfig": vnfModel.isConfig ? vnfModel.isConfig : false,
+ "isPnf": vnfModel.isPnf ? vnfModel.isPnf : false
+ };
resource = {
"name": vnfModel.modelCustomizationName,
@@ -278,11 +294,11 @@ var UtilityService = function($log, DataService, PARAMETER) { convertedAsdcModel.completeDisplayInputs = completeDisplayInputs;
// Need to collect all the model customization names (node template tag) and descriptions
DataService.setResources (completeResources);
-
- console.log ("convertedAsdcModel: "); console.log (JSON.stringify ( convertedAsdcModel, null, 4 ));
+
+ $log.debug ("convertedAsdcModel: ", convertedAsdcModel);
return (convertedAsdcModel);
};
-
+
var convertOldModel = function (serviceModel ) {
var resource = {};
@@ -290,6 +306,8 @@ var UtilityService = function($log, DataService, PARAMETER) { "service": serviceModel.service,
"networks": {},
"vnfs": {},
+ "pnfs": serviceModel.pnfs,
+ "serviceProxies": serviceModel.serviceProxies,
"completeDisplayInputs": {},
"isNewFlow": false
};
@@ -356,9 +374,18 @@ var UtilityService = function($log, DataService, PARAMETER) { convertedAsdcModel.networks[networkModel.uuid].displayInputs=networkModelDisplayInputs;
}
}
-
- for (var vnfCustomizationName in serviceModel.vnfs) {
- var vnfModel = serviceModel.vnfs[vnfCustomizationName];
+
+ _.forEach(serviceModel.configurations, function(element, key) {
+ element.isConfig = true;
+ });
+ _.forEach(serviceModel.pnfs, function(element, key) {
+ element.isPnf= true;
+ element.modelCustomizationName= key;
+ });
+ var mergedVnfs = Object.assign(serviceModel.vnfs, serviceModel.configurations, serviceModel.pnfs);
+
+ for (var vnfCustomizationName in mergedVnfs) {
+ var vnfModel = mergedVnfs[vnfCustomizationName];
convertedAsdcModel.vnfs[vnfModel.uuid] = {
"uuid": vnfModel.uuid,
"invariantUuid": vnfModel.invariantUuid,
@@ -371,8 +398,13 @@ var UtilityService = function($log, DataService, PARAMETER) { "vfModules": {},
"volumeGroups": {},
"commands": {},
- "displayInputs": {}
- }
+ "displayInputs": {},
+ "sourceNodes": vnfModel.sourceNodes,
+ "collectorNodes": vnfModel.collectorNodes,
+ "isConfigurationByPolicy": vnfModel.configurationByPolicy ? vnfModel.configurationByPolicy : false,
+ "isConfig": vnfModel.isConfig ? vnfModel.isConfig : false,
+ "isPnf": vnfModel.isPnf ? vnfModel.isPnf : false
+ };
resource = {
"name": vnfModel.modelCustomizationName,
"description": vnfModel.description
@@ -441,203 +473,203 @@ var UtilityService = function($log, DataService, PARAMETER) { convertedAsdcModel.completeDisplayInputs = completeDisplayInputs;
// Need to collect all the model customization names (node template tag) and descriptions
DataService.setResources (completeResources);
- console.log ("convertedAsdcModel: "); console.log (JSON.stringify ( convertedAsdcModel, null, 4 ));
+ $log.debug ("convertedAsdcModel: ", convertedAsdcModel);
return (convertedAsdcModel);
};
-
+
function hasContents(object) {
- if (object === undefined || object === null || object === "") {
- return false;
- }
- return true;
+ if (object === undefined || object === null || object === "") {
+ return false;
+ }
+ return true;
};
function isObjectEmpty(o) {
- var len = 0;
- if (hasContents(o)){
- var keys = Object.keys(o);
- len = keys.length;
- if ( len == 0 ) {
- return true;
- }
- else {
- return false;
- }
- }
- else {
- return true;
- }
+ var len = 0;
+ if (hasContents(o)){
+ var keys = Object.keys(o);
+ len = keys.length;
+ if ( len == 0 ) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+ else {
+ return true;
+ }
};
function padZero(number) {
- if (number < 10) {
- return "0" + number;
- } else {
- return "" + number;
- }
+ if (number < 10) {
+ return "0" + number;
+ } else {
+ return "" + number;
+ }
};
var httpErrorHandler = function(response, status) {
- $log.warn("UtilityService:httpErrorHandler: response:");
- $log.warn(response);
- $log.warn("UtilityService:httpErrorHandler: status:");
- $log.warn(status);
- if (angular.isFunction(_this.httpErrorHandler)) {
- _this.httpErrorHandler(response, status);
- }
+ $log.warn("UtilityService:httpErrorHandler: response:");
+ $log.warn(response);
+ $log.warn("UtilityService:httpErrorHandler: status:");
+ $log.warn(status);
+ if (angular.isFunction(_this.httpErrorHandler)) {
+ _this.httpErrorHandler(response, status);
+ }
};
var startNextAsyncOperation = function() {
- if (_this.asyncOperations.count < _this.asyncOperations.operationList.length) {
- _this.asyncOperations.operationList[_this.asyncOperations.count++]
- ();
- } else {
- if (angular.isFunction(_this.asyncOperations.callbackFunction)) {
- _this.asyncOperations.callbackFunction();
- }
- }
+ if (_this.asyncOperations.count < _this.asyncOperations.operationList.length) {
+ _this.asyncOperations.operationList[_this.asyncOperations.count++]
+ ();
+ } else {
+ if (angular.isFunction(_this.asyncOperations.callbackFunction)) {
+ _this.asyncOperations.callbackFunction();
+ }
+ }
};
return {
- setProperties : function(properties) {
- _this.properties = properties;
- },
- getProperties : function() {
- return _this.properties;
- },
- hasContents : hasContents,
- checkUndefined : function(name, value) {
- if (value === undefined) {
- throw {
- type : "undefinedObject",
- message : "undefined object: \"" + name + "\""
- };
- }
- return value;
- },
- jsonConcat : function (o1, o2) {
- for (var key in o2) {
- o1[key] = o2[key];
- }
- return o1;
- },
- getCurrentTime : function() {
- var time = new Date();
- return padZero(time.getMonth() + 1) + "/"
- + padZero(time.getDate()) + "/"
- + (time.getFullYear() - 2000) + " "
- + padZero(time.getHours()) + ":"
- + padZero(time.getMinutes()) + ":"
- + padZero(time.getSeconds())
- },
- getHttpStatusText : function(statusCode) {
- var statusMap = {
- "200" : "OK",
- "201" : "Created",
- "202" : "Accepted",
- "400" : "Bad Request",
- "401" : "Unauthorized",
- "404" : "Not Found",
- "405" : "Method Not Allowed",
- "409" : "Locked",
- "500" : "Internal Server Error",
- "503" : "Service Unavailable",
- "504" : "Gateway Timeout"
- }
+ setProperties : function(properties) {
+ _this.properties = properties;
+ },
+ getProperties : function() {
+ return _this.properties;
+ },
+ hasContents : hasContents,
+ checkUndefined : function(name, value) {
+ if (value === undefined) {
+ throw {
+ type : "undefinedObject",
+ message : "undefined object: \"" + name + "\""
+ };
+ }
+ return value;
+ },
+ jsonConcat : function (o1, o2) {
+ for (var key in o2) {
+ o1[key] = o2[key];
+ }
+ return o1;
+ },
+ getCurrentTime : function() {
+ var time = new Date();
+ return padZero(time.getMonth() + 1) + "/"
+ + padZero(time.getDate()) + "/"
+ + (time.getFullYear() - 2000) + " "
+ + padZero(time.getHours()) + ":"
+ + padZero(time.getMinutes()) + ":"
+ + padZero(time.getSeconds())
+ },
+ getHttpStatusText : function(statusCode) {
+ var statusMap = {
+ "200" : "OK",
+ "201" : "Created",
+ "202" : "Accepted",
+ "400" : "Bad Request",
+ "401" : "Unauthorized",
+ "404" : "Not Found",
+ "405" : "Method Not Allowed",
+ "409" : "Locked",
+ "500" : "Internal Server Error",
+ "503" : "Service Unavailable",
+ "504" : "Gateway Timeout"
+ }
- if (status === undefined) {
- return "Undefined";
- }
+ if (status === undefined) {
+ return "Undefined";
+ }
- var statusText = statusMap[statusCode];
- if (statusText === undefined) {
- statusText = "Unknown";
- }
+ var statusText = statusMap[statusCode];
+ if (statusText === undefined) {
+ statusText = "Unknown";
+ }
- return statusText + " (" + statusCode + ")";
- },
- getHttpErrorMessage : function(response) {
- var data = response.data;
- if (response.status === 500 && hasContents(data.exception)) {
- var summary = "exception: " + data.exception;
- if (hasContents(data.message)) {
- summary += " message: " + data.message;
- }
- return summary;
- }
- if (response.status === 0 && response.statusText === "") {
- /*
- * This logic is somewhat "fuzzy". Potential (brainstorming)
- * enhancements if users find the message unreliable include:
- *
- * A) SERVER TIMEOUT: perhaps a newer version of Angular can
- * reliably determine timeouts.
- *
- * B) SERVER TIMEOUT: recording start / end times and using that
- * to determine if timeout occured
- *
- * C) SESSION TIMEOUT "Potentially" examine cookies, although
- * that may not be feasible if cookies are set to "httponly".
- */
- if (data === null) {
- //return "possible server timeout";
- return "VID has timed out waiting for a response. To see status, close this popup and the screen will be refreshed automatically";
- }
- if (data === "") {
- return "Possible reasons include a session timeout or a server issue. "
- + "A session timeout might be resolved by refreshing the screen and re-logging in";
- }
- }
- var summary = "";
- if (response.status !== undefined && response.status > 0) {
- summary = "status: " + response.status;
- }
- if (hasContents(response.statusText)) {
- if (summary !== "") {
- summary += " ";
- }
- summary += "message: " + response.statusText;
- }
- return summary;
- },
- setHttpErrorHandler : function(httpErrorHandler) {
- _this.httpErrorHandler = httpErrorHandler;
- },
- runHttpErrorHandler : function(response, status) {
- httpErrorHandler(response, status);
- },
- startAsyncOperations : function(operationList, callbackFunction) {
- for (var i = 0; i < operationList.length; i++) {
- if (!angular.isFunction(operationList[i])) {
- throw "UtilityService:startAsyncOperations: invalid function: index: "
- + i;
- }
- }
- _this.asyncOperations = {
- operationList : operationList,
- callbackFunction : callbackFunction,
- count : 0
- };
- startNextAsyncOperation();
- },
- startNextAsyncOperation : startNextAsyncOperation,
- stopAsyncOperations : function() {
- _this.asyncOperations.count = _this.asyncOperations.operationList.length;
- },
- isObjectEmpty : isObjectEmpty,
- convertModel : convertModel,
- convertNewModel : convertNewModel,
- convertOldModel : convertOldModel,
- arrayContains : function (a, obj) {
- var i = a.length;
- if ( i > 0 ) {
- while (i--) {
- if (a[i] === obj) {
- return true;
- }
- }
- }
- return false;
- }
- }
+ return statusText + " (" + statusCode + ")";
+ },
+ getHttpErrorMessage : function(response) {
+ var data = response.data;
+ if ((response.status >= 400 && response.status < 600) && hasContents(data.exception)) {
+ var summary = "exception: " + data.exception;
+ if (hasContents(data.message)) {
+ summary += " message: " + data.message;
+ }
+ return summary;
+ }
+ if (response.status === 0 && response.statusText === "") {
+ /*
+ * This logic is somewhat "fuzzy". Potential (brainstorming)
+ * enhancements if users find the message unreliable include:
+ *
+ * A) SERVER TIMEOUT: perhaps a newer version of Angular can
+ * reliably determine timeouts.
+ *
+ * B) SERVER TIMEOUT: recording start / end times and using that
+ * to determine if timeout occured
+ *
+ * C) SESSION TIMEOUT "Potentially" examine cookies, although
+ * that may not be feasible if cookies are set to "httponly".
+ */
+ if (data === null) {
+ //return "possible server timeout";
+ return "VID has timed out waiting for a response. To see status, close this popup and the screen will be refreshed automatically";
+ }
+ if (data === "") {
+ return "Possible reasons include a session timeout or a server issue. "
+ + "A session timeout might be resolved by refreshing the screen and re-logging in";
+ }
+ }
+ var summary = "";
+ if (response.status !== undefined && response.status > 0) {
+ summary = "status: " + response.status;
+ }
+ if (hasContents(response.statusText)) {
+ if (summary !== "") {
+ summary += " ";
+ }
+ summary += "message: " + response.statusText;
+ }
+ return summary;
+ },
+ setHttpErrorHandler : function(httpErrorHandler) {
+ _this.httpErrorHandler = httpErrorHandler;
+ },
+ runHttpErrorHandler : function(response, status) {
+ httpErrorHandler(response, status);
+ },
+ startAsyncOperations : function(operationList, callbackFunction) {
+ for (var i = 0; i < operationList.length; i++) {
+ if (!angular.isFunction(operationList[i])) {
+ throw "UtilityService:startAsyncOperations: invalid function: index: "
+ + i;
+ }
+ }
+ _this.asyncOperations = {
+ operationList : operationList,
+ callbackFunction : callbackFunction,
+ count : 0
+ };
+ startNextAsyncOperation();
+ },
+ startNextAsyncOperation : startNextAsyncOperation,
+ stopAsyncOperations : function() {
+ _this.asyncOperations.count = _this.asyncOperations.operationList.length;
+ },
+ isObjectEmpty : isObjectEmpty,
+ convertModel : convertModel,
+ convertNewModel : convertNewModel,
+ convertOldModel : convertOldModel,
+ arrayContains : function (a, obj) {
+ var i = a.length;
+ if ( i > 0 ) {
+ while (i--) {
+ if (a[i] === obj) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }
}
//app.factory("UtilityService", UtilityService);
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm index c5c5ccaa9..233bab1c8 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubs.htm @@ -39,7 +39,8 @@ <br>
Please search by the Subscriber name or enter Service Instance Id or Service Instance Name below: <br><br>
- <table>
+ <table ng-init="loadOwningEntity()">
+
<tr>
<td style="width:30%">
<div class="fn-ebz-container">
@@ -51,7 +52,7 @@ <!--<select name="selectedCustomer" ng-model="selectedCustomer">-->
<!--<option ng-repeat="item in customerList" value="{{item.globalCustomerId}}" ng-disabled="getPermitted(item)">{{item.subscriberName}}</option>-->
<!--</select>-->
- <select ng-model="selectedCustomer"
+ <select ng-model="selectedCustomer" id="selectSubscriber"
ng-options="item.globalCustomerId as item.subscriberName for item in customerList | orderBy:'subscriberName'">
<option value="">Select a subscriber</option>
</select>
@@ -60,8 +61,9 @@ class="glyphicon glyphicon-refresh"></span></a>
</div>
</td>
-
</tr>
+
+
<tr>
<td style="width:30%">
<div class="fn-ebz-container">
@@ -72,8 +74,8 @@ </div>
</td>
<td style="width:60%">
- <div class="fn-ebz-container">
- <input type="text" style="width: 350px;" name="selectedServiceInstance"
+ <div class="fn-ebz-container" style="width: 100%;">
+ <input type="text" name="selectedServiceInstance"
ng-model="selectedServiceInstance"
data-tests-id="searchForExistingInstancesText"
restrict-input="{type : selectedserviceinstancetype}"/>
@@ -81,12 +83,51 @@ </td>
</tr>
+
+ <tr>
+ <td style="width:30%">
+ <div class="fn-ebz-container">
+ <label class="fn-ebz-text-label">Owning entity Name:</label>
+ </div>
+ </td>
+ <td style="width:30%" nowrap>
+ <div class="fn-ebz-container" style="width: 100%;">
+ <!--<select name="selectedCustomer" ng-model="selectedCustomer">-->
+ <!--<option ng-repeat="item in customerList" value="{{item.globalCustomerId}}" ng-disabled="getPermitted(item)">{{item.subscriberName}}</option>-->
+ <!--</select>-->
+ <multiselect id="selectOwningEntity" ng-model="selectedEntity"
+ options="owningEntities"
+ display-prop="name" id-prop="id">
+ </multiselect>
+ </div>
+ </td>
+ </tr>
+
+ <tr>
+ <td style="width:30%">
+ <div class="fn-ebz-container">
+ <label class="fn-ebz-text-label">Project Name:</label>
+ </div>
+ </td>
+ <td style="width:30%" nowrap>
+ <div class="fn-ebz-container" style="width: 100%;">
+ <!--<select name="selectedCustomer" ng-model="selectedCustomer">-->
+ <!--<option ng-repeat="item in customerList" value="{{item.globalCustomerId}}" ng-disabled="getPermitted(item)">{{item.subscriberName}}</option>-->
+ <!--</select>-->
+ <multiselect id="selectProject" ng-model="selectedProject"
+ options="projects"
+ display-prop="name" id-prop="id">
+ </multiselect>
+ </div>
+ </td>
+ </tr>
+
<tr>
<td>
<td style="width:30%">
<div>
<button type="submit" class="btn btn-primary" size="small"
- ng-click="getSubscriberDet(selectedCustomer,selectedserviceinstancetype,selectedServiceInstance);">
+ ng-click="getServiceInstancesSearchResults(selectedCustomer,selectedserviceinstancetype,selectedServiceInstance, selectedProject, selectedEntity);">
Submit
</button>
</a>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm index 16357dde9..6198cb478 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiGetSubscriberList.htm @@ -18,52 +18,66 @@ ============LICENSE_END=========================================================
-->
-<link rel="stylesheet" type="text/css" href="app/vid/styles/aaiGetSubs.css" />
-<link rel="stylesheet" type="text/css" href="app/vid/styles/aaiSubDetails.css" />
+<link rel="stylesheet" type="text/css" href="app/vid/styles/aaiGetSubs.css"/>
+<link rel="stylesheet" type="text/css" href="app/vid/styles/aaiSubDetails.css"/>
<script src="app/vid/scripts/controller/aaiSubscriberController.js"></script>
<div ng-controller="aaiSubscriberController" ng-cloak>
- <div>
- <div class="statusLine" ng-class="{true:'aaiVisible', false:'aaiHidden'}[isSpinnerVisible]">
- <img src="app/vid/images/spinner.gif"></img>
- <label>Status:</label><span class="status">{{status}}</span>
- </div>
-
- <div ng-if="errorMsg != null"><font color='red'>{{errorMsg}}<pre>{{errorDetails | json}}</pre></font></div>
-
- <h2 class="heading2"><center>Create New Service Instance</center></h2>
-
- <table>
- <tr>
- <td >
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Subscriber Name:</label>
- </div>
- </td>
- <td style="width:80%" nowrap>
- <div class="fn-ebz-container" ng-init="autoGetSubs();">
- <select ng-model="selectedCustomer" data-tests-id="subscriberName">
- <option value="">Select Subscriber Name</option>
- <option ng-repeat="item in customerList | orderBy:'subscriberName'" ng-value="item.globalCustomerId" ng-disabled="!item.isPermitted" class="subscriberNameOption">{{item.subscriberName}}</option>
- </select>
- <a class="btn btn-primary" ng-click="refreshSubs();" ><span class="glyphicon glyphicon-refresh"></span></a>
- </div>
- </td>
-
- </tr>
- <tr>
- <td >
- </td>
- <td style="width:80%">
- <div >
- <button type="submit" class="btn btn-primary" size="small" ng-click="getServiceTypes(selectedCustomer);">Submit</button></a>
- <button type="submit" class="btn btn-primary" size="small" ng-click="cancelCreateSI()">Cancel</button></a>
- </div>
- </td>
- </tr>
- </table>
-
-
- </div>
+ <div>
+ <div class="statusLine" ng-class="{true:'aaiVisible', false:'aaiHidden'}[isSpinnerVisible]">
+ <img src="app/vid/images/spinner.gif"></img>
+ <label>Status:</label><span class="status">{{status}}</span>
+ </div>
+
+ <div ng-if="errorMsg != null"><font color='red'>{{errorMsg}}
+ <pre>{{errorDetails | json}}</pre>
+ </font></div>
+
+ <h2 class="heading2">
+ <center>Create New Service Instance</center>
+ </h2>
+
+ <table>
+ <tr>
+ <td>
+ <div class="fn-ebz-container">
+ <label class="fn-ebz-text-label">Subscriber Name:</label>
+ </div>
+ </td>
+ <td style="width:80%" nowrap>
+ <div class="fn-ebz-container" ng-init="autoGetSubs();">
+ <select ng-model="selectedCustomer" data-tests-id="subscriberName">
+ <option value="">Select Subscriber Name</option>
+ <option ng-repeat="item in customerList | orderBy:'subscriberName'"
+ ng-value="item.globalCustomerId" ng-disabled="!item.isPermitted"
+ class="subscriberNameOption">{{item.subscriberName}}
+ </option>
+ </select>
+ <a class="btn btn-primary" ng-click="refreshSubs();"><span
+ class="glyphicon glyphicon-refresh"></span></a>
+ </div>
+ </td>
+
+ </tr>
+ <tr>
+ <td>
+ </td>
+ <td style="width:80%">
+ <div>
+ <button type="submit" class="btn btn-primary" size="small"
+ ng-click="getServiceTypes(selectedCustomer);">Submit
+ </button>
+ </a>
+ <button type="submit" class="btn btn-primary" size="small"
+ ng-click="cancelCreateSI()">Cancel
+ </button>
+ </a>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+
+ </div>
</div>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm index 06a53c3eb..dc9f0a425 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiServiceTypes.htm @@ -31,7 +31,7 @@ <div ng-if="errorMsg != null"><font color='red'>{{errorMsg}}<pre>{{errorDetails | json}}</pre></font></div>
<h2 class="heading2"><center>Create New Service Instance</center></h2>
- <table>
+ <table class="create-instance-service ">
<tr>
<td >
@@ -69,7 +69,7 @@ </td>
<td style="width:80%">
<div >
- <button type="submit" class="btn btn-primary" size="small" ng-click="getAaiServiceModels(selectedServicetype,createSubscriberName);">Submit</button></a>
+ <button type="submit" class="btn btn-primary" size="small" ng-click="getAaiServiceModels(selectedServicetype,createSubscriberName);" ng-disabled="!selectedServicetype" ng-class="{'button--inactive': !selectedServicetype}">Submit</button></a>
<button type="submit" class="btn btn-primary" size="small" ng-click="cancelCreateSIType()">Cancel</button></a>
</div>
</td>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm index 3471fcb98..686e33b05 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubDetails.htm @@ -27,13 +27,13 @@ <label>Status:</label><span class="status">{{status}}</span>
</div>
- <div ng-if="errorMsg != null"><font color='red'>{{errorMsg}}<pre>{{errorDetails | json}}</pre></font></div>
+ <div data-tests-id="subDetailsErrMsg" ng-if="errorMsg != null"><font color='red'>{{errorMsg}}<pre>{{errorDetails | json}}</pre></font></div>
- <h1 class="heading1"><center>Subscriber Details for {{selectedSubscriber}} ({{selectedSubscriberName}})</center></h1>
+ <h1 class="heading1"><center>Subscriber Details for {{selectedSubscriberId}} ({{selectedSubscriberName}})</center></h1>
<br>
<div class="fn-ebz-container">
Filter:
- <input class="fn-ebz-text" type="text" ng-model="searchString" size="20" style="width: 250px;">
+ <input class="fn-ebz-text" type="text" ng-model="searchString" size="20" style="width: 250px;" data-tests-id="filter-subscriber-details">
</div>
<div ng-init="getSubDetails();">
@@ -54,13 +54,13 @@ <tr>
<td att-table-body>
<div>
- <a alt="View/Edit" ng-click="getAsdcModel(disData);" data-tests-id="{{'view/edit-test-data-id-' + disData['serviceInstanceId']}}" ng-bind="disData.isPermitted ? 'View/Edit' : 'View'"></a>
+ <a alt="View/Edit" ng-click="onViewEditClick(disData);" data-tests-id="{{'view/edit-test-data-id-' + disData['serviceInstanceId']}}" ng-bind="disData.isPermitted ? 'View/Edit' : 'View'"></a>
</div>
</td>
<td att-table-body ng-bind="disData['globalCustomerId']"></td>
- <td att-table-body ng-bind="disData['subscriberName']"></td>
+ <td att-table-body ng-bind="disData['subscriberName']" data-tests-id="{{'subscriber-name-test-data-id-' + $index}}"></td>
<td att-table-body ng-bind="disData['serviceType']"></td>
- <td att-table-body ng-bind="disData['serviceInstanceName']"></td>
+ <td att-table-body ng-bind="disData['serviceInstanceName']" data-tests-id="{{'service-name-test-data-id-' + $index}}"></td>
<td att-table-body data-tests-id="{{'instance-id-for-name-' + disData['serviceInstanceName']}}" ng-bind="disData['serviceInstanceId']"></td>
</tr>
</tbody>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm index 40bd1488c..31621cfe5 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/aaiSubViewEdit.htm @@ -23,7 +23,7 @@ <div popup-window class="popupContents" ngx-show="{{popup.isVisible}}"
ng-cloak>
<div ng-include="'app/vid/scripts/view-models/creationDialog.htm'"></div>
- <div ng-include="'app/vid/scripts/view-models/deletionDialog.htm'"></div>
+ <div ng-include="'app/vid/scripts/view-models/deleteResumeDialog.htm'"></div>
<div ng-include="'app/vid/scripts/view-models/detailsDialog.htm'"></div>
</div>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm new file mode 100644 index 000000000..6983477e1 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/addNetworkNode.htm @@ -0,0 +1,62 @@ +<!-- +============LICENSE_START======================================================= +VID +================================================================================ +Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +================================================================================ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END========================================================= +--> +<link rel="stylesheet" type="text/css" href="app/vid/styles/networkNode.css"/> + +<div class="network-wrapper-config"> + <div class="head"> + <div class="title">Config {{modelName}}</div> + <div class="btn-wrapper"> + <button class="cancel-btn grey" data-tests-id="cancelButton" data-ng-click="cancel()">Cancel</button> + <button class="next-btn blue" data-tests-id="nextButton" data-ng-disabled="networkNodeForm.$invalid" data-ng-click="next()">Next</button> + </div> + </div> + + <div class="content-wrapper"> + <div class="content"> + <form name="networkNodeForm" class="form-wrapper"> + <div class="instance-field {{field.id}}" ng-repeat="(key, field) in nodeTemplateFields"> + <input id="{{field.id}}" data-tests-id="suppressRollbackInput" ng-if="key === 'suppressRollback'" type="checkbox" ng-model="field.value"/> + <label for="{{field.id}}"class="title" ng-if="key !== 'lineOfBusiness' && key !== 'platform'"> + {{field.name}} + </label> + <div class="" ng-if="key === 'instanceName'"> + <input data-tests-id="instanceNameInput" name="{{field.id}}" id="{{field.id}}" type="text" required ng-model="field.value" ng-pattern="regexInstanceName"> + <span class="error" data-ng-show="!networkNodeForm.instanceName.$error.required && networkNodeForm.instanceName.$dirty && networkNodeForm.instanceName.$invalid">{{errorMsg}}</span> + </div> + <select id="{{field.id}}" data-tests-id="regionDropDown" ng-if="key === 'lcpRegion'" required ng-model="field.value" + placeholder="Choose {{field.name}}" + data-ng-change="setTenant(field)"> + <option value="" selected>LCP region</option> + <option data-ng-disabled="!option.isPermitted" ng-repeat="option in field.optionList" + value="{{option.id}}" data-tests-id="{{'region-' + option.id}}">{{option.id}}</option> + </select> + <select id="{{field.id}}" data-tests-id="tenantDropDown" ng-if="key === 'tenant'" required ng-model="field.value" + data-ng-options="option.tenantName for option in field.optionList" placeholder="Choose {{field.name}}" + data-ng-disabled="!field.optionList || !field.optionList.length"> + <option value="" selected>Tenant name</option> + </select> + </div> + </form> + </div> + <div class="sidebar-right"> + <service-metadata title-txt="info" service-metadata-fields="serviceMetadataFields"></service-metadata> + </div> + </div> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html index 0f42ec874..94a1790db 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/change-management.html @@ -13,63 +13,95 @@ <input type="search" id="change-management-search" class="search-changes" ng-change="vm.searchChanges()" ng-model-options="{debounce: 300}" ng-model="vm.searchChangesTerm" placeholder="Type to search"> </div> + <span class="refresh-cm"> + Last updated at: + <span class="last-time-updated">{{ vm.lastTimeUpdated }}</span> + <i class="icon-sync" data-tests-id="refresh-cm" ng-click="vm.init()"></i> + </span> <div class="jobs-table"> <div class="row"> <div class="col-md-12"> <uib-tabset active="activeJustified" justified="true"> <uib-tab index="0" heading="Active" id="active-tab"> - <table class="table table-bordered" id="active-table"> - <thead class="thead-default"> - <tr> - <th class="col-md-5">VNF Name</th> - <th class="col-md-2">Type</th> - <th class="col-md-2">Flow</th> - <th class="col-md-2">Start time</th> - <th>Status</th> - <th></th> - </tr> - </thead> - <tbody> + <div class="table-wrapper"> + <table class="table table-bordered" data-tests-id="active-table-cm" id="active-table"> + <thead class="thead-default" ng-click="collapseInProgress=!collapseInProgress"> <tr class="table-headline-row"> - <th> + <th > + <span ng-class="{'collapse-icon':!collapseInProgress,'expand-icon':collapseInProgress }"></span> <span id="in-progress-table-head">IN PROGRESS</span> </th> <th></th> <th></th> <th></th> <th></th> - <th></th> </tr> - <tr ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['FAILED', 'INPROGRESS', 'PENDING']}"> + <tr ng-show="!collapseInProgress"> + <th class="col-md-5">VNF Name</th> + <th class="col-md-2">Type</th> + <th class="col-md-2">Flow</th> + <th class="col-md-2">Start time</th> + <th>Status</th> + </tr> + </thead> + <tbody ng-show="!collapseInProgress"> + + <tr data-tests-id="active-table-cm-row" ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['FAILED', 'IN_PROGRESS', 'PENDING']}"> <th scope="row">{{changeManagement.instanceReferences.vnfInstanceName || 'No-Instance-Name'}}</th> <td>{{changeManagement.requestScope}}</td> <td>{{changeManagement.requestType}}</td> <td>{{changeManagement.startTime}}</td> <td class="centered" ng-if="changeManagement.requestStatus.requestState == 'FAILED'"><span class="icon-x" ng-click="vm.openFailedModal({details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td> - <td class="centered" ng-if="changeManagement.requestStatus.requestState == 'INPROGRESS'"><span class="icon-process" ng-click="vm.openInProgressModal({details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td> + <td class="centered" ng-if="changeManagement.requestStatus.requestState == 'IN_PROGRESS'"><span class="icon-process" ng-click="vm.openInProgressModal({details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td> <td class="centered" ng-if="changeManagement.requestStatus.requestState == 'PENDING'"><span class="icon-alert" ng-click="vm.openAlertModal({details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td> - <td class="centered"><span class="icon-view"></span></td> </tr> - <tr class="table-headline-row"> - <th> - <span id="pending-table-head">PENDING</span> - </th> - <th></th> - <th></th> - <th></th> - <th></th> - <th></th> - </tr> - <tr ng-repeat="changeManagement in vm.pendingChangeManagements"> - <th scope="row">{{changeManagement.vnfName}}</th> - <td>{{changeManagement.scheduleRequest.scheduleName}}</td> - <td>{{changeManagement.workflow}}</td> - <td>{{changeManagement.startTime}}</td> - <td class="centered"><span class="icon-pending" ng-click="vm.openPendingModal({details: 'change management is pending in scheduler and waiting to be deployed'})"></span></td> - <td class="centered"><span class="icon-view"></span></td> + </tbody> + </table> + </div> + <div class="table-wrapper"> + <table class="table table-bordered" data-tests-id="pending-table-cm" id="pending-table"> + <thead ng-click="collapsePending=!collapsePending"> + <tr class="table-headline-row"> + <th class="col-md-6"> + <span ng-class="{'collapse-icon':!collapsePending,'expand-icon':collapsePending }"></span> + <span id="pending-table-head">PENDING</span> + </th> + + <th></th> + <th></th> + <th></th> + <th></th> + <th></th> + <th></th> + <th></th> + </tr> + <tr class="thead-default" ng-show="!collapsePending"> + <th class="col-md-2">Schedule ID</th> + <th class="col-md-2">CM ticket</th> + <th class="col-md-1">VNF name</th> + <th class="col-md-1">VNF status</th> + <th class="col-md-2">Workflow</th> + <th class="col-md-2">Start time</th> + <th class="col-md-2">Schedule status</th> + <th class="col-md-1">Status</th> + </tr> + </thead> + <tbody ng-show="!collapsePending"> + + <tr data-tests-id="pending-table-cm-row" ng-repeat="changeManagement in vm.pendingChangeManagements"> + <th scope="row">{{changeManagement.scheduleRequest.scheduleId}}</th> + <td>{{changeManagement.aotsChangeId}}</td> + <td>{{changeManagement.vnfName}}</td> + <td>{{changeManagement.status}}</td> + <td>{{changeManagement.scheduleRequest.domainData[1].value}}</td> + <td>{{changeManagement.scheduleRequest.createDateTime }}</td><!--| date:"MM/dd/yyyy HH:mm:ss"--> + <td>{{changeManagement.scheduleRequest.status}}</td> + <td class="centered"><span class="cancel-action" ng-class="{'icon-pending':changeManagement.scheduleRequest.status!=='Deleted', 'icon-deleted': changeManagement.scheduleRequest.status=='Deleted'}" + ng-click="vm.openPendingModal($event, changeManagement)"></span></td> </tr> </tbody> </table> + </div> </uib-tab> <uib-tab index="1" heading="Finished" id="finished-tab"> <table class="table table-bordered" id="finished-table"> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm index 0f694612c..da249c2cc 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/createInstanceServiceModels.htm @@ -19,6 +19,8 @@ -->
<link rel="stylesheet" type="text/css" href="app/vid/styles/serviceModels.css" />
+<link rel="stylesheet" type="text/css" href="app/vid/styles/buttons.css" />
+
<div popup-window class="popupContents" ngx-show="{{popup.isTablePopUpVisible}}" ng-cloak>
<div ng-include="'app/vid/scripts/view-models/previousVersion.htm'"/>
</div>
@@ -36,7 +38,7 @@ <br><br>
- <table>
+ <table class="create-instance-service ">
<tr>
<td >
@@ -77,7 +79,7 @@ <!-- <h1 class="heading1" style="margin-top:20px;">Browse SDC Service Models</h1> -->
<div style="margin-top:30px" ng-init="getAaiServiceModelsList();">
- <table att-table table-data="services" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
+ <table data-tests-id="services-list" att-table table-data="services" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
<thead att-table-row type="header">
<tr>
<th att-table-header key="action">Action</th>
@@ -100,9 +102,10 @@ <td att-table-body ng-bind="service['extra-properties']['extra-property'][4]['property-value']"></td>
<td att-table-body ng-bind="service['extra-properties']['extra-property'][6]['property-value']"></td>
<td att-table-body ng-show="service['extra-properties']['extra-property'][6]['property-value'] > '1.0' ">
- <button type=button ng-click="loadPreviousVersionData(service['extra-properties']['extra-property'][6]['property-value'],service['extra-properties']['extra-property'][4]['property-value'])" att-button btn-type="primary" size="small">
+ <div class="clickable-text previous-versions-button"
+ ng-click="loadPreviousVersionData(service['extra-properties']['extra-property'][6]['property-value'],service['extra-properties']['extra-property'][4]['property-value'])">
Previous Versions
- </button>
+ </div>
</td>
<td att-table-body ng-show="service['extra-properties']['extra-property'][6]['property-value'] <= '1.0' "> </td>
</tr>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm index 4449285d2..ca13ca2b7 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/creationDialog.htm @@ -4,7 +4,7 @@ <div class="titleLine">
<img src="app/vid/images/spinner.gif"
ngx-visible="{{isSpinnerVisible}}"></img>
- <h3>Create {{componentName}} -- {{createType}}</h3>
+ <h3 data-tests-id="create-modal-title">Create {{componentName}} -- {{createType}}</h3>
</div>
<div class="error" ng-show="isErrorVisible">
@@ -33,7 +33,7 @@ <div class="buttonRow">
<button data-tests-id="confirmButton" ngx-enabled="{{isConfirmEnabled}}" att-button size="small"
ng-click="confirm();">Confirm</button>
- <button type="button" ng-click="cancel();" att-button
+ <button type="button" data-tests-id="cancelButton" ng-click="cancel();" att-button
btn-type="primary" size="small">Cancel</button>
</div>
</div>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deletionDialog.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm index b4b93166b..ccd54a612 100755..100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deletionDialog.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/deleteResumeDialog.htm @@ -1,70 +1,70 @@ -<!--
- ============LICENSE_START=======================================================
- VID
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<div ng-controller="deletionDialogController">
-
- <div ng-show="isDialogVisible">
- <div class="titleLine">
- <img src="app/vid/images/spinner.gif"
- ngx-visible="{{isSpinnerVisible}}"></img>
- <h3>Delete {{componentName}}</h3>
- </div>
-
- <div class="error" ng-show="isErrorVisible">
- <img src="app/vid/images/error.png"></img>{{error}}
- </div>
-
- <parameter-block control="summaryControl"></parameter-block>
-
- <div ngx-visible="{{isDataVisible}}">
-
- <h4>
- User Provided Data (<img class="requiredIndicator"
- src="app/vid/images/asterisk.png" height='10' width='10'></img> indicates required field)
- </h4>
- <parameter-block control="userProvidedControl"
- callback="userParameterChanged(id);" editable></parameter-block>
-
- <div class="prompt">
- <p>
- Enter Data and <span>Confirm</span> to<br />Delete <span>{{componentName}}</span>
- </p>
- <p>
- <span>Cancel</span> to Return to Previous Page.<br />Data entered
- will be lost
- </p>
- </div>
- </div>
-
- <div class="buttonRow">
- <!-- <button type="button" ng-click="confirm();" att-button
- btn-type="primary" size="small" class="confirm">Confirm</button>
- <button type="button" ng-click="cancel();" att-button
- btn-type="primary" size="small">Cancel</button> --->
- <button ngx-enabled="{{isConfirmEnabled}}" att-button size="small"
- ng-click="confirm();">Confirm</button>
- <button type="button" ng-click="cancel();" att-button
- btn-type="primary" size="small">Cancel</button>
- </div>
- </div>
-
- <div ng-include="'app/vid/scripts/view-models/msoCommit.htm'"></div>
-
-</div>
+<!-- + ============LICENSE_START======================================================= + VID + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<div ng-controller="deleteResumeDialogController"> + + <div ng-show="isDialogVisible"> + <div class="titleLine"> + <img src="app/vid/images/spinner.gif" + ngx-visible="{{isSpinnerVisible}}"></img> + <h3>{{dialogMethod}} {{componentName}}</h3> + </div> + + <div class="error" ng-show="isErrorVisible"> + <img src="app/vid/images/error.png"></img>{{error}} + </div> + + <parameter-block control="summaryControl"></parameter-block> + + <div ngx-visible="{{isDataVisible}}"> + + <h4> + User Provided Data (<img class="requiredIndicator" + src="app/vid/images/asterisk.png" height='10' width='10'></img> indicates required field) + </h4> + <parameter-block control="userProvidedControl" + callback="userParameterChanged(id);" editable></parameter-block> + + <div class="prompt"> + <p> + Enter Data and <span>Confirm</span> to<br />{{dialogMethod}} <span>{{componentName}}</span> + </p> + <p> + <span>Cancel</span> to Return to Previous Page.<br />Data entered + will be lost + </p> + </div> + </div> + + <div class="buttonRow"> + <!-- <button type="button" ng-click="confirm();" att-button + btn-type="primary" size="small" class="confirm">Confirm</button> + <button type="button" ng-click="cancel();" att-button + btn-type="primary" size="small">Cancel</button> ---> + <button data-tests-id="confirmResumeDeleteButton" ngx-enabled="{{isConfirmEnabled}}" att-button size="small" + ng-click="confirm();">Confirm</button> + <button type="button" ng-click="cancel();" att-button + btn-type="primary" size="small">Cancel</button> + </div> + </div> + + <div ng-include="'app/vid/scripts/view-models/msoCommit.htm'"></div> + +</div> diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm index 71efef1dd..0740c07ef 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm @@ -23,7 +23,7 @@ <div popup-window class="popupContents" ngx-show="{{popup.isVisible}}"
ng-cloak>
<div ng-include="'app/vid/scripts/view-models/creationDialog.htm'"></div>
- <div ng-include="'app/vid/scripts/view-models/deletionDialog.htm'"></div>
+ <div ng-include="'app/vid/scripts/view-models/deleteResumeDialog.htm'"></div>
<div ng-include="'app/vid/scripts/view-models/detailsDialog.htm'"></div>
<div ng-include="'app/vid/scripts/view-models/statusDialog.htm'"></div>
</div>
@@ -35,7 +35,7 @@ <div ng-if="errorMsg != null"><font color='red'>{{errorMsg}}<pre>{{errorDetails | json}}</pre></font></div>
- <h1 class="heading1" style="margin-top: 20px;">{{isPermitted == "true" ? "View/Edit" : "View"}} Service Instance</h1>
+ <h1 class="heading1" style="margin-top: 20px;">{{isPermitted ? "View/Edit" : "View"}} Service Instance</h1>
<a class="btn btn-primary btn-xs pull-right" ng-click="reloadRoute();" ><span class="glyphicon glyphicon-refresh"></span></a>
<br>
@@ -47,7 +47,7 @@ {{service.instance.subscriberName}}</th>
<th style="text-align: center" width="34%">SERVICE TYPE:
{{service.instance.serviceType}}</th>
- <th style="text-align: center" width="33%">SERVICE INSTANCE
+ <th data-tests-id="service-instanceId-th-id" style="text-align: center" width="33%">SERVICE INSTANCE
ID: {{service.instance.serviceInstanceId}}</th>
<tr>
<tr>
@@ -64,16 +64,16 @@ <ol ui-tree-nodes="" ng-model="service" >
<li ng-repeat="aService in [service]" ui-tree-node>
<div ui-tree-handle class="tree-node tree-node-content">
- <a class="btn btn-success btn-xs" ng-if="(aService.instance.vnfs && aService.instance.vnfs.length > 0) || (aService.instance.networks && aService.instance.networks.length > 0)" data-nodrag ng-click="this.toggle()">
+ <a class="btn btn-success btn-xs" ng-if="(aService.instance.vnfs && aService.instance.vnfs.length > 0) ||(aService.instance.pnfs && aService.instance.pnfs.length > 0) || (aService.instance.networks && aService.instance.networks.length > 0)" data-nodrag ng-click="this.toggle()">
<span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
</a>
- SERVICE INSTANCE: {{aService.instance.name}}
- <a ng-if="((isMacro()) || (isObjectEmpty(aService.instance.vnfs) && isObjectEmpty(aService.instance.networks))) && isPermitted" data-tests-id="deleteServiceButton" class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteService(aService.instance);">
+ SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}
+ <a ng-if="((isMacro()) || (isObjectEmpty(aService.instance.vnfs) && isObjectEmpty(aService.instance.networks) && isObjectEmpty(aService.instance.pnfs))) && isPermitted" data-tests-id="deleteServiceButton" class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteService(aService.instance);">
<span class="glyphicon glyphicon-remove"></span>
</a>
- <div class="pull-right btn-group" ng-if="aService.convertedModel.vnfs && !isObjectEmpty(aService.convertedModel.vnfs) && !aService.convertedModel.isNewFlow && isPermitted">
+ <div class="pull-right btn-group" ng-if="(aService.convertedModel.vnfs||aService.convertedModel.vnfs) &&(!isObjectEmpty(aService.convertedModel.pnfs)||!isObjectEmpty(aService.convertedModel.pnfs)) && !aService.convertedModel.isNewFlow && isPermitted">
<button type="button" data-tests-id="addVNFButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- Add VNF<span class="caret"></span>
+ Add node instance<span class="caret"></span>
</button>
<ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs">
<a role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs" data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}" ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}}</a>
@@ -82,7 +82,7 @@ </div>
<div class="pull-right btn-group" ng-if="aService.convertedModel.vnfs && !isObjectEmpty(aService.convertedModel.vnfs) && aService.convertedModel.isNewFlow && isPermitted">
<button type="button" data-tests-id="addVNFButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- Add VNF<span class="caret"></span>
+ Add node instance<span class="caret"></span>
</button>
<ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs" data-tests-id="addVnfsDropdown">
<li role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs">
@@ -91,21 +91,24 @@ </ul>
</div>
<!-- <div class="pull-right btn-group" ng-if="aService.model.networks && !equals(aService.model.networks, {})">-->
- <div class="pull-right btn-group" ng-if="aService.convertedModel.networks && (!(isObjectEmpty(aService.convertedModel.networks)))">
+ <div class="pull-right btn-group" ng-if="aService.convertedModel.networks && (!(isObjectEmpty(aService.convertedModel.networks))) && isPermitted">
<!--<div class="pull-right btn-group" ng-if="aService.model.networks">-->
<button type="button" data-tests-id="addNetworkButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Add Network<span class="caret"></span>
</button>
<ul class="dropdown-menu" ng-model="aService.convertedModel.networks">
<li ng-repeat="(networkUuid, network) in aService.convertedModel.networks">
- <a ng-click="addNetworkInstance(network, aService.instance.vnfs)">{{network.modelCustomizationName}}</a>
+ <a data-tests-id="addNetworkOption-{{network.modelCustomizationName}}" ng-click="addNetworkInstance(network, aService.instance.vnfs)">{{network.modelCustomizationName}}</a>
</li>
</ul>
</div>
<a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeService(aService.instance)" style="margin-right: 8px;">
<span class="glyphicon glyphicon-info-sign"></span>
</a>
- <a data-tests-id="activateButton" class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateMSOInstance()" style="margin-right: 8px;">
+ <a data-tests-id="deactivateButton" ng-disabled="!isActivateDeactivateEnabled('deactivate')" class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="deactivateMSOInstance()" style="margin-right: 8px;">
+ Deactivate
+ </a>
+ <a data-tests-id="activateButton" ng-disabled="!isActivateDeactivateEnabled('activate')" class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateMSOInstance()" style="margin-right: 8px;">
Activate
</a>
</div>
@@ -180,7 +183,7 @@ </a>
VFMODULE: {{vfModule.name}} | TYPE: {{vfModule.nodeType}} | ORCH STATUS: {{vfModule.nodeStatus}}
<!-- -->
- <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted" data-tests-id="deleteVFModuleButton" data-nodrag ng-click="deleteVfModule(aService.instance, vfModule, vnf)">
+ <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted" data-tests-id="deleteVFModuleButton-{{vfModule.name}}" data-nodrag ng-click="deleteVfModule(aService.instance, vfModule, vnf)">
<span class="glyphicon glyphicon-remove"></span>
</a>
<div class="pull-right btn-group">
@@ -196,6 +199,12 @@ <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeVfModule(aService.instance, vfModule, vnf)" style="margin-right: 8px;">
<span class="glyphicon glyphicon-info-sign"></span>
</a>
+ <div class="resume" ng-if="isPermitted&&(vfModule.nodeStatus==resumeStatus)">
+ <a data-tests-id="resumeVFModuleButton-{{vfModule.name}}" class="pull-right btn btn-success btn-xs button-margin" ng-click="resume(aService.instance, vfModule, vnf)" >
+ Resume
+ </a>
+ </div>
+
</div>
<ol ui-tree-nodes="" ng-model="vfModule.volumeGroups" ng-class="{hidden: collapsed}">
<li ng-repeat="volumeGroup in vfModule.volumeGroups" ui-tree-node>
@@ -227,6 +236,7 @@ </ol>
</li>
</ol>
+
<ol ui-tree-nodes="" ng-model="aService.instance.networks" ng-class="{hidden: collapsed}">
<li ng-repeat="network in aService.instance.networks" ui-tree-node>
<div ui-tree-handle class="tree-node tree-node-content">
@@ -244,6 +254,49 @@ </div>
</li>
</ol>
+
+
+ <ol ui-tree-nodes="" ng-model="aService.instance.configurations" ng-class="{hidden: collapsed}">
+ <li ng-repeat="configuration in aService.instance.configurations" ui-tree-node>
+ <div ui-tree-handle class="tree-node tree-node-content">
+ <a class="btn btn-success btn-xs" ng-if="(configuration.ports && configuration.ports.length > 0)" data-nodrag ng-click="this.toggle()">
+ <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
+ </a>
+ CONFIGURATION: {{configuration.name}} | TYPE: {{configuration.nodeType}} | ORCH STATUS: {{configuration.nodeStatus}}
+
+ <a class="pull-right btn btn-danger btn-xs" ng-if="!isMacro() && isPermitted && configuration.nodeStatus === STATUS_CONSTANTS.AAI_INACTIVE" data-tests-id="deleteConfigurationButton" data-nodrag ng-click="deleteConfiguration(aService.instance, configuration)">
+ <span class="glyphicon glyphicon-remove"></span>
+ </a>
+
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="toggleConfigurationStatus(aService, configuration)" ng-if="isPermitted && allowConfigurationActions">
+ {{configuration.nodeStatus === STATUS_CONSTANTS.AAI_ACTIVE ? "Deactivate" : "Activate"}}
+ </a>
+ </div>
+ <ol ui-tree-nodes="" ng-model="configuration.ports" ng-class="{hidden: collapsed}">
+ <li ng-repeat="port in configuration.ports" ui-tree-node>
+ <div ui-tree-handle class="tree-node tree-node-content">
+ PORT: {{port.portName}} | ORCH STATUS: {{port.portStatus}}
+
+ <button type="button" class="pull-right btn btn-primary btn-xs" ng-if="configuration.nodeStatus == STATUS_CONSTANTS.AAI_ACTIVE" ng-click="togglePortStatus(aService, configuration, port)">
+ {{port.portStatus === STATUS_CONSTANTS.AAI_ENABLED ? "Disable" : "Enable"}}
+ </button>
+ </div>
+ </li>
+ </ol>
+ </li>
+ </ol>
+
+ <ol id="pnfs-tree" ui-tree-nodes="" ng-model="pnfs" ng-class="{hidden: collapsed || pnf.length === 0}">
+ <li ng-repeat="pnf in pnfs" ui-tree-node>
+ <div ui-tree-handle class="tree-node tree-node-content">
+ PNF: {{pnf}}
+
+ <a class="dissociate-pnf pull-right btn btn-primary btn-xs" data-nodrag ng-click="dissociatePnf(pnf)" style="margin-right: 8px;">
+ <span>Dissociate</span>
+ </a>
+ </div>
+ </li>
+ </ol>
</li>
</ol>
</div>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/messageViewer.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/messageViewer.htm new file mode 100644 index 000000000..67e9248e8 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/messageViewer.htm @@ -0,0 +1,6 @@ +<div class="message-viewer"> + <div ng-include src="icon"></div> + <div class="primaryMessage">{{ primaryMessage }}</div> + <div class="secondaryMessage">{{ secondaryMessage }}</div> + <button data-tests-id="try-again" class="btn btn-primary" ng-if="showTryAgain" ng-click="tryAgain()">TRY AGAIN</button> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm index 48268248b..25a6cf9e0 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/msoCommit.htm @@ -18,8 +18,8 @@ ============LICENSE_END=========================================================
-->
-<div ng-controller="msoCommitController" ng-show="isViewVisible">
-
+<div ng-controller="msoCommitController" ng-show="isViewVisible" >
+<div ng-if="isViewVisible">
<div class="statusLine">
<img src="app/vid/images/spinner.gif"
ngx-visible="{{isSpinnerVisible}}"> </img> <label>Status:</label><span
@@ -45,3 +45,4 @@ ng-click="close();">Close</button>
</div>
</div>
+</div>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/pnfSearchAssociation.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/pnfSearchAssociation.htm new file mode 100644 index 000000000..7c1095e6b --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/pnfSearchAssociation.htm @@ -0,0 +1,62 @@ +<!-- +============LICENSE_START======================================================= +VID +================================================================================ +Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +================================================================================ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END========================================================= +--> +<link rel="stylesheet" type="text/css" href="app/vid/styles/networkNode.css"/> +<link rel="stylesheet" type="text/css" href="app/vid/styles/pnfSearchAssociation.css"/> +<div ng-controller="pnfSearchAssociationController" class="network-wrapper-config pnf-search-association"> + <div class="head"> + <div class="title">PNF Model: {{modelName}}</div> + <div class="btn-wrapper"> + <button class="cancel-btn grey" data-tests-id="back" data-ng-click="back()">Back</button> + <button class="create-btn blue" data-tests-id="associatePnf" data-ng-disabled="!pnfInstance" data-ng-click="associate()">Associate</button> + </div> + </div> + + <div class="content-wrapper"> + <div class="content"> + <div class="bold" >Unique name of physical network function:</div> + <div class="input-wrapper"> + <input data-tests-id="pnfName" type="search" placeholder="Enter PNF name and click Search" data-ng-model="pnfName" ></input> + <div data-tests-id="searchPnf" class="search2-icon search-input" data-ng-click="searchPnf(pnfName)" data-ng-disabled="!pnfName"></div> + </div> + <div class="result-content margin-search" data-ng-show="pnfInstance"> + <span ng-show="pnfInstance.pnfName">PNF unique name:</span> + <div data-tests-id="pnfInstancePnfName">{{pnfInstance.pnfName}}</div> + <span ng-show="pnfInstance.pnfName2" >PNF name:</span> + <div data-tests-id="pnfInstancePnfName2">{{pnfInstance.pnfName2}}</div> + <span ng-show="pnfInstance.pnfName2Source" >PNF name source:</span> + <div data-tests-id="pnfInstancePnfName2Source">{{pnfInstance.pnfName2Source}}</div> + <span ng-show="pnfInstance.pnfId">PNF ID:</span> + <div data-tests-id="pnfInstancePnfId">{{pnfInstance.pnfId}}</div> + <span ng-show="pnfInstance.equipType">Equipment type:</span> + <div data-tests-id="pnfInstanceEquipType">{{pnfInstance.equipType}}</div> + <span ng-show="pnfInstance.equipVendor">Equipment vendor:</span> + <div data-tests-id="pnfInstanceEquipVendor">{{pnfInstance.equipVendor}}</div> + <span ng-show="pnfInstance.equipModel">Equipment model:</span> + <div data-tests-id="pnfInstanceEquipModel">{{pnfInstance.equipModel}}</div> + + </div> + <div class="error-msg margin-search" data-tests-id="pnfNotFoundErrorMessage" data-ng-show="notFound">The specified PNF instance {{pnfNameNotFound}} does not exist in A&AI. <br/>Please note: A&AI is case sensitive</div> + + </div> + + <div class="sidebar-right"> + <service-metadata title-txt="SERVICE MODEL INFO" service-metadata-fields="serviceMetadataFields"></service-metadata> + </div> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/search.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/search.htm new file mode 100644 index 000000000..a0b94fe4a --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/search.htm @@ -0,0 +1,5 @@ +<link rel="stylesheet" type="text/css" href="app/vid/styles/search.css"/> +<div class="search-container"> + <input type="search" data-tests-id="test-search-input" class="search-input" ng-model="searchString" ng-model-options="{debounce: 300}" placeholder="Type to search"> + <div class="search-icon" ng-include src="'app/vid/images/search.svg'"></div> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceMetadata.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceMetadata.htm new file mode 100644 index 000000000..27992d4a4 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceMetadata.htm @@ -0,0 +1,10 @@ +<link rel="stylesheet" type="text/css" href="app/vid/styles/serviceMetadata.css"/> +<div class="header-title" ng-if="titleTxt"> + {{titleTxt}} +</div> +<div class="metadata-content"> + <div class="field" ng-repeat="field in serviceMetadataFields"> + <label>{{field.name}}</label> + <div class="value" data-tests-id="{{'info-test-data-id-' + field.name.split(' ').join('')}}">{{field.value}}</div> + </div> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm index 3cba87196..17b87bfd2 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceModels.htm @@ -69,8 +69,8 @@ <td att-table-body ng-bind="service['distributionStatus']"></td>
<td att-table-body ng-bind="service['lastUpdaterUserId']"></td>
<td att-table-body ng-bind="service['toscaModelUrl']"></td>
- <td att-table-body ng-show="service['version'] > '1.0' "><button type=button ng-click="loadPreviousVersionData(service['invariantUUID'],service['name'],service['version'])" att-button btn-type="primary" size="small">Previous Versions</button></td>
- <td att-table-body ng-show="service['version'] <= '1.0' "> </td>
+ <td att-table-body ng-show="service.hasPreviousVersion"><button type=button ng-click="loadPreviousVersionData(service['invariantUUID'],service['name'],service['version'])" att-button btn-type="primary" size="small">Previous Versions</button></td>
+ <td att-table-body ng-show="!service.hasPreviousVersion"> </td>
</tr>
</tbody>
</table>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm new file mode 100644 index 000000000..e2261dc11 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/serviceProxyConfig.htm @@ -0,0 +1,108 @@ +<!-- +============LICENSE_START======================================================= +VID +================================================================================ +Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +================================================================================ +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END========================================================= +--> +<link rel="stylesheet" type="text/css" href="app/vid/styles/networkNode.css"/> +<link rel="stylesheet" type="text/css" href="app/vid/styles/serviceProxyConfig.css"/> +<div class="service-wrapper-config network-wrapper-config"> + <div class="head"> + <div class="title">Config {{modelName}}</div> + <div class="btn-wrapper"> + <button class="cancel-btn grey" data-tests-id="backButton" data-ng-click="back()">Back</button> + <button class="create-btn blue" data-tests-id="createButton" data-ng-disabled="proxiesInstanceName.$invalid|| disableCreate" data-ng-click="create()">Create</button> + </div> + </div> + + <div class="content-wrapper"> + <div class="content"> + <div class="diagram"> + <div class="diagram-img"> + <div class="circle service-circle"> + <span class="text">Source<br>Service proxy</span> + </div> + <div class="dotted-line" data-ng-class="{'checked': sourceInstance, 'unchecked': !sourceInstance}"> + <span class="conn-circle sprite" data-tests-id="sourceInstanceSelectedIcon" data-ng-class="{'valid-large': sourceInstance}"></span> + </div> + <div class="circle config-circle"> + <span class="line"></span> + </div> + <div class="dotted-line" data-ng-class="{'checked': collectorInstance, 'unchecked': !collectorInstance}"> + <span class="conn-circle sprite" data-tests-id="collectorInstanceSelectedIcon" data-ng-class="{'valid-large': collectorInstance}"></span> + </div> + <div class="circle service-circle"> + <span class="text">Collector<br>Service proxy</span> + </div> + </div> + <div class="element-name-wrapper"> + <div class="element-name service" data-ng-click="openMetadataModal('sourceMetadata')"> + <span class="label-txt" data-tests-id="sourceInstanceName">{{sourceInstanceName}} <span class="info" data-tests-id="sourceInfoButton">i</span></span> + + </div> + <div class="element-name config"> + <span class="label-txt" data-tests-id="modelName">{{modelName}}</span> + </div> + <div class="element-name service" data-ng-click="openMetadataModal('collectorMetadata')"> + <span class="label-txt" data-tests-id="collectorInstanceName">{{collectorInstanceName}}<span class="info" data-tests-id="collectorInfoButton">i</span></span> + + </div> + </div> + </div> + <form name="proxiesInstanceName" class="bottom"> + <div class="wrapper-list source-vnf"> + <div class="title-txt"><b>Source</b> Service Type</div> + <select ng-model="sourceServiceType" + ng-change="onSourceServiceTypeSelected()" name="sourceServiceType" id="sourceServiceType" + ng-options="item['service-type'] disable when !(item['is-permitted']) for item in serviceTypes" + required data-tests-id="sourceServiceType"> + <option value="" disabled>Select service type</option> + </select> + + <div class="title-txt select-vnf-title">VNF providing <b>source</b> requirements</div> + <select ng-model="sourceInstance" name="source" ng-disabled="sourceInstanceList === null" required data-tests-id="sourceDropDown"> + <option value="" selected>Type/Select VNF name</option> + <option ng-repeat="option in sourceInstanceList" data-tests-id="{{'source-' + option.id}}" + value="{{option.id}}">{{option['properties']['vnf-name']}}</option> + </select> + <span class="no-results" data-tests-id="sourceNoResults" ng-show="sourceNoResults">No vnf instances found.</span> + </div> + + <div class="wrapper-list collector-{{collectorType}}"> + <div class="title-txt ng-hide-keep-block" ng-hide="collectorType==='pnf'"><b>Collector</b> Service Type</div> + <select ng-model="collectorServiceType" ng-hide="collectorType==='pnf'" class="ng-hide-keep-block" + ng-change="onCollectorServiceTypeSelected()" name="collectorServiceType" id="collectorServiceType" + ng-options="item['service-type'] disable when !(item['is-permitted']) for item in serviceTypes" + required data-tests-id="collectorServiceType"> + <option value="" disabled>Select service type</option> + </select> + + <div class="title-txt select-vnf-title">{{collectorType.toUpperCase()}} providing <b>collector</b> requirements</div> + <select ng-model="collectorInstance" name="collector" ng-disabled="collectorInstanceList === null" required data-tests-id="collectorDropDown"> + <option value="" selected>Type/Select {{collectorType.toUpperCase()}} name</option> + <option ng-repeat="option in collectorInstanceList" data-tests-id="{{'collector-' + option.id}}" + value="{{option.id}}">{{option['properties'][collectorType=='vnf' ? 'vnf-name' : 'pnfName']}}</option> + </select> + <span class="no-results" data-tests-id="collectorNoResults" ng-show="collectorNoResults">No {{collectorType}} instances found.</span> + </div> + </form> + </div> + + <div class="sidebar-right"> + <service-metadata title-txt="info" service-metadata-fields="serviceMetadataFields"></service-metadata> + </div> + </div> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/view-models/testEnvironments.htm b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/testEnvironments.htm new file mode 100644 index 000000000..2c445f8b8 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/view-models/testEnvironments.htm @@ -0,0 +1,82 @@ +<link rel="stylesheet" type="text/css" href="app/vid/styles/testEnvironments.css" /> +<link rel="stylesheet" type="text/css" href="app/vid/styles/buttons.css" /> +<div class="test-environments"> + <div class="header"> + <div class="header-left"> + <span data-tests-id="test-environments-headline" class="headline">Test Environments {{vm.total}}</span> + <span class="separator"></span> + <div class="button-container" ng-click="vm.createNewTestEnvironment()"> + <div class="icon-svg" data-tests-id="test-environments-new-button"> + <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 55.47337 55.63023"><path class="icon-filling" d="M27.7367.07843A27.73669,27.73669,0,1,0,55.4734,27.81512,27.73757,27.73757,0,0,0,27.7367.07843ZM40.18824,29.6178H29.53938V40.26666a1.80267,1.80267,0,0,1-3.60535,0V29.6178H15.28516a1.80267,1.80267,0,0,1,0-3.60535H25.934V15.36359a1.80267,1.80267,0,0,1,3.60535,0V26.01245H40.18824a1.80267,1.80267,0,1,1,0,3.60535Z"/></svg> + </div> + <span class="button-text">Create New</span> + </div> + <span class="separator"></span> + </div> + <search-text data-tests-id="test-environments-search" search-string="vm.searchString"></search-text> + </div> + <div class="error-messages" ng-if="vm.emptyData || vm.connectError"> + <message-viewer data-tests-id="test-environments-no-data" primary-message="No test environment was created yet" secondary-message="create new to start testing" icon="app/vid/images/emptyData.svg" class="no-data" ng-if="vm.emptyData"> + </message-viewer> + <message-viewer data-tests-id="test-environments-error" primary-message="Something went wrong" secondary-message="{{vm.connectError}}" icon="app/vid/images/icon_noconnection.svg" try-again="vm.loadAAIestEnvironments()" class="connect-error" ng-if="vm.connectError"> + </message-viewer> + </div> + <div class="environments-table" ng-if="vm.environments.length"> + <div class="row"> + <div class="col-md-12"> + <button data-tests-id="test-environments-refresh" class="refresh" type="button" ng-click="vm.loadAAIestEnvironments()"> + <div ng-include src="'app/vid/images/refresh.svg'"></div> + </button> + </div> + </div> + + <div class="row"> + <div class="col-md-12 test-environments-table-container"> + <table data-tests-id="test-environments-table" att-table table-data="vm.environments" search-category="searchCategory" search-string="vm.searchString" class="table table-bordered" id="environments-table"> + <thead att-table-row type="header" class="thead-default"> + <tr> + <th att-table-header default-sort="A" key="operationalEnvironmentId">Environment ID</th> + <th att-table-header key="operationalEnvironmentName">Environment Name</th> + <th att-table-header key="relationshipList.relationship[0].relationshipData[0].relationshipValue">ECOMP Environment ID</th> + <th att-table-header key="relationshipList.relationship[0].relatedToProperty[0].propertyValue">ECOMP Environment Name</th> + <th att-table-header key="tenantContext">Tenant Context</th> + <th att-table-header key="operationalEnvironmentType">Environment Type</th> + <th att-table-header key="workloadContext">Workload Context</th> + <th att-table-header sortable="false">Status</th> + <th att-table-header sortable="false">Action</th> + <th att-table-header sortable="false">Attach Manifest</th> + </tr> + </thead> + <tbody att-table-row type="body" row-repeat="environment in vm.environments"> + <tr> + <td att-table-body ng-bind="environment.operationalEnvironmentId"></td> + <td att-table-body ng-bind="environment.operationalEnvironmentName"></td> + <td att-table-body ng-bind="environment.relationshipList.relationship[0].relationshipData? environment.relationshipList.relationship[0].relationshipData[0].relationshipValue: ''"></td> + <td att-table-body ng-bind="environment.relationshipList.relationship[0].relatedToProperty? environment.relationshipList.relationship[0].relatedToProperty[0].propertyValue: ''"></td> + <td att-table-body ng-bind="environment.tenantContext"></td> + <td att-table-body ng-bind="environment.operationalEnvironmentType"></td> + <td att-table-body ng-bind="environment.workloadContext"></td> + <td att-table-body ng-bind="vm.getEnvStatus(environment)" id="testEnvStatus-{{environment.operationalEnvironmentId}}"></td> + <td att-table-body> + <button id="testEnvActivate-{{environment.operationalEnvironmentId}}" type="button" class="blue envActionBtn" + ng-click="vm.onTestEnvActivateClick(environment)" ng-show="!vm.isEnvActive(environment)">Activate</button> + <button id="testEnvDeactivate-{{environment.operationalEnvironmentId}}" type="button" class="blue envActionBtn" + ng-click="vm.onTestEnvDeactivateClick(environment)" ng-show="vm.isEnvActive(environment)">Deactivate</button> + </td> + <td att-table-body> + <button id="testEnvAttach-{{environment.operationalEnvironmentId}}" class="transparent attach-button" + ng-click="vm.onTestEnvActivateClick(environment)" ng-show="vm.isEnvActive(environment)"> + <img src="app/vid/images/attach.svg"> + </button> + </td> + </tr> + </tbody> + </table> + </div> + </div> + </div> +</div> +<div popup-window class="popupContents" ngx-show="{{popup.isVisible}}" + ng-cloak> + <div ng-include="'app/vid/scripts/view-models/msoCommit.htm'"></div> +</div>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/buttons.css b/vid-app-common/src/main/webapp/app/vid/styles/buttons.css new file mode 100644 index 000000000..7a2a90154 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/buttons.css @@ -0,0 +1,58 @@ +button { + border-radius: 2px; + font-size: 14px; + line-height: 28px; + height: 30px; +} + +button.blue { + border: #0091c8 1px solid; + background-color: #009fdb; + color: white; +} +button.blue:hover { + background-color: #1ec2ff; + border-color: #0091c8; +} +button.blue:active { + background-color: #0091c7; + border-color: #006186; +} +button.blue[disabled] { + background-color: rgba(5, 104, 174, 0.3); + border-color: rgba(4, 113, 168, 0.3); +} + + +button.transparent { + border: 0; + background-color: transparent; + outline: none; +} +button.transparent:hover { + background-color: transparent; +} +button.transparent:active { + background-color: transparent; +} +button.transparent[disabled] { + background-color: transparent; +} + +.clickable-text { + font-size: 12px !important; + color: #337ab7; !important; + text-decoration: none; + text-decoration-line: none !important; +} +.clickable-text:hover { + color: #23527c !important; + text-decoration: none; + text-decoration-line: none !important; +} +.clickable-text:active { + color: #0091c7 !important; +} +.clickable-text[disabled] { + color: rgba(5, 104, 174, 0.3) !important; +} diff --git a/vid-app-common/src/main/webapp/app/vid/styles/change-management-icons.css b/vid-app-common/src/main/webapp/app/vid/styles/change-management-icons.css index 8c4dbd8c5..7e9620a37 100644 --- a/vid-app-common/src/main/webapp/app/vid/styles/change-management-icons.css +++ b/vid-app-common/src/main/webapp/app/vid/styles/change-management-icons.css @@ -51,8 +51,13 @@ color: #5a5a5a; } .icon-pending:before { + content: "\e905"; + color: #00aeef; + cursor: pointer; + } +.icon-deleted:before { content: "\e905"; - color: #00aeef; + color: #cf2a2a; cursor: pointer; } .icon-plus:before { @@ -80,3 +85,63 @@ font-size: 12px; cursor: pointer; } +.icon-search-in:before { + content: "\e90d"; + color: #009FDB; + font-size: 17px; + cursor: pointer; +} +.expand-icon{ + margin-right: 10px; + position: relative; + width: 11px; + height: 11px; + display: inline-block; + cursor: pointer; +} + +/* Vertical line */ +.expand-icon:before{ + content: ""; + position: absolute; + background-color: #5a5a5a; + transition: transform 0.25s ease-out; + right: 40%; + width: 2px; + height: 100%; + margin-left: 5px; +} + +/* horizontal line */ +.expand-icon:after{ + content: ""; + position: absolute; + background-color: #5a5a5a; + transition: transform 0.25s ease-out; + top: 40%; + left: 0; + width: 100%; + height: 2px; +} +.collapse-icon{ + margin-right: 10px; + cursor: pointer; + display: inline-block; + width: 10px; + border-top: 1.6px solid #5a5a5a; + padding: 2.6px; +} +.icon-search2:before { + content: "\e90d"; + color: #009FDB; + font-size: 40px; + cursor: pointer; +} +.icon-sync:before { + content: "\e90f"; + font-size: 20px; + cursor: pointer; +} +.icon-sync:hover:before { + color: #009FDB; +} diff --git a/vid-app-common/src/main/webapp/app/vid/styles/change-management.css b/vid-app-common/src/main/webapp/app/vid/styles/change-management.css index 68a06ee16..7edbea030 100644 --- a/vid-app-common/src/main/webapp/app/vid/styles/change-management.css +++ b/vid-app-common/src/main/webapp/app/vid/styles/change-management.css @@ -90,7 +90,7 @@ } .jobs-table { - background-color: #f8f8f8; + background-color: #ffffff; padding: 40px; } @@ -119,7 +119,7 @@ border: 1px solid #eaeaea; box-sizing: border-box; background-color: #ffffff; - box-shadow: 0px 2px 7px 0px rgba(34, 31, 31, 0.17); + /* box-shadow: 0px 2px 7px 0px rgba(34, 31, 31, 0.17);*/ font-family: "Open Sans"; color: #5a5a5a; font-size: 14px; @@ -127,7 +127,7 @@ } .table>thead { - background-color: #d2d2d2; + background-color: #F2F2F2; font-family: "Open Sans"; color: #191919; font-size: 13px; @@ -140,7 +140,7 @@ color: #00aeef; font-size: 14px; font-weight: 600; - background-color: #eaeaea; + background-color: #EAEAEA; box-shadow: 0px 1px 1px 0px rgba(34, 31, 31, 0.19); } @@ -154,4 +154,24 @@ .centered { text-align: center; +} +.table-wrapper{ +} + +.refresh-cm { + float: right; + position: relative; + right: 45px; + top: 50px; + z-index: 900; + color: #191919; + font-size: 14px; +} +.refresh-cm .last-time-updated { + color: #5A5A5A; +} +.refresh-cm i.icon-sync { + padding-left: 10px; + top: 3px; + position: relative; }
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/common.css b/vid-app-common/src/main/webapp/app/vid/styles/common.css index 8d6fb615b..35f2e33f8 100644 --- a/vid-app-common/src/main/webapp/app/vid/styles/common.css +++ b/vid-app-common/src/main/webapp/app/vid/styles/common.css @@ -1,3 +1,116 @@ +@font-face { + font-family: OpenSans-Bold; + src: url("fonts/OpenSans/OpenSans-Bold.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-BoldItlaic; + src: url("fonts/OpenSans/OpenSans-BoldItalic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-ExtraBold; + src: url("fonts/OpenSans/OpenSans-ExtraBold.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-ExtraBoldItalic; + src: url("fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Italic; + src: url("fonts/OpenSans/OpenSans-Italic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Light; + src: url("fonts/OpenSans/OpenSans-Light.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-LightItalic; + src: url("fonts/OpenSans/OpenSans-LightItalic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Regular; + src: url("fonts/OpenSans/OpenSans-Regular.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Semibold; + src: url("fonts/OpenSans/OpenSans-Semibold.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-SemiboldItalic; + src: url("fonts/OpenSans/OpenSans-SemiboldItalic.ttf") format('truetype'); +} + +@font-face { + font-family: 'icomoon'; + src: url('fonts/icomoon.eot?4cilop'); + src: url('fonts/icomoon.eot?4cilop#iefix') format('embedded-opentype'), + url('fonts/icomoon.ttf?4cilop') format('truetype'), + url('fonts/icomoon.woff?4cilop') format('woff'), + url('fonts/icomoon.svg?4cilop#icomoon') format('svg'); + font-weight: normal; + font-style: normal; +} + html, body { font-size:14px; -}
\ No newline at end of file +} + +.button--inactive { + border: none !important; +} + +.modal-body [class^="icon-"],.modal-body [class*=" icon-"] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'icomoon' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-browse:before { + content: "\e90e"; + color: #5A5A5A; + font-size: 4px; + cursor: pointer; + width: 37px; + height: 37px; + line-height: 37px; + text-align: center; + background: #F2F2F2; + border: 1px solid #D2D2D2; + display: inline-block; + vertical-align: top; + border-radius: 2px; + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} + +.icon-browse:hover::before { + background-color: #E6F6FB; + color: #009FDB; +} + +.icon-browse:active::before { + background-color: #E6F6FB; + color: #009FDB; +} + +input:focus:invalid { + border-color: Tomato; + box-shadow: none; +} diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/Apache License.txt b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/Apache License.txt new file mode 100644 index 000000000..989e2c59e --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/Apache License.txt @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Bold.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Bold.ttf Binary files differnew file mode 100644 index 000000000..fd79d43be --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Bold.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-BoldItalic.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-BoldItalic.ttf Binary files differnew file mode 100644 index 000000000..9bc800958 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-BoldItalic.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBold.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBold.ttf Binary files differnew file mode 100644 index 000000000..21f6f84a0 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBold.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf Binary files differnew file mode 100644 index 000000000..31cb68834 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Italic.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Italic.ttf Binary files differnew file mode 100644 index 000000000..c90da48ff --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Italic.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Light.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Light.ttf Binary files differnew file mode 100644 index 000000000..0d381897d --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Light.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-LightItalic.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-LightItalic.ttf Binary files differnew file mode 100644 index 000000000..68299c4bc --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-LightItalic.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Regular.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Regular.ttf Binary files differnew file mode 100644 index 000000000..db433349b --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Regular.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Semibold.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Semibold.ttf Binary files differnew file mode 100644 index 000000000..1a7679e39 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-Semibold.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-SemiboldItalic.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-SemiboldItalic.ttf Binary files differnew file mode 100644 index 000000000..59b6d16b0 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/OpenSans/OpenSans-SemiboldItalic.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.eot b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.eot Binary files differindex e57ccc5e7..9a031a85b 100644 --- a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.eot +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.eot diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.svg b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.svg index 5d514c47b..3b288d8c1 100644 --- a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.svg +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.svg @@ -20,4 +20,7 @@ <glyph unicode="" glyph-name="noun_573805_cc-03" d="M512.211 960c-282.886 0-512.211-229.325-512.211-512.211s229.325-512.211 512.211-512.211c282.887 0 512.211 229.325 512.211 512.211v0c-0.017 282.88-229.332 512.195-512.21 512.211h-0.001zM261.202 377.71c-38.703 0-70.079 31.375-70.079 70.079s31.375 70.079 70.079 70.079c38.703 0 70.079-31.375 70.079-70.079v0c0.005-0.298 0.007-0.649 0.007-1.001 0-38.155-30.93-69.085-69.085-69.085-0.352 0-0.703 0.003-1.054 0.008l0.053-0.001zM512.211 377.71c-38.703 0-70.079 31.375-70.079 70.079s31.375 70.079 70.079 70.079c38.703 0 70.079-31.375 70.079-70.079v0c0-0.061 0-0.133 0-0.205 0-38.59-31.284-69.874-69.874-69.874-0.072 0-0.144 0-0.216 0h0.011zM763.221 377.71c-38.703 0-70.079 31.375-70.079 70.079s31.375 70.079 70.079 70.079c38.703 0 70.079-31.375 70.079-70.079v0c0-0.061 0-0.133 0-0.205 0-38.59-31.284-69.874-69.874-69.874-0.072 0-0.144 0-0.217 0h0.011z" /> <glyph unicode="" glyph-name="scedular" horiz-adv-x="981" d="M981.333 662.699c0.312 4.17 0.49 9.033 0.49 13.938 0 109.691-88.922 198.613-198.613 198.613-5.353 0-10.656-0.212-15.902-0.627l0.693 0.044h-554.667c-4.553 0.371-9.857 0.583-15.21 0.583-109.691 0-198.613-88.922-198.613-198.613 0-4.905 0.178-9.768 0.527-14.583l-0.038 0.645v-470.699c0-128.811 82.475-256 213.333-256h554.667c130.859 0 213.333 127.189 213.333 256v470.699zM36.352 662.699c0 109.141 66.048 169.301 176.981 169.301h554.667c110.933 0 176.981-60.16 176.981-169.301l-6.315-44.032h-896zM938.667 192c0-109.141-59.733-213.333-170.667-213.333h-554.667c-110.933 0-170.667 104.192-170.667 213.333v384h896v-384zM362.667 405.333h256c11.782 0 21.333-9.551 21.333-21.333s-9.551-21.333-21.333-21.333v0h-256c-11.782 0-21.333 9.551-21.333 21.333s9.551 21.333 21.333 21.333v0zM362.667 234.667h256c11.782 0 21.333-9.551 21.333-21.333s-9.551-21.333-21.333-21.333v0h-256c-11.782 0-21.333 9.551-21.333 21.333s9.551 21.333 21.333 21.333v0zM704 960c11.782 0 21.333-9.551 21.333-21.333v0-170.667c0-11.782-9.551-21.333-21.333-21.333s-21.333 9.551-21.333 21.333v0 170.667c0 11.782 9.551 21.333 21.333 21.333v0zM277.333 960c11.782 0 21.333-9.551 21.333-21.333v0-170.667c0-11.782-9.551-21.333-21.333-21.333s-21.333 9.551-21.333 21.333v0 170.667c0 11.782 9.551 21.333 21.333 21.333v0z" /> <glyph unicode="" glyph-name="finished_d" d="M512 960v0c-282.77 0-512-229.23-512-512v0c0-282.77 229.23-512 512-512s512 229.23 512 512c0 282.77-229.23 512-512 512zM473.454 273.993c8.558 13.239 15.067 22.894 21.138 32.768 91.648 149.211 118.126 170.569 209.701 319.781 5.105 9.183 10.457 17.077 16.416 24.459l-0.252-0.322c8.798 10.219 21.751 16.651 36.206 16.651 9.048 0 17.507-2.52 24.715-6.896l-0.212 0.119c13.74-7.345 22.93-21.594 22.93-37.989 0-6.179-1.305-12.053-3.655-17.361l0.108 0.274c-3.479-7.646-7.067-14.1-11.098-20.236l0.346 0.561c-108.251-176.859-151.479-225.646-259.803-402.286-7.527-16.71-24.034-28.132-43.21-28.132-13.809 0-26.235 5.924-34.874 15.369l-0.032 0.036q-107.52 91.502-213.138 184.978c-11.444 7.654-18.878 20.525-18.878 35.132 0 11.575 4.668 22.060 12.224 29.675l-0.003-0.003c9.080 9.371 21.781 15.187 35.84 15.187s26.76-5.816 35.827-15.174l0.013-0.013c46.738-39.643 92.672-80.457 138.971-120.32z" /> +<glyph unicode="" glyph-name="search2" d="M421.647 182.965c-96.376 0-180.706 36.141-252.988 102.4-66.259 66.259-102.4 156.612-102.4 252.988s36.141 180.706 102.4 252.988c66.259 66.259 156.612 102.4 252.988 102.4s180.706-36.141 252.988-102.4c66.259-66.259 102.4-156.612 102.4-252.988s-36.141-180.706-102.4-252.988c-72.282-66.259-156.612-102.4-252.988-102.4zM1011.953-9.788l-271.059 271.059c66.259 78.306 102.4 174.682 102.4 271.059 0 114.447-42.165 216.847-120.471 295.153s-186.729 120.471-295.153 120.471c-114.447 0-216.847-42.165-295.153-120.471s-120.471-186.729-120.471-295.153c0-114.447 42.165-216.847 120.471-295.153s186.729-120.471 295.153-120.471c102.4 0 198.776 36.141 271.059 102.4l271.059-271.059c6.024-6.024 18.071-12.047 24.094-12.047s18.071 6.024 24.094 12.047c12.047 12.047 12.047 30.118-6.024 42.165z" /> +<glyph unicode="" glyph-name="browse" horiz-adv-x="3584" d="M796.444 561.778c0-219.932-178.29-398.222-398.222-398.222s-398.222 178.29-398.222 398.222c0 219.932 178.29 398.222 398.222 398.222s398.222-178.29 398.222-398.222zM3584 561.778c0-219.932-178.29-398.222-398.222-398.222s-398.222 178.29-398.222 398.222c0 219.932 178.29 398.222 398.222 398.222s398.222-178.29 398.222-398.222zM2190.222 561.778c0-219.932-178.29-398.222-398.222-398.222s-398.222 178.29-398.222 398.222c0 219.932 178.29 398.222 398.222 398.222s398.222-178.29 398.222-398.222z" /> +<glyph unicode="" glyph-name="sync" d="M878.933 358.4c21.333-4.267 34.176-29.867 29.867-55.467-21.333-59.733-59.691-115.2-102.357-157.867-81.109-81.067-187.776-123.733-302.976-123.733s-221.867 42.667-294.357 123.733l-123.776 119.467v-157.867c0-25.6-17.067-42.667-42.667-42.667-25.557 0-42.667 17.067-42.667 42.667v268.8c0 4.267 4.267 4.267 4.267 8.533 4.309 0 4.309 4.267 4.309 4.267 0 4.267 4.224 8.533 8.533 8.533 0 4.267 4.224 4.267 4.224 4.267h4.267c0 4.267 4.309 4.267 8.533 4.267h256c25.643 0 42.667-17.067 42.667-42.667s-17.024-42.667-42.667-42.667h-149.333l119.467-110.933c68.309-68.267 153.643-102.4 243.2-102.4 89.643 0 179.2 34.133 238.976 98.133 38.357 34.133 64 81.067 81.024 128 8.533 21.333 34.133 34.133 55.467 25.6zM958.406 831.276c25.6 0 42.667-17.067 42.667-42.667v-260.267c0-4.267 0-8.533-4.267-12.8 0-4.267-4.267-4.267-4.267-8.533-4.267 0-4.267-4.267-4.267-4.267-4.267-4.267-8.533-4.267-12.8-8.533s-12.8-4.267-17.067-4.267h-256c-25.6 0-42.667 17.067-42.667 42.667s17.067 42.667 42.667 42.667h149.333l-119.467 115.2c-34.133 38.4-81.067 64-128 81.067-85.333 29.867-179.2 25.6-260.267-12.8-81.067-42.667-145.067-110.933-174.933-196.267-8.533-21.333-34.133-34.133-55.467-25.6-21.333 4.267-34.133 29.867-25.6 51.2 38.4 110.933 115.2 196.267 217.6 243.2 102.4 51.2 217.6 55.467 328.533 21.333 59.733-21.333 115.2-59.733 157.867-102.4l123.733-119.467v157.867c0 25.6 17.067 42.667 42.667 42.667z" /> </font></defs></svg>
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.ttf b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.ttf Binary files differindex 7d0e36d1f..acbb2aa5b 100644 --- a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.ttf +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.ttf diff --git a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.woff b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.woff Binary files differindex b2d2e64af..8a7b316c0 100644 --- a/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.woff +++ b/vid-app-common/src/main/webapp/app/vid/styles/fonts/icomoon.woff diff --git a/vid-app-common/src/main/webapp/app/vid/styles/instantiate.css b/vid-app-common/src/main/webapp/app/vid/styles/instantiate.css index 13e2cf0a5..e46a8b970 100755 --- a/vid-app-common/src/main/webapp/app/vid/styles/instantiate.css +++ b/vid-app-common/src/main/webapp/app/vid/styles/instantiate.css @@ -59,4 +59,12 @@ div[ng-controller=InstantiationController] .aaiHidden { div[ng-controller=InstantiationController] .aaiVisible {
visibility: visible;
+}
+
+div.resume {
+ display: inline;
+}
+
+a.button-margin {
+ margin-right: 8px;
}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/messageViewer.css b/vid-app-common/src/main/webapp/app/vid/styles/messageViewer.css new file mode 100644 index 000000000..9514d11b4 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/messageViewer.css @@ -0,0 +1,17 @@ +.message-viewer { + text-align: center; +} + +.message-viewer .primaryMessage { + font-size: 18px; + padding-top: 20px; +} + +.message-viewer .btn-primary { + background-color: #009FDB; + color: #FFFFFF; + border: 1px solid #009FDB; + padding: 0px 25px; + height: 35px; + margin-top: 45px; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/modal-buttons.css b/vid-app-common/src/main/webapp/app/vid/styles/modal-buttons.css new file mode 100644 index 000000000..b5d3d3143 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/modal-buttons.css @@ -0,0 +1,29 @@ +.modal-footer .btn-white, +.modal-footer .btn-white:hover { + font-family: "OpenSans-Semibold"; + border-radius: 5px; + border: 1px solid #009FDB; + background-color: #FFFFFF; + width: 120px; + height: 36px; + color: #009FDB; + font-size: 13px; + line-height: 30px; + text-align: center; + padding: 4px 12px !important; +} + +.modal-footer .btn-primary, +.modal-footer .btn-primary:hover{ + font-family: "OpenSans-Semibold"; + border-radius: 5px; + border: 1px solid #009FDB; + background-color: #009FDB; + width: 120px; + height: 36px; + color: #FFFFFF; + font-size: 13px; + line-height: 30px; + text-align: center; + padding: 4px 12px !important; +} diff --git a/vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css b/vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css new file mode 100644 index 000000000..1a293c049 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/modal-create-new.css @@ -0,0 +1,196 @@ +.modal-dialog { + width: 587px; + border-radius: 8px; +} + +.modal-content { + width: 587px; + border-radius: 8px; + background-color: #ffffff; + font-family: "OpenSans-Regular"; +} + +.modal-content .modal-body { + padding: 15px 35px 5px 35px; +} + +.modal-body .connect-error, +.modal-body .icon-alert.error { + font-family: OpenSans-Regular !important; + color: #CF2A2A; + font-size: 14px; +} + +.modal-body .icon-alert:before { + color: #CF2A2A; + cursor: default; + font-family: 'icomoon' !important; + padding-right: 5px; +} + +.modal-header { + border: none!important; + padding: 15px 35px 0px 35px!important; +} + +.modal-header h3 { + font-family: "OpenSans-Regular"; + color: #191919; + font-size: 22px; + font-weight: 300; + line-height: 16px; + padding-bottom: 20px; + border-bottom: 3px solid #009fdb; + +} + +.modal-close { + margin: -40px 5px 0 0; + color: #5a5a5a; + font-size: 20px; + cursor: pointer; +} + +.form-group .control-label { + font-family: OpenSans-Semibold; + font-size: 12px; + color: #191919; +} + +select { + background: url(../images/chevron.png) no-repeat 98% 10px !important; +} + +input::placeholder { + text-align: left; + font-family: OpenSans-Regular; + font-size: 14px; + color: #a9a9a9; +} + +.form-group .connect-error { + border: 1.5px solid #CF2A2A; +} + +.form-group .grayedOut { + font-family: OpenSans-Regular; + font-size: 14px; + color: #a9a9a9; + opacity: 0.54; +} + +.form-group .grayedOut option { + font-family: OpenSans-Regular; + font-size: 14px; + color: #555; + opacity: 1; +} + +button.dropdown-toggle { + text-align: left; +} + +button[disabled].dropdown-toggle { + opacity: 1; + cursor: not-allowed; + background-color: #eee; + border: 1px solid #aaa; + color: #a0a0a0; +} + +multiselect[disabled] { + cursor: not-allowed; +} + +a.item-unselected:before { + font-family: "icomoon"!important; + content: "\e90c"; + color: #4ca90c; +} + +.form-create .modal-footer { + margin-top: 0; +} + +.form-create .modal-footer .btn, +.form-create .modal-footer .btn:hover { + font-family: "OpenSans-Semibold"; + border-radius: 5px; + border: 1px solid #009FDB; + font-size: 13px; + line-height: 30px; + text-align: center; + padding: 4px 12px !important; + width: 120px; + height: 36px; +} + +.form-create .modal-footer .btn-white, +.form-create .modal-footer .btn-white:hover { + background-color: #FFFFFF; + color: #009FDB; +} + +.form-create .modal-footer .btn-primary, +.form-create .modal-footer .btn-primary:hover{ + background-color: #009FDB; + color: #FFFFFF; +} + +.vnf-versions-container .table { + position: relative; + background-color: #f8f8f8; + background-clip: padding-box; + border-radius: 6px; + outline: 0; +} + +.file-wrapper { + display: flex; +} + +.file-input { + display: inline-block !important; + width: 0.1px; +} + +.file-input-label { + width: 389px; + height: 37px; + background: #FFFFFF; + border: 1px solid #D2D2D2; + border-radius: 2px; + display: inline-block; + line-height: 37px; + font-weight: normal !important; + padding-left: 12px; + border-bottom-right-radius: 0; + border-top-right-radius: 0; + flex: 1; +} + +.vnf-versions-name { + padding-top: 6px; + font-family: "OpenSans-Regular"; + position: absolute; +} + +.vnf-versions-select-as-text { + font-family: "OpenSans-Regular"; + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + border: none; + overflow:hidden; + background-color: #f8f8f8; + height: 31px; +} + +.vnf-files-select { + z-index: 999; + opacity: 0.0; + position: absolute; + width: 23%; + cursor: pointer; + height:100%; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/modals.css b/vid-app-common/src/main/webapp/app/vid/styles/modals.css new file mode 100644 index 000000000..edc89b968 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/modals.css @@ -0,0 +1,52 @@ +@font-face { + font-family: OpenSans-Light; + src: url("fonts/OpenSans/OpenSans-Light.ttf") format('truetype'); +} +@font-face { + font-family: OpenSans-Regular; + src: url("fonts/OpenSans/OpenSans-Regular.ttf") format('truetype'); +} +@font-face { + font-family: OpenSans-Semibold; + src: url("fonts/OpenSans/OpenSans-Semibold.ttf") format('truetype'); +} + +.modal-header * { + font-family: OpenSans-Light; +} +.modal-body * { + font-family: OpenSans-Regular; +} +.modal-footer * { + font-family: OpenSans-Semibold; +} + +.modal-header { + border-bottom: 3px solid; + margin: auto; + width: 95%; + padding: 10px 0; + font-size: 22px; +} +.modal-header #cancel { + cursor: pointer; +} +.modal-title { + float: left; +} +.modal-content { + font-size: 15px; + border-radius: 0; + color: #191919; +} +.modal-footer { + background-color: #F8F8F8; + height: 60px; +} +.modal-footer .btn { + color: #FFF; + background-color: #009FDB; + border-color: #009FDB; + margin-right: 0; + font-size: 13px; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/networkNode.css b/vid-app-common/src/main/webapp/app/vid/styles/networkNode.css new file mode 100644 index 000000000..74fa9fcbe --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/networkNode.css @@ -0,0 +1,271 @@ +@font-face { + font-family: OpenSans-Bold; + src: url("fonts/OpenSans/OpenSans-Bold.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-BoldItlaic; + src: url("fonts/OpenSans/OpenSans-BoldItalic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-ExtraBold; + src: url("fonts/OpenSans/OpenSans-ExtraBold.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-ExtraBoldItalic; + src: url("fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Italic; + src: url("fonts/OpenSans/OpenSans-Italic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Light; + src: url("fonts/OpenSans/OpenSans-Light.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-LightItalic; + src: url("fonts/OpenSans/OpenSans-LightItalic.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Regular; + src: url("fonts/OpenSans/OpenSans-Regular.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-Semibold; + src: url("fonts/OpenSans/OpenSans-Semibold.ttf") format('truetype'); +} + +@font-face { + font-family: OpenSans-SemiboldItalic; + src: url("fonts/OpenSans/OpenSans-SemiboldItalic.ttf") format('truetype'); +} + +.templatebody{ + background-color: white !important; +} +.network-wrapper-config * { + font-family: OpenSans-Regular, sans-serif; +} +.body-content-jsp { + margin-top: 35px; + margin-left: 201px; + margin-right: 0px; + background-color: white; +} +.temporary-solution { + height: 0px; +} +.sprite { + background: url('../images/sprite.png') no-repeat; + display: inline-block; +} +.modal-x { + background-position: -198px -315px; + width: 10px; + height: 10px; +} +.modal-x:hover{ + background-position: -198px -338px; +} +.sprite.checkbox { + background-position: -218px -335px; + width: 14px; + height: 14px; +} +.sprite.checkbox-checked { + background-position: -218px -311px; +} +.sprite.checkbox-disabled { + background-position: -218px -359px; +} +button { + border-radius: 2px; + font-size: 14px; + line-height: 28px; + height: 30px; +} +button.blue { + border: #0091c8 1px solid; + background-color: #009fdb; + color: white; +} +button.blue:hover { + background-color: #1ec2ff; + border-color: #0091c8; +} +button.blue:active { + background-color: #0091c7; + border-color: #006186; +} +button.blue[disabled] { + background-color: rgba(5, 104, 174, 0.3); + border-color: rgba(4, 113, 168, 0.3); +} +button.grey { + color: #009FDB; + background-color: #ffffff; + border: 1px solid #009FDB; +} +button.grey:hover { + background-color: #f8f8f8; + border-color: #009fdb; +} +button.grey:active { + background-color: #d8d8d8; + border-color: #5a5a5a; +} +button.grey[disabled] { + background-color: #f8f8f8; + border-color: #d8d8d8; + color: #cdcdcd; +} +button.white { + border: #009fdb 1px solid; + background-color: white; + color: #009fdb; +} +input[type=checkbox] { + display: none; +} +input[type=checkbox] + label { + position: relative; + padding-left: 2px; + text-indent: 19px; + line-height: 15px; +} +input[type=checkbox] + label::after { + background: url('../images/sprite.png') no-repeat; + display: inline-block; + background-position: -218px -335px; + width: 14px; + height: 14px; + padding-left: 21px; + margin-right: 25px; + line-height: 15px; + color: #5a5a5a; + content: ''; + position: absolute; + left: 0; + top: 0; +} +input[type=checkbox] + label::after.checkbox { + background-position: -218px -335px; + width: 14px; + height: 14px; +} +input[type=checkbox] + label::after.checkbox-checked { + background-position: -218px -311px; +} +input[type=checkbox] + label::after.checkbox-disabled { + background-position: -218px -359px; +} +input[type=checkbox]:checked + label::after { + background: url('../images/sprite.png') no-repeat; + display: inline-block; + background-position: -218px -311px; +} +input[type=checkbox]:checked + label::after.checkbox { + background-position: -218px -335px; + width: 14px; + height: 14px; +} +input[type=checkbox]:checked + label::after.checkbox-checked { + background-position: -218px -311px; +} +input[type=checkbox]:checked + label::after.checkbox-disabled { + background-position: -218px -359px; +} +input[type=checkbox]:disabled + label::after { + background: url('../images/sprite.png') no-repeat; + display: inline-block; + background-position: -218px -359px; +} +input[type=checkbox]:disabled + label::after.checkbox { + background-position: -218px -335px; + width: 14px; + height: 14px; +} +input[type=checkbox]:disabled + label::after.checkbox-checked { + background-position: -218px -311px; +} +input[type=checkbox]:disabled + label::after.checkbox-disabled { + background-position: -218px -359px; +} +.network-wrapper-config { + width: 100%; +} +.network-wrapper-config .head { + line-height: 59px; + height: 59px; + display: flex; + background-color: #F8F8F8; + border-bottom: 1px solid #D8D8D8; +} +.network-wrapper-config .head .title { + font-size: 18px; + margin-left: 56px; + color: #5A5A5A; +} +.network-wrapper-config .head .btn-wrapper { + flex: 1; + text-align: right; + margin-right: 15px; +} +.network-wrapper-config .head .btn-wrapper button { + width: 120px; +} +.network-wrapper-config .head .btn-wrapper button.delete-btn{ + margin-left: 13px; +} +.network-wrapper-config .content-wrapper { + display: flex; +} +.network-wrapper-config .content-wrapper .sidebar-right { + width: 25%; + min-width: 400px; + background-color: #F8F8F8; +} +.network-wrapper-config .content-wrapper .content { + width: 75%; + margin-top: 48px; +} +.network-wrapper-config .content-wrapper .content .form-wrapper { + width: 640px; + margin: 0 auto; +} +.network-wrapper-config span.error { + color: #cf2a2a; +} +.network-wrapper-config .content-wrapper .content .form-wrapper .instance-field .ng-invalid-pattern{ + border-color: #cf2a2a; + color: #cf2a2a; +} +.network-wrapper-config .content-wrapper .content .form-wrapper .instance-field { + margin-bottom: 25px; +} +.network-wrapper-config .content-wrapper .content .form-wrapper .instance-field label{ + color: #191919; + font-size: 13px; +} + +.network-wrapper-config .content-wrapper .content .form-wrapper .instance-field input, +.network-wrapper-config .content-wrapper .content .form-wrapper .instance-field select{ + border-color: #D2D2D2; +} + +.network-wrapper-config .content-wrapper .content .form-wrapper .instance-field.lcpRegionText, +.network-wrapper-config .content-wrapper .content .form-wrapper .instance-field.productFamily{ + display: none; +} + +.sidebar-right service-metadata .metadata-content{ + padding-bottom: 20px; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/pnfSearchAssociation.css b/vid-app-common/src/main/webapp/app/vid/styles/pnfSearchAssociation.css new file mode 100644 index 000000000..5cf16d83c --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/pnfSearchAssociation.css @@ -0,0 +1,82 @@ +@font-face { + font-family: 'icomoon'; + src: url('fonts/icomoon.eot?4cilop'); + src: url('fonts/icomoon.eot?4cilop#iefix') format('embedded-opentype'), + url('fonts/icomoon.ttf?4cilop') format('truetype'), + url('fonts/icomoon.woff?4cilop') format('woff'), + url('fonts/icomoon.svg?4cilop#icomoon') format('svg'); + font-weight: normal; + font-style: normal; +} + +.pnf-search-association [class^="icon-"],.pnf-search-association [class*=" icon-"] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'icomoon' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.search-input{ + width:40px; + margin-left: -30px; + z-index: 2; + cursor: pointer; + display: inline-block; + position: absolute; + line-height: 40px; +} +.content-wrapper{ + margin-left: 70px; + font-family: OpenSans-Semibold; + } +.content-wrapper .content{ + margin-top: 47px; +} +.input-wrapper{ + margin-top: 6px; +} +input[type=search]{ + /*border: none;*/ + width: 415px; + height: 40px; + border: 1px solid #D2D2D2; + border-radius: 2px; +} +input[type=search]:before { +/* content: "\e90d"; + color: #00aeef; + font-size: 50px; + cursor: pointer; + margin-left: 350px*/ +} +.error-msg{ + color: red; +} +.bold{ + font-family: OpenSans-Semibold; +} +.margin-search{ + margin-top: 37px; +} +.result-content span{ + font-family: OpenSans-Semibold; +} +.result-content div{ + margin-bottom: 24px; + margin-top: 3px; +} +.search2-icon:before { + font-family: 'icomoon'; + content: "\e90d"; + color: #009FDB; + font-size: 17px; + cursor: pointer; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/search.css b/vid-app-common/src/main/webapp/app/vid/styles/search.css new file mode 100644 index 000000000..8ab5ea8c0 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/search.css @@ -0,0 +1,37 @@ +.search-container { + display: flex; + background: #FFFFFF; + border: 1px solid #D2D2D2; + border-radius: 2px; + width: 500px; +} +.search-container .search-input, +.search-container .search-input:focus, +.search-container .search-input:hover{ + border: none; + padding: 10px; + display: inline-block; + width: 458px; + font-style: italic; +} + +.search-container .search-input::placeholder { + text-align: left; +} + +.search-container .search-icon { + display: inline-block; + margin: auto; + width: 16px; + height: 16px; +} + +.search-container .search-icon svg path { + fill: #5A5A5A; +} + +.search-container .search-icon:hover path { + fill: #009FDB; +} + + diff --git a/vid-app-common/src/main/webapp/app/vid/styles/serviceMetadata.css b/vid-app-common/src/main/webapp/app/vid/styles/serviceMetadata.css new file mode 100644 index 000000000..c54b6d4c9 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/serviceMetadata.css @@ -0,0 +1,18 @@ +service-metadata { + display: block; +} +service-metadata .header-title { + text-transform: uppercase; + font-size: 16px; + color: #191919; + background: #EAEAEA; + line-height: 40px; + padding-left: 20px; +} +service-metadata .metadata-content { + padding-left: 20px; +} +service-metadata .field { + margin-top: 15px; + font-size: 13px; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css b/vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css index 0a642993e..a8dddb6a4 100755 --- a/vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css +++ b/vid-app-common/src/main/webapp/app/vid/styles/serviceModels.css @@ -67,4 +67,8 @@ div[ng-controller=ServiceModelController] .progHidden { div[ng-controller=ServiceModelController] .progVisible {
visibility: visible;
+}
+
+.previous-versions-button {
+ width: 113px;
}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/serviceProxyConfig.css b/vid-app-common/src/main/webapp/app/vid/styles/serviceProxyConfig.css new file mode 100644 index 000000000..d1ca37bad --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/serviceProxyConfig.css @@ -0,0 +1,154 @@ +.diagram { + background: #F8F8F8; + padding: 48px 20px; + margin: 0px 48px; + display: flex; + flex-direction: column; +} +.diagram .diagram-img { + margin: 0 auto; + display: flex; + width: 90%; +} +.circle { + float: left; + border: 3px solid; + width: 140px; + height: 140px; + border-radius: 50%; + flex: 0 0 140px; +} +.circle .text { + float: left; + width: 100%; + padding-top: 37%; + text-align: center; + font-size: 14px; + color: #191919; + line-height: 17px; +} +.config-circle { + border-color: #9063CD; + background-color: rgba(144,99,205,0.50); +} +.config-circle .line { + width: 3px; + background-color: #8f61cc; + margin: auto; + height: 100%; + display: block; +} +.service-circle { + border-color: #71C5E8; +} +.service-circle:hover { + background: rgba(113, 197, 232, 0.50); +} +.dotted-line { + border-bottom: 2px dashed #5a5a5a; + width: 200px; + float: left; + height: 70px; + flex: 1; +} +.dotted-line.unchecked .conn-circle { + width: 13px; + height: 13px; + margin: 54px auto; + display: block; + border: 15px solid #F8F8F8; +} +.dotted-line.unchecked .conn-circle:before { + content: ""; + float: left; + background: #767676; + width: 13px; + height: 13px; + border-radius: 50%; + position: relative; + top: -6px; + right: 6px; +} + +.valid-large { + background-position: -240px -154px; + width: 35px; + height: 35px; +} +.dotted-line.checked .conn-circle { + margin: 52px auto; + display: block; +} +.element-name { + color: #191919; + font-size: 14px; + width: 100%; + text-align: center; +} +.element-name.service { + flex: 50%; +} +.element-name-wrapper{ + display: flex; + margin-top: 30px; +} +.element-name-wrapper .element-name .label-txt { + color: #191919; + font-size: 14px; +} +.element-name-wrapper .element-name.service .label-txt:hover { + color: #009FDB; + cursor: pointer; + text-align: center; +} +.element-name-wrapper .element-name .info{ + background: #009FDB; + border-radius: 50%; + height: 16px; + width: 16px; + color: white; + line-height: 15px; + padding-top: 1px; + margin-left: 10px; + margin-top: 2px; + cursor: pointer; + display: inline-block; +} +.service-wrapper-config .bottom { + display: flex; + height: 450px; + margin: 40px 48px; +} +.service-wrapper-config .wrapper-list { + flex: 50%; + height: 100%; +} +.service-wrapper-config .wrapper-list:first-child { + border-right: 1px dashed #D8D8D8; + margin-right: 50px; + padding-right: 50px; +} +.service-wrapper-config .title-txt { + color: #191919; + font-size: 13px; + margin-bottom: 10px; +} + +.service-wrapper-config .select-vnf-title { + margin-top: 20px; +} + +.ng-hide-keep-block.ng-hide:not(.ng-hide-animate) { + display: block!important; + visibility: hidden; +} + +.service-wrapper-config select { + border-color: #D2D2D2; + background-position: 100% 4px; +} +.no-results { + margin-top: 10px; + text-align: center; + display: block; +}
\ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/styles/testEnvironments.css b/vid-app-common/src/main/webapp/app/vid/styles/testEnvironments.css new file mode 100644 index 000000000..4532111b9 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/styles/testEnvironments.css @@ -0,0 +1,215 @@ +.body-content-jsp { + margin-top: 35px; + min-height: 500px; + margin-left: 201px; + margin-right: 0px; + background-color: #f8f8f8; + display: flex; + flex-direction: column; +} + +.temporary-solution { + display: none; +} + +.body-content-jsp > div.ng-scope { + flex: 1; + display: flex; + flex-direction: column; +} + +.body-content-jsp > div.ng-scope > div { + flex: 1; + display: flex; + flex-direction: column; +} + +.test-environments { + background: white; + font-family: "OpenSans-Regular"; + color: #797979; + flex:1; + display: flex; + flex-direction: column; +} + +.test-environments .header { + height: 70px; + padding: 15px; + background: #F8F8F8; +} +.test-environments .header .header-left { + display: inline-flex; + align-items: center; +} + +.test-environments .headline { + color: #5A5A5A; + font-size: 22px; + text-align: left; +} + +.test-environments .separator { + height: 40px; + border-left: 1px solid #D2D2D2; + margin: 0px 20px; +} + +.test-environments .header .button-container { + display: flex; + align-items: center; + cursor: pointer; +} + +.test-environments .error-messages { + margin: auto; +} + +.test-environments .error-messages .no-data svg path { + fill: #D2D2D2; +} + +.test-environments .error-messages .no-data .secondaryMessage, +.test-environments .error-messages .connect-error .secondaryMessage { + color: #D2D2D2; +} + +.test-environments .error-messages .connect-error svg path { + fill: red; +} + +.test-environments .error-messages .connect-error .primaryMessage { + color: red; +} + +.test-environments .button-container svg { + fill: #009FDB; +} + +.test-environments .button-container .button-text{ + color: #5A5A5A; + padding-left: 10px; +} + +.test-environments .search-container { + float: right; + margin-right: 40px; +} + +.test-environments .refresh:focus { + outline: none; +} + +.test-environments .refresh { + float: right; + width: 20px; + height: 20px; + border: none; + background: none; + padding: 0; + margin-bottom: 15px; +} + +.test-environments .refresh svg{ + height: 20px; + width: 20px; +} + +.test-environments .refresh svg path { + fill: #5A5A5A; +} + +.test-environments .refresh:hover path { + fill: #009FDB; +} + +.test-environments .error { + text-align: center; + color: red; +} + +.test-environments .environments-table { + margin: 40px; +} + +.test-environments .environments-table .tablesorter-default { + cursor: default; +} + +.test-environments .environments-table .tablesorter-default thead .tablesorter-header .tablesorter-header-inner { + background-image: none; + background-size: 8px; +} + +.test-environments .environments-table .tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner { + background-image: url('../images/sort_down.svg'); +} + +.test-environments .environments-table .tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner { + background-image: url('../images/sort_up.svg'); +} + +.test-environments .environments-table .thead-default tr th { + background: #EAEAEA; + color: #191919; + font-size: 13px; + font-weight: 600; + vertical-align: middle; +} + +.test-environments .environments-table .thead-default tr th .tablesorter-header-inner { + padding-right: 10px; +} + +.test-environments .environments-table .thead-default tr th span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.test-environments .environments-table .thead-default tr th:first-child { + min-width: 150px; +} + +/*.test-environments .environments-table .thead-default tr th:*/ + +.test-environments .environments-table .tablesorter-header-inner { + padding: 0; + width: 100%; +} + +.test-environments .environments-table .tablesorter-default tbody td { + background: white; + font-size: 14px; + padding: 12px 8px; +} + +.test-environments .environments-table .tablesorter-default tbody tr:focus td { + background: #E6F6FB; +} + +.test-environments .environments-table .tablesorter-default tbody tr:focus { + border: none; + outline: none; +} + +.attach-button { + margin-left: 35px; +} + +.envActionBtn { + width: 94px; + height: 30px; +} + +#environments-table { + margin-top: 0; +} + +.test-environments-table-container { + overflow: auto; + max-height: 50vh; + width: 98%; + margin-left: 15px; + padding-left: 0; +} diff --git a/vid-app-common/src/main/webapp/app/vid/styles/vidTree.css b/vid-app-common/src/main/webapp/app/vid/styles/vidTree.css index 1aec73d81..7904b3695 100755 --- a/vid-app-common/src/main/webapp/app/vid/styles/vidTree.css +++ b/vid-app-common/src/main/webapp/app/vid/styles/vidTree.css @@ -64,4 +64,8 @@ tr.angular-ui-tree-empty { -webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
+}
+
+.pull-right .dropdown-menu {
+ background-color: transparent;
}
\ No newline at end of file |