<script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
<script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
<script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
-<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.10.0/lodash.min.js"></script>
+<script type="text/javascript" src="app/fusion/external/lodash/lodash.min.0.10.js"></script>
<%--<script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script>--%>
<script src="app/fusion/external/angular-1.4.8/angular-touch.min.js"></script>
<script src="app/fusion/external/angular-1.4.8/angular-animate.min.js"></script>
<script src="app/vid/external/bootstrap/js/bootstrap.min.js"></script>\r
<script src="app/vid/external/multiselect/angular-bootstrap-multiselect.min.js"></script>\r
<script src="app/vid/external/upload-file/ng-file-upload.min.js"></script>\r
+<script src="app/vid/external/angular-feature-flags/featureFlags.min.js"></script>\r
+<script src="app/vid/external/angular-moment/moment.min.js"></script>\r
+<script src="app/vid/external/angular-moment/angular-moment.min.js"></script>\r
\r
<script src="app/vid/scripts/angular-ui-tree.js"></script>\r
\r
<script src="app/vid/scripts/modals/alert-modal/alert-modal.controller.js"></script>\r
<script src="app/vid/scripts/controller/aaiSubscriberController.js"></script>\r
<script src="app/vid/scripts/controller/creationDialogController.js"></script>\r
+<script src="app/vid/scripts/controller/iframeDialogController.js"></script>\r
<script src="app/vid/scripts/controller/deleteResumeDialogController.js"></script>\r
<script src="app/vid/scripts/controller/detailsDialogController.js"></script>\r
<script src="app/vid/scripts/controller/statusDialogController.js"></script>\r
<script src="app/vid/scripts/controller/testEnvironmentsController.js"></script>\r
<script src="app/vid/scripts/modals/attach-test-env-manifest/attach-test-env-manifest.controller.js"></script>\r
<script src="app/vid/scripts/controller/ServiceProxyConfigController.js"></script>\r
+<script src="app/vid/scripts/controller/iframeController.js"></script>\r
\r
<script src="app/vid/scripts/directives/angularjs-datetime-picker.js"></script>\r
<script src="app/vid/scripts/controller/msoCommitModalController.js"></script>\r
<script src="app/vid/scripts/services/utilityService.js"></script>\r
<script src="app/vid/scripts/services/vnfService.js"></script>\r
<script src="app/vid/scripts/services/pnfService.js"></script>\r
+<script src="app/vid/scripts/services/crService.js"></script>\r
<script src="app/vid/scripts/services/change-management.service.js"></script>\r
<script src="app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.controller.js"></script>\r
<script src="app/vid/scripts/services/OwningEntityService.js"></script>\r
+ SystemProperties.getProperty(MsoProperties.MSO_POLLING_INTERVAL_MSECS) + "}";\r
%>\r
\r
-<div ng-controller="ServiceModelController"\r
+<div class="service-models-page" ng-controller="ServiceModelController"\r
ng-init="init(<%=properties%>);" ng-cloak>\r
- <div ng-view></div>\r
+ <div class="overlay"></div>\r
+ <div class="service-model-content" ng-view></div>\r
</div>\r
<!-- Temporary solution for footer overlapping the men after talking to EComp SDK developer on 06/16/2016 -->\r
<div class="temporary-solution">\r
<script src="app/vid/external/multiselect/angular-bootstrap-multiselect.min.js"></script>\r
<script src="app/vid/external/upload-file/ng-file-upload.min.js"></script>\r
+<script src="app/vid/external/angular-feature-flags/featureFlags.min.js"></script>\r
+<script src="app/vid/external/angular-moment/moment.min.js"></script>\r
+<script src="app/vid/external/angular-moment/angular-moment.min.js"></script>\r
+<%@ page import="org.onap.vid.properties.Features"%>\r
+<%@ page import="org.onap.vid.properties.VidProperties" %>\r
+<%@ page import="org.onap.portalsdk.core.util.SystemProperties" %>\r
<div>\r
<h1 class="heading1">ONAP</h1>\r
<br>\r
\r
<h1 class="heading1"><a href="mailto:portal@lists.onap.org" target="_top">Contact Us</a></h1>\r
<a href="mailto:portal@lists.onap.org" target="_top">Please click here to contact us.</a>\r
- \r
+ <%\r
+ if (Features.FLAG_ADD_MSO_TESTAPI_FIELD.isActive()) {\r
+\r
+ String displayTestApi = SystemProperties.getProperty(VidProperties.MSO_DISPLAY_TEST_API_ON_SCREEN);\r
+ String defaultTestApiValue = SystemProperties.getProperty(VidProperties.MSO_DEFAULT_TEST_API);\r
+\r
+ String selectionVisibility = Boolean.parseBoolean(displayTestApi) ? "inherit" : "hidden";\r
+ %>\r
+ <div style="visibility: <%=selectionVisibility%>" id="selectTestApiSection">\r
+ <br/><br/><br/>\r
+ <label>Test API for A-la-carte:</label>\r
+ <select style="width: 20ch" id="selectTestApi" onchange="sessionStorage.setItem('msoRequestParametersTestApiValue',this.value);">\r
+ <option value="VNF_API">VNF_API (old)</option>\r
+ <option value="GR_API">GR_API (new)</option>\r
+ </select>\r
+ </div>\r
+ <script type="text/javascript">\r
+ var selectedValue = sessionStorage.getItem('msoRequestParametersTestApiValue') || "<%=defaultTestApiValue%>";\r
+ var element = document.getElementById('selectTestApi');\r
+ if (element) {\r
+ element.value = selectedValue;\r
+ }\r
+ sessionStorage.setItem('msoRequestParametersTestApiValue', selectedValue);\r
+ </script>\r
+ <%\r
+ }\r
+ %>\r
<BR>\r
</div>\r
<br>\r
angular.module('att.abs.helper', []);\r
angular.module('quantum', []);\r
var app=angular.module("abs", ["att.abs", "att.abs.helper","modalServices", /*'ngAnimate','ngTouch',*/ 'ui.bootstrap',\r
- "att.gridster","checklist-model","ngRoute", "ngCookies", 'btorfs.multiselect','ngFileUpload']);\r
+ "att.gridster","checklist-model","ngRoute", "ngCookies", 'btorfs.multiselect','ngFileUpload','feature-flags', 'angularMoment']);\r
\r
+app.run(function(featureFlags, $http) {\r
+ $http.get('flags').then(function (results) {\r
+ var flags = [];\r
+ for (var key in results.data) {\r
+ flags.push({"key":key, "active":results.data[key]})\r
+ }\r
+ featureFlags.set(flags);\r
+ })\r
+});\r
--- /dev/null
+/*!
+ Lo-Dash 0.10.0 lodash.com/license
+ Underscore.js 1.4.2 underscorejs.org/LICENSE
+*/
+;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||Z);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(bt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return bt.call(s,r)&&-1<q(s[r],n)}return-1<q(e,n,t)}}function u(e){return e.charCodeAt(0)}function a(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function f
+(e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(St.call(u)):n),this instanceof r?(d.prototype=e.prototype,a=new d,u=e.apply(a,u),T(u)?u:a):e.apply(a,u)}var i=x(e),s=!n,o=t;return s&&(n=t),i||(t=e),r}function l(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:X}function c(){for(var e={b:"",c:"",e:qt,f:Qt,g:"",h:zt,i:Vt,j:dt,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e
+ .d=/^[^,]+/.exec(t)[0],r="var i,x,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){x=l[i];"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){x=l[i+=''];"+e.g+"}}else {"),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(e.f&&e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+="x=l[i];"+e.g+""
+ ,e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+="x=l[i];"+e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){x=l[i];"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t",Function("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(l,bt,m,N,Yt,Lt,Et)}function h(e){return"\\"+
+ Zt[e]}function p(e){return un[e]}function d(){}function v(e){return an[e]}function m(e){return xt.call(e)==_t}function g(e){var t=i;if(!e||"object"!=typeof e||m(e))return t;var n=e.constructor;return(!$t||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!x(n)||n instanceof n)?Rt?(sn(e,function(e,n,r){return t=!bt.call(r,n),i}),t===i):(sn(e,function(e,n){t=n}),t===i||bt.call(e,t)):t}function y(e){var t=[];return on(e,function(e,n){t.push(n)}),t}function b(e,t,n,s,o){if(e==r)return e;n&&(t=
+ i);if(n=T(e)){var u=xt.call(e);if(!Gt[u]||Wt&&m(e))return e;var a=u==Dt,n=a||(u==jt?cn(e):n)}if(!n||!t)return n?a?St.call(e):rn({},e):e;n=e.constructor;switch(u){case Pt:case Ht:return new n(+e);case Bt:case It:return new n(e);case Ft:return n(e.source,ot.exec(e))}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?pn:on)(e,function(e,n){f[n]=b(e,t,r,s,o)}),f}function w(e){var t=[];return sn(e,function(e,n){x(e)&&t.push(n)}),t.sort()
+}function E(e){var t={};return on(e,function(e,n){t[e]=n}),t}function S(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=xt.call(e);if(u!=xt.call(t))return i;switch(u){case Pt:case Ht:return+e==+t;case Bt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Ft:case It:return e==t+""}var a=u==Dt||u==_t;if(Wt&&!a&&(a=m(e))&&!m(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=jt||$t&&("function"!=typeof e.toString&&"string"==typeof
+ (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+"")))return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!x(u)||!(u instanceof u&&x(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=S(e[l],t[l],s,o)););return f}for(var c in e)if(bt.call(e,c)&&(l++,!bt.call(t,c)||!S(e[c],t[c],s,o)))return i;for(c in t)if(bt.call(t,c)&&!(l--))return i;if(qt)for(;7>++u;)if(c=
+ dt[u],bt.call(e,c)&&(!bt.call(t,c)||!S(e[c],t[c],s,o)))return i;return n}function x(e){return"function"==typeof e}function T(e){return e?Yt[typeof e]:i}function N(e){return xt.call(e)==It}function C(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==Y&&(u=[],a=[],"number"!=typeof n&&(o=i.length));for(;++s<o;)on(i[s],function(t,n){var i,s,o;if(t&&((s=ln(t))||cn(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?ln(o)?o:[]:cn(o)?o:{}),e[n]=C(o,t,Y,u,a))}else t!=
+r&&(e[n]=t)});return e}function k(e){var t=[];return on(e,function(e){t.push(e)}),t}function L(e,t,n){var r=-1,s=e?e.length:0,o=i,n=(0>n?At(0,s+n):n)||0;return"number"==typeof s?o=-1<(N(e)?e.indexOf(t,n):q(e,t,n)):pn(e,function(e){if(++r>=n)return!(o=e===t)}),o}function A(e,t,r){var i=n,t=l(t,r);if(ln(e))for(var r=-1,s=e.length;++r<s&&(i=!!t(e[r],r,e)););else pn(e,function(e,n,r){return i=!!t(e,n,r)});return i}function O(e,t,n){var r=[],t=l(t,n);if(ln(e))for(var n=-1,i=e.length;++n<i;){var s=e[n]
+;t(s,n,e)&&r.push(s)}else pn(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function M(e,t,n){var r,t=l(t,n);return pn(e,function(e,n,s){if(t(e,n,s))return r=e,i}),r}function _(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=l(t,n);if(ln(e))for(;++r<i;)s[r]=t(e[r],r,e);else pn(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function D(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||!ln(e))t=!t&&N(e)?u:l(t,n),pn(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[
+ i]>o&&(o=e[i]);return o}function P(e,t){var n=[];return pn(e,function(e){n.push(e[t])}),n}function H(e,t,n,r){var s=3>arguments.length,t=l(t,r);return pn(e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function B(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=hn(e),o=a.length;else Vt&&N(e)&&(s=e.split(""));return pn(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function j(e,t,n){var r,t=l(t,n);if(ln(e))for(var n=-1,i=e.length;++n<i&&!(r=t(
+ e[n],n,e)););else pn(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function F(e,t,n){if(e)return t==r||n?e[0]:St.call(e,0,t)}function I(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];ln(s)?wt.apply(i,t?s:I(s)):i.push(s)}return i}function q(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?At(0,i+n):n||0)-1;else if(n)return r=U(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function R(e,t,n){return e?St.call(e,t==r||n?1:t):[]}function U(e,t,n,r){for(var i=0,s=
+ e?e.length:i,n=n?l(n,r):X,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function z(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=i);var f=!t&&74<o;if(f)var c={};n&&(a=[],n=l(n,r));for(;++s<o;){var r=e[s],h=n?n(r,s,e):r;f&&(a=bt.call(c,h+"")?c[h]:c[h]=[]);if(t?!s||a[a.length-1]!==h:0>q(a,h))(n||f)&&a.push(h),u.push(r)}return u}function W(e,t){return Kt||Tt&&2<arguments.length?Tt.call.apply(Tt,arguments):f(e,t,St.call(arguments,2))}function X(e){return e}function V
+(e){pn(w(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return wt.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,$="object"==typeof exports&&exports,J="object"==typeof global&&global;J.global===J&&(e=J);var K=[],Q=new function(){},G=0,Y=Q,Z=30,et=e._,tt=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,nt=/&(?:amp|lt|gt|quot|#x27);/g,rt=/\b__p\+='';/g,it=/\b(__p\+=)''\+/g,st=/(__e\(.*?\)|\b__t\))\+'';/g
+ ,ot=/\w*$/,ut=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,at=RegExp("^"+(Q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ft=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,lt=/<%=([\s\S]+?)%>/g,ct=/($^)/,ht=/[&<>"']/g,pt=/['\n\r\t\u2028\u2029\\]/g,dt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),vt=Math.ceil,mt=K.concat,gt=Math.floor,yt=at.test(yt=Object.getPrototypeOf)&&yt,bt=Q.hasOwnProperty,wt=K.push,Et=
+ Q.propertyIsEnumerable,St=K.slice,xt=Q.toString,Tt=at.test(Tt=St.bind)&&Tt,Nt=at.test(Nt=Array.isArray)&&Nt,Ct=e.isFinite,kt=e.isNaN,Lt=at.test(Lt=Object.keys)&&Lt,At=Math.max,Ot=Math.min,Mt=Math.random,_t="[object Arguments]",Dt="[object Array]",Pt="[object Boolean]",Ht="[object Date]",Bt="[object Number]",jt="[object Object]",Ft="[object RegExp]",It="[object String]",qt,Rt,Ut=(Ut={0:1,length:1},K.splice.call(Ut,0,1),Ut[0]),zt=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y
+ :1};for(var n in new e)t.push(n);for(n in arguments)zt=!n;qt=!/valueOf/.test(t),Rt="x"!=t[0]})(1);var Wt=!m(arguments),Xt="x"!=St.call("x")[0],Vt="xx"!="x"[0]+Object("x")[0];try{var $t=("[object Object]",xt.call(e.document||0)==jt)}catch(Jt){}var Kt=Tt&&/\n|Opera/.test(Tt+xt.call(e.opera)),Qt=Lt&&/^.+$|true/.test(Lt+!!e.attachEvent),Gt={};Gt[_t]=Gt["[object Function]"]=i,Gt[Dt]=Gt[Pt]=Gt[Ht]=Gt[Bt]=Gt[jt]=Gt[Ft]=Gt[It]=n;var Yt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},Zt=
+ {"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:lt,variable:""};var en={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=x",c:"}}"},tn={a:"d,c,w",k:"c=e(c,w)",b:"if(c(x,i,d)===false)return t",g:"if(c(x,i,d)===false)return t"},nn={b:r},rn=c(en);Wt&&(m=function(e){return e?bt.call(e,"callee"):i});var sn=c(tn,nn,{l:i}),on=c(tn,nn
+),un={"&":"&","<":"<",">":">",'"':""","'":"'"},an=E(un),fn=c(en,{g:"if(t[i]==null)"+en.g}),ln=Nt||function(e){return xt.call(e)==Dt};x(/x/)&&(x=function(e){return"[object Function]"==xt.call(e)});var cn=yt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=yt(t))&&yt(n);return n?e==n||yt(e)==n&&!m(e):g(e)}:g,hn=Lt?function(e){return"function"==typeof e&&Et.call(e,"prototype")?y(e):T(e)?Lt(e):[]}:y,pn=c(tn);s.VERSION="0.10.0",s.assign=rn,s
+ .after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=W,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=w(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=W(e[i],e)}return e},s.bindKey=function(e,t){return f(e,t,St.call(arguments,2))},s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=b,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=function(){var e=arguments;return function(){for(
+ var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=L,s.countBy=function(e,t,n){var r={},t=l(t,n);return pn(e,function(e,n,i){n=t(e,n,i),bt.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=fn,s.defer=function(e){var n=St.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=
+ function(e,n){var r=St.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},s.difference=function(e){for(var t=-1,n=e?e.length:0,r=mt.apply(K,arguments),r=o(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.escape=function(e){return e==r?"":(e+"").replace(ht,p)},s.every=A,s.filter=O,s.find=M,s.first=F,s.flatten=I,s.forEach=pn,s.forIn=sn,s.forOwn=on,s.functions=w,s.groupBy=function(e,t,n){var r={},t=l(t,n);return pn(e,function(e,n,i){n=t(e,n,i),(bt.call(r,n)?r[n]:r[n]=[]).push(e
+)}),r},s.has=function(e,t){return e?bt.call(e,t):i},s.identity=X,s.indexOf=q,s.initial=function(e,t,n){return e?St.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return pn(e,function(e){if(0>q(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=o(t[s])))(e))return;i.push(e)}}),i},s.invert=E,s.invoke=function(e,t){var n=St.call(arguments,2),r="function"==typeof t,i=[];return pn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=m,s.isArray=ln,s.isBoolean=
+ function(e){return e===n||e===i||xt.call(e)==Pt},s.isDate=function(e){return xt.call(e)==Ht},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=xt.call(e),s=e.length;return r==Dt||r==It||r==_t||Wt&&m(e)||r==jt&&"number"==typeof s&&x(e.splice)?!s:(on(e,function(){return t=i}),t)},s.isEqual=S,s.isFinite=function(e){return Ct(e)&&!kt(parseFloat(e))},s.isFunction=x,s.isNaN=function(e){return xt.call(e)==Bt&&e!=+e},s.isNull=function(e){return e===r},s
+ .isNumber=function(e){return xt.call(e)==Bt},s.isObject=T,s.isPlainObject=cn,s.isRegExp=function(e){return xt.call(e)==Ft},s.isString=N,s.isUndefined=function(e){return e===t},s.keys=hn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:St.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?At(0,r+n):Ot(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.map=_,s.max=D,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments
+):arguments[0];return bt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=C,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!ln(e))t=!t&&N(e)?u:l(t,n),pn(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=V,s.noConflict=function(){return e._=et,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=l(t,n);
+else var s=mt.apply(K,arguments);return sn(e,function(e,n,o){if(r?!t(e,n,o):0>q(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return on(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return f(e,St.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=mt.apply(K,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=l(t,n),sn(e,function(e,n,
+ i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=P,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+gt(Mt()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=At(0,vt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=H,s.reduceRight=B,s.reject=function(e,t,n){return t=l(t,n),O(e,function(e,n,r){return!t(e,n,r)})},s.rest=R,s.result=function(e,t){var n=e?e[t]:r;return x(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return pn
+(e,function(e){var r=gt(Mt()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:hn(e).length},s.some=j,s.sortBy=function(e,t,n){var r=[],t=l(t,n);pn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(a);e--;)r[e]=r[e].c;return r},s.sortedIndex=U,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=s.templateSettings,u=0,a=n.interpolate||o.interpolate||ct,f="__p += '",l=n.variable||o.variable,c=
+ l;e.replace(RegExp((n.escape||o.escape||ct).source+"|"+a.source+"|"+(a===lt?ft:ct).source+"|"+(n.evaluate||o.evaluate||ct).source+"|$","g"),function(t,n,i,s,o,a){i||(i=s),f+=e.slice(u,a).replace(pt,h),f+=n?"'+__e("+n+")+'":o?"';"+o+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=o||tt.test(n||i)),u=a+t.length}),f+="';",c||(l="obj",r?f="with("+l+"){"+f+"}":(n=RegExp("(\\(\\s*)"+l+"\\."+l+"\\b","g"),f=f.replace(ut,"$&"+l+".").replace(n,"$1__d"))),f=(r?f.replace(rt,""):f).replace(it,"$1").replace
+(st,"$1;"),f="function("+l+"){"+(c?"":l+"||("+l+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(c?"":",__d="+l+"."+l+"||"+l)+";")+f+"return __p}";try{i=Function("_","return "+f)(s)}catch(p){throw p.source=f,p}return t?i(t):(i.source=f,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.apply(o,i)
+):u||(u=setTimeout(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return e&&"number"==typeof e.length?(Xt?N(e):"string"==typeof e)?e.split(""):St.call(e):k(e)},s.unescape=function(e){return e==r?"":(e+"").replace(nt,v)},s.union=function(){return z(mt.apply(K,arguments))},s.uniq=z,s.uniqueId=function(e){var t=G++;return e?e+t:t},s.values=k,s.where=function(e,t){var n=hn(t);return O(e,function(e){for(var r=n.length;r--;){var i=
+ e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=o(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return wt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?D(P(arguments,"length")):0,r=Array(n);++t<n;)r[t]=P(arguments,t);return r},s.all=A,s.any=j,s.collect=_,s.detect=M,s.drop=R,s.each=pn,s.extend=rn,s.foldl=H,s.foldr=B,s.head=F,s.include=L,s.inject=H,s.methods=
+ w,s.select=O,s.tail=R,s.take=F,s.unique=z,V(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},pn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=K[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Ut&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),pn(["concat","join","slice"],function(e){var t=K[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__
+ ,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):$?"object"==typeof module&&module&&module.exports==$?(module.exports=s)._=s:$._=s:e._=s})(this);
\ No newline at end of file
--- /dev/null
+FLAG_ASYNC_INSTANTIATION = true
+FLAG_ASYNC_JOBS = true
+FLAG_REGION_ID_FROM_REMOTE = true
+CREATE_INSTANCE_TEST = false
+EMPTY_DRAWING_BOARD_TEST = false
+FLAG_ADVANCED_PORTS_FILTER = true
+FLAG_ADD_MSO_TESTAPI_FIELD = true
+FLAG_UNASSIGN_SERVICE = true
+FLAG_COLLECTION_RESOURCE_SUPPORT = true
+FLAG_NETWORK_TO_ASYNC_INSTANTIATION = true
+FLAG_SERVICE_MODEL_CACHE = true
+FLAG_SHOW_ASSIGNMENTS = true
+FLAG_SHOW_VERIFY_SERVICE=false
+FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD = false
--- /dev/null
+# features.properties
+# -------------------
+
+# This file is, generally, empty.
+
+# Configure `featureFlags.filename` in system.properties to use
+# one of the ready-made sets:
+
+# - featureFlags.filename = ci.features.properties
+# - featureFlags.filename = ist.features.properties
+# - featureFlags.filename = e2e.features.properties
CLOUD_REGION_ID : "cloudRegionID",
COMPONENT_STATUS : "ComponentStatus",
CREATE_COMPONENT : "createComponent",
+ IFRAME_DIALOG : "iframeDialog",
DELETE_RESUME_COMPONENT : "deleteResumeComponent",
DELETE:"Delete",
RESUME:"Resume",
MODEL_VERSION_1 : "1",
MSO_CREATE_REQ : "createInstance",
MSO_DELETE_REQ : "deleteInstance",
+ MSO_DELETE_CONFIGURATION_REQ : 'deleteConfiguration',
MSO_CHANGE_CONFIG_STATUS_REQ: "changeConfigurationStatus",
MSO_CHANGE_PORT_STATUS_REQ: "changePortStatus",
MSO_CREATE_ENVIRONMENT: "createEnvironmentInstance",
VNF_TYPE : "vnfType",
VOLUME_GROUP : "volumeGroup",
IS_PERMITTED: "is-permitted",
- RESUME_STATUS: "PendingActivation",
PNF : "pnf",
// IDs
CIDR_MASK_1 : "255.255.255.000",
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_PORT_MIRRORING_CONFIGS_DATA : "aai_getPortMirroringConfigsData",
+ AAI_GET_PORT_MIRRORING_SOURCE_PORTS : "aai_getPortMirroringSourcePorts",
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_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_CR_INSTANCE: "aai_get_network_collection_details",
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/",
WORKFLOW: "workflow",
GET_TIME_SLOTS:"get_time_slots",
SUBMIT_VNF_CHANGE_TIMESLOTS:"submit_vnf_change_timeslots",
+ AAI_GET_INSTANCE_GROUPS_BY_VNF_INSTANCE_ID_PATH: 'aai_get_instance_groups_by_vnf_instance_id',
FORWARD_SLASH : "/",
GET_SYSTEM_PROP_VNF_PROV_STATUS_PATH : "get_system_prop_vnf_prov_status",
SERVICES_PATH : "rest/models/services/",
SERVICETYPE_SUB_PATH : "&serviceType=",
SERVICEINSTANCEID_SUB_PATH : "&serviceInstanceId=",
+ MODELVERSIONID_SUB_PATH : "&aaiModelVersionId=",
SERVICEMODELS_INSTANCES_SERVICES_PATH : "serviceModels.htm#/instances/services",
SERVICEMODELS_MODELS_SERVICES_PATH : "serviceModels.htm#/models/services",
SUBDETAILS_SELECTEDSUBSCRIBER : "#subdetails?selectedSubscriber=",
SUBSCRIBERNAME_SUB_PATH : "&subscriberName=",
WELCOME_PATH : "welcome.htm",
IS_PERMITTED_SUB_PATH: "&isPermitted=",
+ SERVICE_POPUP_IFRAME_URL: "app/ui/#/servicePopup?serviceModelId=",
+ SUB_INTERFACE_POPUP_IFRAME_URL: "app/ui/#/vlan?",
+ VERIFY_SERVICE_URL: "rest/models/services/verifyService",
- //Test Environment Urls:
+ //Test Environment Urls:
OPERATIONAL_ENVIRONMENT_CREATE : "operationalEnvironment/create",
OPERATIONAL_ENVIRONMENT_DEACTIVATE : "operationalEnvironment/deactivate?operationalEnvironment=",
OPERATIONAL_ENVIRONMENT_ACTIVATE : "operationalEnvironment/activate?operationalEnvironment=",
INSTANTIATE_URL : "app/vid/scripts/view-models/instantiate.htm",
SERVICE_MODELS : "app/vid/scripts/view-models/serviceModels.htm",
-
+ ACTIVATE_SERVICE_STATUSES: ['created', 'pendingdelete', 'pending-delete', 'assigned'],
FULL_NAME_MAP : {
"model-invariant-id" : "Model ID",
update: "update",
replace: "replace",
vnfScaleOut: "VNF Scale Out"
- }
+ },
+
+ FEATURE_FLAGS:{
+ FLAG_ASYNC_INSTANTIATION : "FLAG_ASYNC_INSTANTIATION",
+ FLAG_VLAN_TAGGING_VIEW_EDIT: "FLAG_VLAN_TAGGING_VIEW_EDIT",
+ FLAG_NETWORK_TO_ASYNC_INSTANTIATION : "FLAG_NETWORK_TO_ASYNC_INSTANTIATION",
+ FLAG_REGION_ID_FROM_REMOTE : "FLAG_REGION_ID_FROM_REMOTE",
+ FLAG_ADD_MSO_TESTAPI_FIELD : "FLAG_ADD_MSO_TESTAPI_FIELD",
+ FLAG_COLLECTION_RESOURCE_SUPPORT : "FLAG_COLLECTION_RESOURCE_SUPPORT",
+ FLAG_SHOW_ASSIGNMENTS: "FLAG_SHOW_ASSIGNMENTS",
+ FLAG_SHOW_VERIFY_SERVICE: "FLAG_SHOW_VERIFY_SERVICE"
+ }
};
-})())
+})());
VF_MODULES: "vfModules",\r
VF_MODULE_ID: "vf-module-id",\r
VF_MODULE_NAME: "vf-module-name",\r
+ VF_MODULE_MODEL_CUSTOMIZATION_ID: "vf-module-model-customization-id",\r
+ VF_MODULE_MODEL_VERSION_ID: "vf-module-model-version-id",\r
VID: "VID",\r
VNF_ID: "vnf-id",\r
VNF_NAME: "vnf-name",\r
CONFIGURATION_NAME: "configuration-name",\r
CONFIGURATION_TYPE: "configuration-type",\r
CONFIGURATION_ID: "configuration-id",\r
- PORT: "l-interface",\r
- PORT_ID: "interface-id",\r
- PORT_NAME: "interface-name",\r
- PORT_MIRRORED: "is-port-mirrored"\r
+ PORT_ID: "interfaceId",\r
+ PORT_NAME: "interfaceName",\r
+ PORT_MIRRORED: "isPortMirrored"\r
};\r
\r
var KEY = {\r
AAI_ACTIVE: "Active",\r
AAI_INACTIVE: "Inactive",\r
AAI_CREATED: "Created",\r
+ AAI_DELETE: "Deleted",\r
AAI_ENABLED: "Enabled",\r
AAI_DISABLED: "Disabled"\r
};\r
/*\r
* Max number of times that VID will poll MSO for a given request status\r
*/\r
- var MSO_MAX_POLLS = 10;\r
+ var MSO_MAX_POLLS = 1440;\r
/*\r
* Number of msecs that VID will wait between MSO polls.\r
*/\r
- var MSO_POLLING_INTERVAL_MSECS = 10000;\r
+ var MSO_POLLING_INTERVAL_MSECS = 200;\r
\r
var SCHEDULER_POLLING_INTERVAL_MSECS = 10000;\r
\r
\r
var SCALE_OUT_CONTROLLERS = ["", "SDNC", "APPC"];\r
\r
+ var SDNC_SHOW_ASSIGNMENTS_URL = "https://sdnc.api.simpledemo.onap.org:8448/configAdapter/index#/resource_manager/<SERVICE_INSTANCE_ID>";\r
+ \r
return {\r
ASDC_MODEL_STATUS : ASDC_MODEL_STATUS,\r
MSO_MAX_POLLS : MSO_MAX_POLLS,\r
COMPONENT_LIST_NAMED_QUERY_ID : COMPONENT_LIST_NAMED_QUERY_ID,\r
SCHEDULER_CALLBACK_URL: SCHEDULER_CALLBACK_URL,\r
SCHEDULER_PORTAL_URL: SCHEDULER_PORTAL_URL,\r
+ SDNC_SHOW_ASSIGNMENTS_URL: SDNC_SHOW_ASSIGNMENTS_URL,\r
SCALE_OUT_CONTROLLERS: SCALE_OUT_CONTROLLERS\r
};\r
})())\r
* deployable objects (Services, VNFs, VF-Modules, Networks, and Volume-Groups)\r
*/\r
(function () {\r
- "use strict";\r
+ "use strict";\r
\r
- appDS2.requires.push('ui.tree');\r
+ appDS2.requires.push('ui.tree');\r
\r
- appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService, AaiService,PnfService, $q) {\r
-\r
- $scope.popup = new Object();\r
- $scope.defaultBaseUrl = "";\r
- $scope.responseTimeoutMsec = 60000;\r
- $scope.properties = UtilityService.getProperties();\r
+ appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService, AaiService, PnfService, CrService, AsdcService, $q, featureFlags, _, CreationService, $window) {\r
+ $scope.popup = new Object();\r
+ $scope.defaultBaseUrl = "";\r
+ $scope.responseTimeoutMsec = 60000;\r
+ $scope.properties = UtilityService.getProperties();\r
$scope.resumeStatus = COMPONENT.RESUME_STATUS;\r
//isPermitted - returned as string from url and converted into boolean\r
- $scope.isPermitted = $location.search().isPermitted == "true";\r
- $scope.STATUS_CONSTANTS = FIELD.STATUS;\r
+ $scope.isPermitted = $location.search().isPermitted == "true";\r
+ $scope.STATUS_CONSTANTS = FIELD.STATUS;\r
$scope.pnfs = [];// PNF data init;\r
-\r
- $scope.init = function() {\r
+ $scope.collectionResource = {};\r
+ $scope.collections = [];\r
+ $scope.networks = [];\r
+ $scope.isCR = false;\r
+ $scope.isVFC = false;\r
+ $scope.init = function () {\r
/*\r
* These 2 statements should be included in non-test code.\r
*/\r
- // takes a default value, retrieves the prop value from the file system and sets it\r
- var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec();\r
- PropertyService.setMsoMaxPollingIntervalMsec(msecs);\r
- \r
- // takes a default value, retrieves the prop value from the file system and sets it\r
- var polls = PropertyService.retrieveMsoMaxPolls();\r
- PropertyService.setMsoMaxPolls(polls);\r
- \r
- PropertyService.setServerResponseTimeoutMsec(30000);\r
+ // takes a default value, retrieves the prop value from the file system and sets it\r
+ var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec();\r
+ PropertyService.setMsoMaxPollingIntervalMsec(msecs);\r
+\r
+ // takes a default value, retrieves the prop value from the file system and sets it\r
+ var polls = PropertyService.retrieveMsoMaxPolls();\r
+ PropertyService.setMsoMaxPolls(polls);\r
+\r
+ PropertyService.setServerResponseTimeoutMsec(30000);\r
\r
/*\r
* Common parameters that shows an example of how the view edit screen\r
\r
//PropertyService.setMsoBaseUrl("testmso");\r
\r
- $scope.convertModel = function(asdcModel) {\r
- if (!asdcModel) return undefined;\r
- var convertedAsdcModel = UtilityService.convertModel(asdcModel);\r
- return convertedAsdcModel;\r
- };\r
- \r
- $scope.service = {\r
- "model": vidService.getModel(),\r
- "convertedModel": $scope.convertModel(vidService.getModel()),\r
- "instance": vidService.getInstance()\r
- };\r
+ $scope.convertModel = function (asdcModel) {\r
+ if (!asdcModel) return undefined;\r
+ var convertedAsdcModel = UtilityService.convertModel(asdcModel);\r
+ return convertedAsdcModel;\r
+ };\r
+\r
+ $scope.prepareScopeWithModel = function () {\r
+ // skip if no model\r
+ if (!vidService.getModel()) return;\r
\r
- preparePnfs();\r
+ $scope.service = {\r
+ "model": vidService.getModel(),\r
+ "convertedModel": $scope.convertModel(vidService.getModel()),\r
+ "instance": vidService.getInstance()\r
+ };\r
\r
\r
- function preparePnfs(){\r
- var serviceInstance = {\r
+ $scope.isCR = !_.isEmpty($scope.service.model.collectionResource) && featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_COLLECTION_RESOURCE_SUPPORT);\r
+ if ($scope.isCR)\r
+ prepareCr();\r
+ else\r
+ preparePnfs();\r
+ };\r
+\r
+ function preparePnfs() {\r
+ var serviceInstance = {\r
globalCustomerId: $location.search().subscriberId,\r
serviceType: $location.search().serviceType,\r
serviceInstanceId: $location.search().serviceInstanceId\r
- };\r
+ };\r
\r
- _setPnf(serviceInstance).then(function(data){\r
+ _setPnf(serviceInstance).then(function (data) {\r
$scope.pnfs = data;\r
});\r
- }\r
-\r
-\r
- $scope.returnVfModules = function (vnfInstance) {\r
- \r
- var svcModel = $scope.service.convertedModel;\r
- //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];\r
- var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
- var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- var vnfModel = null;\r
- \r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {\r
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
- if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) ) {\r
- //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));\r
- return (vnfModel.vfModules);\r
- }\r
- }\r
- else {\r
- // old flow\r
- if ( vnfModelVersionId != null ) {\r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
- if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) ) {\r
- //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));\r
- return (vnfModel.vfModules);\r
- }\r
- }\r
- }\r
- \r
- }\r
- return null;\r
- }\r
- $scope.hasVfModules = function (vnfInstance) {\r
- if ($scope.returnVfModules(vnfInstance) != null ){\r
- return true;\r
- }\r
- return false;\r
- }\r
- $scope.returnVolumeGroups = function (vnfInstance) {\r
- \r
- var svcModel = $scope.service.convertedModel;\r
-\r
- //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];\r
- var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID];\r
- var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
- var vnfModel = null;\r
- \r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {\r
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
- if ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) {\r
- //console.log ("vnfModel.volumeGroups: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));\r
- return (vnfModel.volumeGroups);\r
- }\r
- }\r
- else {\r
- // old flow\r
- if ( vnfModelVersionId != null ) {\r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
- if ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) {\r
- //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));\r
- return (vnfModel.volumeGroups);\r
- }\r
- }\r
- }\r
- \r
- }\r
- return null;\r
- }\r
- $scope.hasVolumeGroups = function (vnfInstance) {\r
- if ($scope.returnVolumeGroups(vnfInstance) != null ){\r
- return true;\r
- }\r
- return false;\r
- }\r
- $scope.deleteNetwork = function(serviceObject, network) {\r
-\r
- console.log("Removing Network " + network.name);\r
-\r
- //Send delete network request to MSO\r
-\r
- //var networks = this.service.instance.networks;\r
-\r
- //networks.splice(networks.indexOf(network), 1);\r
-\r
- //Retrieve updated data from A&AI\r
- var serviceInstance = serviceObject.object;\r
- var svcModel = $scope.service.convertedModel;\r
- var netModel;\r
- DataService.setInventoryItem(network.object);\r
- // set model default and override later if found\r
- DataService.setModelInfo(COMPONENT.NETWORK, {});\r
- \r
- if ( network.object != null ) {\r
- \r
- //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];\r
- var netModelVersionId = network.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
- var netModelCustomizationUuid = network.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.networks) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (UtilityService.hasContents(netModelCustomizationUuid) ) ) {\r
- netModel = svcModel.networks[netModelCustomizationUuid];\r
- }\r
- else {\r
- \r
- if ( UtilityService.hasContents(netModelVersionId) ) {\r
- netModel = svcModel.networks[netModelVersionId];\r
- }\r
- \r
- }\r
- }\r
- }\r
- if (!($scope.isObjectEmpty(netModel) ) ) {\r
- DataService.setModelInfo(COMPONENT.NETWORK, {\r
- "modelInvariantId": netModel.invariantUuid,\r
- "modelVersion": netModel.version,\r
- "modelNameVersionId": netModel.uuid,\r
- "modelCustomizationName": netModel.modelCustomizationName,\r
- "customizationUuid": netModel.customizationUuid,\r
- "modelName": netModel.name,\r
- "inputs": ""\r
- });\r
- }\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- DataService.setServiceName($scope.service.model.service.name);\r
- DataService.setServiceUuid($scope.service.model.service.uuid);\r
- DataService.setNetworkInstanceId(network.object[FIELD.ID.NETWORK_ID]);\r
- \r
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
- componentId : COMPONENT.NETWORK,\r
- callbackFunction : deleteOrResumeCallback,\r
- dialogMethod: COMPONENT.DELETE\r
- });\r
- };\r
-\r
- $scope.deleteService = function(serviceObject) {\r
-\r
- var serviceInstance = serviceObject.object;\r
- \r
- console.log("Removing Service " + $scope.service.instance.name);\r
-\r
- if ( $scope.isMacro() ) {\r
- DataService.setALaCarte (false);\r
- }\r
- else {\r
- DataService.setALaCarte (true);\r
- }\r
- DataService.setMacro($scope.isMacro());\r
- DataService.setInventoryItem(serviceInstance);\r
- setCurrentServiceModelInfoFromScope();\r
-\r
- \r
- DataService.setSubscriberName(serviceObject[FIELD.ID.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- DataService.setGlobalCustomerId(serviceObject[COMPONENT.GLOBAL_CUSTOMER_ID]);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- \r
- DataService.setServiceName($scope.service.model.service.name);\r
- \r
- DataService.setServiceUuid($scope.service.model.service.uuid);\r
- \r
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
- componentId : COMPONENT.SERVICE,\r
- callbackFunction : deleteServiceInstanceCallbackFunction,\r
- dialogMethod: COMPONENT.DELETE\r
- });\r
- \r
- };\r
+ }\r
\r
- function populate_popup_vfModule(serviceObject, vfModule, vnf){\r
- var serviceInstance = serviceObject.object;\r
\r
- DataService.setInventoryItem(vfModule.object);\r
+ function prepareCr() {\r
+ var serviceInstance = {\r
+ globalCustomerId: $location.search().subscriberId,\r
+ serviceType: $location.search().serviceType,\r
+ serviceInstanceId: $location.search().serviceInstanceId\r
+ };\r
\r
- var svcModel = $scope.service.convertedModel;\r
+ _setCr(serviceInstance).then(function (data) {\r
+ $scope.collectionResource = data;\r
+ $scope.collections.push($scope.collectionResource.collection);\r
+ $scope.networks.push($scope.collectionResource.networks[0]);\r
+ });\r
+ }\r
\r
- //var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
- var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
- var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];;\r
- var vfModuleInstanceID = vfModule.object[FIELD.ID.VF_MODULE_ID];\r
- if (vfModuleInstanceID == null) {\r
- vfModuleInstanceID = "";\r
- }\r
+ $scope.returnVfModules = function (vnfInstance) {\r
\r
- var vnfModel = null;\r
- var vfModuleModel = null;\r
+ var svcModel = $scope.service.convertedModel;\r
+ //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];\r
+ var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
+ var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
\r
- DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
- "modelInvariantId": "",\r
- "modelVersion": "",\r
- "modelNameVersionId": "",\r
- "modelCustomizationName": "",\r
- "customizationUuid": "",\r
- "modelName": "",\r
- "inputs": ""\r
- });\r
+ var vnfModel = null;\r
\r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ if (vnfModel !== undefined) {\r
+ if (!($scope.isObjectEmpty(vnfModel.vfModules))) {\r
+ //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));\r
+ return (vnfModel.vfModules);\r
+ }\r
+ }\r
+ }\r
+ else {\r
+ // old flow\r
+ if (vnfModelVersionId != null) {\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ if (vnfModel !== undefined) {\r
+ if (!($scope.isObjectEmpty(vnfModel.vfModules))) {\r
+ //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));\r
+ return (vnfModel.vfModules);\r
+ }\r
+ }\r
+ }\r
+ }\r
\r
- var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- if ( !($scope.isObjectEmpty(vnfModel.vfModules) ) && UtilityService.hasContents(vfModuleCustomizationUuid) ) {\r
+ }\r
+ return null;\r
+ }\r
+ $scope.hasVfModules = function (vnfInstance) {\r
+ if ($scope.returnVfModules(vnfInstance) != null) {\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+ $scope.returnVolumeGroups = function (vnfInstance) {\r
\r
- vfModuleModel = vnfModel.vfModules[vfModuleCustomizationUuid];\r
+ var svcModel = $scope.service.convertedModel;\r
+\r
+ //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];\r
+ var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID];\r
+ var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
\r
+ var vnfModel = null;\r
+\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ if (vnfModel !== undefined) {\r
+\r
+ if (!($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
+ //console.log ("vnfModel.volumeGroups: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));\r
+ return (vnfModel.volumeGroups);\r
+ }\r
}\r
}\r
else {\r
// old flow\r
- if (vnfModelVersionId != null ) {\r
+ if (vnfModelVersionId != null) {\r
vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ if (!($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
+ //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));\r
+ return (vnfModel.volumeGroups);\r
+ }\r
}\r
- //var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID];\r
- var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];\r
- if ( (!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.vfModules))) &&\r
- UtilityService.hasContents(vfModuleModelVersionId) ) {\r
- vfModuleModel = vnfModel.vfModules[vfModuleModelVersionId];\r
- }\r
- }\r
- if ( !($scope.isObjectEmpty(vfModuleModel)) ) {\r
- DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
- "modelInvariantId": vfModuleModel.invariantUuid,\r
- "modelVersion": vfModuleModel.version,\r
- "modelNameVersionId": vfModuleModel.uuid,\r
- "modelCustomizationName": vfModuleModel.modelCustomizationName,\r
- "customizationUuid": vfModuleModel.customizationUuid,\r
- "modelName": vfModuleModel.name,\r
- "inputs": ""\r
- });\r
}\r
+\r
+ }\r
+ return null;\r
+ }\r
+ $scope.hasVolumeGroups = function (vnfInstance) {\r
+ if ($scope.returnVolumeGroups(vnfInstance) != null) {\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+ $scope.deleteNetwork = function (serviceObject, network) {\r
+\r
+ console.log("Removing Network " + network.name);\r
+\r
+ //Send delete network request to MSO\r
+\r
+ //var networks = this.service.instance.networks;\r
+\r
+ //networks.splice(networks.indexOf(network), 1);\r
+\r
+ //Retrieve updated data from A&AI\r
+ var serviceInstance = serviceObject.object;\r
+\r
+ setCurrentNetworkModelInfoFromScope(network);\r
+\r
+ DataService.setInventoryItem(network.object);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+ DataService.setServiceUuid($scope.service.model.service.uuid);\r
+ DataService.setNetworkInstanceId(network.object[FIELD.ID.NETWORK_ID]);\r
+\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.NETWORK,\r
+ callbackFunction: deleteOrResumeCallback,\r
+ dialogMethod: COMPONENT.DELETE\r
+ });\r
+ };\r
+\r
+ $scope.deleteService = function (serviceObject, serviceOrchestrationStatus) {\r
+\r
+ var serviceInstance = serviceObject.object;\r
+\r
+ console.log("Removing Service " + $scope.service.instance.name);\r
+\r
+ if ($scope.isMacro()) {\r
+ DataService.setALaCarte(false);\r
+ }\r
+ else {\r
+ DataService.setALaCarte(true);\r
+ }\r
+ DataService.setMacro($scope.isMacro());\r
+ DataService.setInventoryItem(serviceInstance);\r
+ setCurrentServiceModelInfoFromScope();\r
+\r
+\r
+ DataService.setSubscriberName(serviceObject[FIELD.ID.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ DataService.setGlobalCustomerId(serviceObject[COMPONENT.GLOBAL_CUSTOMER_ID]);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+\r
+ DataService.setServiceUuid($scope.service.model.service.uuid);\r
+\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.SERVICE,\r
+ callbackFunction: deleteServiceInstanceCallbackFunction,\r
+ dialogMethod: COMPONENT.DELETE,\r
+ serviceStatus: serviceOrchestrationStatus\r
+ });\r
+\r
+ };\r
+\r
+ function populate_popup_vfModule(serviceObject, vfModule, vnf) {\r
+ var serviceInstance = serviceObject.object;\r
+\r
+ DataService.setInventoryItem(vfModule.object);\r
+\r
+ setCurrentVfModuleModelInfoFromScope(vnf, vfModule);\r
+ var vfModuleInstanceID = vfModule.object[FIELD.ID.VF_MODULE_ID];\r
+ if (vfModuleInstanceID == null) {\r
+ vfModuleInstanceID = "";\r
}\r
\r
DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
DataService.setServiceName($scope.service.model.service.name);\r
\r
DataService.setServiceUuid($scope.service.model.service.uuid);\r
- }\r
+ }\r
\r
- $scope.deleteVfModule = function(serviceObject, vfModule, vnf) {\r
+ $scope.deleteVfModule = function (serviceObject, vfModule, vnf) {\r
\r
- console.log("Removing VF-Module " + vfModule.name);\r
+ console.log("Removing VF-Module " + vfModule.name);\r
\r
populate_popup_vfModule(serviceObject, vfModule, vnf);\r
- \r
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
- componentId : COMPONENT.VF_MODULE,\r
- callbackFunction : deleteOrResumeCallback,\r
+\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.VF_MODULE,\r
+ callbackFunction: deleteOrResumeCallback,\r
dialogMethod: COMPONENT.DELETE\r
- });\r
- \r
- return;\r
+ });\r
+\r
+ return;\r
\r
- };\r
+ };\r
\r
- function setCurrentServiceModelInfoFromScope(){\r
+ function setCurrentServiceModelInfoFromScope() {\r
DataService.setModelInfo(COMPONENT.SERVICE, {\r
"modelInvariantId": $scope.service.model.service.invariantUuid,\r
"modelVersion": $scope.service.model.service.version,\r
"modelName": $scope.service.model.service.name,\r
"inputs": ""\r
});\r
- };\r
+ };\r
\r
- function setCurrentVNFModelInfo(vnf){\r
+ function setCurrentVNFModelInfo(vnf) {\r
var svcModel = $scope.service.convertedModel;\r
var vnfModel;\r
var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {\r
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
}\r
else {\r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
}\r
- if ( !($scope.isObjectEmpty(vnfModel) ) ) {\r
+ if (!($scope.isObjectEmpty(vnfModel))) {\r
\r
DataService.setModelInfo(COMPONENT.VNF, {\r
"modelInvariantId": vnfModel.invariantUuid,\r
}\r
\r
\r
+ }\r
\r
- }\r
-\r
- $scope.deleteVnf = function(serviceObject, vnf) {\r
- console.log("Removing VNF " + vnf.name);\r
- \r
- var serviceInstance = serviceObject.object;\r
- var svcModel = $scope.service.convertedModel;\r
- DataService.setInventoryItem(vnf.object);\r
- \r
- /*var vnftype = vnf.object['vnf-type'];\r
- if (vnftype == null)\r
- vnftype = "";\r
- else\r
- {\r
- var n = vnftype.search("/");\r
- if (n >= 0)\r
- vnftype = vnftype.substring(n+1);\r
- }*/\r
- \r
- var svcModel = $scope.service.convertedModel;\r
- var vnfModelInvariantUuid = null;\r
- var vnfModelVersion = null;\r
- var vnfModelCustomizationUuid = null;\r
- var vnfModel = null;\r
- var vnfModelVersionId = null;\r
- \r
- vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
- vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
- vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- DataService.setModelInfo(COMPONENT.VNF, {\r
- "modelInvariantId": vnfModelInvariantUuid,\r
- "modelVersion": "",\r
- "modelNameVersionId": vnfModelVersionId,\r
- "modelCustomizationName": "",\r
- "customizationUuid": vnfModelCustomizationUuid,\r
- "modelName": "",\r
- "inputs": ""\r
- });\r
- \r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {\r
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
- }\r
- else {\r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
- }\r
- //console.log ( "vnf models: "); console.log ( JSON.stringify ($scope.service.convertedModel.vnfs, null, 4) );\r
- if ( !($scope.isObjectEmpty(vnfModel) ) ) {\r
- \r
- DataService.setModelInfo(COMPONENT.VNF, {\r
- "modelInvariantId": vnfModel.invariantUuid,\r
- "modelVersion": vnfModel.version,\r
- "modelNameVersionId": vnfModel.uuid,\r
- "modelCustomizationName": vnfModel.modelCustomizationName,\r
- "customizationUuid": vnfModel.customizationUuid,\r
- "modelName": vnfModel.name,\r
- "inputs": ""\r
- });\r
- }\r
- } \r
- \r
- DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- \r
- DataService.setServiceName($scope.service.model.service.name);\r
- \r
- DataService.setServiceUuid($scope.service.model.service.uuid);\r
- \r
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
- componentId : COMPONENT.VNF,\r
- callbackFunction : deleteOrResumeCallback,\r
- dialogMethod: COMPONENT.DELETE\r
- });\r
- \r
- };\r
- \r
- \r
-\r
- $scope.deleteVolumeGroup = function(serviceObject, vnf, vfModule, volumeGroup) {\r
-\r
- console.log("Removing Volume Group " + volumeGroup.name);\r
- var haveModel = false;\r
- var svcModel = $scope.service.convertedModel;\r
- \r
- var vnfModelInvariantUuid = null;\r
- var vnfModelVersion = null;\r
- var vnfModelCustomizationUuid = null;\r
- var vnfModel = null;\r
- var vnfModelVersionId = null;\r
- \r
- vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
- vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
- vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
- "modelInvariantId": "",\r
- "modelVersion": "",\r
- "modelNameVersionId": "",\r
- "modelCustomizationName": "",\r
- "customizationUuid": "",\r
- "modelName": "",\r
- "inputs": ""\r
- });\r
- \r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (vnfModelCustomizationUuid != null ) ) {\r
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
- }\r
- else {\r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
- }\r
- }\r
- \r
- \r
- // volume groups don't have model-invariant-id/version in a&ai.\r
- // Their model-invariant-id/version is the one for the associated vfModule\r
- \r
- var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID];\r
- var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];\r
- var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- var volGroupModel = null;\r
- \r
- if ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) {\r
- if ( ( !($scope.isObjectEmpty(vnfModel) ) ) && ( !($scope.isObjectEmpty(vnfModel.volumeGroups) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid) ) ){\r
- volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid];\r
- }\r
- else {\r
- volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId];\r
- }\r
- if ( !($scope.isObjectEmpty(volGroupModel) ) ) {\r
- DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
- "modelInvariantId": volGroupModel.invariantUuid,\r
- "modelVersion": volGroupModel.version,\r
- "modelNameVersionId": volGroupModel.uuid,\r
- "modelCustomizationName": volGroupModel.modelCustomizationName,\r
- "customizationUuid": volGroupModel.customizationUuid,\r
- "modelName": volGroupModel.name,\r
- "inputs": ""\r
- });\r
- \r
- }\r
- }\r
- }\r
-\r
- var serviceInstance = serviceObject.object;\r
- \r
- DataService.setInventoryItem(volumeGroup.object);\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- \r
- DataService.setServiceName($scope.service.model.service.name);\r
- \r
- DataService.setServiceUuid($scope.service.model.service.uuid);\r
- DataService.setVnfInstanceId(vnf.nodeId);\r
- DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);\r
- \r
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
- componentId : COMPONENT.VOLUME_GROUP,\r
- dialogMethod: COMPONENT.DELETE\r
- });\r
- };\r
- \r
- $scope.deleteVnfVolumeGroup = function(serviceObject, vnf, volumeGroup) {\r
-\r
- console.log("Removing Volume Group " + volumeGroup.name);\r
- var serviceInstance = serviceObject.object;\r
- \r
- DataService.setInventoryItem(volumeGroup.object);\r
- \r
- var svcModel = $scope.service.convertedModel;\r
- \r
- var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
- var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
- var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- var volGroupModelInvariantUuid = volumeGroup.object[FIELD.ID.MODEL_INVAR_ID];\r
- var volGroupModelVersionId = volumeGroup.object[FIELD.ID.MODEL_VERSION_ID];\r
- var volGroupModelCustomizationUuid = volumeGroup.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- var vnfModel = null;\r
- var volGroupModel = null;\r
- \r
- // send an empty model by default since model is not required for deletes\r
- DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {});\r
-\r
- if ( svcModel.isNewFlow ) {\r
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
- if ( UtilityService.hasContents (volGroupModelCustomizationUuid) ) {\r
- volGroupModel = vnfModel.volumeGroups[volGroupModelCustomizationUuid];\r
- }\r
- }\r
- else {\r
- \r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
- if ( UtilityService.hasContents (volGroupModelVersionId) ) {\r
- volGroupModel = vnfModel.volumeGroups[volGroupModelVersionId];\r
- }\r
- }\r
- if ( !($scope.isObjectEmpty(volGroupModel) ) ) {\r
- DataService.setModelInfo(COMPONENT.VOLUME_GROUP, { \r
- "modelInvariantId": volGroupModel.invariantUuid,\r
- "modelVersion": volGroupModel.version,\r
- "modelNameVersionId": volGroupModel.uuid,\r
- "modelName": volGroupModel.name,\r
- "modelCustomizationName": volGroupModel.modelCustomizationName,\r
- "customizationUuid": volGroupModel.customizationUuid,\r
- "inputs": ""\r
- });\r
- }\r
- \r
- DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- \r
- DataService.setServiceName($scope.service.model.service.name);\r
- \r
- DataService.setServiceUuid($scope.service.model.service.uuid);\r
- DataService.setVnfInstanceId(vnf.nodeId);\r
- DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);\r
- \r
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
- componentId : COMPONENT.VOLUME_GROUP,\r
- callbackFunction : deleteOrResumeCallback,\r
- dialogMethod: COMPONENT.DELETE\r
- });\r
- };\r
-\r
- $scope.describeNetwork = function(serviceObject, networkObject) {\r
- var serviceInstance = serviceObject.object;\r
- var network = networkObject.object;\r
- //console.log ("networkObject="); console.log (JSON.stringify(networkObject, null, 4));\r
- \r
- DataService.setResCustomizationUuid(" ");\r
- \r
- var svcModel = $scope.service.convertedModel;\r
- var netModel = null;\r
- \r
- if ( !($scope.isObjectEmpty(network) ) ) {\r
- \r
- var netModelInvariantUuid = network[FIELD.ID.MODEL_INVAR_ID];\r
- var netModelVersionId = network[FIELD.ID.MODEL_VERSION_ID];\r
- var netModelCustomizationUuid = network[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- if ( UtilityService.hasContents (netModelCustomizationUuid) ) {\r
- // set it to what came from a&ai \r
- DataService.setResCustomizationUuid(netModelCustomizationUuid);\r
- }\r
- \r
- if ( (!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.networks))) ) {\r
- if ( svcModel.isNewFlow ) {\r
- netModel = svcModel.networks[netModelCustomizationUuid];\r
- }\r
- else {\r
- netModel = svcModel.networks[netModelVersionId];\r
- }\r
- /*\r
- * The details pop-up should use a&ai info\r
- * if ( !($scope.isObjectEmpty(netModel) ) ) {\r
- if (UtilityService.hasContents(netModel.customizationUuid)) {\r
- DataService.setResCustomizationUuid(netModel.customizationUuid);\r
- }\r
- }*/\r
- }\r
- }\r
- \r
- DataService.setNetworkInstanceId(network[FIELD.ID.NETWORK_ID]);\r
- DataService.setInventoryItem(networkObject);\r
- DataService.setSubscriberName(serviceObject.subscriberName);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
- componentId : COMPONENT.NETWORK\r
- });\r
- };\r
-\r
- // for service instance id - no need for this!\r
- $scope.describeService = function(serviceObject) {\r
- var serviceInstance = serviceObject.object;\r
- \r
- DataService.setInventoryItem(serviceInstance);\r
- //DataService.setModelInfo(serviceInstance['service-instance-id'], serviceInstance);\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- //Display popup with additional service information\r
- $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
- componentId : COMPONENT.SERVICE\r
- });\r
- \r
- };\r
-\r
- $scope.describeVfModule = function(serviceObject, vfModuleObject, vnf) {\r
- var serviceInstance = serviceObject.object;\r
- var vfModule = vfModuleObject.object;\r
- \r
- /*var vfModuleInvariantUuid = vfModule[FIELD.ID.MODEL_INVAR_ID];\r
- var vfModuleModelVersionId = vfModule[FIELD.ID.MODEL_VERSION_ID];*/\r
- var vfModuleCustomizationUuid = vfModule[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
- DataService.setCustomizationUuid(" ");\r
- if ( UtilityService.hasContents (vfModuleCustomizationUuid) ) {\r
- DataService.setCustomizationUuid(vfModuleCustomizationUuid);\r
- }\r
- \r
- //Display popup with additional VF-Module information\r
- DataService.setVfModuleInstanceId(vfModule[FIELD.ID.VF_MODULE_ID]);\r
- DataService.setInventoryItem(vfModule)\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
- componentId : COMPONENT.VF_MODULE\r
- });\r
- };\r
-\r
- $scope.getStatusOfVnf = function(serviceObject, vnfObject) {\r
- var serviceInstance = serviceObject.object;\r
- var vnf = vnfObject.object;\r
- \r
- DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);\r
- DataService.setInventoryItem(vnf);\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- DataService.setServiceInstanceName(serviceInstance[FIELD.ID.SERVICE_INSTANCE_NAME]);\r
- \r
- $scope.$broadcast(COMPONENT.COMPONENT_STATUS, {\r
- componentId : COMPONENT.VNF,\r
- callbackFunction : updateProvStatusVnfCallbackFunction\r
- });\r
- };\r
-\r
- $scope.describeVnf = function(serviceObject, vnfObject) {\r
- var serviceInstance = serviceObject.object;\r
- var vnf = vnfObject.object;\r
- DataService.setResCustomizationUuid(" ");\r
- \r
- //var vnfInvariantUuid = vnf[FIELD.ID.MODEL_INVAR_ID];\r
- //var vnfVersionId = vnf[FIELD.ID.MODEL_VERSION_ID];\r
- var vnfCustomizationUuid = vnf[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- \r
- if ( UtilityService.hasContents (vnfCustomizationUuid) ) {\r
- DataService.setResCustomizationUuid(vnfCustomizationUuid);\r
- }\r
- //Display popup with additional VNF information\r
- DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);\r
- DataService.setInventoryItem(vnf);\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
- componentId : COMPONENT.VNF\r
- });\r
- };\r
-\r
- $scope.describeVolumeGroup = function(serviceObject, vnf, volumeGroupObject) {\r
- \r
- var serviceInstance = serviceObject.object;\r
- var volumeGroup = volumeGroupObject.object;\r
- \r
- //var volGroupInvariantUuid = volumeGroup[FIELD.ID.MODEL_INVAR_ID];\r
- //var volGroupVersionId = volumeGroup[FIELD.ID.MODEL_VERSION_ID];\r
- var volGroupCustomizationUuid = volumeGroup[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
- DataService.setCustomizationUuid(" "); \r
- if ( UtilityService.hasContents(volGroupCustomizationUuid) ) {\r
- DataService.setCustomizationUuid(volGroupCustomizationUuid); \r
- }\r
- DataService.setVolumeGroupInstanceId(volumeGroup[FIELD.ID.VOLUME_GROUP_ID]);\r
- DataService.setInventoryItem(volumeGroup);\r
- \r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
- \r
- \r
- $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
- componentId : COMPONENT.VOLUME_GROUP\r
- });\r
- };\r
-\r
- $scope.addNetworkInstance = function(netModel, existingVnfs) {\r
- \r
- // For networks we assume that we always follow the new flow\r
- console.log("Adding network to service instance" + this.service.instance.name);\r
- if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0) ) {\r
- var msg = VnfService.isVnfListStatusValid (existingVnfs);\r
- if ( msg != "" ) {\r
- alert ( msg );\r
- return;\r
- }\r
- }\r
- \r
- DataService.setSubscriberName($scope.service.instance.subscriberName);\r
- DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
- DataService.setServiceType($scope.service.instance.serviceType);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- DataService.setServiceInstanceId($scope.service.instance.id);\r
- DataService.setServiceName($scope.service.model.service.name);\r
- \r
- DataService.setModelInfo(COMPONENT.NETWORK, {\r
- "modelType": "network",\r
- "modelInvariantId": netModel.invariantUuid,\r
- "modelVersion": netModel.version,\r
- "modelNameVersionId": netModel.uuid,\r
- "modelName": netModel.name,\r
- "modelCustomizationName": netModel.modelCustomizationName,\r
- "customizationUuid": netModel.customizationUuid,\r
- "inputs": "",\r
- "displayInputs": netModel.displayInputs\r
- });\r
- setCurrentServiceModelInfoFromScope();\r
-\r
- \r
- $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
- componentId : COMPONENT.NETWORK,\r
- callbackFunction : createVnfCallbackFunction\r
- }); \r
- };\r
-\r
- $scope.addVnfInstance = function(vnf, existingVnfs) {\r
- \r
- if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0) ) {\r
- var msg = VnfService.isVnfListStatusValid (existingVnfs);\r
- if ( msg != "" ) {\r
- alert ( msg );\r
- return;\r
- }\r
- }\r
- DataService.setSubscriberName($scope.service.instance.subscriberName);\r
- DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
- DataService.setServiceType($scope.service.instance.serviceType);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- DataService.setServiceInstanceId($scope.service.instance.id);\r
- DataService.setServiceName($scope.service.model.service.name);\r
- \r
- console.log ( "existingVnfs: " );\r
- console.log (JSON.stringify ( existingVnfs, null, 4));\r
- console.log ( "existingVnfs: " ); console.log (JSON.stringify ( existingVnfs, null, 4));\r
- var vnf_type = "";\r
- var vnf_role = "";\r
- var vnf_function = "";\r
- var vnf_code = "";\r
- \r
- if (UtilityService.hasContents (vnf.nfType) ) {\r
- vnf_type = vnf.nfType;\r
- }\r
- if (UtilityService.hasContents (vnf.nfRole) ) {\r
- vnf_role = vnf.nfRole;\r
- }\r
- if (UtilityService.hasContents (vnf.nfFunction) ) {\r
- vnf_function = vnf.nfFunction;\r
- }\r
- if (UtilityService.hasContents (vnf.nfCode) ) {\r
- vnf_code = vnf.nfCode;\r
- }\r
- DataService.setModelInfo(COMPONENT.VNF, {\r
- "modelType": vnf.isPnf ? "pnf" : "vnf",\r
- "modelInvariantId": vnf.invariantUuid,\r
- "modelVersion": vnf.version,\r
- "modelNameVersionId": vnf.uuid,\r
- "modelName": vnf.name,\r
- "modelCustomizationName": vnf.modelCustomizationName,\r
- "customizationUuid": vnf.customizationUuid,\r
- "inputs": "",\r
- "displayInputs": vnf.displayInputs,\r
- "vnfType": vnf_type,\r
- "vnfRole": vnf_role,\r
- "vnfFunction": vnf_function,\r
- "vnfCode": vnf_code,\r
- "properties": vnf.properties\r
- });\r
- \r
- DataService.setModelInstanceName($scope.service.model.service.name);\r
- setCurrentServiceModelInfoFromScope();\r
-\r
- if (vnf.isConfig) {\r
- DataService.setServiceProxies($scope.service.model.serviceProxies);\r
- DataService.setSourceServiceProxies(vnf.sourceNodes);\r
- DataService.setCollectorServiceProxies(vnf.collectorNodes);\r
- DataService.setConfigurationByPolicy(vnf.isConfigurationByPolicy);\r
- $location.path("/addNetworkNode");\r
- } else if(vnf.isPnf){\r
- $location.path("/pnfSearchAssociation");\r
- } else {\r
- $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
- componentId: COMPONENT.VNF,\r
- callbackFunction: createVnfCallbackFunction\r
- });\r
- }\r
- };\r
-\r
- $scope.addVfModuleInstance = function(vnfInstance, vfModuleModel) {\r
- \r
- if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED ) {\r
- var msg = VnfService.isVnfStatusValid (vnfInstance);\r
- if ( msg != "" ) {\r
- alert ( msg );\r
- return;\r
- }\r
- \r
- }\r
- var svcModel = $scope.service.convertedModel;\r
- DataService.setSubscriberName($scope.service.instance.subscriberName);\r
- DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
- DataService.setServiceType($scope.service.instance.serviceType);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- DataService.setServiceInstanceId($scope.service.instance.id);\r
- DataService.setServiceName($scope.service.model.service.name);\r
-\r
- var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];\r
- var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];\r
- var vnfModelCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- var vnfModel = null;\r
- if ( svcModel.isNewFlow ) {\r
- vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
- }\r
- else {\r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
- }\r
- \r
- var availableVolumeGroupList = [];\r
- angular.forEach(vnfInstance[FIELD.ID.AVAILABLEVOLUMEGROUPS], function(volumeGroupInstance, key) {\r
- availableVolumeGroupList.push({"instance": volumeGroupInstance});\r
- });\r
- \r
- DataService.setAvailableVolumeGroupList(availableVolumeGroupList);\r
- setCurrentServiceModelInfoFromScope();\r
-\r
- DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);\r
-\r
- DataService.setModelInfo(COMPONENT.VNF, {\r
- "modelInvariantId": vnfModel.invariantUuid,\r
- "modelVersion": vnfModel.version,\r
- "modelNameVersionId": vnfModel.uuid,\r
- "modelName": vnfModel.name,\r
- "modelCustomizationName": vnfModel.modelCustomizationName,\r
- "customizationUuid": vnfModel.customizationUuid,\r
- "inputs": ""\r
- });\r
- \r
- DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
- "modelInvariantId": vfModuleModel.invariantUuid,\r
- "modelVersion": vfModuleModel.version,\r
- "modelNameVersionId": vfModuleModel.uuid,\r
- "customizationUuid": vfModuleModel.customizationUuid,\r
- "modelCustomizationName": vfModuleModel.modelCustomizationName,\r
- "modelName": vfModuleModel.name,\r
- "inputs": ""\r
- });\r
- \r
- $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
- componentId : COMPONENT.VF_MODULE,\r
- callbackFunction : createVfModuleCallbackFunction\r
- });\r
- \r
- };\r
-\r
- $scope.addVolumeGroupInstance = function(vnfInstance, volumeGroupModel) {\r
- if ( VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED ) {\r
- var msg = VnfService.isVnfStatusValid (vnfInstance);\r
- if ( msg != "" ) {\r
- alert ( msg );\r
- return;\r
- }\r
- }\r
- var svcModel = $scope.service.convertedModel;\r
- DataService.setSubscriberName($scope.service.instance.subscriberName);\r
- DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
- DataService.setServiceType($scope.service.instance.serviceType);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- DataService.setServiceInstanceId($scope.service.instance.id);\r
- DataService.setServiceName($scope.service.model.service.name);\r
- setCurrentServiceModelInfoFromScope();\r
-\r
- DataService.setModelInfo(COMPONENT.SERVICE, {\r
- "modelInvariantId": $scope.service.model.service.invariantUuid,\r
- "modelVersion": $scope.service.model.service.version,\r
- "modelNameVersionId": $scope.service.model.service.uuid,\r
- "modelName": $scope.service.model.service.name,\r
- "inputs": ""\r
- });\r
-\r
- DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);\r
-\r
- var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];\r
- var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];\r
- var vnfCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
- var vnfModel = null;\r
- \r
- if ( svcModel.isNewFlow ) {\r
- vnfModel = svcModel.vnfs[vnfCustomizationUuid];\r
- }\r
- else {\r
- vnfModel = svcModel.vnfs[vnfModelVersionId];\r
- }\r
-\r
- DataService.setModelInfo(COMPONENT.VNF, {\r
- "modelInvariantId": vnfModel.invariantUuid,\r
- "modelVersion": vnfModel.version,\r
- "modelNameVersionId": vnfModel.uuid,\r
- "modelName": vnfModel.name,\r
- "modelCustomizationName": vnfModel.modelCustomizationName,\r
- "customizationUuid": vnfModel.customizationUuid,\r
- "inputs": ""\r
- });\r
- \r
- DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
- "modelInvariantId": volumeGroupModel.invariantUuid,\r
- "modelVersion": volumeGroupModel.version,\r
- "modelNameVersionId": volumeGroupModel.uuid,\r
- "modelName": volumeGroupModel.name,\r
- "modelCustomizationName": volumeGroupModel.modelCustomizationName,\r
- "customizationUuid": volumeGroupModel.customizationUuid,\r
- "inputs": ""\r
- });\r
- \r
- $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
- componentId : COMPONENT.VOLUME_GROUP,\r
- callbackFunction : createVolumeGroupCallbackFunction\r
- });\r
- };\r
-\r
- $scope.resume = function(serviceObject, vfModule, vnfModel) {\r
- populate_popup_vfModule(serviceObject, vfModule, vnfModel);\r
- setCurrentVNFModelInfo(vnfModel);\r
- DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);\r
- setCurrentServiceModelInfoFromScope();\r
- $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
- componentId : COMPONENT.VF_MODULE,\r
- callbackFunction : deleteOrResumeCallback,\r
- dialogMethod: COMPONENT.RESUME\r
- });\r
- };\r
-\r
- $scope.deleteConfiguration = function (serviceObject, configuration) {\r
- console.log("Deleting Configuration " + configuration.name);\r
-\r
- var serviceInstance = serviceObject.object;\r
+ function setCurrentNetworkModelInfoFromScope(network) {\r
var svcModel = $scope.service.convertedModel;\r
- var configModel;\r
- DataService.setInventoryItem(configuration.object);\r
+ var netModel;\r
// set model default and override later if found\r
- DataService.setModelInfo(COMPONENT.CONFIGURATION, {});\r
+ DataService.setModelInfo(COMPONENT.NETWORK, {});\r
\r
- if ( configuration.object != null ) {\r
+ if (network.object != null) {\r
\r
//var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];\r
- var configModelVersionId = configuration.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
- var configModelCustomizationUuid = configuration.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+ var netModelVersionId = network.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
+ var netModelCustomizationUuid = network.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
\r
- //configurations added to vnfs list, in order to be part of the "Add VNF" drop-down list\r
- if ( (!($scope.isObjectEmpty(svcModel))) && ( !($scope.isObjectEmpty(svcModel.vnfs) ) ) ) {\r
- if ( (svcModel.isNewFlow) && (UtilityService.hasContents(configModelCustomizationUuid) ) ) {\r
- configModel = svcModel.vnfs[configModelCustomizationUuid];\r
+ if (UtilityService.hasContents(netModelCustomizationUuid)) {\r
+ // set it to what came from a&ai\r
+ DataService.setResCustomizationUuid(netModelCustomizationUuid);\r
+ }\r
+\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.networks)))) {\r
+ if ((svcModel.isNewFlow) && (UtilityService.hasContents(netModelCustomizationUuid))) {\r
+ netModel = svcModel.networks[netModelCustomizationUuid];\r
}\r
else {\r
\r
- if ( UtilityService.hasContents(configModelVersionId) ) {\r
- configModel = svcModel.vnfs[configModelVersionId];\r
+ if (UtilityService.hasContents(netModelVersionId)) {\r
+ netModel = svcModel.networks[netModelVersionId];\r
}\r
\r
}\r
}\r
}\r
- if (!($scope.isObjectEmpty(configModel) ) ) {\r
- DataService.setModelInfo(COMPONENT.CONFIGURATION, {\r
- "modelInvariantId": configModel.invariantUuid,\r
- "modelVersion": configModel.version,\r
- "modelNameVersionId": configModel.uuid,\r
- "modelCustomizationName": configModel.modelCustomizationName,\r
- "customizationUuid": configModel.customizationUuid,\r
- "modelName": configModel.name,\r
+ if (!($scope.isObjectEmpty(netModel))) {\r
+ DataService.setModelInfo(COMPONENT.NETWORK, {\r
+ "modelInvariantId": netModel.invariantUuid,\r
+ "modelVersion": netModel.version,\r
+ "modelNameVersionId": netModel.uuid,\r
+ "modelCustomizationName": netModel.modelCustomizationName,\r
+ "customizationUuid": netModel.customizationUuid,\r
+ "modelName": netModel.name,\r
"inputs": ""\r
});\r
}\r
+ }\r
\r
- DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
- DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
- DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+ function setCurrentVfModuleModelInfoFromScope(vnf, vfModule) {\r
\r
- DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
- DataService.setServiceInstanceName($scope.service.instance.name);\r
- DataService.setServiceName($scope.service.model.service.name);\r
- DataService.setServiceUuid($scope.service.model.service.uuid);\r
- DataService.setConfigurationInstanceId(configuration.object[FIELD.ID.CONFIGURATION_ID]);\r
+ var svcModel = $scope.service.convertedModel;\r
+\r
+ //var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
+ var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
+ var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+ var vnfModel = null;\r
+ var vfModuleModel = null;\r
\r
- $scope.$broadcast(COMPONENT.DELETE_COMPONENT, {\r
- componentId : COMPONENT.CONFIGURATION,\r
- callbackFunction : deleteCallbackFunction\r
+ DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
+ "modelInvariantId": "",\r
+ "modelVersion": "",\r
+ "modelNameVersionId": "",\r
+ "modelCustomizationName": "",\r
+ "customizationUuid": "",\r
+ "modelName": "",\r
+ "inputs": ""\r
});\r
- };\r
\r
- $scope.resetProgress = function() {\r
- $scope.percentProgress = 0;\r
- $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_INFO;\r
- };\r
-\r
- $scope.setProgress = function(percentProgress) {\r
- percentProgress = parseInt(percentProgress);\r
- if (percentProgress >= 100) {\r
- $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_SUCCESS; \r
- }\r
-\r
- if (percentProgress < $scope.percentProgress) {\r
- return;\r
- }\r
-\r
- $scope.percentProgress = percentProgress;\r
- $scope.progressWidth = {width: percentProgress + "%"};\r
- if (percentProgress >= 5) {\r
- $scope.progressText = percentProgress + " %";\r
- } else {\r
- // Hidden since color combination is barely visible when progress portion is narrow.\r
- $scope.progressText = "";\r
- }\r
- };\r
- $scope.isObjectEmpty = function(o) {\r
- var len = 0;\r
- if (UtilityService.hasContents(o)){\r
- var keys = Object.keys(o);\r
- len = keys.length;\r
- if ( len == 0 ) {\r
- return true;\r
- }\r
- else {\r
- return false;\r
- }\r
- }\r
- else {\r
- return true;\r
- }\r
- }\r
- $scope.isMacro = function() {\r
- if (UtilityService.arrayContains (VIDCONFIGURATION.MACRO_SERVICES, $scope.service.model.service.invariantUuid )) {\r
- return(true);\r
- \r
- }\r
- else {\r
- return (false);\r
- }\r
- }\r
- $scope.reloadRoute = function() {\r
- $route.reload();\r
- }\r
-\r
-\r
-\r
- /*\r
- Private metthods\r
- */\r
-\r
- /*\r
- setPnf\r
- * set the controller pnf param using api call\r
- * return: void\r
- */\r
- function _setPnf(data){ // data is the $scope.service.instance object\r
- return PnfService.getPnfs(data)\r
- .then(\r
- function success(response){\r
- return response.data;\r
- // * can add here changes on the data that are needed to the view ( filter, ect..)\r
- },\r
- function error(error){\r
- console.error(error);\r
- }\r
- );\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+\r
+ var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+ if (!($scope.isObjectEmpty(vnfModel)) && !($scope.isObjectEmpty(vnfModel.vfModules)) && UtilityService.hasContents(vfModuleCustomizationUuid)) {\r
+\r
+ vfModuleModel = vnfModel.vfModules[vfModuleCustomizationUuid];\r
+\r
+ }\r
+ }\r
+ else {\r
+ // old flow\r
+ if (vnfModelVersionId != null) {\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ }\r
+ //var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID];\r
+ var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];\r
+ if ((!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.vfModules))) &&\r
+ UtilityService.hasContents(vfModuleModelVersionId)) {\r
+ vfModuleModel = vnfModel.vfModules[vfModuleModelVersionId];\r
+ }\r
+ }\r
+ if (!($scope.isObjectEmpty(vfModuleModel))) {\r
+ DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
+ "modelInvariantId": vfModuleModel.invariantUuid,\r
+ "modelVersion": vfModuleModel.version,\r
+ "modelNameVersionId": vfModuleModel.uuid,\r
+ "modelCustomizationName": vfModuleModel.modelCustomizationName,\r
+ "customizationUuid": vfModuleModel.customizationUuid,\r
+ "modelName": vfModuleModel.name,\r
+ "inputs": ""\r
+ });\r
+ }\r
+ }\r
}\r
\r
- /*\r
- Callbaks functions\r
+ function setCurrentVolumeGroupModelInfoFromScope(vnf, vfModule) {\r
+ var svcModel = $scope.service.convertedModel;\r
\r
- */\r
- var updateProvStatusVnfCallbackFunction = function(response) {\r
- $scope.callbackResults = "";\r
- var color = FIELD.ID.COLOR_NONE;\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- $scope.reloadRoute();\r
- /*\r
- * This 1/2 delay was only added to visually highlight the status\r
- * change. Probably not needed in the real application code.\r
- */\r
- $timeout(function() {\r
- $scope.callbackResults = UtilityService.getCurrentTime()\r
- + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
- if (response.isSuccessful) {\r
- color = FIELD.ID.COLOR_8F8;\r
- \r
- } else {\r
- color = FIELD.ID.COLOR_F88;\r
- }\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- }, 500);\r
- \r
- };\r
-\r
- var createVnfCallbackFunction = function(response) {\r
- $scope.callbackResults = "";\r
- var color = FIELD.ID.COLOR_NONE;\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- \r
- /*\r
- * This 1/2 delay was only added to visually highlight the status\r
- * change. Probably not needed in the real application code.\r
- */\r
- $timeout(function() {\r
- $scope.callbackResults = UtilityService.getCurrentTime()\r
- + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
- if (response.isSuccessful) {\r
- color = FIELD.ID.COLOR_8F8;\r
- $scope.reloadRoute();\r
- } else {\r
- color = FIELD.ID.COLOR_F88;\r
- }\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- }, 500);\r
- \r
- \r
- \r
- };\r
- \r
- var deleteOrResumeCallback = function(response) {\r
- $scope.callbackResults = "";\r
- var color = FIELD.ID.COLOR_NONE;\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- \r
- /*\r
- * This 1/2 delay was only added to visually highlight the status\r
- * change. Probably not needed in the real application code.\r
- */\r
- $timeout(function() {\r
- $scope.callbackResults = UtilityService.getCurrentTime()\r
- + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
- if (response.isSuccessful) {\r
- color = FIELD.ID.COLOR_8F8;\r
- $scope.reloadRoute();\r
- } else {\r
- color = FIELD.ID.COLOR_F88;\r
- }\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- }, 500);\r
- \r
- };\r
- \r
- var createVfModuleCallbackFunction = function(response) {\r
- $scope.callbackResults = "";\r
- var color = FIELD.ID.COLOR_NONE;\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- \r
- /*\r
- * This 1/2 delay was only added to visually highlight the status\r
- * change. Probably not needed in the real application code.\r
- */\r
- $timeout(function() {\r
- $scope.callbackResults = UtilityService.getCurrentTime()\r
- + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
- if (response.isSuccessful) {\r
- color = FIELD.ID.COLOR_8F8;\r
- $scope.reloadRoute();\r
- } else {\r
- color = FIELD.ID.COLOR_F88;\r
- }\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- }, 500);\r
-\r
- };\r
- \r
- var deleteServiceInstanceCallbackFunction = function(response) {\r
- $scope.callbackResults = "";\r
- var color = FIELD.ID.COLOR_NONE;\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- \r
- /*\r
- * This 1/2 delay was only added to visually highlight the status\r
- * change. Probably not needed in the real application code.\r
- */\r
- $timeout(function() {\r
- $scope.callbackResults = UtilityService.getCurrentTime()\r
- + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
- if (response.isSuccessful) {\r
- color = FIELD.ID.COLOR_8F8;\r
- $location.path(COMPONENT.SERVICEMODELS_MODELS_SERVICES_PATH)\r
- } else {\r
- color = FIELD.ID.COLOR_F88;\r
- }\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- }, 500);\r
-\r
- };\r
- \r
- var createVolumeGroupCallbackFunction = function(response) {\r
- $scope.callbackResults = "";\r
- var color = FIELD.ID.COLOR_NONE;\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- \r
- /*\r
- * This 1/2 delay was only added to visually highlight the status\r
- * change. Probably not needed in the real application code.\r
- */\r
- $timeout(function() {\r
- $scope.callbackResults = UtilityService.getCurrentTime()\r
- + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
- if (response.isSuccessful) {\r
- color = FIELD.ID.COLOR_8F8;\r
- $scope.reloadRoute();\r
- } else {\r
- color = FIELD.ID.COLOR_F88;\r
- }\r
- $scope.callbackStyle = {\r
- "background-color" : color\r
- };\r
- }, 500);\r
- \r
- \r
- \r
- };\r
- \r
- });\r
+ var vnfModelCustomizationUuid = null;\r
+ var vnfModel = null;\r
+ var vnfModelVersionId = null;\r
+\r
+ vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
+ vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
+ "modelInvariantId": "",\r
+ "modelVersion": "",\r
+ "modelNameVersionId": "",\r
+ "modelCustomizationName": "",\r
+ "customizationUuid": "",\r
+ "modelName": "",\r
+ "inputs": ""\r
+ });\r
+\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ }\r
+ else {\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ }\r
+ }\r
+\r
+\r
+ // volume groups don't have model-invariant-id/version in a&ai.\r
+ // Their model-invariant-id/version is the one for the associated vfModule\r
+\r
+ var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];\r
+ var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+ var volGroupModel = null;\r
+\r
+ if (!($scope.isObjectEmpty(vnfModel)) && !($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
+ if ((svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid))) {\r
+ volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid];\r
+ }\r
+ else {\r
+ volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId];\r
+ }\r
+ if (!($scope.isObjectEmpty(volGroupModel))) {\r
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
+ "modelInvariantId": volGroupModel.invariantUuid,\r
+ "modelVersion": volGroupModel.version,\r
+ "modelNameVersionId": volGroupModel.uuid,\r
+ "modelCustomizationName": volGroupModel.modelCustomizationName,\r
+ "customizationUuid": volGroupModel.customizationUuid,\r
+ "modelName": volGroupModel.name,\r
+ "inputs": ""\r
+ });\r
+\r
+ }\r
+ }\r
+ }\r
+\r
+ function setCurrentVolumeGroupModelInfoByVfModuleFromScope(vnf, volumeGroup) {\r
+ var svcModel = $scope.service.convertedModel;\r
+\r
+ var vnfModelCustomizationUuid = null;\r
+ var vnfModel = null;\r
+ var vnfModelVersionId = null;\r
+\r
+ vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
+ vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
+ "modelInvariantId": "",\r
+ "modelVersion": "",\r
+ "modelNameVersionId": "",\r
+ "modelCustomizationName": "",\r
+ "customizationUuid": "",\r
+ "modelName": "",\r
+ "inputs": ""\r
+ });\r
+\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ }\r
+ else {\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ }\r
+ }\r
+\r
+\r
+ // volume groups don't have model-invariant-id/version in a&ai.\r
+ // Their model-invariant-id/version is the one for the associated vfModule\r
+\r
+ var vfModuleModelVersionId = volumeGroup.object[FIELD.ID.VF_MODULE_MODEL_VERSION_ID];\r
+ var vfModuleCustomizationUuid = volumeGroup.object[FIELD.ID.VF_MODULE_MODEL_CUSTOMIZATION_ID];\r
+ var volGroupModel = null;\r
+ if ((!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.volumeGroups)))) {\r
+ if ((svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid))) {\r
+ volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid];\r
+ }\r
+ else {\r
+ volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId];\r
+ }\r
+ if (!($scope.isObjectEmpty(volGroupModel))) {\r
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
+ "modelInvariantId": volGroupModel.invariantUuid,\r
+ "modelVersion": volGroupModel.version,\r
+ "modelNameVersionId": volGroupModel.uuid,\r
+ "modelCustomizationName": volGroupModel.modelCustomizationName,\r
+ "customizationUuid": volGroupModel.customizationUuid,\r
+ "modelName": volGroupModel.name,\r
+ "inputs": ""\r
+ });\r
+\r
+ }\r
+ }\r
+ }\r
+\r
+ $scope.deleteVnf = function (serviceObject, vnf) {\r
+ console.log("Removing VNF " + vnf.name);\r
+\r
+ var serviceInstance = serviceObject.object;\r
+ var svcModel = $scope.service.convertedModel;\r
+ DataService.setInventoryItem(vnf.object);\r
+\r
+ /*var vnftype = vnf.object['vnf-type'];\r
+ if (vnftype == null)\r
+ vnftype = "";\r
+ else\r
+ {\r
+ var n = vnftype.search("/");\r
+ if (n >= 0)\r
+ vnftype = vnftype.substring(n+1);\r
+ }*/\r
+\r
+ var svcModel = $scope.service.convertedModel;\r
+ var vnfModelInvariantUuid = null;\r
+ var vnfModelVersion = null;\r
+ var vnfModelCustomizationUuid = null;\r
+ var vnfModel = null;\r
+ var vnfModelVersionId = null;\r
+\r
+ vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
+ vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
+ vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ DataService.setModelInfo(COMPONENT.VNF, {\r
+ "modelInvariantId": vnfModelInvariantUuid,\r
+ "modelVersion": "",\r
+ "modelNameVersionId": vnfModelVersionId,\r
+ "modelCustomizationName": "",\r
+ "customizationUuid": vnfModelCustomizationUuid,\r
+ "modelName": "",\r
+ "inputs": ""\r
+ });\r
+\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ }\r
+ else {\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ }\r
+ //console.log ( "vnf models: "); console.log ( JSON.stringify ($scope.service.convertedModel.vnfs, null, 4) );\r
+ if (!($scope.isObjectEmpty(vnfModel))) {\r
+\r
+ DataService.setModelInfo(COMPONENT.VNF, {\r
+ "modelInvariantId": vnfModel.invariantUuid,\r
+ "modelVersion": vnfModel.version,\r
+ "modelNameVersionId": vnfModel.uuid,\r
+ "modelCustomizationName": vnfModel.modelCustomizationName,\r
+ "customizationUuid": vnfModel.customizationUuid,\r
+ "modelName": vnfModel.name,\r
+ "inputs": ""\r
+ });\r
+ }\r
+ }\r
+\r
+ DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+\r
+ DataService.setServiceUuid($scope.service.model.service.uuid);\r
+\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.VNF,\r
+ callbackFunction: deleteOrResumeCallback,\r
+ dialogMethod: COMPONENT.DELETE\r
+ });\r
+\r
+ };\r
+\r
+ $scope.deleteVolumeGroup = function (serviceObject, vnf, vfModule, volumeGroup) {\r
+\r
+ console.log("Removing Volume Group " + volumeGroup.name);\r
+ var haveModel = false;\r
+\r
+ var serviceInstance = serviceObject.object;\r
+\r
+ setCurrentVolumeGroupModelInfoFromScope(vnf, vfModule);\r
+\r
+ DataService.setInventoryItem(volumeGroup.object);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+\r
+ DataService.setServiceUuid($scope.service.model.service.uuid);\r
+ DataService.setVnfInstanceId(vnf.nodeId);\r
+ DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);\r
+\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.VOLUME_GROUP,\r
+ dialogMethod: COMPONENT.DELETE\r
+ });\r
+ };\r
+\r
+ $scope.deleteVnfVolumeGroup = function (serviceObject, vnf, volumeGroup) {\r
+\r
+ console.log("Removing Volume Group " + volumeGroup.name);\r
+ var serviceInstance = serviceObject.object;\r
+\r
+ DataService.setInventoryItem(volumeGroup.object);\r
+\r
+ var svcModel = $scope.service.convertedModel;\r
+\r
+ var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
+ var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
+ var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ var volGroupModelInvariantUuid = volumeGroup.object[FIELD.ID.MODEL_INVAR_ID];\r
+ var volGroupModelVersionId = volumeGroup.object[FIELD.ID.MODEL_VERSION_ID];\r
+ var volGroupModelCustomizationUuid = volumeGroup.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ var vnfModel = null;\r
+ var volGroupModel = null;\r
+\r
+ // send an empty model by default since model is not required for deletes\r
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {});\r
+\r
+ if (svcModel.isNewFlow) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ if (UtilityService.hasContents(volGroupModelCustomizationUuid)) {\r
+ volGroupModel = vnfModel.volumeGroups[volGroupModelCustomizationUuid];\r
+ }\r
+ }\r
+ else {\r
+\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ if (UtilityService.hasContents(volGroupModelVersionId)) {\r
+ volGroupModel = vnfModel.volumeGroups[volGroupModelVersionId];\r
+ }\r
+ }\r
+ if (!($scope.isObjectEmpty(volGroupModel))) {\r
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
+ "modelInvariantId": volGroupModel.invariantUuid,\r
+ "modelVersion": volGroupModel.version,\r
+ "modelNameVersionId": volGroupModel.uuid,\r
+ "modelName": volGroupModel.name,\r
+ "modelCustomizationName": volGroupModel.modelCustomizationName,\r
+ "customizationUuid": volGroupModel.customizationUuid,\r
+ "inputs": ""\r
+ });\r
+ }\r
+\r
+ DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+\r
+ DataService.setServiceUuid($scope.service.model.service.uuid);\r
+ DataService.setVnfInstanceId(vnf.nodeId);\r
+ DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);\r
+\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.VOLUME_GROUP,\r
+ callbackFunction: deleteOrResumeCallback,\r
+ dialogMethod: COMPONENT.DELETE\r
+ });\r
+ };\r
+\r
+ $scope.describeNetwork = function (serviceObject, networkObject) {\r
+ var serviceInstance = serviceObject.object;\r
+ var network = networkObject.object;\r
+ //console.log ("networkObject="); console.log (JSON.stringify(networkObject, null, 4));\r
+\r
+ DataService.setResCustomizationUuid(" ");\r
+\r
+ setCurrentServiceModelInfoFromScope();\r
+ setCurrentNetworkModelInfoFromScope(networkObject);\r
+\r
+ DataService.setNetworkInstanceId(network[FIELD.ID.NETWORK_ID]);\r
+ DataService.setInventoryItem(networkObject);\r
+ DataService.setSubscriberName(serviceObject.subscriberName);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
+ componentId: COMPONENT.NETWORK\r
+ });\r
+ };\r
+\r
+ // for service instance id - no need for this!\r
+ $scope.describeService = function (serviceObject) {\r
+ var serviceInstance = serviceObject.object;\r
+ setCurrentServiceModelInfoFromScope();\r
+\r
+ DataService.setInventoryItem(serviceInstance);\r
+ //DataService.setModelInfo(serviceInstance['service-instance-id'], serviceInstance);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ //Display popup with additional service information\r
+ $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
+ componentId: COMPONENT.SERVICE\r
+ });\r
+\r
+ };\r
+\r
+ $scope.describeVfModule = function (serviceObject, vfModuleObject, vnf) {\r
+ var serviceInstance = serviceObject.object;\r
+ var vfModule = vfModuleObject.object;\r
+\r
+ /*var vfModuleInvariantUuid = vfModule[FIELD.ID.MODEL_INVAR_ID];\r
+ var vfModuleModelVersionId = vfModule[FIELD.ID.MODEL_VERSION_ID];*/\r
+ var vfModuleCustomizationUuid = vfModule[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ setCurrentServiceModelInfoFromScope();\r
+ setCurrentVfModuleModelInfoFromScope(vnf, vfModuleObject);\r
+\r
+ DataService.setCustomizationUuid(" ");\r
+ if (UtilityService.hasContents(vfModuleCustomizationUuid)) {\r
+ DataService.setCustomizationUuid(vfModuleCustomizationUuid);\r
+ }\r
+\r
+ //Display popup with additional VF-Module information\r
+ DataService.setVfModuleInstanceId(vfModule[FIELD.ID.VF_MODULE_ID]);\r
+ DataService.setInventoryItem(vfModule)\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
+ componentId: COMPONENT.VF_MODULE\r
+ });\r
+ };\r
+\r
+ $scope.getStatusOfVnf = function (serviceObject, vnfObject) {\r
+ var serviceInstance = serviceObject.object;\r
+ var vnf = vnfObject.object;\r
+\r
+ DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);\r
+ DataService.setInventoryItem(vnf);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+ DataService.setServiceInstanceName(serviceInstance[FIELD.ID.SERVICE_INSTANCE_NAME]);\r
+\r
+ $scope.$broadcast(COMPONENT.COMPONENT_STATUS, {\r
+ componentId: COMPONENT.VNF,\r
+ callbackFunction: updateProvStatusVnfCallbackFunction\r
+ });\r
+ };\r
+\r
+ $scope.describeVnf = function (serviceObject, vnfObject) {\r
+ var serviceInstance = serviceObject.object;\r
+ var vnf = vnfObject.object;\r
+ DataService.setResCustomizationUuid(" ");\r
+\r
+ //var vnfInvariantUuid = vnf[FIELD.ID.MODEL_INVAR_ID];\r
+ //var vnfVersionId = vnf[FIELD.ID.MODEL_VERSION_ID];\r
+ var vnfCustomizationUuid = vnf[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ if (UtilityService.hasContents(vnfCustomizationUuid)) {\r
+ DataService.setResCustomizationUuid(vnfCustomizationUuid);\r
+ }\r
+\r
+ setCurrentServiceModelInfoFromScope();\r
+ setCurrentVNFModelInfo(vnfObject);\r
+\r
+ //Display popup with additional VNF information\r
+ DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);\r
+ DataService.setInventoryItem(vnf);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
+ componentId: COMPONENT.VNF\r
+ });\r
+ };\r
+\r
+ $scope.describeVolumeGroup = function (serviceObject, vnf, volumeGroupObject) {\r
+\r
+ var serviceInstance = serviceObject.object;\r
+ var volumeGroup = volumeGroupObject.object;\r
+\r
+ var volGroupCustomizationUuid = volumeGroup[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ setCurrentServiceModelInfoFromScope();\r
+ setCurrentVolumeGroupModelInfoByVfModuleFromScope(vnf, volumeGroupObject);\r
+\r
+ DataService.setCustomizationUuid(" ");\r
+ if (UtilityService.hasContents(volGroupCustomizationUuid)) {\r
+ DataService.setCustomizationUuid(volGroupCustomizationUuid);\r
+ }\r
+ DataService.setVolumeGroupInstanceId(volumeGroup[FIELD.ID.VOLUME_GROUP_ID]);\r
+ DataService.setInventoryItem(volumeGroup);\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+\r
+ $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
+ componentId: COMPONENT.VOLUME_GROUP\r
+ });\r
+ };\r
+\r
+ $scope.addNetworkInstance = function (netModel, existingVnfs) {\r
+\r
+ // For networks we assume that we always follow the new flow\r
+ console.log("Adding network to service instance" + this.service.instance.name);\r
+ if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0)) {\r
+ var msg = VnfService.isVnfListStatusValid(existingVnfs);\r
+ if (msg != "") {\r
+ alert(msg);\r
+ return;\r
+ }\r
+ }\r
+\r
+ DataService.setSubscriberName($scope.service.instance.subscriberName);\r
+ DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
+ DataService.setServiceType($scope.service.instance.serviceType);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+ DataService.setServiceInstanceId($scope.service.instance.id);\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+\r
+ DataService.setModelInfo(COMPONENT.NETWORK, {\r
+ "modelType": "network",\r
+ "modelInvariantId": netModel.invariantUuid,\r
+ "modelVersion": netModel.version,\r
+ "modelNameVersionId": netModel.uuid,\r
+ "modelName": netModel.name,\r
+ "modelCustomizationName": netModel.modelCustomizationName,\r
+ "customizationUuid": netModel.customizationUuid,\r
+ "inputs": "",\r
+ "displayInputs": netModel.displayInputs\r
+ });\r
+ setCurrentServiceModelInfoFromScope();\r
+\r
+\r
+ $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
+ componentId: COMPONENT.NETWORK,\r
+ callbackFunction: createVnfCallbackFunction\r
+ });\r
+ };\r
+\r
+ $scope.addVnfInstance = function (vnf, existingVnfs) {\r
+\r
+ if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0)) {\r
+ var msg = VnfService.isVnfListStatusValid(existingVnfs);\r
+ if (msg != "") {\r
+ alert(msg);\r
+ return;\r
+ }\r
+ }\r
+\r
+ var isVfc = false;\r
+\r
+ _.map($scope.service.model.vnfs, function (value, key) {\r
+ if (value.uuid == vnf.uuid) {\r
+ if (!_.isEmpty(value.vfcInstanceGroups)) {\r
+ isVfc = true;\r
+ var queryData = {\r
+ serviceModelId: $scope.service.model.service.uuid,\r
+ serviceInstanceID: $scope.service.instance.id,\r
+ globalCustomerId: $scope.service.instance.globalCustomerId,\r
+ serviceType: $scope.service.instance.serviceType,\r
+ serviceInstanceName: $scope.service.instance.name,\r
+ modelCustomizationName: value.modelCustomizationName,\r
+ modelCustomizationId: value.customizationUuid,\r
+ subscriberName: $scope.service.instance.subscriberName\r
+ };\r
+\r
+ $scope.$broadcast(COMPONENT.IFRAME_DIALOG, queryData);\r
+ return;\r
+ }\r
+ }\r
+ });\r
+\r
+ DataService.setSubscriberName($scope.service.instance.subscriberName);\r
+ DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
+ DataService.setServiceType($scope.service.instance.serviceType);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+ DataService.setServiceInstanceId($scope.service.instance.id);\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+\r
+ console.log("existingVnfs: ");\r
+ console.log(JSON.stringify(existingVnfs, null, 4));\r
+ console.log("existingVnfs: ");\r
+ console.log(JSON.stringify(existingVnfs, null, 4));\r
+ var vnf_type = "";\r
+ var vnf_role = "";\r
+ var vnf_function = "";\r
+ var vnf_code = "";\r
+\r
+ if (UtilityService.hasContents(vnf.nfType)) {\r
+ vnf_type = vnf.nfType;\r
+ }\r
+ if (UtilityService.hasContents(vnf.nfRole)) {\r
+ vnf_role = vnf.nfRole;\r
+ }\r
+ if (UtilityService.hasContents(vnf.nfFunction)) {\r
+ vnf_function = vnf.nfFunction;\r
+ }\r
+ if (UtilityService.hasContents(vnf.nfCode)) {\r
+ vnf_code = vnf.nfCode;\r
+ }\r
+ DataService.setModelInfo(COMPONENT.VNF, {\r
+ "modelType": vnf.isPnf ? "pnf" : "vnf",\r
+ "modelInvariantId": vnf.invariantUuid,\r
+ "modelVersion": vnf.version,\r
+ "modelNameVersionId": vnf.uuid,\r
+ "modelName": vnf.name,\r
+ "modelCustomizationName": vnf.modelCustomizationName,\r
+ "customizationUuid": vnf.customizationUuid,\r
+ "inputs": "",\r
+ "displayInputs": vnf.displayInputs,\r
+ "vnfType": vnf_type,\r
+ "vnfRole": vnf_role,\r
+ "vnfFunction": vnf_function,\r
+ "vnfCode": vnf_code,\r
+ "properties": vnf.properties\r
+ });\r
+\r
+ DataService.setModelInstanceName($scope.service.model.service.name);\r
+ setCurrentServiceModelInfoFromScope();\r
+\r
+ if (vnf.isConfig) {\r
+ DataService.setServiceProxies($scope.service.model.serviceProxies);\r
+ DataService.setSourceServiceProxies(vnf.sourceNodes);\r
+ DataService.setCollectorServiceProxies(vnf.collectorNodes);\r
+ DataService.setConfigurationByPolicy(vnf.isConfigurationByPolicy);\r
+ $location.path("/addNetworkNode");\r
+ } else if (vnf.isPnf) {\r
+ $location.path("/pnfSearchAssociation");\r
+ } else if (isVfc) {\r
+ //do nothing\r
+ } else {\r
+ $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
+ componentId: COMPONENT.VNF,\r
+ callbackFunction: createVnfCallbackFunction\r
+ });\r
+ }\r
+ };\r
+\r
+ $scope.addVfModuleInstance = function (vnfInstance, vfModuleModel) {\r
+\r
+ if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED) {\r
+ var msg = VnfService.isVnfStatusValid(vnfInstance);\r
+ if (msg != "") {\r
+ alert(msg);\r
+ return;\r
+ }\r
+\r
+ }\r
+ var svcModel = $scope.service.convertedModel;\r
+ DataService.setSubscriberName($scope.service.instance.subscriberName);\r
+ DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
+ DataService.setServiceType($scope.service.instance.serviceType);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+ DataService.setServiceInstanceId($scope.service.instance.id);\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+\r
+ var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];\r
+ var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];\r
+ var vnfModelCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+ var vnfModel = null;\r
+ if (svcModel.isNewFlow) {\r
+ vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
+ }\r
+ else {\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ }\r
+\r
+ var availableVolumeGroupList = [];\r
+ angular.forEach(vnfInstance[FIELD.ID.AVAILABLEVOLUMEGROUPS], function (volumeGroupInstance, key) {\r
+ availableVolumeGroupList.push({"instance": volumeGroupInstance});\r
+ });\r
+\r
+ DataService.setAvailableVolumeGroupList(availableVolumeGroupList);\r
+ setCurrentServiceModelInfoFromScope();\r
+\r
+ DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);\r
+\r
+ DataService.setModelInfo(COMPONENT.VNF, {\r
+ "modelInvariantId": vnfModel.invariantUuid,\r
+ "modelVersion": vnfModel.version,\r
+ "modelNameVersionId": vnfModel.uuid,\r
+ "modelName": vnfModel.name,\r
+ "modelCustomizationName": vnfModel.modelCustomizationName,\r
+ "customizationUuid": vnfModel.customizationUuid,\r
+ "inputs": ""\r
+ });\r
+\r
+ DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
+ "modelInvariantId": vfModuleModel.invariantUuid,\r
+ "modelVersion": vfModuleModel.version,\r
+ "modelNameVersionId": vfModuleModel.uuid,\r
+ "customizationUuid": vfModuleModel.customizationUuid,\r
+ "modelCustomizationName": vfModuleModel.modelCustomizationName,\r
+ "modelName": vfModuleModel.name,\r
+ "inputs": ""\r
+ });\r
+\r
+ $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
+ componentId: COMPONENT.VF_MODULE,\r
+ callbackFunction: createVfModuleCallbackFunction\r
+ });\r
+\r
+ };\r
+\r
+ $scope.addVolumeGroupInstance = function (vnfInstance, volumeGroupModel) {\r
+ if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED) {\r
+ var msg = VnfService.isVnfStatusValid(vnfInstance);\r
+ if (msg != "") {\r
+ alert(msg);\r
+ return;\r
+ }\r
+ }\r
+ var svcModel = $scope.service.convertedModel;\r
+ DataService.setSubscriberName($scope.service.instance.subscriberName);\r
+ DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
+ DataService.setServiceType($scope.service.instance.serviceType);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+ DataService.setServiceInstanceId($scope.service.instance.id);\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+ setCurrentServiceModelInfoFromScope();\r
+\r
+ DataService.setModelInfo(COMPONENT.SERVICE, {\r
+ "modelInvariantId": $scope.service.model.service.invariantUuid,\r
+ "modelVersion": $scope.service.model.service.version,\r
+ "modelNameVersionId": $scope.service.model.service.uuid,\r
+ "modelName": $scope.service.model.service.name,\r
+ "inputs": ""\r
+ });\r
+\r
+ DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);\r
+\r
+ var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];\r
+ var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];\r
+ var vnfCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+ var vnfModel = null;\r
+\r
+ if (svcModel.isNewFlow) {\r
+ vnfModel = svcModel.vnfs[vnfCustomizationUuid];\r
+ }\r
+ else {\r
+ vnfModel = svcModel.vnfs[vnfModelVersionId];\r
+ }\r
+\r
+ DataService.setModelInfo(COMPONENT.VNF, {\r
+ "modelInvariantId": vnfModel.invariantUuid,\r
+ "modelVersion": vnfModel.version,\r
+ "modelNameVersionId": vnfModel.uuid,\r
+ "modelName": vnfModel.name,\r
+ "modelCustomizationName": vnfModel.modelCustomizationName,\r
+ "customizationUuid": vnfModel.customizationUuid,\r
+ "inputs": ""\r
+ });\r
+\r
+ DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
+ "modelInvariantId": volumeGroupModel.invariantUuid,\r
+ "modelVersion": volumeGroupModel.version,\r
+ "modelNameVersionId": volumeGroupModel.uuid,\r
+ "modelName": volumeGroupModel.name,\r
+ "modelCustomizationName": volumeGroupModel.modelCustomizationName,\r
+ "customizationUuid": volumeGroupModel.customizationUuid,\r
+ "inputs": ""\r
+ });\r
+\r
+ $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
+ componentId: COMPONENT.VOLUME_GROUP,\r
+ callbackFunction: createVolumeGroupCallbackFunction\r
+ });\r
+ };\r
+\r
+ $scope.resume = function (serviceObject, vfModule, vnfModel) {\r
+ populate_popup_vfModule(serviceObject, vfModule, vnfModel);\r
+ setCurrentVNFModelInfo(vnfModel);\r
+ DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);\r
+ setCurrentServiceModelInfoFromScope();\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.VF_MODULE,\r
+ callbackFunction: deleteOrResumeCallback,\r
+ dialogMethod: COMPONENT.RESUME\r
+ });\r
+ };\r
+\r
+ $scope.deleteConfiguration = function (serviceObject, configuration) {\r
+ console.log("Deleting Configuration " + configuration.name);\r
+\r
+ var serviceInstance = serviceObject.object;\r
+ var svcModel = $scope.service.convertedModel;\r
+ var configModel;\r
+ DataService.setInventoryItem(configuration.object);\r
+ // set model default and override later if found\r
+ DataService.setModelInfo(COMPONENT.CONFIGURATION, {});\r
+\r
+ if (configuration.object != null) {\r
+\r
+ //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];\r
+ var configModelVersionId = configuration.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
+ var configModelCustomizationUuid = configuration.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
+\r
+ //configurations added to vnfs list, in order to be part of the "Add VNF" drop-down list\r
+ if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
+ if ((svcModel.isNewFlow) && (UtilityService.hasContents(configModelCustomizationUuid))) {\r
+ configModel = svcModel.vnfs[configModelCustomizationUuid];\r
+ }\r
+ else {\r
+\r
+ if (UtilityService.hasContents(configModelVersionId)) {\r
+ configModel = svcModel.vnfs[configModelVersionId];\r
+ }\r
+\r
+ }\r
+ }\r
+ }\r
+ if (!($scope.isObjectEmpty(configModel))) {\r
+ DataService.setModelInfo(COMPONENT.CONFIGURATION, {\r
+ "modelInvariantId": configModel.invariantUuid,\r
+ "modelVersion": configModel.version,\r
+ "modelNameVersionId": configModel.uuid,\r
+ "modelCustomizationName": configModel.modelCustomizationName,\r
+ "customizationUuid": configModel.customizationUuid,\r
+ "modelName": configModel.name,\r
+ "inputs": ""\r
+ });\r
+ }\r
+\r
+ DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
+ DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
+ DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
+\r
+ DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
+ DataService.setServiceInstanceName($scope.service.instance.name);\r
+ DataService.setServiceName($scope.service.model.service.name);\r
+ DataService.setServiceUuid($scope.service.model.service.uuid);\r
+ DataService.setConfigurationInstanceId(configuration.object[FIELD.ID.CONFIGURATION_ID]);\r
+\r
+ $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
+ componentId: COMPONENT.CONFIGURATION,\r
+ dialogMethod: COMPONENT.DELETE,\r
+ callbackFunction: deleteCallbackFunction\r
+ });\r
+ };\r
+\r
+ var deleteCallbackFunction = function () {\r
+ console.log('hi')\r
+ }\r
+\r
+ $scope.resetProgress = function () {\r
+ $scope.percentProgress = 0;\r
+ $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_INFO;\r
+ };\r
+\r
+ $scope.setProgress = function (percentProgress) {\r
+ percentProgress = parseInt(percentProgress);\r
+ if (percentProgress >= 100) {\r
+ $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_SUCCESS;\r
+ }\r
+\r
+ if (percentProgress < $scope.percentProgress) {\r
+ return;\r
+ }\r
+\r
+ $scope.percentProgress = percentProgress;\r
+ $scope.progressWidth = {width: percentProgress + "%"};\r
+ if (percentProgress >= 5) {\r
+ $scope.progressText = percentProgress + " %";\r
+ } else {\r
+ // Hidden since color combination is barely visible when progress portion is narrow.\r
+ $scope.progressText = "";\r
+ }\r
+ };\r
+ $scope.isObjectEmpty = function (o) {\r
+ var len = 0;\r
+ if (UtilityService.hasContents(o)) {\r
+ var keys = Object.keys(o);\r
+ len = keys.length;\r
+ if (len == 0) {\r
+ return true;\r
+ }\r
+ else {\r
+ return false;\r
+ }\r
+ }\r
+ else {\r
+ return true;\r
+ }\r
+ }\r
+ $scope.isMacro = function () {\r
+ return $scope.service && AsdcService.isMacro($scope.service.model);\r
+ }\r
+ $scope.reloadRoute = function () {\r
+ $route.reload();\r
+ }\r
+\r
+\r
+ /*\r
+Private metthods\r
+*/\r
+\r
+ /*\r
+ setPnf\r
+ * set the controller pnf param using api call\r
+ * return: void\r
+ */\r
+ function _setPnf(data) { // data is the $scope.service.instance object\r
+ return PnfService.getPnfs(data)\r
+ .then(\r
+ function success(response) {\r
+ return response.data;\r
+ // * can add here changes on the data that are needed to the view ( filter, ect..)\r
+ },\r
+ function error(error) {\r
+ console.error(error);\r
+ }\r
+ );\r
+ }\r
+\r
+\r
+ function _setCr(data) { // data is the $scope.service.instance object\r
+ return CrService.getCr(data)\r
+ .then(\r
+ function success(response) {\r
+ return response.data.results;\r
+ // * can add here changes on the data that are needed to the view ( filter, ect..)\r
+ },\r
+ function error(error) {\r
+ console.error(error);\r
+ }\r
+ );\r
+ }\r
+\r
+\r
+ /*\r
+ Callbaks functions\r
+\r
+ */\r
+ var updateProvStatusVnfCallbackFunction = function (response) {\r
+ $scope.callbackResults = "";\r
+ var color = FIELD.ID.COLOR_NONE;\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+ $scope.reloadRoute();\r
+ /*\r
+ * This 1/2 delay was only added to visually highlight the status\r
+ * change. Probably not needed in the real application code.\r
+ */\r
+ $timeout(function () {\r
+ $scope.callbackResults = UtilityService.getCurrentTime()\r
+ + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
+ if (response.isSuccessful) {\r
+ color = FIELD.ID.COLOR_8F8;\r
+\r
+ } else {\r
+ color = FIELD.ID.COLOR_F88;\r
+ }\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+ }, 500);\r
+\r
+ };\r
+\r
+ var createVnfCallbackFunction = function (response) {\r
+ $scope.callbackResults = "";\r
+ var color = FIELD.ID.COLOR_NONE;\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+\r
+ /*\r
+ * This 1/2 delay was only added to visually highlight the status\r
+ * change. Probably not needed in the real application code.\r
+ */\r
+ $timeout(function () {\r
+ $scope.callbackResults = UtilityService.getCurrentTime()\r
+ + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
+ if (response.isSuccessful) {\r
+ color = FIELD.ID.COLOR_8F8;\r
+ $scope.reloadRoute();\r
+ } else {\r
+ color = FIELD.ID.COLOR_F88;\r
+ }\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+ }, 500);\r
+\r
+\r
+ };\r
+\r
+ var deleteOrResumeCallback = function (response) {\r
+ $scope.callbackResults = "";\r
+ var color = FIELD.ID.COLOR_NONE;\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+\r
+ /*\r
+ * This 1/2 delay was only added to visually highlight the status\r
+ * change. Probably not needed in the real application code.\r
+ */\r
+ $timeout(function () {\r
+ $scope.callbackResults = UtilityService.getCurrentTime()\r
+ + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
+ if (response.isSuccessful) {\r
+ color = FIELD.ID.COLOR_8F8;\r
+ $scope.reloadRoute();\r
+ } else {\r
+ color = FIELD.ID.COLOR_F88;\r
+ }\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+ }, 500);\r
+\r
+ };\r
+\r
+ var createVfModuleCallbackFunction = function (response) {\r
+ $scope.callbackResults = "";\r
+ var color = FIELD.ID.COLOR_NONE;\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+\r
+ /*\r
+ * This 1/2 delay was only added to visually highlight the status\r
+ * change. Probably not needed in the real application code.\r
+ */\r
+ $timeout(function () {\r
+ $scope.callbackResults = UtilityService.getCurrentTime()\r
+ + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
+ if (response.isSuccessful) {\r
+ color = FIELD.ID.COLOR_8F8;\r
+ $scope.reloadRoute();\r
+ } else {\r
+ color = FIELD.ID.COLOR_F88;\r
+ }\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+ }, 500);\r
+\r
+ };\r
+\r
+ var deleteServiceInstanceCallbackFunction = function (response) {\r
+ $scope.callbackResults = "";\r
+ var color = FIELD.ID.COLOR_NONE;\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+\r
+ /*\r
+ * This 1/2 delay was only added to visually highlight the status\r
+ * change. Probably not needed in the real application code.\r
+ */\r
+ $timeout(function () {\r
+ $scope.callbackResults = UtilityService.getCurrentTime()\r
+ + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
+ if (response.isSuccessful) {\r
+ color = FIELD.ID.COLOR_8F8;\r
+ $location.path(COMPONENT.SERVICEMODELS_MODELS_SERVICES_PATH)\r
+ } else {\r
+ color = FIELD.ID.COLOR_F88;\r
+ }\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+ }, 500);\r
+\r
+ };\r
+\r
+ var createVolumeGroupCallbackFunction = function (response) {\r
+ $scope.callbackResults = "";\r
+ var color = FIELD.ID.COLOR_NONE;\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+\r
+ /*\r
+ * This 1/2 delay was only added to visually highlight the status\r
+ * change. Probably not needed in the real application code.\r
+ */\r
+ $timeout(function () {\r
+ $scope.callbackResults = UtilityService.getCurrentTime()\r
+ + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
+ if (response.isSuccessful) {\r
+ color = FIELD.ID.COLOR_8F8;\r
+ $scope.reloadRoute();\r
+ } else {\r
+ color = FIELD.ID.COLOR_F88;\r
+ }\r
+ $scope.callbackStyle = {\r
+ "background-color": color\r
+ };\r
+ }, 500);\r
+\r
+\r
+ };\r
+\r
+ });\r
})();\r
'use strict';\r
\r
appDS2.controller("ServiceModelController", function ($scope, $http, $location, COMPONENT, VIDCONFIGURATION, FIELD, DataService, vidService,\r
- PropertyService, UtilityService) {\r
+ PropertyService, UtilityService, AsdcService,$timeout) {\r
\r
$scope.popup = {};\r
- \r
+ var defaultViewPerPage = 10;\r
// var baseEndpoint = "vid";\r
var pathQuery = COMPONENT.SERVICES_DIST_STATUS_PATH + VIDCONFIGURATION.ASDC_MODEL_STATUS;\r
\r
if ( VIDCONFIGURATION.ASDC_MODEL_STATUS === FIELD.STATUS.ALL) {\r
pathQuery = COMPONENT.SERVICES_PATH;\r
}\r
- \r
+ window.addEventListener("message", receiveMessage, false);\r
+\r
+ function receiveMessage(event){\r
+ if(event.data == 'navigateTo') {\r
+ $location.path('/models/services').search({});\r
+ $scope.$apply();\r
+ $scope.rememberFilter = true;\r
+ }\r
+ if(event.data == 'navigateToInstantiationStatus') {\r
+ $location.path('/instantiationStatus').search({});\r
+ $scope.$apply();\r
+ }\r
+ }\r
+\r
$scope.getServiceModels = function() {\r
$scope.status = FIELD.STATUS.FETCHING_SERVICE_CATALOG_ASDC;\r
\r
$scope.services = [];\r
if (response.data && angular.isArray(response.data.services)) {\r
wholeData = response.data.services;\r
- $scope.services = $scope.filterDataWithHigherVersion(wholeData);\r
- $scope.viewPerPage=10;\r
- $scope.totalPage=$scope.services.length/$scope.viewPerPage;\r
- $scope.sortBy=COMPONENT.NAME;\r
- $scope.scrollViewPerPage=2;\r
- $scope.currentPage=1;\r
- $scope.searchCategory;\r
- $scope.currentPageNum=1;\r
- $scope.isSpinnerVisible = false;\r
- $scope.isProgressVisible = false;\r
+ $scope.services = $scope.filterDataWithHigherVersion(wholeData);\r
+ $scope.viewPerPage = defaultViewPerPage;\r
+ $scope.totalPage=$scope.services.length/$scope.viewPerPage;\r
+ $scope.sortBy=COMPONENT.NAME;\r
+ $scope.scrollViewPerPage=2;\r
+ $scope.currentPage=1;\r
+ $scope.currentPageNum=1;\r
+ $scope.isSpinnerVisible = false;\r
+ $scope.isProgressVisible = false;\r
+ if (sessionStorage.getItem("searchKey")!='undefined' && ($scope.rememberFilter)) {\r
+ var searchKey = JSON.parse(sessionStorage.getItem("searchKey"));\r
+ $scope.searchString = searchKey.searchString || '';\r
+ $scope.viewPerPage = searchKey.viewPerPage || defaultViewPerPage;\r
+ $scope.totalPage = $scope.services.length / $scope.viewPerPage;\r
+ $timeout(function () {\r
+ // the table controller handles the current page once\r
+ // data is loaded, therefore we're delying the paging\r
+ // override\r
+ $scope.currentPage = $scope.currentPageNum = searchKey.currentPage ? parseInt(searchKey.currentPage) : 1;\r
+ }, 0);\r
+ $scope.rememberFilter = false;\r
+ }\r
} else {\r
$scope.status = FIELD.STATUS.FAILED_SERVICE_MODELS_ASDC;\r
$scope.error = true;\r
\r
//PropertyService.setMsoBaseUrl("testmso");\r
PropertyService.setServerResponseTimeoutMsec(30000);\r
- }\r
+ };\r
\r
$scope.prevPage = function() {\r
$scope.currentPage--;\r
- }\r
+ };\r
\r
$scope.nextPage = function() {\r
$scope.currentPage++;\r
- }\r
+ };\r
+\r
+\r
\r
$scope.createType = COMPONENT.A_LA_CARTE;\r
$scope.deployService = function(service) {\r
-\r
+ var searchKey = {\r
+ searchString: $scope.searchString,\r
+ viewPerPage: $scope.viewPerPage,\r
+ currentPage: $scope.currentPage\r
+ };\r
+ sessionStorage.setItem("searchKey",JSON.stringify(searchKey));\r
\r
console.log("Instantiating SDC service " + service.uuid);\r
- \r
+\r
$http.get(COMPONENT.SERVICES_PATH + service.uuid)\r
.then(function successCallback(getServiceResponse) {\r
- \r
+\r
var serviceModel = getServiceResponse.data;\r
\r
//VID-233 bug fix when models doesn't exists\r
DataService.setALaCarte (true);\r
$scope.createType = COMPONENT.A_LA_CARTE;\r
var broadcastType = COMPONENT.CREATE_COMPONENT;\r
- \r
- if (UtilityService.arrayContains (VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid )) {\r
- DataService.setALaCarte (false);\r
- $scope.createType = COMPONENT.MACRO;\r
- var convertedAsdcModel = UtilityService.convertModel(serviceModel);\r
- \r
- //console.log ("display inputs "); \r
- //console.log (JSON.stringify ( convertedAsdcModel.completeDisplayInputs));\r
- \r
- DataService.setModelInfo(COMPONENT.SERVICE, {\r
- "modelInvariantId": serviceModel.service.invariantUuid,\r
- "modelVersion": serviceModel.service.version,\r
- "modelNameVersionId": serviceModel.service.uuid,\r
- "modelName": serviceModel.service.name,\r
- "description": serviceModel.service.description,\r
- "category":serviceModel.service.category,\r
- "serviceEcompNaming": serviceModel.service.serviceEcompNaming,\r
- "inputs": serviceModel.service.inputs,\r
- "serviceType": serviceModel.service.serviceType,\r
- "serviceRole": serviceModel.service.serviceRole,\r
- "displayInputs": convertedAsdcModel.completeDisplayInputs\r
- });\r
- };\r
- \r
+ if (AsdcService.isMacro(serviceModel)) {\r
+ DataService.setALaCarte(false);\r
+ if(AsdcService.shouldExcludeMacroFromAsyncInstatiationFlow(serviceModel)){\r
+ DataService.setShouldExcludeMacroFromAsyncInstatiationFlow(true);\r
+ $scope.createType = COMPONENT.MACRO;\r
+ var convertedAsdcModel = UtilityService.convertModel(serviceModel);\r
+\r
+ DataService.setModelInfo(COMPONENT.SERVICE, {\r
+ "modelInvariantId": serviceModel.service.invariantUuid,\r
+ "modelVersion": serviceModel.service.version,\r
+ "modelNameVersionId": serviceModel.service.uuid,\r
+ "modelName": serviceModel.service.name,\r
+ "description": serviceModel.service.description,\r
+ "category": serviceModel.service.category,\r
+ "serviceEcompNaming": serviceModel.service.serviceEcompNaming,\r
+ "inputs": serviceModel.service.inputs,\r
+ "serviceType": serviceModel.service.serviceType,\r
+ "serviceRole": serviceModel.service.serviceRole,\r
+ "displayInputs": convertedAsdcModel.completeDisplayInputs\r
+ });\r
+\r
+ }\r
+ }\r
+\r
$scope.$broadcast(broadcastType, {\r
componentId : COMPONENT.SERVICE,\r
+ modelNameVersionId: serviceModel.service.uuid,\r
callbackFunction : function(response) {\r
if (response.isSuccessful) {\r
vidService.setModel(serviceModel);\r
- \r
+\r
var subscriberId = FIELD.STATUS.NOT_FOUND;\r
var serviceType = FIELD.STATUS.NOT_FOUND;\r
- \r
+\r
var serviceInstanceId = response.instanceId;\r
- \r
+\r
for (var i = 0; i < response.control.length; i++) {\r
if (response.control[i].id == COMPONENT.SUBSCRIBER_NAME) {\r
subscriberId = response.control[i].value;\r
serviceType = response.control[i].value;\r
}\r
}\r
- \r
- \r
+\r
+\r
$scope.refreshSubs(subscriberId,serviceType,serviceInstanceId);\r
- \r
+\r
}\r
}\r
});\r
- \r
}, function errorCallback(response) {\r
console.log("Error: " + response);\r
});\r
callbackFunction : function(response) {\r
}\r
});\r
- }\r
+ };\r
\r
$scope.refreshSubs = function(subscriberId, serviceType, serviceInstanceId) {\r
$scope.status = FIELD.STATUS.FETCHING_SUBSCRIBER_LIST_AAI;\r
}).then(function(response){\r
\r
if (response.data.status < 200 || response.data.status > 202) {\r
- $scope.showError(FIELD.ERROR.MSO)\r
+ $scope.showError(FIELD.ERROR.MSO);\r
return;\r
}\r
\r
},
requestParams: function () {
return requestParams;
+ },
+ configuration: function () {
+ return null;
}
}
});
controller: 'ServiceProxyConfigController',\r
templateUrl: 'app/vid/scripts/view-models/serviceProxyConfig.htm'\r
})\r
+ .when('/servicePlanning', {\r
+ controller: 'iframeController',\r
+ templateUrl: 'app/vid/scripts/view-models/iframe.htm'\r
+ })\r
+ .when('/instantiationStatus', {\r
+ controller: 'iframeController',\r
+ templateUrl: 'app/vid/scripts/view-models/iframe.htm'\r
+ })\r
.otherwise({\r
redirectTo: '/models/services'\r
});\r
\r
"use strict";\r
\r
-appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", "DataService", "PropertyService", "$scope", "$http", "$timeout", "$location", "$log", "$route", "$uibModal", "VIDCONFIGURATION", "UtilityService", "vidService", "AaiService", "MsoService", "OwningEntityService", "$q",\r
- function (COMPONENT, FIELD, PARAMETER, DataService, PropertyService, $scope, $http, $timeout, $location, $log, $route, $uibModal, VIDCONFIGURATION, UtilityService, vidService, AaiService, MsoService, OwningEntityService, $q) {\r
+appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", "DataService", "PropertyService", "$scope", "$http", "$timeout", "$location", "$log", "$route", "$uibModal", "VIDCONFIGURATION", "UtilityService", "vidService", "AaiService", "MsoService", "OwningEntityService", "AsdcService","featureFlags", "$q", "_",\r
+ function (COMPONENT, FIELD, PARAMETER, DataService, PropertyService, $scope, $http, $timeout, $location, $log, $route, $uibModal, VIDCONFIGURATION, UtilityService, vidService, AaiService, MsoService, OwningEntityService, AsdcService, featureFlags, $q, _) {\r
\r
$scope.showVnfDetails = function (vnf) {\r
console.log("showVnfDetails");\r
$scope.serviceTypes = [FIELD.PROMPT.SELECT_SERVICE, COMPONENT.UCPE_VMS, COMPONENT.SDN_L3_BONDING, COMPONENT.SDN_ETHERNET_INTERNET];\r
$scope.defaultSubscriberName = [FIELD.PROMPT.SELECT_SUB];\r
\r
+ $scope.verifyButtonEnabled = true;\r
+\r
var callbackFunction = function (response) {\r
alert(response);\r
};\r
$scope.createType = "a la carte";\r
var broadcastType = "createComponent";\r
\r
- if (UtilityService.arrayContains(VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid)) {\r
+ if (AsdcService.isMacro(serviceModel)) {\r
+ DataService.setShouldExcludeMacroFromAsyncInstatiationFlow(AsdcService.shouldExcludeMacroFromAsyncInstatiationFlow(serviceModel));\r
DataService.setALaCarte(false);\r
$scope.createType = "Macro";\r
var convertedAsdcModel = UtilityService.convertModel(serviceModel);\r
$scope.setProgress(2); // Show "a little" progress\r
}\r
\r
+ function getRelatedInstanceGroupsByVnfId(genericVnf) {\r
+ var model = vidService.getModel();\r
+ if (model && model.vnfs && !_.isEmpty(model.vnfs)) {\r
+ Object.keys(model.vnfs).forEach(function (key) {\r
+ var vnf = model.vnfs[key];\r
+ if (vnf.vfcInstanceGroups && !_.isEmpty(vnf.vfcInstanceGroups)) {\r
+ if (vnf.uuid === genericVnf.modelVersionId) {\r
+ AaiService.getInstanceGroupsByVNFInstanceId(genericVnf.nodeId,\r
+ function (response) { //success\r
+ handleGetRelatedInstanceGroupsResponseForVnf(response, genericVnf);\r
+ },\r
+ function (response) { //failure\r
+ $scope.showError(FIELD.ERROR.AAI);\r
+ $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICE_INSTANCE_DATA + response.status;\r
+ $scope.errorDetails = response.data;\r
+ }\r
+ )\r
+ }\r
+ }\r
+ })\r
+ }\r
+ }\r
+\r
+ function resolveModelDataIfMissing(modelVersionId) {\r
+ var model = vidService.getModel();\r
+ if (model && model.service && model.service.uuid === modelVersionId) {\r
+ return $q.resolve(); // no need to resolve anything\r
+ } else {\r
+ // resolve model and value of isPermitted\r
+ return resolveIfIsPermitted()\r
+ .then(function() {\r
+ return getAsdcModelByVersionId(modelVersionId);\r
+ })\r
+ }\r
+ }\r
+\r
+ function resolveIfIsPermitted() {\r
+ var deferred = $q.defer();\r
+ AaiService.searchServiceInstances(\r
+ '?subscriberId=' + $location.search().subscriberId +\r
+ '&serviceInstanceIdentifier=' + $location.search().serviceInstanceId)\r
+ .then(function (response) {\r
+ if (response.displayData && response.displayData.length) {\r
+ var first = response.displayData[0];\r
+ $scope.isPermitted = first.isPermitted;\r
+ deferred.resolve(first.isPermitted);\r
+ } else {\r
+ deferred.reject("some error while resolveIfIsPermitted")\r
+ }\r
+ });\r
+\r
+ return deferred.promise;\r
+ }\r
+\r
+\r
$scope.getComponentList = function (event, request) {\r
\r
$scope.isSpinnerVisible = true;\r
\r
//$scope.getAsdcModel($location.search().modelUuid);\r
\r
- $scope.namedQueryId = VIDCONFIGURATION.COMPONENT_LIST_NAMED_QUERY_ID;\r
- $scope.status = FIELD.STATUS.FETCHING_SERVICE_INST_DATA + $scope.serviceInstanceId;\r
-\r
- AaiService.runNamedQuery($scope.namedQueryId, $scope.globalCustomerId, $scope.serviceType, $scope.serviceInstanceId,\r
- function (response) { //success\r
- $scope.handleInitialResponseInventoryItems(response);\r
- $scope.setProgress(100); // done\r
- $scope.status = FIELD.STATUS.DONE;\r
- $scope.isSpinnerVisible = false;\r
- },\r
- function (response) { //failure\r
- $scope.showError(FIELD.ERROR.AAI);\r
- $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICE_INSTANCE_DATA + response.status;\r
- $scope.errorDetails = response.data;\r
- }\r
- );\r
-\r
- }\r
+ return getModelVersionIdForServiceInstance({\r
+ globalCustomerId: $location.search().subscriberId,\r
+ serviceInstanceId: $location.search().serviceInstanceId,\r
+ aaiModelVersionId: $location.search().aaiModelVersionId\r
+ })\r
+ .then(resolveModelDataIfMissing)\r
+ .then($scope.prepareScopeWithModel)\r
+ .then(function () {\r
+\r
+ $scope.namedQueryId = VIDCONFIGURATION.COMPONENT_LIST_NAMED_QUERY_ID;\r
+ $scope.status = FIELD.STATUS.FETCHING_SERVICE_INST_DATA + $scope.serviceInstanceId;\r
+\r
+ return AaiService.runNamedQuery($scope.namedQueryId, $scope.globalCustomerId, $scope.serviceType, $scope.serviceInstanceId,\r
+ function (response) { //success\r
+ $scope.handleInitialResponseInventoryItems(response);\r
+ $scope.setProgress(100); // done\r
+ $scope.status = FIELD.STATUS.DONE;\r
+ $scope.isSpinnerVisible = false;\r
+ //TODO\r
+ },\r
+ function (response) { //failure\r
+ $scope.showError(FIELD.ERROR.AAI);\r
+ $scope.errorMsg = FIELD.ERROR.FETCHING_SERVICE_INSTANCE_DATA + response.status;\r
+ $scope.errorDetails = response.data;\r
+ }\r
+ )\r
+ })\r
+ };\r
\r
$scope.handleServerError = function (response, status) {\r
alert(response.statusText);\r
}\r
\r
+ function handleGetRelatedInstanceGroupsResponseForVnf(response, genericVnf) {\r
+ _.forEach(response.data, function (instanceGroup) {\r
+ var newInstanceGroup = {\r
+ name: instanceGroup.name,\r
+ type: instanceGroup.type\r
+ };\r
+ genericVnf.instanceGroups.push(newInstanceGroup);\r
+ })\r
+ }\r
+\r
+\r
+\r
function getModelVersionIdForServiceInstance(instance) {\r
if (UtilityService.hasContents(instance.aaiModelVersionId)) {\r
return $q.resolve(instance.aaiModelVersionId);\r
+ } else if ($scope.modelVersionIdForServiceInstance\r
+ && $scope.modelVersionIdForServiceInstance.globalCustomerId === instance.globalCustomerId\r
+ && $scope.modelVersionIdForServiceInstance.serviceInstanceId === instance.serviceInstanceId\r
+ ) {\r
+ return $q.resolve($scope.modelVersionIdForServiceInstance.aaiModelVersionId);\r
} else {\r
- return AaiService.getModelVersionId(instance.globalCustomerId, instance.serviceInstanceId);\r
+ $scope.status = FIELD.STATUS.FETCHING_SERVICE_INST_DATA + $scope.serviceInstanceId;\r
+ return AaiService.getModelVersionId(instance.globalCustomerId, instance.serviceInstanceId)\r
+ .then(function (aaiModelVersionId) {\r
+ $scope.modelVersionIdForServiceInstance = {\r
+ globalCustomerId: instance.globalCustomerId,\r
+ serviceInstanceId: instance.serviceInstanceId,\r
+ aaiModelVersionId: aaiModelVersionId\r
+ };\r
+ return $q.resolve(aaiModelVersionId);\r
+ });\r
}\r
}\r
\r
COMPONENT.SUBSCRIBERNAME_SUB_PATH + disData.subscriberName +\r
COMPONENT.SERVICETYPE_SUB_PATH + disData.serviceType +\r
COMPONENT.SERVICEINSTANCEID_SUB_PATH + disData.serviceInstanceId +\r
+ COMPONENT.MODELVERSIONID_SUB_PATH + disData.aaiModelVersionId +\r
COMPONENT.IS_PERMITTED_SUB_PATH + disData.isPermitted;\r
}\r
};\r
method: 'GET',\r
url: pathQuery\r
}).then(function successCallback(response) {\r
- vidService.setModel(response.data);\r
- console.log("aaiSubscriber getAsdcModel DONE!!!!");\r
- }, function errorCallback(response) {\r
+ if (response.headers()['content-type'].includes('json')) {\r
+ vidService.setModel(response.data);\r
+ console.log("aaiSubscriber getAsdcModel DONE!!!!");\r
+ } else {\r
+ // the response is erroneous\r
+ console.log("aaiSubscriber getAsdcModel BAD RESPONSE");\r
+ errorCallback(response);\r
+ return $q.reject()\r
+ }\r
+ }, errorCallback);\r
+\r
+ function errorCallback(response) {\r
$log.error("aaiSubscriber getAsdcModel - " + FIELD.ERROR.NO_MATCHING_MODEL_AAI + aaiModelVersionId);\r
$scope.errorMsg = FIELD.ERROR.NO_MATCHING_MODEL_AAI + aaiModelVersionId;\r
alert($scope.errorMsg);\r
- });\r
+ }\r
}\r
\r
function returnMatchingServiceSubscription(serviceSubs, serviceId){\r
});\r
}\r
\r
+ $scope.isConfigurationDataAvailiable = function (configuration) {\r
+ $log.debug(configuration);\r
+ return configuration.configData && (!configuration.configData.errorDescription);\r
+ }\r
+\r
$scope.isActivateDeactivateEnabled = function(btnType) {\r
- if ($scope.serviceOrchestrationStatus && $scope.service.model.service.serviceType.toLowerCase().indexOf('transport') != -1) {\r
+ if ($scope.serviceOrchestrationStatus) {\r
+ var status = $scope.serviceOrchestrationStatus.toLowerCase();\r
switch (btnType) {\r
case "activate":\r
- return $scope.serviceOrchestrationStatus === 'Created' ||\r
- $scope.serviceOrchestrationStatus.toLowerCase() === 'pendingdelete' || $scope.serviceOrchestrationStatus.toLowerCase() === 'pending-delete';\r
+ return _.includes(COMPONENT.ACTIVATE_SERVICE_STATUSES, status);\r
break;\r
case "deactivate":\r
- return $scope.serviceOrchestrationStatus === 'Active';\r
+ return status === 'active';\r
break;\r
}\r
}\r
return false;\r
};\r
\r
+ $scope.isShowVerifyService = function () {\r
+ return featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_SHOW_VERIFY_SERVICE);\r
+ }\r
+\r
+ $scope.isEnableVerifyService = function () {\r
+ //Button should only be enabled when the service type is A la carte\r
+ if (DataService.getALaCarte()) {\r
+ return $scope.verifyButtonEnabled;\r
+ }\r
+ return false;\r
+ };\r
+\r
+ $scope.activateVerifyService = function () {\r
+ $scope.verifyButtonEnabled = false;\r
+ let url = COMPONENT.VERIFY_SERVICE_URL;\r
+\r
+ let config = {\r
+ headers: {\r
+ 'Content-Type': 'application/json'\r
+ }\r
+ };\r
+\r
+ let data = {\r
+ "serviceInstanceList": [\r
+ {\r
+ "serviceInstanceId": $scope.serviceInstanceId,\r
+ "modelVersionId": $scope.service.model.service.uuid,\r
+ "modelInvariantId": $scope.service.model.service.invariantUuid,\r
+ "customerId": $scope.globalCustomerId,\r
+ "serviceType": $scope.service.instance.serviceType,\r
+ }\r
+ ]\r
+ };\r
+ AaiService.postPOMBAverificationRequest(url, data, config);\r
+\r
+ };\r
+\r
+ $scope.isShowAssignmentsEnabled = function () {\r
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_SHOW_ASSIGNMENTS)) {\r
+ if ($scope.serviceOrchestrationStatus) {\r
+ return $scope.serviceOrchestrationStatus.toLowerCase() === 'assigned';\r
+ }\r
+ }\r
+ return false;\r
+ };\r
+\r
+ $scope.isResumeShown = function (status) {\r
+ var vfModuleStatus = status.toLowerCase();\r
+ var serviceStatus = $scope.serviceOrchestrationStatus && $scope.serviceOrchestrationStatus.toLowerCase();\r
+ return _.includes(['pendingactivation', 'assigned'], vfModuleStatus) && !$scope.isActivateDeactivateEnabled("activate");\r
+ };\r
+\r
$scope.handleInitialResponseInventoryItems = function (response) {\r
\r
$scope.inventoryResponseItemList = response.data[FIELD.ID.INVENTORY_RESPONSE_ITEM]; // get data from json\r
"configurations": []\r
};\r
\r
+ var portMirroringConfigurationIds = [];\r
if (inventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) {\r
\r
angular.forEach(inventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function (subInventoryResponseItem, key) {\r
"nodeType": genericVnfObject[FIELD.ID.VNF_TYPE],\r
"nodeId": genericVnfObject[FIELD.ID.VNF_ID],\r
"nodeStatus": genericVnfObject[FIELD.ID.ORCHESTRATION_STATUS],\r
+ "modelVersionId" : genericVnfObject[FIELD.ID.MODEL_VERSION_ID],\r
"object": genericVnfObject,\r
"vfModules": [],\r
"volumeGroups": [],\r
+ "instanceGroups": [],\r
"availableVolumeGroups": []\r
};\r
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_VLAN_TAGGING_VIEW_EDIT)) {\r
+\r
+ //TODO should be changed after integration\r
+ genericVnf["instanceGroups"] = [{"name":"a2"}];\r
+\r
+ }\r
$scope.service.instance[FIELD.ID.VNFS].push(genericVnf);\r
+ getRelatedInstanceGroupsByVnfId(genericVnf);\r
+\r
+\r
\r
// look for volume-groups\r
if (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) {\r
}\r
}\r
\r
+\r
if (subInventoryResponseItem[FIELD.ID.GENERIC_CONFIGURATION] != null) {\r
var configObject = subInventoryResponseItem[FIELD.ID.GENERIC_CONFIGURATION];\r
var config = {\r
"modelVersionId": configObject[FIELD.ID.MODEL_VERSION_ID],\r
"modelCustomizationId": configObject[FIELD.ID.MODEL_CUSTOMIZATION_ID],\r
"object": configObject,\r
- "ports": []\r
+ "ports": [],\r
+ "configData" : null\r
};\r
+ portMirroringConfigurationIds.push(configObject[FIELD.ID.CONFIGURATION_ID]);\r
\r
$scope.allowConfigurationActions = [FIELD.STATUS.AAI_ACTIVE, FIELD.STATUS.AAI_INACTIVE, FIELD.STATUS.AAI_CREATED].indexOf(config.nodeStatus) != -1;\r
\r
- if (subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS] != null) {\r
- angular.forEach(subInventoryResponseItem[FIELD.ID.INVENTORY_RESPONSE_ITEMS][FIELD.ID.INVENTORY_RESPONSE_ITEM], function (subSubInventoryResponseItem, key) {\r
- var port = {};\r
- var portObject;\r
- if (subSubInventoryResponseItem[FIELD.ID.PORT] != null) {\r
- portObject = subSubInventoryResponseItem[FIELD.ID.PORT];\r
- port = {\r
- "portId": portObject[FIELD.ID.PORT_ID],\r
- "portName": portObject[FIELD.ID.PORT_NAME],\r
- "portStatus": portObject[FIELD.ID.PORT_MIRRORED] === true ? FIELD.STATUS.AAI_ENABLED : FIELD.ID.AAI_DISABLED,\r
- "object": portObject\r
- };\r
- config.ports.push(port);\r
- }\r
- });\r
- }\r
$scope.service.instance[FIELD.ID.CONFIGURATIONS].push(config);\r
}\r
\r
});\r
+\r
+ AaiService.getPortMirroringData(portMirroringConfigurationIds).then(function(result){\r
+ angular.forEach($scope.service.instance[FIELD.ID.CONFIGURATIONS], function(config){\r
+ config['configData'] = result.data[config['nodeId']]\r
+\r
+ if (config.configData && config.configData.errorDescription) {\r
+ $scope.errorMsg = ($scope.errorMsg ? $scope.errorMsg + "\n" : "") +\r
+ "Cannot read cloud-region for configuration \"" + config.name + "\": " +\r
+ config.configData.errorDescription;\r
+ }\r
+ });\r
+ });\r
+\r
+ AaiService.getPortMirroringSourcePorts(portMirroringConfigurationIds).then(function(result){\r
+ angular.forEach($scope.service.instance[FIELD.ID.CONFIGURATIONS], function(config){\r
+ angular.forEach(result.data[config['nodeId']], function(port){\r
+ if (port.errorDescription) {\r
+ $scope.errorMsg = ($scope.errorMsg ? $scope.errorMsg + "\n" : "") +\r
+ "Cannot read a source port for configuration \"" + config.name + "\": " +\r
+ port.errorDescription;\r
+ } else {\r
+ config.ports.push({\r
+ "portId": port[FIELD.ID.PORT_ID],\r
+ "portName": port[FIELD.ID.PORT_NAME],\r
+ "portStatus": port[FIELD.ID.PORT_MIRRORED] === true ? FIELD.STATUS.AAI_ENABLED : FIELD.STATUS.AAI_DISABLED\r
+ });\r
+ }\r
+ });\r
+ });\r
+ });\r
+\r
}\r
});\r
+\r
});\r
+\r
+\r
+\r
}\r
\r
+\r
+\r
+\r
$scope.handleInitialResponse = function (response) {\r
try {\r
$scope.enableCloseButton(true);\r
});\r
};\r
\r
- var activateDeactivateServiceInstance = function(msoType) {\r
+ var activateDeactivateServiceInstance = function (msoType) {\r
var requestParams = {\r
model: $scope.service.model,\r
instance: $scope.service.instance\r
}\r
};\r
\r
- $scope.activateMSOInstance = function() {\r
+ $scope.showAssignmentsSDNC = function () {\r
+\r
+ if ($scope.service && $scope.service.instance) {\r
+ return VIDCONFIGURATION.SDNC_SHOW_ASSIGNMENTS_URL.replace("<SERVICE_INSTANCE_ID>" , $scope.service.instance.id);\r
+ }\r
+ return null;\r
+ };\r
+\r
+ $scope.activateMSOInstance = function () {\r
\r
activateDeactivateServiceInstance(COMPONENT.MSO_ACTIVATE_SERVICE_REQ);\r
};\r
\r
- $scope.deactivateMSOInstance = function() {\r
+ $scope.deactivateMSOInstance = function () {\r
\r
activateDeactivateServiceInstance(COMPONENT.MSO_DEACTIVATE_SERVICE_REQ);\r
};\r
\r
- $scope.toggleConfigurationStatus = function (serviceObject, configuration) {\r
-\r
\r
+ $scope.deleteConfiguration = function (serviceObject, configuration) {\r
AaiService.getLoggedInUserID(function (response) {\r
- DataService.setLoggedInUserId(response.data);\r
- var requestParams = {\r
- serviceModel: {\r
- "modelType": "service",\r
- "modelInvariantId": serviceObject.model.service.invariantUuid,\r
- "modelVersionId": "uuid",\r
- "modelName": serviceObject.model.service.name,\r
- "modelVersion": serviceObject.model.service.version\r
- },\r
- configurationModel: {\r
- "modelType": "configuration",\r
- "modelInvariantId": configuration.modelInvariantId,\r
- "modelVersionId": configuration.modelVersionId,\r
- "modelCustomizationId": configuration.modelCustomizationId\r
- },\r
- serviceInstanceId: serviceObject.instance.serviceInstanceId,\r
- configurationId: configuration.nodeId,\r
- configStatus: configuration.nodeStatus,\r
- userId: DataService.getLoggedInUserId()\r
- };\r
+ DataService.setLoggedInUserId(response.data);\r
+ var requestParams = {\r
+ serviceModel: {\r
+ "modelType": "configuration",\r
+ "modelInvariantId": serviceObject.model.service.invariantUuid,\r
+ "modelVersionId": serviceObject.model.service.uuid,\r
+ "modelName": serviceObject.model.service.name,\r
+ "modelVersion": serviceObject.model.service.version\r
+ },\r
+ configurationModel: {\r
+ "modelType": "configuration",\r
+ "modelInvariantId": configuration.modelInvariantId,\r
+ "modelVersionId": configuration.modelVersionId,\r
+ "modelCustomizationId": configuration.modelCustomizationId\r
+ },\r
+ serviceInstanceId: serviceObject.instance.serviceInstanceId,\r
+ configurationId: configuration.nodeId,\r
+ configStatus: configuration.DELETE,\r
+ userId: DataService.getLoggedInUserId()\r
+ };\r
\r
- openMsoModal(COMPONENT.MSO_CHANGE_CONFIG_STATUS_REQ, requestParams);\r
- });\r
+ openMsoModal(COMPONENT.MSO_DELETE_CONFIGURATION_REQ, requestParams, configuration);\r
+ });\r
\r
};\r
\r
- $scope.togglePortStatus = function(serviceObject, configuration, port) {\r
+ $scope.toggleConfigurationStatus = function (serviceObject, configuration) {\r
+ AaiService.getLoggedInUserID(function (response) {\r
+ DataService.setLoggedInUserId(response.data);\r
+ var requestParams = {\r
+ serviceModel: {\r
+ "modelType": "service",\r
+ "modelInvariantId": serviceObject.model.service.invariantUuid,\r
+ "modelVersionId": serviceObject.model.service.uuid,\r
+ "modelName": serviceObject.model.service.name,\r
+ "modelVersion": serviceObject.model.service.version\r
+ },\r
+ configurationModel: {\r
+ "modelType": "configuration",\r
+ "modelInvariantId": configuration.modelInvariantId,\r
+ "modelVersionId": configuration.modelVersionId,\r
+ "modelCustomizationId": configuration.modelCustomizationId\r
+ },\r
+ serviceInstanceId: serviceObject.instance.serviceInstanceId,\r
+ configurationId: configuration.nodeId,\r
+ configStatus: configuration.nodeStatus,\r
+ userId: DataService.getLoggedInUserId()\r
+ };\r
+\r
+ openMsoModal(COMPONENT.MSO_CHANGE_CONFIG_STATUS_REQ, requestParams, configuration);\r
+ });\r
\r
- var requestParams = {\r
- serviceInstanceId: serviceObject.instance.serviceInstanceId,\r
- configurationId: configuration.nodeId,\r
- portId: port.portId,\r
- portStatus: port.portStatus,\r
- serviceModel: {\r
- "modelType": "service",\r
- "modelInvariantId": serviceObject.model.service.invariantUuid,\r
- "modelVersionId": "uuid",\r
- "modelName": serviceObject.model.service.name,\r
- "modelVersion": serviceObject.model.service.version\r
- },\r
- configurationModel: {\r
- "modelType": "configuration",\r
- "modelInvariantId": configuration.modelInvariantId,\r
- "modelVersionId": configuration.modelVersionId,\r
- "modelCustomizationId": configuration.modelCustomizationId\r
- },\r
- userId: DataService.getLoggedInUserId()\r
- };\r
+ };\r
\r
- openMsoModal(COMPONENT.MSO_CHANGE_PORT_STATUS_REQ, requestParams);\r
+ $scope.togglePortStatus = function (serviceObject, configuration, port) {\r
+ AaiService.getLoggedInUserID(function (response) {\r
+ DataService.setLoggedInUserId(response.data);\r
+\r
+ var requestParams = {\r
+ serviceInstanceId: serviceObject.instance.serviceInstanceId,\r
+ configurationId: configuration.nodeId,\r
+ portId: port.portId,\r
+ portStatus: port.portStatus,\r
+ serviceModel: {\r
+ "modelType": "service",\r
+ "modelInvariantId": serviceObject.model.service.invariantUuid,\r
+ "modelVersionId": serviceObject.model.service.uuid,\r
+ "modelName": serviceObject.model.service.name,\r
+ "modelVersion": serviceObject.model.service.version\r
+ },\r
+ configurationModel: {\r
+ "modelType": "configuration",\r
+ "modelInvariantId": configuration.modelInvariantId,\r
+ "modelVersionId": configuration.modelVersionId,\r
+ "modelCustomizationId": configuration.modelCustomizationId\r
+ },\r
+ userId: DataService.getLoggedInUserId()\r
+ };\r
+\r
+ openMsoModal(COMPONENT.MSO_CHANGE_PORT_STATUS_REQ, requestParams, configuration);\r
+ });\r
};\r
\r
- $scope.dissociatePnf = function(pnfName) {\r
+ $scope.dissociatePnf = function (pnfName) {\r
\r
var jobInfo = {\r
status: "confirm",\r
};\r
\r
if (DataService.getLoggedInUserId()) {\r
+ requestParams.userId = DataService.getLoggedInUserId();\r
requestParams.attuuid = DataService.getLoggedInUserId();\r
openMsoModal(COMPONENT.MSO_REMOVE_RELATIONSHIP, requestParams);\r
} else {\r
AaiService.getLoggedInUserID(function (response) {\r
DataService.setLoggedInUserId(response.data);\r
\r
+ requestParams.userId = response.data;\r
requestParams.attuuid = response.data;\r
openMsoModal(COMPONENT.MSO_REMOVE_RELATIONSHIP, requestParams);\r
});\r
\r
};\r
\r
- var openMsoModal = function (msoType, requestParams) {\r
+ var openMsoModal = function (msoType, requestParams, configuration) {\r
var modalInstance = $uibModal.open({\r
templateUrl: 'app/vid/scripts/modals/mso-commit/mso-commit.html',\r
- controller : "msoCommitModalController",\r
+ controller: "msoCommitModalController",\r
backdrop: false,\r
resolve: {\r
msoType: function () {\r
return msoType;\r
},\r
- requestParams: function() {\r
+ requestParams: function () {\r
requestParams.callbackFunction = updateViewCallbackFunction;\r
return requestParams;\r
+ },\r
+ configuration: function () {\r
+ return configuration;\r
}\r
}\r
});\r
};\r
\r
- var updateViewCallbackFunction = function(response) {\r
+ var updateViewCallbackFunction = function (response) {\r
$scope.callbackResults = "";\r
var color = FIELD.ID.COLOR_NONE;\r
$scope.callbackStyle = {\r
- "background-color" : color\r
+ "background-color": color\r
};\r
\r
/*\r
* This 1/2 delay was only added to visually highlight the status\r
* change. Probably not needed in the real application code.\r
*/\r
- $timeout(function() {\r
+ $timeout(function () {\r
$scope.callbackResults = UtilityService.getCurrentTime()\r
+ FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
if (response.isSuccessful) {\r
color = FIELD.ID.COLOR_F88;\r
}\r
$scope.callbackStyle = {\r
- "background-color" : color\r
+ "background-color": color\r
};\r
}, 500);\r
};\r
}\r
}\r
};\r
- }]).directive('restrictInput', function () {\r
+ }\r
+]).directive('restrictInput', function () {\r
\r
return {\r
\r
vm.lastTimeUpdated = "";
vm.hasScheduler = !!VIDCONFIGURATION.SCHEDULER_PORTAL_URL;
+ vm.currModal = null;
vm.init = function() {
vm.lastTimeUpdated = $filter('date')(new Date(), "MM/dd/yyyy | HH:mm:ss");
loadSchedulerChangeManagements();
};
+ var fuseMsoAndSchedulerTaks = function() {
+ if (vm.changeManagements && vm.pendingChangeManagements) {
+ var requestIdToVnfName = {}
+ vm.pendingChangeManagements.forEach(function(schedulerItem) {
+ if (schedulerItem.msoRequestId && schedulerItem.vnfName) {
+ requestIdToVnfName[schedulerItem.msoRequestId] = schedulerItem.vnfName;
+ }
+ })
+ $log.debug("requestIdToVnfName", requestIdToVnfName);
+
+ vm.changeManagements = vm.changeManagements.map(function(msoItem) {
+ msoItem['vnfNameFromScheduler'] = requestIdToVnfName[msoItem.requestId];
+ return msoItem;
+ })
+ }
+ };
+
var loadMSOChangeManagements = function() {
changeManagementService.getMSOChangeManagements()
.then(function(response) {
vm.changeManagements = response.data;
})
+ .then(function () {
+ fuseMsoAndSchedulerTaks();
+ })
.catch(function (error) {
$log.error(error);
});
}
});
})
+ .then(function () {
+ fuseMsoAndSchedulerTaks();
+ })
.catch(function(error) {
$log.error(error);
});
};
vm.createNewChange = function() {
+ vm.closeCurrentModalIfOpen();
var modalInstance = $uibModal.open({
templateUrl: 'app/vid/scripts/modals/new-change-management/new-change-management.html',
controller: 'newChangeManagementModalController',
resolve: {}
});
+ vm.currModal = modalInstance;
+
modalInstance.result.then(function (result) {
console.log("This is the result of the new change management modal.", result);
});
console.log("function for searching changes: " + vm.searchChangesTerm)
};
- vm.openFailedModal = function(jobInfo) {
- var modalInstance = $uibModal.open({
- templateUrl: 'app/vid/scripts/modals/failed-change-management/failed-change-management.html',
- controller: 'changeManagementManualTasksController',
- controllerAs: 'vm',
- resolve: {
- jobInfo: function () {
- return jobInfo;
- }
- },
- });
+ vm.openManualTasksPopup = function($event, jobInfo, templateUrl, message) {
- modalInstance.result.then(function (result) {
- console.log("This is the result of the failed change management modal.", result);
- });
- };
+ vm.closeCurrentModalIfOpen();
- vm.openInProgressModal = function(jobInfo) {
var modalInstance = $uibModal.open({
- templateUrl: 'app/vid/scripts/modals/in-progress-modal-management/in-progress-change-management.html',
+ templateUrl: templateUrl,
controller: 'changeManagementManualTasksController',
controllerAs: 'vm',
+ backdrop: false,
+ animation: true,
+ appendTo: angular.element($event.currentTarget).parent(),
resolve: {
jobInfo: function () {
return jobInfo;
});
modalInstance.result.then(function (result) {
- console.log("This is the result of the in progress change management modal.", result);
+ console.log(message, result);
});
+
+ vm.currModal = modalInstance;
};
- vm.openAlertModal = function(jobInfo) {
- var modalInstance = $uibModal.open({
- templateUrl: 'app/vid/scripts/modals/alert-change-management/alert-change-management.html',
- controller: 'changeManagementManualTasksController',
- controllerAs: 'vm',
- resolve: {
- jobInfo: function () {
- return jobInfo;
- }
- }
- });
+ vm.openFailedModal = function($event, jobInfo) {
+ vm.openManualTasksPopup($event, jobInfo,
+ 'app/vid/scripts/modals/failed-change-management/failed-change-management.html',
+ "This is the result of the failed change management modal.")
+ };
- modalInstance.result.then(function (result) {
- console.log("This is the result of the alert change management modal.", result);
- });
+ vm.openInProgressModal = function($event, jobInfo) {
+ vm.openManualTasksPopup($event, jobInfo,
+ 'app/vid/scripts/modals/in-progress-modal-management/in-progress-change-management.html',
+ "This is the result of the in progress change management modal.")
+ };
+
+ vm.openAlertModal = function($event, jobInfo) {
+ vm.openManualTasksPopup($event, jobInfo,
+ 'app/vid/scripts/modals/alert-change-management/alert-change-management.html',
+ "This is the result of the alert change management modal.")
};
+
vm.openBasicAlertModal = function(jobInfo) {
+ vm.closeCurrentModalIfOpen();
var modalInstance = $uibModal.open({
templateUrl: 'app/vid/scripts/modals/alert-modal/alert-modal.html',
controller: 'alertModalController',
controllerAs: 'vm',
+ backdrop: false,
+ animation: true,
appendTo: angular.element(".jobs-table").eq(0),
resolve: {
jobInfo: function () {
}
}
});
+ vm.currModal = modalInstance;
modalInstance.result.then(function (result) {
console.log("This is the result of the alert change management modal.", result);
});
};
vm.openPendingModal = function($event, changeManagement) {
+
+ vm.closeCurrentModalIfOpen();
+
var modalInstance = $uibModal.open({
templateUrl: 'app/vid/scripts/modals/cancel-pending-workflow/cancel-pending-workflow.html',
controller: 'cancelPendingWorkflowController',
}
});
+ vm.currModal = modalInstance;
+
modalInstance.result.then(function (result) {
// send to service
if(result){
}});
};
+ vm.isChangeManagementDeleted = function(changeManagement) {
+ return changeManagement.scheduleRequest.status!=='Deleted'
+ };
+
+ vm.closeCurrentModalIfOpen = function() {
+ if (vm.currModal != null) {
+ vm.currModal.close();
+ vm.currModal = null;
+ }
+ }
vm.init();
\r
"use strict";\r
\r
-var creationDialogController = function( COMPONENT, FIELD, PARAMETER, $scope, $http, $timeout, $log,\r
- CreationService, UtilityService, DataService,VIDCONFIGURATION) {\r
-\r
- $scope.isDialogVisible = false;\r
- $scope.summaryControl = {};\r
- $scope.userProvidedControl = {};\r
-\r
- var callbackFunction = undefined;\r
- var componentId = undefined;\r
-\r
- $scope.$on(COMPONENT.CREATE_COMPONENT, function(event, request) {\r
-\r
- $scope.isSpinnerVisible = true;\r
- $scope.isErrorVisible = false;\r
- $scope.isDataVisible = false;\r
- $scope.isConfirmEnabled = false;\r
- $scope.isDialogVisible = true;\r
- $scope.popup.isVisible = true;\r
-\r
- callbackFunction = request.callbackFunction;\r
- componentId = request.componentId;\r
- CreationService.initializeComponent(request.componentId);\r
-\r
- CreationService.setHttpErrorHandler(function(response) {\r
- showError(FIELD.ERROR.SYSTEM_FAILURE, UtilityService\r
- .getHttpErrorMessage(response));\r
- });\r
-\r
- $scope.componentName = CreationService.getComponentDisplayName();\r
-\r
- CreationService.getParameters(handleGetParametersResponse);\r
-\r
- });\r
-\r
- var handleGetParametersResponse = function(parameters) {\r
- $scope.summaryControl.setList(parameters.summaryList);\r
- $scope.userProvidedControl.setList(parameters.userProvidedList);\r
-\r
- $scope.isSpinnerVisible = false;\r
- $scope.isDataVisible = true;\r
- $scope.isConfirmEnabled = true;\r
- };\r
- \r
- var validateInstanceName = function(iname) {\r
- var patt1 = /^([a-z])+([0-9a-z\-_\.]*)$/i;\r
- \r
- if ( iname == null ){\r
- return false;\r
- }\r
- if ( !iname.match(patt1) ) {\r
- return false;\r
- }\r
- return true;\r
- };\r
- var validateMap = function(mname) {\r
- var patt1 = /^{(\s*\w+\s*:\s*\w+\s*)(\s*,\s*\w+\s*:\s*\w+\s*)*}$/im;\r
- if ( mname == null ){\r
- return true;\r
- }\r
- if ( !mname.match(patt1) ) {\r
- return false;\r
- }\r
- return true;\r
- };\r
- \r
- var validateList = function(lname) {\r
- var patt1 = /^\[(\s*\w+\s*)(\s*,\s*\w+\s*)*\]$/i;\r
- if ( lname == null ){\r
- return true;\r
- }\r
- if ( !lname.match(patt1) ) {\r
- return false;\r
- }\r
- return true;\r
- };\r
- \r
- $scope.userParameterChanged = function(id) {\r
- CreationService.updateUserParameterList(id, $scope.userProvidedControl);\r
- }\r
-\r
- $scope.confirm = function() {\r
-\r
- var requiredFields = $scope.userProvidedControl.getRequiredFields();\r
- if (requiredFields !== "") {\r
- showError(FIELD.ERROR.MISSING_DATA, requiredFields);\r
- return;\r
- }\r
- \r
- var isUploadAvailable = false;\r
- var uploadIndex =0;\r
- var paramList = $scope.userProvidedControl.getList();\r
- var isAnyError = false;\r
- for (var i = 0; i < paramList.length; i++) {\r
- if (paramList[i].id === FIELD.ID.SUPPLEMENTORY_DATA_FILE) {\r
- isUploadAvailable = true;\r
- uploadIndex=i;\r
- }\r
- if (paramList[i].id === FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE && paramList[i].value && document.getElementById(FIELD.ID.SUPPLEMENTORY_DATA_FILE).value=='' ) {\r
- isAnyError = true;\r
- }\r
- }\r
- \r
- if(isUploadAvailable && isAnyError ){\r
- showError(FIELD.ERROR.MISSING_DATA, FIELD.ERROR.MISSING_FILE);\r
- return;\r
- }else if(isUploadAvailable && document.getElementById(FIELD.ID.SUPPLEMENTORY_DATA_FILE).value!='' ){\r
- var errorMsg = "";\r
- var fileInput = document.getElementById(FIELD.ID.SUPPLEMENTORY_DATA_FILE);\r
- var file = fileInput.files[0];\r
- var reader = new FileReader();\r
- reader.onload = function(e) {\r
- try{\r
- paramList[uploadIndex].value = JSON.parse(reader.result);\r
- FIELD.PARAMETER.SUPPLEMENTORY_DATA_FILE['value'] = paramList[uploadIndex].value;\r
- \r
- var instanceName = "";\r
-\r
- if ( DataService.getALaCarte() ) {\r
- if ( paramList != null ) {\r
- for (var i = 0; i < paramList.length; i++) {\r
- if (paramList[i].id === FIELD.ID.INSTANCE_NAME) {\r
- instanceName = paramList[i].value;\r
- break;\r
- }\r
- }\r
- }\r
- var isValid = validateInstanceName (instanceName);\r
- if ( isValid ) {\r
- $scope.isErrorVisible = false;\r
- } else {\r
- showError(FIELD.ERROR.INVALID_INSTANCE_NAME + instanceName, \r
- FIELD.ERROR.INSTANCE_NAME_VALIDATE);\r
- return;\r
- }\r
- }\r
- var arbitraryParametersList = DataService.getArbitraryParameters();\r
- var p = null;\r
- if (UtilityService.hasContents (arbitraryParametersList)) {\r
- for (var i = 0; i < arbitraryParametersList.length; i++) {\r
- p = arbitraryParametersList[i];\r
- if (p.type === PARAMETER.MAP) {\r
- //validate a map: { <entry_key_1>: <entry_value_1>, ... , <entry_key_n>: <entry_value_n> }\r
- // need to find the value in paramList\r
- for (var j = 0; j < paramList.length; j++) {\r
- if (paramList[j].id === p.id) {\r
- p.value = paramList[j].value;\r
- var isValid = validateMap (p.value);\r
- if ( isValid ) {\r
- $scope.isErrorVisible = false;\r
- break;\r
- } \r
- else {\r
- showError(FIELD.ERROR.INVALID_MAP + p.id, \r
- FIELD.ERROR.MAP_VALIDATE);\r
- return;\r
- } \r
- }\r
- }\r
- } else if (p.type === PARAMETER.LIST) {\r
- //validate a list: { value or a list of comma separated values }\r
- // need to find the value in paramList\r
- for (var j = 0; j < paramList.length; j++) {\r
- if (paramList[j].id === p.id) {\r
- p.value = paramList[j].value;\r
- var isValid = validateList (p.value);\r
- if ( isValid ) {\r
- $scope.isErrorVisible = false;\r
- break;\r
- } \r
- else {\r
- showError(FIELD.ERROR.INVALID_LIST + p.id, \r
- FIELD.ERROR.LIST_VALIDATE);\r
- return;\r
- } \r
- }\r
- }\r
- }\r
- }\r
- }\r
- var requestDetails = CreationService\r
- .getMsoRequestDetails($scope.userProvidedControl.getList());\r
-\r
- $scope.isDialogVisible = false;\r
-\r
- $scope.$broadcast(COMPONENT.MSO_CREATE_REQ, {\r
- url : CreationService.getMsoUrl(),\r
- requestDetails : requestDetails,\r
- componentId: componentId,\r
- callbackFunction : function(response) {\r
- if (response.isSuccessful) {\r
- $scope.popup.isVisible = false;\r
- runCallback(response);\r
- } else {\r
- $scope.isDialogVisible = false;\r
- $scope.popup.isVisible = false;\r
- }\r
- }\r
- });\r
- \r
- }catch(e){\r
- errorMsg = errorMsg+ FIELD.ERROR.INVALID_DATA_FORMAT;\r
- }\r
- if (errorMsg !== "") {\r
- showError(FIELD.ERROR.SYSTEM_FAILURE, errorMsg);\r
- return;\r
- }\r
- }\r
- reader.readAsText(file);\r
- }else{\r
- \r
- var paramList = $scope.userProvidedControl.getList();\r
- var instanceName = "";\r
-\r
- if ( DataService.getALaCarte() ) {\r
- if ( paramList != null ) {\r
- for (var i = 0; i < paramList.length; i++) {\r
- if (paramList[i].id === FIELD.ID.INSTANCE_NAME) {\r
- instanceName = paramList[i].value;\r
- break;\r
- }\r
- }\r
- }\r
- var isValid = validateInstanceName (instanceName);\r
- if ( isValid ) {\r
- $scope.isErrorVisible = false;\r
- } else {\r
- showError(FIELD.ERROR.INVALID_INSTANCE_NAME + instanceName, \r
- FIELD.ERROR.INSTANCE_NAME_VALIDATE);\r
- return;\r
- }\r
- }\r
- var arbitraryParametersList = DataService.getArbitraryParameters();\r
- var p = null;\r
- if (UtilityService.hasContents (arbitraryParametersList)) {\r
- for (var i = 0; i < arbitraryParametersList.length; i++) {\r
- p = arbitraryParametersList[i];\r
- if (p.type === PARAMETER.MAP) {\r
- //validate a map: { <entry_key_1>: <entry_value_1>, ... , <entry_key_n>: <entry_value_n> }\r
- // need to find the value in paramList\r
- for (var j = 0; j < paramList.length; j++) {\r
- if (paramList[j].id === p.id) {\r
- p.value = paramList[j].value;\r
- var isValid = validateMap (p.value);\r
- if ( isValid ) {\r
- $scope.isErrorVisible = false;\r
- break;\r
- } \r
- else {\r
- showError(FIELD.ERROR.INVALID_MAP + p.id, \r
- FIELD.ERROR.MAP_VALIDATE);\r
- return;\r
- } \r
- }\r
- }\r
- } else if (p.type === PARAMETER.LIST) {\r
- //validate a list: { value or a list of comma separated values }\r
- // need to find the value in paramList\r
- for (var j = 0; j < paramList.length; j++) {\r
- if (paramList[j].id === p.id) {\r
- p.value = paramList[j].value;\r
- var isValid = validateList (p.value);\r
- if ( isValid ) {\r
- $scope.isErrorVisible = false;\r
- break;\r
- } \r
- else {\r
- showError(FIELD.ERROR.INVALID_LIST + p.id, \r
- FIELD.ERROR.LIST_VALIDATE);\r
- return;\r
- } \r
- }\r
- }\r
- }\r
- }\r
- }\r
- var requestDetails = CreationService\r
- .getMsoRequestDetails($scope.userProvidedControl.getList());\r
-\r
- $scope.isDialogVisible = false;\r
-\r
- $scope.$broadcast(COMPONENT.MSO_CREATE_REQ, {\r
- url : CreationService.getMsoUrl(),\r
- requestDetails : requestDetails,\r
- componentId: componentId,\r
- callbackFunction : function(response) {\r
- if (response.isSuccessful) {\r
- $scope.popup.isVisible = false;\r
- runCallback(response);\r
- } else {\r
- $scope.isDialogVisible = false;\r
- $scope.popup.isVisible = false;\r
- }\r
- }\r
- });\r
- }\r
- }\r
-\r
- $scope.cancel = function() {\r
- $scope.isDialogVisible = false;\r
- $scope.popup.isVisible = false;\r
- runCallback(false);\r
- }\r
-\r
- var runCallback = function(response) {\r
- if (angular.isFunction(callbackFunction)) {\r
- callbackFunction({\r
- isSuccessful : response.isSuccessful,\r
- control : $scope.userProvidedControl.getList(),\r
- instanceId : response.instanceId\r
- });\r
- }\r
- }\r
-\r
- var showError = function(summary, details) {\r
- var message = summary;\r
- if (UtilityService.hasContents(details)) {\r
- message += " (" + details + ")";\r
- }\r
- $scope.isSpinnerVisible = false;\r
- $scope.isErrorVisible = true;\r
- $scope.error = message;\r
- }\r
- \r
-}\r
-\r
-appDS2.controller("creationDialogController", [ "COMPONENT", "FIELD", "PARAMETER", "$scope", "$http",\r
- "$timeout", "$log", "CreationService", "UtilityService", "DataService","VIDCONFIGURATION",\r
- creationDialogController ]);\r
+var creationDialogController = function (COMPONENT, FIELD, PARAMETER, $scope, $http, $timeout, $log,\r
+ CreationService, UtilityService, DataService, VIDCONFIGURATION, $location) {\r
+\r
+ $scope.isDialogVisible = false;\r
+ $scope.summaryControl = {};\r
+ $scope.userProvidedControl = {};\r
+\r
+ var callbackFunction = undefined;\r
+ var componentId = undefined;\r
+\r
+ $scope.shouldShowOldPopup = function () {\r
+ return DataService.getALaCarte() || DataService.getShouldExcludeMacroFromAsyncInstatiationFlow()\r
+ };\r
+\r
+ function receiveMessage(event) {\r
+ if (event.data == 'closeIframe') {\r
+ window.removeEventListener("message", receiveMessage, false);\r
+\r
+ $scope.cancel();\r
+ }\r
+ else if (event.data.eventId == 'submitIframe') {\r
+ {\r
+ $location.path('/servicePlanning').search({serviceModelId: event.data.data.serviceModelId});\r
+ }\r
+ }\r
+ $scope.$apply();\r
+ }\r
+\r
+ $scope.$on(COMPONENT.CREATE_COMPONENT, function (event, request) {\r
+ $scope.isSpinnerVisible = true;\r
+ $scope.isErrorVisible = false;\r
+ $scope.isDataVisible = false;\r
+ $scope.isConfirmEnabled = false;\r
+ $scope.isDialogVisible = true;\r
+ $scope.popup.isVisible = true;\r
+\r
+\r
+ if (!$scope.shouldShowOldPopup()) {\r
+ $scope.url = COMPONENT.SERVICE_POPUP_IFRAME_URL + request.modelNameVersionId + "&isCreate=true&r=" + Math.random();\r
+ window.addEventListener("message", receiveMessage, false);\r
+\r
+ }\r
+ else {\r
+ callbackFunction = request.callbackFunction;\r
+ componentId = request.componentId;\r
+ CreationService.initializeComponent(request.componentId);\r
+\r
+ CreationService.setHttpErrorHandler(function (response) {\r
+ showError(FIELD.ERROR.SYSTEM_FAILURE, UtilityService\r
+ .getHttpErrorMessage(response));\r
+ });\r
+\r
+ $scope.componentName = CreationService.getComponentDisplayName();\r
+\r
+ CreationService.getParameters(handleGetParametersResponse);\r
+ }\r
+\r
+ });\r
+\r
+ var handleGetParametersResponse = function (parameters) {\r
+ $scope.summaryControl.setList(parameters.summaryList);\r
+ $scope.userProvidedControl.setList(parameters.userProvidedList);\r
+\r
+ $scope.isSpinnerVisible = false;\r
+ $scope.isDataVisible = true;\r
+ $scope.isConfirmEnabled = true;\r
+ };\r
+\r
+ var validateInstanceName = function (iname) {\r
+ var patt1 = /^([a-z])+([0-9a-z\-_\.]*)$/i;\r
+\r
+ if (iname == null) {\r
+ return false;\r
+ }\r
+ if (!iname.match(patt1)) {\r
+ return false;\r
+ }\r
+ return true;\r
+ };\r
+ var validateMap = function (mname) {\r
+ var patt1 = /^{(\s*\w+\s*:\s*\w+\s*)(\s*,\s*\w+\s*:\s*\w+\s*)*}$/im;\r
+ if (mname == null) {\r
+ return true;\r
+ }\r
+ if (!mname.match(patt1)) {\r
+ return false;\r
+ }\r
+ return true;\r
+ };\r
+\r
+ var validateList = function (lname) {\r
+ var patt1 = /^\[(\s*\w+\s*)(\s*,\s*\w+\s*)*\]$/i;\r
+ if (lname == null) {\r
+ return true;\r
+ }\r
+ if (!lname.match(patt1)) {\r
+ return false;\r
+ }\r
+ return true;\r
+ };\r
+\r
+ $scope.userParameterChanged = function (id) {\r
+ CreationService.updateUserParameterList(id, $scope.userProvidedControl);\r
+ };\r
+\r
+ $scope.confirm = function () {\r
+\r
+ var requiredFields = $scope.userProvidedControl.getRequiredFields();\r
+ if (requiredFields !== "") {\r
+ showError(FIELD.ERROR.MISSING_DATA, requiredFields);\r
+ return;\r
+ }\r
+\r
+ var isUploadAvailable = false;\r
+ var uploadIndex = 0;\r
+ var paramList = $scope.userProvidedControl.getList();\r
+ var isAnyError = false;\r
+ for (var i = 0; i < paramList.length; i++) {\r
+ if (paramList[i].id === FIELD.ID.SUPPLEMENTORY_DATA_FILE) {\r
+ isUploadAvailable = true;\r
+ uploadIndex = i;\r
+ }\r
+ if (paramList[i].id === FIELD.ID.UPLOAD_SUPPLEMENTORY_DATA_FILE && paramList[i].value && document.getElementById(FIELD.ID.SUPPLEMENTORY_DATA_FILE).value == '') {\r
+ isAnyError = true;\r
+ }\r
+ }\r
+\r
+ if (isUploadAvailable && isAnyError) {\r
+ showError(FIELD.ERROR.MISSING_DATA, FIELD.ERROR.MISSING_FILE);\r
+\r
+ } else if (isUploadAvailable && document.getElementById(FIELD.ID.SUPPLEMENTORY_DATA_FILE).value != '') {\r
+ var errorMsg = "";\r
+ var fileInput = document.getElementById(FIELD.ID.SUPPLEMENTORY_DATA_FILE);\r
+ var file = fileInput.files[0];\r
+ var reader = new FileReader();\r
+ reader.onload = function (e) {\r
+ try {\r
+ paramList[uploadIndex].value = JSON.parse(reader.result);\r
+ FIELD.PARAMETER.SUPPLEMENTORY_DATA_FILE['value'] = paramList[uploadIndex].value;\r
+\r
+ var instanceName = "";\r
+\r
+ if (DataService.getALaCarte()) {\r
+ if (paramList != null) {\r
+ for (var i = 0; i < paramList.length; i++) {\r
+ if (paramList[i].id === FIELD.ID.INSTANCE_NAME) {\r
+ instanceName = paramList[i].value;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ var isValid = validateInstanceName(instanceName);\r
+ if (isValid) {\r
+ $scope.isErrorVisible = false;\r
+ } else {\r
+ showError(FIELD.ERROR.INVALID_INSTANCE_NAME + instanceName,\r
+ FIELD.ERROR.INSTANCE_NAME_VALIDATE);\r
+ return;\r
+ }\r
+ }\r
+ var arbitraryParametersList = DataService.getArbitraryParameters();\r
+ var p = null;\r
+ if (UtilityService.hasContents(arbitraryParametersList)) {\r
+ for (var i = 0; i < arbitraryParametersList.length; i++) {\r
+ p = arbitraryParametersList[i];\r
+ if (p.type === PARAMETER.MAP) {\r
+ //validate a map: { <entry_key_1>: <entry_value_1>, ... , <entry_key_n>: <entry_value_n> }\r
+ // need to find the value in paramList\r
+ for (var j = 0; j < paramList.length; j++) {\r
+ if (paramList[j].id === p.id) {\r
+ p.value = paramList[j].value;\r
+ var isValid = validateMap(p.value);\r
+ if (isValid) {\r
+ $scope.isErrorVisible = false;\r
+ break;\r
+ }\r
+ else {\r
+ showError(FIELD.ERROR.INVALID_MAP + p.id,\r
+ FIELD.ERROR.MAP_VALIDATE);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ } else if (p.type === PARAMETER.LIST) {\r
+ //validate a list: { value or a list of comma separated values }\r
+ // need to find the value in paramList\r
+ for (var j = 0; j < paramList.length; j++) {\r
+ if (paramList[j].id === p.id) {\r
+ p.value = paramList[j].value;\r
+ var isValid = validateList(p.value);\r
+ if (isValid) {\r
+ $scope.isErrorVisible = false;\r
+ break;\r
+ }\r
+ else {\r
+ showError(FIELD.ERROR.INVALID_LIST + p.id,\r
+ FIELD.ERROR.LIST_VALIDATE);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ var requestDetails = CreationService\r
+ .getMsoRequestDetails($scope.userProvidedControl.getList());\r
+\r
+ $scope.isDialogVisible = false;\r
+\r
+ $scope.$broadcast(COMPONENT.MSO_CREATE_REQ, {\r
+ url: CreationService.getMsoUrl(),\r
+ requestDetails: requestDetails,\r
+ componentId: componentId,\r
+ callbackFunction: function (response) {\r
+ if (response.isSuccessful) {\r
+ $scope.popup.isVisible = false;\r
+ runCallback(response);\r
+ } else {\r
+ $scope.isDialogVisible = false;\r
+ $scope.popup.isVisible = false;\r
+ }\r
+ }\r
+ });\r
+\r
+ } catch (e) {\r
+ errorMsg = errorMsg + FIELD.ERROR.INVALID_DATA_FORMAT;\r
+ }\r
+ if (errorMsg !== "") {\r
+ showError(FIELD.ERROR.SYSTEM_FAILURE, errorMsg);\r
+\r
+ }\r
+ };\r
+ reader.readAsText(file);\r
+ } else {\r
+\r
+ var paramList = $scope.userProvidedControl.getList();\r
+ var instanceName = "";\r
+\r
+ if (DataService.getALaCarte()) {\r
+ if (paramList != null) {\r
+ for (var i = 0; i < paramList.length; i++) {\r
+ if (paramList[i].id === FIELD.ID.INSTANCE_NAME) {\r
+ instanceName = paramList[i].value;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ var isValid = validateInstanceName(instanceName);\r
+ if (isValid) {\r
+ $scope.isErrorVisible = false;\r
+ } else {\r
+ showError(FIELD.ERROR.INVALID_INSTANCE_NAME + instanceName,\r
+ FIELD.ERROR.INSTANCE_NAME_VALIDATE);\r
+ return;\r
+ }\r
+ }\r
+ var arbitraryParametersList = DataService.getArbitraryParameters();\r
+ var p = null;\r
+ if (UtilityService.hasContents(arbitraryParametersList)) {\r
+ for (var i = 0; i < arbitraryParametersList.length; i++) {\r
+ p = arbitraryParametersList[i];\r
+ if (p.type === PARAMETER.MAP) {\r
+ //validate a map: { <entry_key_1>: <entry_value_1>, ... , <entry_key_n>: <entry_value_n> }\r
+ // need to find the value in paramList\r
+ for (var j = 0; j < paramList.length; j++) {\r
+ if (paramList[j].id === p.id) {\r
+ p.value = paramList[j].value;\r
+ var isValid = validateMap(p.value);\r
+ if (isValid) {\r
+ $scope.isErrorVisible = false;\r
+ break;\r
+ }\r
+ else {\r
+ showError(FIELD.ERROR.INVALID_MAP + p.id,\r
+ FIELD.ERROR.MAP_VALIDATE);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ } else if (p.type === PARAMETER.LIST) {\r
+ //validate a list: { value or a list of comma separated values }\r
+ // need to find the value in paramList\r
+ for (var j = 0; j < paramList.length; j++) {\r
+ if (paramList[j].id === p.id) {\r
+ p.value = paramList[j].value;\r
+ var isValid = validateList(p.value);\r
+ if (isValid) {\r
+ $scope.isErrorVisible = false;\r
+ break;\r
+ }\r
+ else {\r
+ showError(FIELD.ERROR.INVALID_LIST + p.id,\r
+ FIELD.ERROR.LIST_VALIDATE);\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ var requestDetails = CreationService\r
+ .getMsoRequestDetails($scope.userProvidedControl.getList());\r
+\r
+ $scope.isDialogVisible = false;\r
+\r
+ $scope.$broadcast(COMPONENT.MSO_CREATE_REQ, {\r
+ url: CreationService.getMsoUrl(),\r
+ requestDetails: requestDetails,\r
+ componentId: componentId,\r
+ callbackFunction: function (response) {\r
+ if (response.isSuccessful) {\r
+ $scope.popup.isVisible = false;\r
+ runCallback(response);\r
+ } else {\r
+ $scope.isDialogVisible = false;\r
+ $scope.popup.isVisible = false;\r
+ }\r
+ }\r
+ });\r
+ }\r
+ };\r
+\r
+ $scope.cancel = function () {\r
+ $scope.isDialogVisible = false;\r
+ $scope.popup.isVisible = false;\r
+ runCallback(false);\r
+ };\r
+\r
+\r
+ var runCallback = function (response) {\r
+ if (angular.isFunction(callbackFunction)) {\r
+ callbackFunction({\r
+ isSuccessful: response.isSuccessful,\r
+ control: $scope.userProvidedControl.getList(),\r
+ instanceId: response.instanceId\r
+ });\r
+ }\r
+ };\r
+\r
+ var showError = function (summary, details) {\r
+ var message = summary;\r
+ if (UtilityService.hasContents(details)) {\r
+ message += " (" + details + ")";\r
+ }\r
+ $scope.isSpinnerVisible = false;\r
+ $scope.isErrorVisible = true;\r
+ $scope.error = message;\r
+ }\r
+\r
+};\r
+\r
+appDS2.controller("creationDialogController", ["COMPONENT", "FIELD", "PARAMETER", "$scope", "$http",\r
+ "$timeout", "$log", "CreationService", "UtilityService", "DataService", "VIDCONFIGURATION", "$location",\r
+ creationDialogController]);\r
$scope.isDialogVisible = false;
$scope.summaryControl = {};
$scope.userProvidedControl = {};
-
+
var callbackFunction = undefined;
var componentId = undefined;
+ $scope.dialogMethod = COMPONENT.DELETE;
$scope.$on(COMPONENT.DELETE_RESUME_COMPONENT, function(event, request) {
$scope.isE2EService = false;
- $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;
- $scope.isServiceInstance = componentId === "service";
-
- DeleteResumeService.initializeComponent(request.componentId);
+ $scope.isDataVisible = false;
+ $scope.isSpinnerVisible = false;
+ $scope.isErrorVisible = false;
+ $scope.isDialogVisible = true;
+ $scope.popup.isVisible = true;
+ $scope.isConfirmEnabled = false;
+ $scope.dialogMethod = request.dialogMethod;
+ $scope.serviceStatus = request.serviceStatus;
+ callbackFunction = request.callbackFunction;
+ componentId = request.componentId;
- $scope.componentName = DeleteResumeService.getComponentDisplayName();
+ DeleteResumeService.initializeComponent(request.componentId);
- $scope.summaryControl.setList(DeleteResumeService.getSummaryList());
+ $scope.componentName = DeleteResumeService.getComponentDisplayName();
+ $scope.summaryControl.setList(DeleteResumeService.getSummaryList());
- DeleteResumeService.getParameters(handleGetParametersResponse);
+ 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) {
+ $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() {
DataService.setE2EService($scope.isE2EService); //VoLTE support
+ var requiredFields = $scope.userProvidedControl.getRequiredFields();
+ if (requiredFields === "") {
+ $scope.isErrorVisible = false;
+ } else {
+ showError(FIELD.ERROR.MISSING_DATA, requiredFields);
+ return;
+ }
- var requiredFields = $scope.userProvidedControl.getRequiredFields();
- if (requiredFields === "") {
- $scope.isErrorVisible = false;
- } else {
- showError(FIELD.ERROR.MISSING_DATA, requiredFields);
- return;
- }
-
- var callbackAfterMSO = function(isSuccessful) {
+ var callbackAfterMSO = function(isSuccessful) {
if (isSuccessful) {
$scope.popup.isVisible = false;
runCallback(true);
} else {
- $scope.isDialogVisible = true;
+ $scope.isDialogVisible = true;
}
};
- $scope.isDialogVisible = false;
+ $scope.isDialogVisible = false;
- if ($scope.dialogMethod == COMPONENT.DELETE)
- {
+ if ($scope.dialogMethod == COMPONENT.DELETE)
+ {
var requestDetails = DeleteResumeService.getMsoRequestDetails($scope.userProvidedControl.getList());
}
$scope.$broadcast(COMPONENT.MSO_DELETE_REQ, {
- url : DeleteResumeService.getMsoUrl(),
+ url : DeleteResumeService.getMsoUrl($scope.serviceStatus),
requestDetails : requestDetails,
- componentId: componentId,
+ componentId: componentId,
callbackFunction : callbackAfterMSO
});
- }
- else
+ }
+ else
if ($scope.dialogMethod == COMPONENT.RESUME)
{
CreationService.initializeComponent(componentId);
}
$scope.cancel = function() {
- $scope.isDialogVisible = false;
- $scope.popup.isVisible = false;
- runCallback(false);
+ $scope.isDialogVisible = false;
+ $scope.popup.isVisible = false;
+ runCallback(false);
}
var runCallback = function(isSuccessful) {
- if (angular.isFunction(callbackFunction)) {
- callbackFunction({
- isSuccessful : isSuccessful
- });
- }
+ if (angular.isFunction(callbackFunction)) {
+ callbackFunction({
+ isSuccessful : isSuccessful
+ });
+ }
}
}
"use strict";
var msoCommitModalController = function(COMPONENT, FIELD, $scope, $http, $timeout, $window, $log,
- MsoService, PropertyService, UtilityService, DataService, $uibModalInstance, msoType, requestParams, vidService) {
+ MsoService, PropertyService, UtilityService, DataService, $uibModalInstance, msoType, requestParams, configuration, vidService, featureFlags) {
$scope.isSpinnerVisible = true;
$scope.isProgressVisible = true;
var init = function(msoType) {
switch(msoType) {
+ case COMPONENT.MSO_DELETE_CONFIGURATION_REQ :
+ return MsoService.deleteConfiguration(requestParams, configuration);
case COMPONENT.MSO_CREATE_REQ:
return MsoService.createConfigurationInstance(requestParams);
case COMPONENT.MSO_CHANGE_CONFIG_STATUS_REQ:
- return MsoService.toggleConfigurationStatus(requestParams);
+ return MsoService.toggleConfigurationStatus(requestParams, configuration);
case COMPONENT.MSO_CHANGE_PORT_STATUS_REQ:
- return MsoService.togglePortStatus(requestParams);
+ return MsoService.togglePortStatus(requestParams, configuration);
case COMPONENT.MSO_CREATE_REALATIONSHIP:
return MsoService.associatePnf(requestParams);
case COMPONENT.MSO_REMOVE_RELATIONSHIP:
_this.msoRequestType = msoType;
+
init(_this.msoRequestType)
.then(function (response) {
successCallbackFunction(response);
};
appDS2.controller("msoCommitModalController", [ "COMPONENT", "FIELD", "$scope", "$http", "$timeout",
- "$window", "$log", "MsoService", "PropertyService", "UtilityService", "DataService", "$uibModalInstance", "msoType", "requestParams", "vidService",
+ "$window", "$log", "MsoService", "PropertyService", "UtilityService", "DataService", "$uibModalInstance", "msoType", "requestParams", "configuration", "vidService", "featureFlags",
msoCommitModalController ]);
requestParams: function () {
requestParams.callbackFunction = updateViewCallbackFunction;
return requestParams;
+ },
+ configuration: function () {
+ return null;
}
}
})
_.find(relatedEcompEnv.relationshipData, {"relationshipKey": "operational-environment.operational-environment-id"})
.relationshipValue;
var relatedInstanceName =
- _.find(relatedEcompEnv.relatedToProperty, {"propertyKey": "operational-environment.operational-name"})
+ _.find(relatedEcompEnv.relatedToProperty, {"propertyKey": "operational-environment.operational-environment-name"})
.propertyValue;
var workloadContext = testEnv.workloadContext;
var result = [];
if(changeManagements && metadata && metadata.statuses) {
angular.forEach(changeManagements, function(changeManagement) {
- angular.forEach(metadata.statuses, function(status) {
- if(changeManagement.requestStatus.requestState === status) {
- result.push(changeManagement);
- return;
- }
- });
+ var found = metadata.statuses
+ .map(function(c) { return c.toLowerCase(); })
+ .indexOf(changeManagement.requestStatus.requestState.toLowerCase()) !== -1;
+
+ if (metadata.notContains && !found) {
+ result.push(changeManagement);
+ }
+ if (! metadata.notContains && found) {
+ result.push(changeManagement);
+ }
});
}
<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" />
+<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/css/manual-task-popup.css" />
<div class="modal-header">
<h3 class="modal-title" id="alert-modal-header">On Hold</h3>
<span id="cancel" ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span>
<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>
+ <span id="cancel" ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true" data-tests-id="pull_right_modal_close">×</span>
</div>
-<div class="modal-body" id="modal-body">
+<div class="modal-body" id="modal-body" data-tests-id="btn-cancel-workflow">
Are you sure you want to delete workflow
<br/>
{{vm.workflow.scheduleRequest.scheduleName}}?
vm.manualTasks = [];
vm.MANUAL_TASKS = COMPONENT.MANUAL_TASKS;
var init = function() {
+ vm.requestState = jobInfo.requestState;
+
if (jobInfo && jobInfo.details) {
vm.content = jobInfo.details;
} else {
--- /dev/null
+.modal {
+ position: inherit;
+ text-align: left;
+}
+.modal-dialog {
+ position: absolute;
+ right: 0;
+ display: inline;
+ margin-top: -200px;
+}
\ No newline at end of file
<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" />
+<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/css/manual-task-popup.css" />
<div class="modal-header">
- <h3 class="modal-title" id="failed-modal-header">Failed</h3>
+ <h3 class="modal-title" id="failed-modal-header">{{vm.requestState || 'Failed' }}</h3>
<span id="cancel" ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span>
</div>
<div class="modal-body">
<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" />
+<link rel="stylesheet" type="text/css" href="app/vid/scripts/modals/css/manual-task-popup.css" />
<div class="modal-header">
<h3 class="modal-title" id="in-progress-modal-header">In Progress</h3>
<span id="cancel" ng-click="vm.close()" class="pull-right modal-close" aria-hidden="true">×</span>
</div>
- <pre class="log">{{log}}</pre>
+ <pre class="log" data-tests-id="msoCommitLog">{{log}}</pre>
<div class="buttonRow">
<button data-tests-id="msoCommitDialogCloseButton" ngx-enabled="{{isCloseEnabled}}" att-button size="small"
'use strict';
appDS2.controller("newChangeManagementModalController", ["$uibModalInstance", "$uibModal",'$q', "AaiService", "changeManagementService", "Upload",
- "$log", "$scope", "_", "COMPONENT", "VIDCONFIGURATION", newChangeManagementModalController]);
+ "$log", "$scope", "_", "COMPONENT", "VIDCONFIGURATION","DataService","featureFlags", newChangeManagementModalController]);
- function newChangeManagementModalController($uibModalInstance, $uibModal,$q, AaiService, changeManagementService, Upload, $log, $scope, _, COMPONENT, VIDCONFIGURATION) {
+ function newChangeManagementModalController($uibModalInstance, $uibModal,$q, AaiService, changeManagementService, Upload, $log, $scope, _, COMPONENT, VIDCONFIGURATION, DataService, featureFlags) {
var vm = this;
vm.hasScheduler = !!VIDCONFIGURATION.SCHEDULER_PORTAL_URL;
vm.softwareVersionRegex = "[-a-zA-Z0-9\.]+";
+ var attuid;
+
+ function fetchAttUid() {
+ var defer = $q.defer();
+ if (attuid) {
+ defer.resolve(attuid);
+ } else {
+ AaiService.getLoggedInUserID(function (response) {
+ attuid = response.data;
+ defer.resolve(attuid);
+ },
+ function (err) {
+ defer.reject(err);
+ });
+ }
+ return defer.promise;
+ }
+
var init = function () {
vm.changeManagement = {};
loadServicesCatalog();
- registerVNFNamesWatcher();
+ fetchAttUid().then(registerVNFNamesWatcher);
vm.loadSubscribers();
};
modelCustomizationName: csarVNF.modelCustomizationName,
modelCustomizationId: csarVNF.customizationUuid
},
- cloudConfiguration: {
- lcpCloudRegionId: "mdt1",
- tenantId: "88a6ca3ee0394ade9403f075db23167e"
- },
+ cloudConfiguration: selectionVNF.cloudConfiguration || {},
requestInfo: {
source: "VID",
suppressRollback: false,
- requestorId: "az2016"
+ requestorId: attuid
},
relatedInstanceList: [
{
return data;
}]
})
- .then(function (configUpdateResponse) {
- vm.changeManagement.configUpdateFile = configUpdateResponse && JSON.parse(configUpdateResponse.data).payload;
- defer.resolve(true);
- })
- .catch(function (error) {
- defer.resolve(false);
- });
+ .then(function (configUpdateResponse) {
+ vm.changeManagement.configUpdateFile = configUpdateResponse && JSON.parse(configUpdateResponse.data).payload;
+ defer.resolve(true);
+ })
+ .catch(function (error) {
+ defer.resolve(false);
+ });
return defer.promise;
};
vm.changeManagement.policyYN = "Y";
vm.changeManagement.sniroYN = "Y";
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ADD_MSO_TESTAPI_FIELD)) {
+ vm.changeManagement.testApi = DataService.getMsoRequestParametersTestApi();
+ }
var data = {
widgetName: 'Portal-Common-Scheduler',
widgetData: vm.changeManagement,
vm.serviceInstancesToGetVersions = [];
var versions = [];
_.forEach(vm.vnfs, function (vnf) {
- if (vnf.properties['nf-role'] === vm.changeManagement['vnfType']) {
-
+ if (vnf.properties['nf-role'] === vm.changeManagement['vnfType']
+ && vnf.properties["model-invariant-id"]
+ && vnf.properties["model-version-id"]) {
vm.serviceInstancesToGetVersions.push({
- "model-invariant-id": vnf.properties["model-invariant-id"],
- "model-version-id": vnf.properties["model-version-id"] }
+ "model-invariant-id": vnf.properties["model-invariant-id"],
+ "model-version-id": vnf.properties["model-version-id"]
+ }
);
versions.push(vnf.properties["model-invariant-id"]);
</div>
<div ng-if="vm.shouldShowVnfInPlaceFields()">
<div class="form-group">
- <label class="control-label">operations-timeout</label>
+ <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>
+ <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>
+ <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>
<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>
+ <label class="control-label" for="tenantContext">Tenant Context</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">
\r
"use strict";\r
\r
-var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONENT, FIELD, $q) {\r
+var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONENT, FIELD, $q, featureFlags) {\r
\r
function getServiceInstance(serviceInstanceIdentifier, findBy) {\r
serviceInstanceIdentifier.trim();\r
});\r
\r
return deferred.promise;\r
- };\r
-\r
-\r
+ }\r
function getGlobalCustomerIdFromServiceInstanceResponse(response) {\r
var globalCustomerId = "";\r
if (angular.isArray(response.data[FIELD.ID.RESULT_DATA])) {\r
timeout : PropertyService.getServerResponseTimeoutMsec()\r
}).then(function (response) {\r
var displayData = response.data[FIELD.ID.SERVICE_INSTANCES];\r
- if (!displayData.length) {\r
+ if (!displayData || !displayData.length) {\r
displayData = [{\r
globalCustomerId : null,\r
subscriberName : null,\r
COMPONENT.FORWARD_SLASH + encodeURIComponent(globalCustomerId) +\r
COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceType) +\r
COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceInstanceId);\r
- $http.get(url, {}, {\r
+ return $http.get(url, {}, {\r
\r
\r
timeout : PropertyService.getServerResponseTimeoutMsec()\r
});\r
},\r
\r
+ getCRInformationByInstanceId : function (serviceInstanceId) {\r
+\r
+ var deferred = $q.defer();\r
+\r
+ var url = COMPONENT.AAI_GET_CR_INSTANCE +\r
+ COMPONENT.FORWARD_SLASH + encodeURIComponent(serviceInstanceId);\r
+ $http.get(url, {}, {\r
+ timeout : PropertyService.getServerResponseTimeoutMsec()\r
+ }).then(function(response) {\r
+ if (response.data != null) {\r
+ deferred.resolve(response);\r
+ } else {\r
+ deferred.resolve(response);\r
+ }\r
+ }, function(response) {\r
+ deferred.resolve(response);\r
+ });\r
+ return deferred.promise;\r
+ },\r
+\r
searchServiceInstances: searchServiceInstances,\r
\r
getModelVersionId: function (subscriberId, instanceId) {\r
});\r
},\r
\r
+ getPortMirroringData : function (ids) {\r
+ var defer = $q.defer();\r
+ if(featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_REGION_ID_FROM_REMOTE)){\r
+ var url = COMPONENT.AAI_GET_PORT_MIRRORING_CONFIGS_DATA +'?configurationIds=' + ids.join(',');\r
+ $http.get(url).then(function(res){\r
+ defer.resolve(res);\r
+ }).catch(function(err) {\r
+ $log.error(err);\r
+ defer.resolve({});\r
+ });\r
+ }else {\r
+ var staticConfigurationData = {};\r
+ angular.forEach(ids, function(id) {\r
+ staticConfigurationData[id] = {\r
+ "cloudRegionId": "mdt1"\r
+ }\r
+ });\r
+ defer.resolve({\r
+ "data": staticConfigurationData\r
+ });\r
+ }\r
+\r
+ return defer.promise;\r
+\r
+ },\r
+\r
+ getPortMirroringSourcePorts : function (ids) {\r
+ var defer = $q.defer();\r
+ var url = COMPONENT.AAI_GET_PORT_MIRRORING_SOURCE_PORTS +'?configurationIds=' + ids.join(',');\r
+ $http.get(url).then(function(res){\r
+ defer.resolve(res);\r
+ }).catch(function(err) {\r
+ $log.error(err);\r
+ defer.resolve({});\r
+ });\r
+ return defer.promise;\r
+ },\r
+\r
getSubscriptionServiceTypeList : function(globalCustomerId,\r
successCallbackFunction) {\r
$log\r
} else {\r
successCallbackFunction([]);\r
}\r
- },function(failure){console.log("failure")})["catch"]\r
- if(catchCallbackFunction) {\r
+ })["catch"] (function(response, status) {\r
+ if (catchCallbackFunction) {\r
catchCallbackFunction();\r
}\r
- (UtilityService.runHttpErrorHandler);\r
+ UtilityService.runHttpErrorHandler(response, status);\r
+ })\r
},\r
getServices : function(successCallbackFunction) {\r
$log\r
var deferred = $q.defer();\r
\r
if (UtilityService.hasContents(modelInvariantId)) {\r
- var body = {"versions" : modelInvariantId}\r
+ var body = {"versions": modelInvariantId};\r
$http.post(( COMPONENT.AAI_GET_VERSION_BY_INVARIANT_ID),body)\r
\r
.success(function (response) {\r
});\r
\r
return deferred.promise;\r
+ },\r
+\r
+ getInstanceGroupsByVNFInstanceId: function (vnf_instance_id, successCallback, errorCallback) {\r
+ var url = COMPONENT.AAI_GET_INSTANCE_GROUPS_BY_VNF_INSTANCE_ID_PATH + "/" + vnf_instance_id;\r
+\r
+ $http.get(url, {}, {\r
+ timeout: PropertyService.getServerResponseTimeoutMsec()\r
+ }).then(function (response) {\r
+ successCallback(response);\r
+ }, function (response) {\r
+ errorCallback(response);\r
+ });\r
+ },\r
+\r
+ postPOMBAverificationRequest: function (url, data, config) {\r
+ $http.post(url, data, config)\r
+ .success(function (data, status, headers, config) {\r
+ //If at some point in the future the result should be handled - this should be the entry point.\r
+ log.debug("POMBA was called successfully with data: " + data);\r
+ })\r
+ .error(function (data, status, header, config) {\r
+ log.debug("Error: " +\r
+ "Data: " + data +\r
+ "status: " + status +\r
+ "headers: " + header +\r
+ "config: " + config);\r
+ });\r
}\r
- }};\r
+ }\r
+};\r
\r
appDS2.factory("AaiService", ["$http", "$log", "PropertyService",\r
- "UtilityService", "COMPONENT", "FIELD", "$q", AaiService]);\r
+ "UtilityService", "COMPONENT", "FIELD", "$q", "featureFlags", AaiService]);\r
\r
"use strict";\r
\r
-var AsdcService = function($http, $log, PropertyService, UtilityService) {\r
+var AsdcService = function ($http, $log, PropertyService, UtilityService, VIDCONFIGURATION, COMPONENT, featureFlags) {\r
return {\r
- getModel : function(modelId, successCallbackFunction) {\r
- $log.debug("AsdcService:getModel: modelId: " + modelId);\r
- $http.get(\r
- "asdc/getModel/" + modelId\r
- + "?r=" + Math.random(),\r
- {\r
- timeout : PropertyService\r
- .getServerResponseTimeoutMsec()\r
- }).then(successCallbackFunction)["catch"]\r
- (UtilityService.runHttpErrorHandler);\r
- }\r
+ getModel: function (modelId, successCallbackFunction) {\r
+ $log.debug("AsdcService:getModel: modelId: " + modelId);\r
+ $http.get(\r
+ "asdc/getModel/" + modelId\r
+ + "?r=" + Math.random(),\r
+ {\r
+ timeout: PropertyService\r
+ .getServerResponseTimeoutMsec()\r
+ }).then(successCallbackFunction)["catch"]\r
+ (UtilityService.runHttpErrorHandler);\r
+ },\r
+\r
+ shouldExcludeMacroFromAsyncInstatiationFlow: function(serviceModel){\r
+ if (!featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ASYNC_INSTANTIATION))\r
+ return true;\r
+ if (!_.isEmpty(serviceModel.pnfs))\r
+ return true;\r
+ if (!_.isEmpty(serviceModel.collectionResource))\r
+ return true;\r
+ if (!_.isEmpty(serviceModel.networks) && !featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_NETWORK_TO_ASYNC_INSTANTIATION))\r
+ return true;\r
+ if(serviceModel.service.instantiationType === "ClientConfig")\r
+ return true;\r
+ return false;\r
+ },\r
+\r
+ isMacro: function (serviceModel) {\r
+ if (serviceModel && serviceModel.service) {\r
+ switch (serviceModel.service.instantiationType) {\r
+ case 'Macro':\r
+ case 'Both':\r
+ return true;\r
+ case 'A-La-Carte':\r
+ return false;\r
+ case 'ClientConfig':\r
+ console.debug("Looking for " + serviceModel.service.invariantUuid + " by Client Config");\r
+ return UtilityService.arrayContains(VIDCONFIGURATION.MACRO_SERVICES, serviceModel.service.invariantUuid);\r
+ default:\r
+ console.debug("Unexpected serviceModel.service.instantiationType: " + serviceModel.service.instantiationType);\r
+ return true;\r
+ }\r
+ } else {\r
+ $log.debug("isMscro=false, because serviceModel.service is undefined");\r
+ return false;\r
+ }\r
+ }\r
}\r
}\r
\r
-appDS2.factory("AsdcService", [ "$http", "$log", "PropertyService",\r
- "UtilityService", AsdcService ]);\r
+appDS2.factory("AsdcService", ["$http", "$log", "PropertyService",\r
+ "UtilityService", "VIDCONFIGURATION","COMPONENT", "featureFlags", AsdcService]);\r
*/\r
\r
var CreationService = function($log, AaiService, AsdcService, DataService,VIDCONFIGURATION,\r
- ComponentService, COMPONENT, FIELD, PARAMETER, UtilityService, OwningEntityService) {\r
+ ComponentService, COMPONENT, FIELD, PARAMETER, UtilityService, OwningEntityService,featureFlags) {\r
\r
var _this = this;\r
-\r
var getAsyncOperationList = function() {\r
if (DataService.getLoggedInUserId() == null) {\r
getLoggedInUserID();\r
userParams : getArbitraryParameters(parameterList)\r
}\r
};\r
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ADD_MSO_TESTAPI_FIELD)) {\r
+ if ((_this.componentId != COMPONENT.SERVICE) || ( DataService.getALaCarte() )) {\r
+ requestDetails.requestParameters.testApi = DataService.getMsoRequestParametersTestApi();\r
+ }\r
+ }\r
if ( (_this.componentId != COMPONENT.SERVICE) || ( !DataService.getALaCarte() ) ) {\r
// include cloud region for everything but service create alacarte\r
var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);\r
};\r
}\r
switch (_this.componentId) {\r
+\r
case COMPONENT.SERVICE:\r
requestDetails.subscriberInfo = {\r
globalSubscriberId : DataService.getGlobalCustomerId(),\r
\r
appDS2.factory("CreationService", [ "$log", "AaiService", "AsdcService",\r
"DataService","VIDCONFIGURATION", "ComponentService", "COMPONENT", "FIELD", "PARAMETER",\r
- "UtilityService", "OwningEntityService", CreationService ]);\r
+ "UtilityService", "OwningEntityService","featureFlags", CreationService ]);\r
getServiceInstanceToCustomer : function() {\r
return _this.serviceInstanceToCustomer;\r
},\r
+ getMsoRequestParametersTestApi: function(){\r
+ return sessionStorage.getItem("msoRequestParametersTestApiValue");\r
+ },\r
setALaCarte : function(aval) {\r
_this.aLaCarte = aval;\r
},\r
}\r
return _this.aLaCarte;\r
},\r
+ setShouldExcludeMacroFromAsyncInstatiationFlow: function (val) {\r
+ _this.shouldExcludeMacroFromAsyncInstatiationFlow = val;\r
+ },\r
+ getShouldExcludeMacroFromAsyncInstatiationFlow: function(){\r
+ if (_this.shouldExcludeMacroFromAsyncInstatiationFlow === undefined) {\r
+ return false;\r
+ }\r
+ return _this.shouldExcludeMacroFromAsyncInstatiationFlow;\r
+ },\r
setMacro : function(aval) {\r
_this.macro = aval;\r
},\r
"use strict";
var DeleteResumeService = function($log, AaiService, AsdcService, DataService,
- ComponentService, COMPONENT, FIELD, UtilityService) {
+ ComponentService, COMPONENT, FIELD, UtilityService,featureFlags) {
var _this = this;
}
};
- var getMsoUrl = function() {
+ var getMsoUrl = function(serviceStatus) {
switch (_this.componentId) {
case COMPONENT.CONFIGURATION:
return "mso_delete_configuration/"
if(DataService.getE2EService() === true)
return "mso_delete_e2e_svc_instance/"+ DataService.getServiceInstanceId();
else
- return "mso_delete_svc_instance/"+ DataService.getServiceInstanceId();
+ return "mso_delete_svc_instance" + "/" + DataService.getServiceInstanceId() + "?serviceStatus=" + serviceStatus;
case COMPONENT.VNF:
return "mso_delete_vnf_instance/"
+ DataService.getServiceInstanceId() + "/vnfs/"
requestorId: requestorloggedInId
}
};
+ if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_ADD_MSO_TESTAPI_FIELD)) {
+ if ((_this.componentId != COMPONENT.SERVICE) || ( DataService.getALaCarte() )) {
+ // a-la-carte services AND *any* non-service
+ requestDetails.requestParameters = {
+ testApi : DataService.getMsoRequestParametersTestApi()
+ };
+ }
+ }
switch (_this.componentId) {
case COMPONENT.SERVICE:
- requestDetails.requestParameters = {
- aLaCarte : DataService.getALaCarte()
- };
+ if (!requestDetails.requestParameters) {
+ requestDetails.requestParameters = {};
+ }
+ requestDetails.requestParameters.aLaCarte = DataService.getALaCarte();
if ( !(DataService.getALaCarte()) ) {
// for macro delete include cloud config.
var lcpRegion = getValueFromList(FIELD.ID.LCP_REGION, parameterList);
appDS2.factory("DeleteResumeService", [ "$log", "AaiService", "AsdcService",
"DataService", "ComponentService", "COMPONENT", "FIELD",
- "UtilityService", DeleteResumeService ]);
+ "UtilityService","featureFlags", DeleteResumeService ]);
\r
"use strict";\r
\r
-var DetailsService = function($log, DataService, ComponentService, COMPONENT,\r
- FIELD, UtilityService) {\r
+var DetailsService = function ($log, DataService, ComponentService, COMPONENT,\r
+ FIELD, UtilityService) {\r
\r
var _this = this;\r
\r
- var getSummaryList = function() {\r
- switch (_this.componentId) {\r
- case COMPONENT.NETWORK:\r
- case COMPONENT.SERVICE:\r
- case COMPONENT.VNF:\r
- case COMPONENT.VF_MODULE:\r
- case COMPONENT.VOLUME_GROUP:\r
- return [ {\r
- name : FIELD.NAME.SUBSCRIBER_NAME,\r
- value : DataService.getSubscriberName()\r
- }, {\r
- name : FIELD.NAME.SERVICE_INSTANCE_ID,\r
- value : DataService.getServiceInstanceId()\r
- }, {\r
- name : FIELD.NAME.SERVICE_TYPE,\r
- value : DataService.getServiceType()\r
- } ];\r
- }\r
+ var getSummaryList = function () {\r
+ var model = DataService.getModelInfo(COMPONENT.SERVICE);\r
+ switch (_this.componentId) {\r
+ case COMPONENT.NETWORK:\r
+ case COMPONENT.SERVICE:\r
+ case COMPONENT.VNF:\r
+ case COMPONENT.VF_MODULE:\r
+ case COMPONENT.VOLUME_GROUP:\r
+ return [{\r
+ name: FIELD.NAME.SUBSCRIBER_NAME,\r
+ value: DataService.getSubscriberName()\r
+ }, {\r
+ name: FIELD.NAME.SERVICE_INSTANCE_ID,\r
+ value: DataService.getServiceInstanceId()\r
+ }, {\r
+ name: FIELD.NAME.SERVICE_TYPE,\r
+ value: DataService.getServiceType()\r
+ }, {\r
+ name: FIELD.NAME.MODEL_NAME,\r
+ value: model.modelName\r
+ }, {\r
+ name: FIELD.NAME.MODEL_VERSION,\r
+ value: model.modelVersion\r
+ }];\r
+ }\r
};\r
\r
- var getDetailsList = function() {\r
- switch (_this.componentId) {\r
- case COMPONENT.NETWORK:\r
- case COMPONENT.SERVICE:\r
- case COMPONENT.VNF:\r
- case COMPONENT.VF_MODULE:\r
- case COMPONENT.VOLUME_GROUP:\r
- return ComponentService.getDisplayNames(ComponentService\r
- .getInventoryParameterList(_this.componentId, DataService\r
- .getInventoryItem(), false));\r
- }\r
+ var getDetailsList = function () {\r
+ switch (_this.componentId) {\r
+ case COMPONENT.NETWORK:\r
+ case COMPONENT.SERVICE:\r
+ case COMPONENT.VNF:\r
+ case COMPONENT.VF_MODULE:\r
+ case COMPONENT.VOLUME_GROUP:\r
+ var model = DataService.getModelInfo(_this.componentId);\r
+ var metaData = ComponentService.getDisplayNames(ComponentService\r
+ .getInventoryParameterList(_this.componentId, DataService\r
+ .getInventoryItem(), false));\r
+ if (model && !UtilityService.isObjectEmpty(model.modelName) && !UtilityService.isObjectEmpty(model.modelVersion)) {\r
+ metaData = metaData.concat([\r
+ {\r
+ id: FIELD.NAME.MODEL_NAME,\r
+ name: FIELD.NAME.MODEL_NAME,\r
+ value: model.modelName\r
+ }, {\r
+ id: FIELD.NAME.MODEL_VERSION,\r
+ name: FIELD.NAME.MODEL_VERSION,\r
+ value: model.modelVersion\r
+ }\r
+ ]);\r
+ }\r
+ return metaData;\r
+ }\r
};\r
\r
- var getMsoFilterString = function() {\r
+ var getMsoFilterString = function () {\r
\r
- var instanceId = "";\r
+ var instanceId = "";\r
\r
- switch (_this.componentId) {\r
- case COMPONENT.NETWORK:\r
- instanceId = DataService.getNetworkInstanceId();\r
- break;\r
- case COMPONENT.SERVICE:\r
- instanceId = DataService.getServiceInstanceId();\r
- break;\r
- case COMPONENT.VNF:\r
- instanceId = DataService.getVnfInstanceId();\r
- break;\r
- case COMPONENT.VF_MODULE:\r
- instanceId = DataService.getVfModuleInstanceId();\r
- break;\r
- case COMPONENT.VOLUME_GROUP:\r
- instanceId = DataService.getVolumeGroupInstanceId();\r
- }\r
+ switch (_this.componentId) {\r
+ case COMPONENT.NETWORK:\r
+ instanceId = DataService.getNetworkInstanceId();\r
+ break;\r
+ case COMPONENT.SERVICE:\r
+ instanceId = DataService.getServiceInstanceId();\r
+ break;\r
+ case COMPONENT.VNF:\r
+ instanceId = DataService.getVnfInstanceId();\r
+ break;\r
+ case COMPONENT.VF_MODULE:\r
+ instanceId = DataService.getVfModuleInstanceId();\r
+ break;\r
+ case COMPONENT.VOLUME_GROUP:\r
+ instanceId = DataService.getVolumeGroupInstanceId();\r
+ }\r
\r
- return "filter=" + _this.componentId + "InstanceId:EQUALS:"\r
- + instanceId;\r
+ return "filter=" + _this.componentId + "InstanceId:EQUALS:"\r
+ + instanceId;\r
};\r
\r
return {\r
- initializeComponent : function(componentId) {\r
- _this.componentId = ComponentService.initialize(componentId);\r
- },\r
- getComponentDisplayName : ComponentService.getComponentDisplayName,\r
- getSummaryList : getSummaryList,\r
- getDetailsList : getDetailsList,\r
- getMsoFilterString : getMsoFilterString\r
+ initializeComponent: function (componentId) {\r
+ _this.componentId = ComponentService.initialize(componentId);\r
+ },\r
+ getComponentDisplayName: ComponentService.getComponentDisplayName,\r
+ getSummaryList: getSummaryList,\r
+ getDetailsList: getDetailsList,\r
+ getMsoFilterString: getMsoFilterString\r
}\r
}\r
\r
-appDS2.factory("DetailsService", [ "$log", "DataService", "ComponentService",\r
- "COMPONENT", "FIELD", "UtilityService", DetailsService ]);\r
+appDS2.factory("DetailsService", ["$log", "DataService", "ComponentService",\r
+ "COMPONENT", "FIELD", "UtilityService", DetailsService]);\r
\r
"use strict";\r
\r
-var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityService, COMPONENT, FIELD) {\r
+var MsoService = function($http, $log, $q, PropertyService, AaiService, UtilityService, COMPONENT, FIELD, moment) {\r
\r
var _this = this;\r
\r
timeout : PropertyService.getServerResponseTimeoutMsec()\r
}).then(successCallbackFunction)["catch"]\r
(UtilityService.runHttpErrorHandler);\r
- }\r
+ };\r
\r
var checkValidStatus = function(response) {\r
if (response.data.status < 200 || response.data.status > 202) {\r
}\r
};\r
\r
- var buildPayloadForServiceActivateDeactivate = function (model, userId, aicZone) {\r
+ var buildPayloadForServiceActivateDeactivate = function (model, userId) {\r
var requestDetails = {\r
"modelInfo": {\r
"modelType": "service",\r
"requestorId": userId\r
},\r
"requestParameters": {\r
- "userParams": [{\r
- "name": "aic_zone",\r
- "value": aicZone\r
- }]\r
+ // aicZone was sent from here\r
+ "userParams": []\r
}\r
};\r
\r
};\r
\r
var activateInstance = function(requestParams) {\r
- var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId, requestParams.aicZone);\r
+ var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId);\r
\r
return sendPostRequest(COMPONENT.MSO_ACTIVATE_INSTANCE.replace('@serviceInstanceId', requestParams.instance.serviceInstanceId),\r
requestDetails);\r
};\r
\r
var deactivateInstance = function(requestParams) {\r
- var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId, requestParams.aicZone);\r
+ var requestDetails = buildPayloadForServiceActivateDeactivate(requestParams.model, requestParams.userId);\r
\r
return sendPostRequest(COMPONENT.MSO_DEACTIVATE_INSTANCE.replace('@serviceInstanceId', requestParams.instance.serviceInstanceId),\r
requestDetails);\r
UtilityService.checkUndefined(COMPONENT.STATUS, response.data.status);\r
checkValidStatus(response);\r
\r
- var list = response.data.entity.requestList\r
+ var list = response.data.entity.requestList;\r
UtilityService.checkUndefined(FIELD.ID.REQUEST_LIST, list);\r
\r
var message = "";\r
if (status === undefined) {\r
message += addListEntry(FIELD.ID.REQUEST_STATUS, undefined) + "\n";\r
} else {\r
- message += addListEntry(FIELD.ID.TIMESTAMP, status.timestamp)\r
- + ",\n";\r
+ if(status.finishTime) {\r
+ message += addListEntry(FIELD.ID.TIMESTAMP, moment(new Date(status.finishTime)).format("ddd, DD MMM YYYY HH:mm:ss"))\r
+ + ",\n";\r
+ }\r
message += addListEntry(FIELD.ID.REQUEST_STATE, status.requestState)\r
+ ",\n";\r
message += addListEntry(FIELD.ID.REQUEST_STATUS,\r
if (status === undefined) {\r
message += addListEntry(FIELD.ID.REQUEST_STATUS, undefined) + "\n";\r
} else {\r
- message += addListEntry(FIELD.ID.TIMESTAMP, status.timestamp)\r
+ message += addListEntry(FIELD.ID.TIMESTAMP, moment(new Date()).format("ddd, DD MMM YYYY HH:mm:ss"))\r
+ ",\n";\r
message += addListEntry(FIELD.ID.REQUEST_STATE, status.requestState)\r
+ ",\n";\r
showFunction(FIELD.ERROR.SYSTEM_FAILURE, error.message);\r
break;\r
case "msoFailure":\r
- showFunction(FIELD.ERROR.MSO, "")\r
+ showFunction(FIELD.ERROR.MSO, "");\r
break;\r
default:\r
showFunction(FIELD.ERROR.SYSTEM_FAILURE);\r
}\r
},\r
{\r
- "relatedInstance": {\r
- "instanceId": requestParams.configurationByPolicy ?\r
- requestParams.portMirroringConfigFields.destinationInstance.properties['pnfName']:\r
- requestParams.portMirroringConfigFields.destinationInstance.properties['vnf-id'],\r
+ "relatedInstance": requestParams.configurationByPolicy ? {\r
+ "instanceName": requestParams.portMirroringConfigFields.destinationInstance.properties['pnfName'],\r
"instanceDirection": "destination",\r
- "modelInfo":\r
- requestParams.configurationByPolicy ?\r
- {"modelType": "pnf"} :\r
- modelInfoOf(requestParams.portMirroringConfigFields.destinationInstance)\r
+ "modelInfo": {\r
+ "modelType": "pnf"\r
+ }\r
+ } : {\r
+ "instanceId": requestParams.portMirroringConfigFields.destinationInstance.properties['vnf-id'],\r
+ "instanceDirection": "destination",\r
+ "modelInfo": modelInfoOf(requestParams.portMirroringConfigFields.destinationInstance)\r
}\r
}\r
],\r
});\r
return deferred.promise;\r
},\r
+ deleteConfiguration: function(requestParams, configuration) {\r
+\r
+ var requestDetails = {\r
+ "modelInfo": requestParams.configurationModel,\r
+ "cloudConfiguration": {\r
+ "lcpCloudRegionId": configuration.configData.cloudRegionId\r
+ },\r
+ "requestInfo": {\r
+ "source": "VID",\r
+ "requestorId": requestParams.userId\r
+ },\r
+ "requestParameters": {\r
+ "userParams": []\r
+ }\r
+ };\r
\r
- toggleConfigurationStatus: function(requestParams) {\r
+ var url = "mso/mso_delete_configuration/" + requestParams.serviceInstanceId + "/configurations/" + requestParams.configurationId;\r
+ return sendPostRequest(url, requestDetails);\r
+ },\r
+ toggleConfigurationStatus: function(requestParams, configuration) {\r
\r
var requestDetails = {\r
"modelInfo": requestParams.configurationModel,\r
"cloudConfiguration": {\r
- "lcpCloudRegionId": "mdt1"\r
+ "lcpCloudRegionId": configuration && configuration.configData ? configuration.configData.cloudRegionId : null\r
},\r
"requestInfo": {\r
"source": "VID",\r
return sendPostRequest(url, requestDetails);\r
},\r
\r
- togglePortStatus: function(requestParams) {\r
+ togglePortStatus: function(requestParams, configuration, defaultParams) {\r
+\r
var requestDetails = {\r
"modelInfo": requestParams.configurationModel,\r
"cloudConfiguration": {\r
- "lcpCloudRegionId": "mdt1"\r
+ "lcpCloudRegionId": configuration && configuration.configData ? configuration.configData.cloudRegionId : null\r
},\r
"requestInfo": {\r
"source": "VID",\r
* string for some known conditions.\r
*/\r
\r
-var UtilityService = function($log, DataService, PARAMETER) {\r
+var UtilityService = function($log, DataService, PARAMETER, _) {\r
\r
var _this = this;\r
+\r
+ function hasCustomizationUuidFields(mapOfVfs) {\r
+ return _.some(mapOfVfs, function (o) {\r
+ return _.has(o, "customizationUuid");\r
+ });\r
+ }\r
+\r
var convertModel = function (serviceModel) {\r
\r
- var isNewFlow = false;\r
+ var isNewFlow =\r
+ hasCustomizationUuidFields(serviceModel.networks)\r
+ || hasCustomizationUuidFields(serviceModel.pnfs)\r
+ || hasCustomizationUuidFields(serviceModel.vnfs)\r
+ || hasCustomizationUuidFields(serviceModel.configurations);\r
\r
- for (var networkCustomizationName in serviceModel.networks) {\r
- var networkModel = serviceModel.networks[networkCustomizationName];\r
- if ( networkModel.customizationUuid != null ) {\r
- isNewFlow = true;\r
- break;\r
- }\r
- }\r
- if ( !isNewFlow ) {\r
- for (var vnfCustomizationName in serviceModel.vnfs) {\r
- var vnfModel = serviceModel.vnfs[vnfCustomizationName];\r
- if ( vnfModel.customizationUuid != null ) {\r
- isNewFlow = true;\r
- break;\r
- }\r
- }\r
- }\r
if ( isNewFlow ) {\r
return (convertNewModel (serviceModel) );\r
}\r
element.isPnf= true;\r
element.modelCustomizationName= key;\r
});\r
- var mergedVnfs = Object.assign(serviceModel.vnfs, serviceModel.configurations, serviceModel.pnfs);\r
+ var mergedVnfs = Object.assign({}, serviceModel.vnfs, serviceModel.configurations, serviceModel.pnfs);\r
\r
for (var vnfCustomizationName in mergedVnfs) {\r
var vnfModel = mergedVnfs[vnfCustomizationName];\r
convertedAsdcModel.vnfs[vnfCustomizationUuid]["nfFunction"] = vnf_function;\r
convertedAsdcModel.vnfs[vnfCustomizationUuid]["nfCode"] = vnf_code;\r
//\r
- for (var vfModuleCustomizationName in serviceModel.vnfs[vnfCustomizationName].vfModules) {\r
- var vfModuleModel = serviceModel.vnfs[vnfCustomizationName].vfModules[vfModuleCustomizationName];\r
+ for (var vfModuleCustomizationName in vnfModel.vfModules) {\r
+ var vfModuleModel = vnfModel.vfModules[vfModuleCustomizationName];\r
convertedAsdcModel.vnfs[vnfCustomizationUuid].vfModules[vfModuleModel.customizationUuid] = vfModuleModel;\r
}\r
\r
- for (var volumeGroupCustomizationName in serviceModel.vnfs[vnfCustomizationName].volumeGroups) {\r
- var volumeGroupModel = serviceModel.vnfs[vnfCustomizationName].volumeGroups[volumeGroupCustomizationName];\r
+ for (var volumeGroupCustomizationName in mergedVnfs[vnfCustomizationName].volumeGroups) {\r
+ var volumeGroupModel = mergedVnfs[vnfCustomizationName].volumeGroups[volumeGroupCustomizationName];\r
convertedAsdcModel.vnfs[vnfCustomizationUuid].volumeGroups[volumeGroupModel.customizationUuid] = volumeGroupModel;\r
}\r
}\r
element.isPnf= true;\r
element.modelCustomizationName= key;\r
});\r
- var mergedVnfs = Object.assign(serviceModel.vnfs, serviceModel.configurations, serviceModel.pnfs);\r
+ var mergedVnfs = Object.assign({}, serviceModel.vnfs, serviceModel.configurations, serviceModel.pnfs);\r
\r
for (var vnfCustomizationName in mergedVnfs) {\r
var vnfModel = mergedVnfs[vnfCustomizationName];\r
convertedAsdcModel.vnfs[vnfModel.uuid].displayInputs=vnfModelDisplayInputs;\r
}\r
\r
- for (var vfModuleCustomizationName in serviceModel.vnfs[vnfCustomizationName].vfModules) {\r
- var vfModuleModel = serviceModel.vnfs[vnfCustomizationName].vfModules[vfModuleCustomizationName];\r
+ for (var vfModuleCustomizationName in vnfModel.vfModules) {\r
+ var vfModuleModel = vnfModel.vfModules[vfModuleCustomizationName];\r
convertedAsdcModel.vnfs[vnfModel.uuid].vfModules[vfModuleModel.uuid] = vfModuleModel;\r
}\r
\r
- for (var volumeGroupCustomizationName in serviceModel.vnfs[vnfCustomizationName].volumeGroups) {\r
- var volumeGroupModel = serviceModel.vnfs[vnfCustomizationName].volumeGroups[volumeGroupCustomizationName];\r
+ for (var volumeGroupCustomizationName in vnfModel.volumeGroups) {\r
+ var volumeGroupModel = vnfModel.volumeGroups[volumeGroupCustomizationName];\r
convertedAsdcModel.vnfs[vnfModel.uuid].volumeGroups[volumeGroupModel.uuid] = volumeGroupModel;\r
}\r
}\r
}\r
\r
//app.factory("UtilityService", UtilityService);\r
-appDS2.factory("UtilityService", [ "$log", "DataService", "PARAMETER", UtilityService ]);\r
+appDS2.factory("UtilityService", [ "$log", "DataService", "PARAMETER", "_", UtilityService ]);\r
+<script src="../controller/change-management.controller.js"></script>
<link rel="stylesheet" type="text/css" href="app/vid/styles/change-management.css" />
<link rel="stylesheet" type="text/css" href="app/vid/styles/change-management-icons.css" />
<div class="changes-management">
</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>
+ <tr data-tests-id="active-table-cm-row" ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['COMPLETE'], notContains: true}">
+ <th scope="row">{{
+ changeManagement.vnfNameFromScheduler ||
+ changeManagement.instanceReferences.vnfInstanceId ||
+ '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 == '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" ng-if="changeManagement.requestStatus.requestState.toUpperCase() === 'FAILED'"><span class="icon-x" ng-click="vm.openFailedModal($event, {details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td>
+ <td class="centered" ng-if="changeManagement.requestStatus.requestState.toUpperCase() === 'IN_PROGRESS'"><span class="icon-process" ng-click="vm.openInProgressModal($event, {details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td>
+ <td class="centered"
+ ng-if="['PENDING_MANUAL_TASK','PENDING'].indexOf(changeManagement.requestStatus.requestState.toUpperCase()) !== -1"
+ ><span class="icon-alert" ng-click="vm.openAlertModal($event, {details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td>
+ <td class="centered"
+ ng-if="['FAILED','IN_PROGRESS','PENDING_MANUAL_TASK','PENDING'].indexOf(changeManagement.requestStatus.requestState.toUpperCase()) == -1"
+ ><span class="icon-alert" ng-click="vm.openFailedModal($event, {requestState: changeManagement.requestStatus.requestState, details: changeManagement.requestStatus.statusMessage, job: changeManagement})"></span></td>
</tr>
</tbody>
</table>
</div>
<div class="table-wrapper">
- <table ng-if="vm.hasScheduler" class="table table-bordered" data-tests-id="pending-table-cm" id="pending-table">
+ <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">
<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>
+ <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)"
+ ng-show="vm.isChangeManagementDeleted(changeManagement)"
+ data-tests-id="icon-status-{{changeManagement.scheduleRequest.scheduleId}}"></span>
+ </td>
</tr>
</tbody>
</table>
<th></th>
</tr>
<tr ng-repeat="changeManagement in vm.changeManagements | changeManagementsByStatuses:{statuses: ['COMPLETE']}">
- <th scope="row">{{changeManagement.instanceReferences.vnfInstanceName || 'No-Instance-Name'}}</th>
+ <th scope="row">{{
+ changeManagement.vnfNameFromScheduler ||
+ changeManagement.instanceReferences.vnfInstanceId ||
+ 'No-Instance-Name'
+ }}</th>
<td>{{changeManagement.requestScope}}</td>
<td>{{changeManagement.requestType}}</td>
<td>{{changeManagement.startTime}}</td>
-<div ng-controller="creationDialogController">\r
-\r
+<div ng-controller="creationDialogController">\r
<div ng-show="isDialogVisible">\r
- <div class="titleLine">\r
- <img src="app/vid/images/spinner.gif"\r
- ngx-visible="{{isSpinnerVisible}}"></img>\r
- <h3 data-tests-id="create-modal-title">Create {{componentName}} -- {{createType}}</h3>\r
- </div>\r
-\r
- <div class="error" ng-show="isErrorVisible">\r
- <img src="app/vid/images/error.png"></img>{{error}}\r
- </div>\r
+ <iframe class="popup" scrolling="no" ng-if="!shouldShowOldPopup()" id="iframe_callback" ng-src={{url}}></iframe>\r
+ <div ng-if="shouldShowOldPopup()">\r
+ <div class="titleLine">\r
+ <img src="app/vid/images/spinner.gif"\r
+ ngx-visible="{{isSpinnerVisible}}"></img>\r
+ <h3 data-tests-id="create-modal-title">Create {{componentName}} -- {{createType}}</h3>\r
+ </div>\r
\r
- <div ngx-visible="{{isDataVisible}}">\r
- <parameter-block control="summaryControl"></parameter-block>\r
- <h4>\r
- User Provided Data (<img class="requiredIndicator"\r
- src="app/vid/images/asterisk.png" height='10' width='10'></img> indicates required field)\r
- </h4>\r
- <parameter-block control="userProvidedControl"\r
- callback="userParameterChanged(id);" editable></parameter-block>\r
- <div class="prompt">\r
- <p>\r
- Enter Data and <span>Confirm</span> to<br />Create <span>{{componentName}}</span>\r
- </p>\r
- <p>\r
- <span>Cancel</span> to Return to Previous Page.<br />Data entered\r
- will be lost\r
- </p>\r
+ <div class="error" ng-show="isErrorVisible">\r
+ <img src="app/vid/images/error.png"></img>{{error}}\r
</div>\r
\r
- </div>\r
- <div class="buttonRow">\r
- <button data-tests-id="confirmButton" ngx-enabled="{{isConfirmEnabled}}" att-button size="small"\r
- ng-click="confirm();">Confirm</button>\r
- <button type="button" data-tests-id="cancelButton" ng-click="cancel();" att-button\r
- btn-type="primary" size="small">Cancel</button>\r
+ <div ngx-visible="{{isDataVisible}}">\r
+ <parameter-block control="summaryControl"></parameter-block>\r
+ <h4>\r
+ User Provided Data (<img class="requiredIndicator"\r
+ src="app/vid/images/asterisk.png" height='10' width='10'></img> indicates required field)\r
+ </h4>\r
+ <parameter-block control="userProvidedControl"\r
+ callback="userParameterChanged(id);" editable></parameter-block>\r
+ <div class="prompt">\r
+ <p>\r
+ Enter Data and <span>Confirm</span> to<br />Create <span>{{componentName}}</span>\r
+ </p>\r
+ <p>\r
+ <span>Cancel</span> to Return to Previous Page.<br />Data entered\r
+ will be lost\r
+ </p>\r
+ </div>\r
+\r
+ </div>\r
+ <div class="buttonRow">\r
+ <button data-tests-id="confirmButton" ngx-enabled="{{isConfirmEnabled}}" att-button size="small"\r
+ ng-click="confirm();">Confirm</button>\r
+ <button type="button" data-tests-id="cancelButton" ng-click="cancel();" att-button\r
+ btn-type="primary" size="small">Cancel</button>\r
+ </div>\r
</div>\r
</div>\r
\r
\r
<h4>Instantiation Transactions</h4>\r
\r
- <pre class="log">{{log}}</pre>\r
+ <pre data-tests-id="detailsLog" class="log">{{log}}</pre>\r
\r
<div class="buttonRow">\r
- <button type="button" ng-click="close();" att-button\r
+ <button type="button" ng-click="close();" att-button data-tests-id="detailsCloseBtn"\r
btn-type="primary" size="small">Close</button>\r
</div>\r
\r
--- /dev/null
+<iframe ng-src="{{url}}"></iframe>
\ No newline at end of file
--- /dev/null
+<div ng-controller="iframeDialogController">
+ <div ng-if="isDialogVisible">
+ <iframe class="popup iframeDialog" scrolling="no" id="iframe_callback" ng-src={{url}}></iframe>
+ </div>
+ <div ng-include="'app/vid/scripts/view-models/msoCommit.htm'"></div>
+</div>
\ No newline at end of file
============LICENSE_END=========================================================\r
-->\r
\r
-<div ng-controller="InstantiationController">\r
+<div>\r
\r
<div popup-window class="popupContents" ngx-show="{{popup.isVisible}}"\r
ng-cloak>\r
<div ng-include="'app/vid/scripts/view-models/deleteResumeDialog.htm'"></div>\r
<div ng-include="'app/vid/scripts/view-models/detailsDialog.htm'"></div>\r
<div ng-include="'app/vid/scripts/view-models/statusDialog.htm'"></div>\r
+ <div ng-include="'app/vid/scripts/view-models/iframeDialog.htm'"></div>\r
</div>\r
<div ng-controller="aaiSubscriberController" ng-init="getComponentList() ">\r
<div class="statusLine" ng-class="{true:'aaiVisible', false:'aaiHidden'}[isSpinnerVisible]">\r
<label>Status:</label><span class="status">{{status}}</span>\r
</div>\r
\r
- <div ng-if="errorMsg != null"><font color='red'>{{errorMsg}}<pre>{{errorDetails | json}}</pre></font></div>\r
-\r
- <h1 class="heading1" style="margin-top: 20px;">{{isPermitted ? "View/Edit" : "View"}} Service Instance</h1>\r
- <a class="btn btn-primary btn-xs pull-right" ng-click="reloadRoute();" ><span class="glyphicon glyphicon-refresh"></span></a>\r
-\r
- <br>\r
-\r
- <center>\r
- <table att-table border="1" ng-model="service">\r
- <tr>\r
- <th style="text-align: center" width="33%">SUBSCRIBER:\r
- {{service.instance.subscriberName}}</th>\r
- <th style="text-align: center" width="34%">SERVICE TYPE:\r
- {{service.instance.serviceType}}</th>\r
- <th data-tests-id="service-instanceId-th-id" style="text-align: center" width="33%">SERVICE INSTANCE\r
- ID: {{service.instance.serviceInstanceId}}</th>\r
- <tr>\r
- <tr>\r
- <td colspan='3' style="text-align: center">Service Instance\r
- Name: {{service.instance.name || "Not defined"}}\r
- </td>\r
- <tr>\r
- </table>\r
-\r
- </center>\r
-\r
- <div ui-tree data-drag-enabled="false" data-nodrop-enabled="true" style="margin: 30px">\r
-\r
- <ol ui-tree-nodes="" ng-model="service" >\r
- <li ng-repeat="aService in [service]" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- <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()">\r
- <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
- </a>\r
- SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}\r
- <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);">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a>\r
- <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">\r
- <button type="button" data-tests-id="addVNFButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Add node instance<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs">\r
- <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>\r
-\r
- </ul>\r
- </div>\r
- <div class="pull-right btn-group" ng-if="aService.convertedModel.vnfs && !isObjectEmpty(aService.convertedModel.vnfs) && aService.convertedModel.isNewFlow && isPermitted">\r
- <button type="button" data-tests-id="addVNFButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Add node instance<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs" data-tests-id="addVnfsDropdown">\r
- <li role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs">\r
- <a data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}" ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}} {{vnf.nfType}} {{vnf.nfRole}} {{vnf.nfFunction}} {{vnf.nfCode}}</a>\r
- </li>\r
- </ul>\r
- </div>\r
- <!-- <div class="pull-right btn-group" ng-if="aService.model.networks && !equals(aService.model.networks, {})">-->\r
- <div class="pull-right btn-group" ng-if="aService.convertedModel.networks && (!(isObjectEmpty(aService.convertedModel.networks))) && isPermitted">\r
- <!--<div class="pull-right btn-group" ng-if="aService.model.networks">-->\r
- <button type="button" data-tests-id="addNetworkButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Add Network<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="aService.convertedModel.networks">\r
- <li ng-repeat="(networkUuid, network) in aService.convertedModel.networks">\r
- <a data-tests-id="addNetworkOption-{{network.modelCustomizationName}}" ng-click="addNetworkInstance(network, aService.instance.vnfs)">{{network.modelCustomizationName}}</a>\r
- </li>\r
- </ul>\r
- </div>\r
- <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeService(aService.instance)" style="margin-right: 8px;">\r
- <span class="glyphicon glyphicon-info-sign"></span>\r
- </a>\r
- <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;">\r
- Deactivate\r
- </a>\r
- <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;">\r
- Activate\r
- </a>\r
- </div>\r
- <ol ui-tree-nodes="" ng-model="aService.instance.vnfs" ng-class="{hidden: collapsed}">\r
- <li ng-repeat="vnf in aService.instance.vnfs" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- <a class="btn btn-success btn-xs" ng-if="(vnf.vfModules && vnf.vfModules.length > 0) || (vnf.volumeGroups && vnf.volumeGroups.length > 0)" data-nodrag ng-click="this.toggle()">\r
- <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
- </a>\r
- VNF: {{vnf.name}} | TYPE: {{vnf.nodeType}} | ORCH STATUS: {{vnf.nodeStatus}}\r
-\r
- <a ng-if="(vnf.vfModules.length == 0) && (vnf.volumeGroups.length == 0) && isPermitted" data-tests-id="deleteVNFButton" class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteVnf(aService.instance, vnf)">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a>\r
- <!-- <div class="pull-right btn-group" ng-if="aService.convertedModel.vnfs[vnf.object['model-invariant-id']][vnf.object['model-version-id']].vfModules">-->\r
- <div class="pull-right btn-group" ng-if="(hasVfModules(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">\r
-\r
- <button type="button" data-tests-id="addVFModuleButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Add VF-Module<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="vfModule" >\r
- <a ng-repeat="(vfModuleCustomizationUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].vfModules" data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}" ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}} </a>\r
- </ul>\r
- </div>\r
-\r
-\r
- <div class="pull-right btn-group" ng-if="(hasVfModules(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">\r
-\r
- <button type="button" data-tests-id="addVFModuleButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Add VF-Module<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="vnf">\r
- <a ng-repeat="(vfModuleUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-version-id']].vfModules" data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}" ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}}</a>\r
- </li>\r
- </ul>\r
-\r
- </div>\r
-\r
- <div class="pull-right btn-group" ng-if="(hasVolumeGroups(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">\r
- <button type="button" data-tests-id="addVolumeGroupButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Add Volume Group<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="volumeGroup" >\r
- <a ng-repeat="(volumeGroupCustomizationUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].volumeGroups" data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}" ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>\r
- </ul>\r
- </div>\r
-\r
- <div class="pull-right btn-group" ng-if="(hasVolumeGroups(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">\r
-\r
- <button type="button" data-tests-id="addVolumeGroupButton" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Add Volume Group<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="vnf">\r
- <a ng-repeat="(volumeGroupUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-version-id']].volumeGroups" data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}" ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>\r
- </li>\r
- </ul>\r
-\r
- </div>\r
-\r
- <!-- VID-374/378 - switching-off feature <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="getStatusOfVnf(aService.instance, vnf)" style="margin-right: 8px;">\r
- <span class="glyphicon glyphicon-exclamation-sign"></span>\r
- </a> -->\r
- <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeVnf(aService.instance, vnf)" style="margin-right: 8px;">\r
- <span class="glyphicon glyphicon-info-sign"></span>\r
- </a>\r
- </div>\r
- <ol ui-tree-nodes="" ng-model="vnf.vfModules" ng-class="{hidden: collapsed}">\r
- <li ng-repeat="vfModule in vnf.vfModules" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- <a class="btn btn-success btn-xs" ng-if="(vfModule.volumeGroups && vfModule.volumeGroups.length > 0)" data-nodrag ng-click="this.toggle()">\r
- <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
- </a>\r
- VFMODULE: {{vfModule.name}} | TYPE: {{vfModule.nodeType}} | ORCH STATUS: {{vfModule.nodeStatus}}\r
- <!-- -->\r
- <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)">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a>\r
- <div class="pull-right btn-group">\r
- <!-- <button type="button" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
- Attach Volume Group<span class="caret"></span>\r
- </button>\r
- <ul class="dropdown-menu" ng-model="vnf.volumeGroups">\r
- <li ng-repeat="volumeGroup in vnf.availableVolumeGroups">\r
- <a ng-click="attachVolumeGroupInstance(vfModule, volumeGroup)">{{volumeGroup.name}}</a>\r
- </li>\r
- </ul> -->\r
- </div>\r
- <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeVfModule(aService.instance, vfModule, vnf)" style="margin-right: 8px;">\r
- <span class="glyphicon glyphicon-info-sign"></span>\r
- </a>\r
- <div class="resume" ng-if="isPermitted&&(vfModule.nodeStatus==resumeStatus)">\r
- <a data-tests-id="resumeVFModuleButton-{{vfModule.name}}" class="pull-right btn btn-success btn-xs button-margin" ng-click="resume(aService.instance, vfModule, vnf)" >\r
- Resume\r
- </a>\r
- </div>\r
-\r
- </div>\r
- <ol ui-tree-nodes="" ng-model="vfModule.volumeGroups" ng-class="{hidden: collapsed}">\r
- <li ng-repeat="volumeGroup in vfModule.volumeGroups" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}} | ORCH STATUS: {{volumeGroup.nodeStatus}}\r
- <!-- <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteVolumeGroup(aService.instance, vnf, vfModule, volumeGroup)">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a> -->\r
- <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)" style="margin-right: 8px;">\r
- <span class="glyphicon glyphicon-info-sign"></span>\r
- </a>\r
- </div>\r
- </li>\r
- </ol>\r
- </li>\r
- </ol>\r
- <ol ui-tree-nodes="" ng-model="vnf.availableVolumeGroups" ng-class="{hidden: collapsed}">\r
- <li ng-repeat="volumeGroup in vnf.availableVolumeGroups" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}} | ORCH STATUS: {{volumeGroup.nodeStatus}}\r
- <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted" data-tests-id="deleteVNFVolumeGroupButton" data-nodrag ng-click="deleteVnfVolumeGroup(aService.instance, vnf, volumeGroup)">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a>\r
- <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)" style="margin-right: 8px;">\r
- <span class="glyphicon glyphicon-info-sign"></span>\r
- </a>\r
- </div>\r
- </li>\r
- </ol>\r
- </li>\r
- </ol>\r
-\r
- <ol ui-tree-nodes="" ng-model="aService.instance.networks" ng-class="{hidden: collapsed}">\r
- <li ng-repeat="network in aService.instance.networks" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH STATUS: {{network.nodeStatus}}\r
-\r
- <a class="pull-right btn btn-danger btn-xs" ng-if="!isMacro() && isPermitted" data-tests-id="deleteNetworkButton" data-nodrag ng-click="deleteNetwork(aService.instance, network)">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a>\r
- <!-- <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteNetwork(aService.instance, network)">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a>-->\r
- <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="describeNetwork(aService.instance, network)" style="margin-right: 8px;">\r
- <span class="glyphicon glyphicon-info-sign"></span>\r
- </a>\r
- </div>\r
- </li>\r
- </ol>\r
-\r
-\r
- <ol ui-tree-nodes="" ng-model="aService.instance.configurations" ng-class="{hidden: collapsed}">\r
- <li ng-repeat="configuration in aService.instance.configurations" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- <a class="btn btn-success btn-xs" ng-if="(configuration.ports && configuration.ports.length > 0)" data-nodrag ng-click="this.toggle()">\r
- <span class="glyphicon" ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
- </a>\r
- CONFIGURATION: {{configuration.name}} | TYPE: {{configuration.nodeType}} | ORCH STATUS: {{configuration.nodeStatus}}\r
-\r
- <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)">\r
- <span class="glyphicon glyphicon-remove"></span>\r
- </a>\r
-\r
- <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="toggleConfigurationStatus(aService, configuration)" ng-if="isPermitted && allowConfigurationActions">\r
- {{configuration.nodeStatus === STATUS_CONSTANTS.AAI_ACTIVE ? "Deactivate" : "Activate"}}\r
- </a>\r
- </div>\r
- <ol ui-tree-nodes="" ng-model="configuration.ports" ng-class="{hidden: collapsed}">\r
- <li ng-repeat="port in configuration.ports" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- PORT: {{port.portName}} | ORCH STATUS: {{port.portStatus}}\r
-\r
- <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)">\r
- {{port.portStatus === STATUS_CONSTANTS.AAI_ENABLED ? "Disable" : "Enable"}}\r
- </button>\r
- </div>\r
- </li>\r
- </ol>\r
- </li>\r
- </ol>\r
-\r
- <ol id="pnfs-tree" ui-tree-nodes="" ng-model="pnfs" ng-class="{hidden: collapsed || pnf.length === 0}">\r
- <li ng-repeat="pnf in pnfs" ui-tree-node>\r
- <div ui-tree-handle class="tree-node tree-node-content">\r
- PNF: {{pnf}}\r
-\r
- <a class="dissociate-pnf pull-right btn btn-primary btn-xs" data-nodrag ng-click="dissociatePnf(pnf)" style="margin-right: 8px;">\r
- <span>Dissociate</span>\r
- </a>\r
- </div>\r
- </li>\r
- </ol>\r
- </li>\r
- </ol>\r
- </div>\r
- </div>\r
+ <div ng-if="errorMsg != null" style="white-space: pre-line"><font color='red'>{{errorMsg}}\r
+ <pre>{{errorDetails | json}}</pre>\r
+ </font></div>\r
+\r
+ <h1 class="heading1" style="margin-top: 20px;">{{isPermitted ? "View/Edit" : "View"}} Service Instance</h1>\r
+ <a class="btn btn-primary btn-xs pull-right" ng-click="reloadRoute();"><span\r
+ class="glyphicon glyphicon-refresh"></span></a>\r
+\r
+ <br>\r
+\r
+ <center>\r
+ <table att-table border="1" ng-model="service">\r
+ <tr>\r
+ <th style="text-align: center" width="33%">SUBSCRIBER:\r
+ {{service.instance.subscriberName}}\r
+ </th>\r
+ <th style="text-align: center" width="34%">SERVICE TYPE:\r
+ {{service.instance.serviceType}}\r
+ </th>\r
+ <th data-tests-id="service-instanceId-th-id" style="text-align: center" width="33%">SERVICE INSTANCE\r
+ ID: {{service.instance.serviceInstanceId}}\r
+ </th>\r
+ <tr>\r
+ <tr>\r
+ <td colspan='3' style="text-align: center">Service Instance\r
+ Name: {{service.instance.name || "Not defined"}}\r
+ </td>\r
+ <tr>\r
+ </table>\r
+\r
+ </center>\r
+\r
+ <div ui-tree data-drag-enabled="false" data-nodrop-enabled="true" style="margin: 30px">\r
+\r
+ <ol ui-tree-nodes="" ng-model="service">\r
+ <li ng-repeat="aService in [service]" ui-tree-node>\r
+\r
+ <div ng-if="isCR && collectionResource != null">\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ <a class="btn btn-success btn-xs" data-nodrag ng-click="this.toggle()">\r
+ <span class="glyphicon"\r
+ ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
+ </a>\r
+ SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}\r
+ <a ng-if="isPermitted" data-tests-id="deleteServiceButton"\r
+ class="pull-right btn btn-danger btn-xs" data-nodrag\r
+ ng-click="deleteService(aService.instance);">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>\r
+\r
+ <a class="pull-right btn btn-primary btn-xs" data-tests-id="infoServiceButton" data-nodrag\r
+ ng-click="describeService(aService.instance)" style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-info-sign service-info"></span>\r
+ </a>\r
+ </div>\r
+ <ol ui-tree-nodes="" ng-model="collections" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="collection in collections" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content" data-tests-id="collectionDiv">\r
+ <a class="btn btn-success btn-xs" data-nodrag ng-click="this.toggle()">\r
+ <span class="glyphicon"\r
+ ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
+ </a>\r
+ COLLECTION: {{collection["collection-name"]}} | TYPE:\r
+ {{collection["collection-type"]}}\r
+ </div>\r
+ <ol ui-tree-nodes="" ng-model="networks" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="network in networks" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content"\r
+ data-tests-id="collectionNetworkDiv">\r
+ NETWORK INSTANCE GROUP: {{network["network-id"]}} | ROLE:\r
+ {{network["network-role"]}} | TYPE: {{network["network-type"]}} | # OF\r
+ NETWORKS: {{collectionResource.networks.length}}\r
+ </div>\r
+ </li>\r
+ </ol>\r
+ </li>\r
+ </ol>\r
+ </div>\r
+ <div ng-if="!isCR">\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ <a class="btn btn-success btn-xs"\r
+ 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)"\r
+ data-nodrag ng-click="this.toggle()">\r
+ <span class="glyphicon"\r
+ ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
+ </a>\r
+ SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}\r
+ <a ng-if="((isMacro()) || (isObjectEmpty(aService.instance.vnfs) && isObjectEmpty(aService.instance.networks) && isObjectEmpty(aService.instance.pnfs))) && isPermitted"\r
+ data-tests-id="deleteServiceButton" class="pull-right btn btn-danger btn-xs" data-nodrag\r
+ ng-click="deleteService(aService.instance, serviceOrchestrationStatus);">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>\r
+ <div class="pull-right btn-group"\r
+ ng-if="(aService.convertedModel.vnfs||aService.convertedModel.vnfs) &&(!isObjectEmpty(aService.convertedModel.pnfs)||!isObjectEmpty(aService.convertedModel.pnfs)) && !aService.convertedModel.isNewFlow && isPermitted">\r
+ <button type="button" data-tests-id="addVNFButton"\r
+ class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
+ aria-haspopup="true" aria-expanded="false">\r
+ Add node instance<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs">\r
+ <a role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs"\r
+ data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}"\r
+ ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}}</a>\r
+\r
+ </ul>\r
+ </div>\r
+ <div class="pull-right btn-group"\r
+ ng-if="aService.convertedModel.vnfs && !isObjectEmpty(aService.convertedModel.vnfs) && aService.convertedModel.isNewFlow && isPermitted">\r
+ <button type="button" data-tests-id="addVNFButton"\r
+ class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
+ aria-haspopup="true" aria-expanded="false">\r
+ Add node instance<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs"\r
+ data-tests-id="addVnfsDropdown">\r
+ <li role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs">\r
+ <a data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}"\r
+ ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}}\r
+ {{vnf.nfType}} {{vnf.nfRole}} {{vnf.nfFunction}} {{vnf.nfCode}}</a>\r
+ </li>\r
+ </ul>\r
+ </div>\r
+ <!-- <div class="pull-right btn-group" ng-if="aService.model.networks && !equals(aService.model.networks, {})">-->\r
+ <div class="pull-right btn-group"\r
+ ng-if="aService.convertedModel.networks && (!(isObjectEmpty(aService.convertedModel.networks))) && isPermitted">\r
+ <!--<div class="pull-right btn-group" ng-if="aService.model.networks">-->\r
+ <button type="button" data-tests-id="addNetworkButton"\r
+ class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
+ aria-haspopup="true" aria-expanded="false">\r
+ Add Network<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="aService.convertedModel.networks">\r
+ <li ng-repeat="(networkUuid, network) in aService.convertedModel.networks">\r
+ <a data-tests-id="addNetworkOption-{{network.modelCustomizationName}}"\r
+ ng-click="addNetworkInstance(network, aService.instance.vnfs)">{{network.modelCustomizationName}}</a>\r
+ </li>\r
+ </ul>\r
+ </div>\r
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="describeService(aService.instance)" style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-info-sign service-info"></span>\r
+ </a>\r
+ <a data-tests-id="deactivateButton" ng-disabled="!isActivateDeactivateEnabled('deactivate')"\r
+ class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="deactivateMSOInstance()"\r
+ style="margin-right: 8px;">\r
+ Deactivate\r
+ </a>\r
+ <a data-tests-id="activateButton" ng-disabled="!isActivateDeactivateEnabled('activate')"\r
+ class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateMSOInstance()"\r
+ style="margin-right: 8px;">\r
+ Activate\r
+ </a>\r
+ <a data-tests-id="showAssignmentsButton" ng-disabled="!isShowAssignmentsEnabled()"\r
+ class="pull-right btn btn-primary btn-xs" data-nodrag style="margin-right: 8px;"\r
+ target="_blank" ng-href="{{showAssignmentsSDNC()}}">\r
+ Show Assignments\r
+ </a>\r
+ <a data-tests-id="verifyServiceButton" ng-if="isShowVerifyService()" ng-disabled="!isEnableVerifyService()"\r
+ class="pull-right btn btn-primary btn-xs" data-nodrag style="margin-right: 8px;"\r
+ target="_blank" ng-click="activateVerifyService()">\r
+ Verify Service\r
+ </a>\r
+ </div>\r
+ <ol ui-tree-nodes="" ng-model="aService.instance.vnfs" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="vnf in aService.instance.vnfs" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ <a class="btn btn-success btn-xs"\r
+ ng-if="(vnf.vfModules && vnf.vfModules.length > 0) || (vnf.volumeGroups && vnf.volumeGroups.length > 0)"\r
+ data-nodrag ng-click="this.toggle()">\r
+ <span class="glyphicon"\r
+ ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
+ </a>\r
+ VNF: {{vnf.name}} | TYPE: {{vnf.nodeType}} | ORCH STATUS: {{vnf.nodeStatus}}\r
+\r
+ <a ng-if="(vnf.vfModules.length == 0) && (vnf.volumeGroups.length == 0) && isPermitted"\r
+ data-tests-id="deleteVNFButton" class="pull-right btn btn-danger btn-xs"\r
+ data-nodrag ng-click="deleteVnf(aService.instance, vnf)">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>\r
+ <!-- <div class="pull-right btn-group" ng-if="aService.convertedModel.vnfs[vnf.object['model-invariant-id']][vnf.object['model-version-id']].vfModules">-->\r
+ <div class="pull-right btn-group"\r
+ ng-if="(hasVfModules(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">\r
+\r
+ <button type="button" data-tests-id="addVFModuleButton"\r
+ class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
+ aria-haspopup="true" aria-expanded="false">\r
+ Add VF-Module<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="vfModule">\r
+ <a ng-repeat="(vfModuleCustomizationUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].vfModules"\r
+ data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}"\r
+ ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}} </a>\r
+ </ul>\r
+ </div>\r
+\r
+\r
+ <div class="pull-right btn-group"\r
+ ng-if="(hasVfModules(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">\r
+\r
+ <button type="button" data-tests-id="addVFModuleButton"\r
+ class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
+ aria-haspopup="true" aria-expanded="false">\r
+ Add VF-Module<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="vnf">\r
+ <a ng-repeat="(vfModuleUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-version-id']].vfModules"\r
+ data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}"\r
+ ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}}</a>\r
+ </li>\r
+ </ul>\r
+\r
+ </div>\r
+\r
+ <div class="pull-right btn-group"\r
+ ng-if="(hasVolumeGroups(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">\r
+ <button type="button" data-tests-id="addVolumeGroupButton"\r
+ class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
+ aria-haspopup="true" aria-expanded="false">\r
+ Add Volume Group<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="volumeGroup">\r
+ <a ng-repeat="(volumeGroupCustomizationUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].volumeGroups"\r
+ data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}"\r
+ ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>\r
+ </ul>\r
+ </div>\r
+\r
+ <div class="pull-right btn-group"\r
+ ng-if="(hasVolumeGroups(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">\r
+\r
+ <button type="button" data-tests-id="addVolumeGroupButton"\r
+ class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
+ aria-haspopup="true" aria-expanded="false">\r
+ Add Volume Group<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="vnf">\r
+ <a ng-repeat="(volumeGroupUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-version-id']].volumeGroups"\r
+ data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}"\r
+ ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>\r
+ </li>\r
+ </ul>\r
+\r
+ </div>\r
+\r
+ <!-- VID-374/378 - switching-off feature <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="getStatusOfVnf(aService.instance, vnf)" style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-exclamation-sign"></span>\r
+ </a> -->\r
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="describeVnf(aService.instance, vnf)" style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-info-sign vnf-info"></span>\r
+ </a>\r
+ </div>\r
+ <ol ui-tree-nodes="" ng-model="vnf.instanceGroups" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="instanceGroup in vnf.instanceGroups" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content"\r
+ ng-class="'instanceGroupTreeNode'">\r
+ INSTANCE-GROUP: {{instanceGroup.name}} | TYPE: Instance-Group\r
+ </div>\r
+\r
+ </li>\r
+ </ol>\r
+\r
+ <ol ui-tree-nodes="" ng-model="vnf.vfModules" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="vfModule in vnf.vfModules" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content"\r
+ ng-class="'vfModuleTreeNode-' + vfModule.nodeStatus.toLowerCase()">\r
+ <a class="btn btn-success btn-xs"\r
+ ng-if="(vfModule.volumeGroups && vfModule.volumeGroups.length > 0)"\r
+ data-nodrag ng-click="this.toggle()">\r
+ <span class="glyphicon"\r
+ ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
+ </a>\r
+ VFMODULE: {{vfModule.name}} | TYPE: {{vfModule.nodeType}} | ORCH STATUS:\r
+ {{vfModule.nodeStatus}}\r
+ <!-- -->\r
+ <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted"\r
+ data-tests-id="deleteVFModuleButton-{{vfModule.name}}" data-nodrag\r
+ ng-click="deleteVfModule(aService.instance, vfModule, vnf)">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>\r
+ <div class="pull-right btn-group">\r
+ <!-- <button type="button" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
+ Attach Volume Group<span class="caret"></span>\r
+ </button>\r
+ <ul class="dropdown-menu" ng-model="vnf.volumeGroups">\r
+ <li ng-repeat="volumeGroup in vnf.availableVolumeGroups">\r
+ <a ng-click="attachVolumeGroupInstance(vfModule, volumeGroup)">{{volumeGroup.name}}</a>\r
+ </li>\r
+ </ul> -->\r
+ </div>\r
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="describeVfModule(aService.instance, vfModule, vnf)"\r
+ style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-info-sign vfmodule-info"></span>\r
+ </a>\r
+ <div class="resume"\r
+ ng-if="isPermitted && isResumeShown(vfModule.nodeStatus)">\r
+ <a data-tests-id="resumeVFModuleButton-{{vfModule.name}}"\r
+ class="pull-right btn btn-success btn-xs button-margin"\r
+ ng-click="resume(aService.instance, vfModule, vnf)">\r
+ Resume\r
+ </a>\r
+ </div>\r
+\r
+ </div>\r
+ <ol ui-tree-nodes="" ng-model="vfModule.volumeGroups"\r
+ ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="volumeGroup in vfModule.volumeGroups" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}}\r
+ | ORCH STATUS: {{volumeGroup.nodeStatus}}\r
+ <!-- <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteVolumeGroup(aService.instance, vnf, vfModule, volumeGroup)">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a> -->\r
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)"\r
+ style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-info-sign"></span>\r
+ </a>\r
+ </div>\r
+ </li>\r
+ </ol>\r
+ </li>\r
+ </ol>\r
+ <ol ui-tree-nodes="" ng-model="vnf.availableVolumeGroups"\r
+ ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="volumeGroup in vnf.availableVolumeGroups" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}} | ORCH\r
+ STATUS: {{volumeGroup.nodeStatus}}\r
+ <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted"\r
+ data-tests-id="deleteVNFVolumeGroupButton" data-nodrag\r
+ ng-click="deleteVnfVolumeGroup(aService.instance, vnf, volumeGroup)">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>\r
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)"\r
+ style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-info-sign volume-group-info"></span>\r
+ </a>\r
+ </div>\r
+ </li>\r
+ </ol>\r
+ </li>\r
+ </ol>\r
+\r
+ <ol ui-tree-nodes="" ng-model="aService.instance.networks" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="network in aService.instance.networks" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH STATUS:\r
+ {{network.nodeStatus}}\r
+\r
+ <a class="pull-right btn btn-danger btn-xs" ng-if="!isMacro() && isPermitted"\r
+ data-tests-id="deleteNetworkButton" data-nodrag\r
+ ng-click="deleteNetwork(aService.instance, network)">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>\r
+ <!-- <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteNetwork(aService.instance, network)">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>-->\r
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="describeNetwork(aService.instance, network)"\r
+ style="margin-right: 8px;">\r
+ <span class="glyphicon glyphicon-info-sign network-info"></span>\r
+ </a>\r
+ </div>\r
+ </li>\r
+ </ol>\r
+\r
+ <ol ui-tree-nodes="" ng-model="aService.instance.configurations" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="configuration in aService.instance.configurations" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ <a class="btn btn-success btn-xs"\r
+ ng-if="(configuration.ports && configuration.ports.length > 0)" data-nodrag\r
+ ng-click="this.toggle()">\r
+ <span class="glyphicon"\r
+ ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
+ </a>\r
+ CONFIGURATION: {{configuration.name}} | TYPE: {{configuration.nodeType}} | ORCH\r
+ STATUS: {{configuration.nodeStatus}}\r
+\r
+ <a class="pull-right btn btn-danger btn-xs"\r
+ ng-if="!isMacro() && isPermitted && configuration.nodeStatus !== STATUS_CONSTANTS.AAI_ACTIVE"\r
+ ng-disabled="!isConfigurationDataAvailiable(configuration)"\r
+ data-tests-id="deleteConfigurationButton"\r
+ data-nodrag\r
+ ng-click="deleteConfiguration(aService, configuration)">\r
+ <span class="glyphicon glyphicon-remove"></span>\r
+ </a>\r
+\r
+\r
+ <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="toggleConfigurationStatus(aService, configuration)"\r
+ ng-if="isPermitted && allowConfigurationActions"\r
+ ng-disabled="!isConfigurationDataAvailiable(configuration)"\r
+ data-tests-id="activateDeactivateButton">\r
+ {{configuration.nodeStatus === STATUS_CONSTANTS.AAI_ACTIVE ? "Deactivate" :\r
+ "Activate"}}\r
+ </a>\r
+ </div>\r
+ <ol ui-tree-nodes="" ng-model="configuration.ports" ng-class="{hidden: collapsed}">\r
+ <li ng-repeat="port in configuration.ports" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ PORT: {{port.portName}} | ORCH STATUS: {{port.portStatus}}\r
+\r
+ <button type="button" data-tests-id="enableDisableButton"\r
+ class="pull-right btn btn-primary btn-xs"\r
+ ng-if="configuration.nodeStatus == STATUS_CONSTANTS.AAI_ACTIVE"\r
+ ng-disabled="!isConfigurationDataAvailiable(configuration)"\r
+ ng-click="togglePortStatus(aService, configuration, port)">\r
+ {{port.portStatus === STATUS_CONSTANTS.AAI_ENABLED ? "Disable" :\r
+ "Enable"}}\r
+ </button>\r
+ </div>\r
+ </li>\r
+ </ol>\r
+ </li>\r
+ </ol>\r
+\r
+ <ol id="pnfs-tree" ui-tree-nodes="" ng-model="pnfs"\r
+ ng-class="{hidden: collapsed || pnf.length === 0}">\r
+ <li ng-repeat="pnf in pnfs" ui-tree-node>\r
+ <div ui-tree-handle class="tree-node tree-node-content">\r
+ PNF: {{pnf}}\r
+\r
+ <a class="dissociate-pnf pull-right btn btn-primary btn-xs" data-nodrag\r
+ ng-click="dissociatePnf(pnf)" style="margin-right: 8px;">\r
+ <span>Dissociate</span>\r
+ </a>\r
+ </div>\r
+ </li>\r
+ </ol>\r
+ </div>\r
+ </li>\r
+ </ol>\r
+ </div>\r
+ </div>\r
</div>\r
<div class="error" ng-show="isTableErrorVisible">
<img src="app/vid/images/error.png"></img>{{error}}
</div>
- <table att-table table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
+ <table att-table table-data="tableData" data-tests-id="Previous-version-pop-up-table" 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>
</tr>
</thead>
<tbody att-table-row type="body" row-repeat="row in tableData">
- <tr>
- <td att-table-body ><button type=button ng-click="deployService(row)" att-button btn-type="{{deployButtonType}}" size="small">Deploy</button></td>
+ <tr data-tests-id="Previous-version-pop-up-uuid-{{row['uuid']}}">
+ <td att-table-body ><button type=button data-tests-id="deploy-{{row['uuid']}}" ng-click="deployService(row)" att-button btn-type="{{deployButtonType}}" size="small">Deploy</button></td>
<td att-table-body ng-bind="row['uuid']"></td>
<td att-table-body ng-bind="row['invariantUUID']"></td>
<td att-table-body ng-bind="row['name']"></td>
<div class="buttonRow">
- <button type="button" ng-click="cancelTable();" att-button
+ <button type="button" id="cancel" ng-click="cancelTable();" att-button
btn-type="primary" size="small">Cancel</button>
</div>
</div>
limitations under the License.\r
============LICENSE_END=========================================================\r
-->\r
-\r
<link rel="stylesheet" type="text/css" href="app/vid/styles/serviceModels.css" />\r
<div popup-window class="popupContents" ngx-show="{{popup.isTablePopUpVisible}}" ng-cloak>\r
<div ng-include="'app/vid/scripts/view-models/previousVersionDialog.htm'"/>\r
\r
<h1 class="heading1" style="margin-top:20px;">Browse SDC Service Models</h1>\r
<div style="margin-top:30px" ng-init="getServiceModels();">\r
- \r
- <table att-table table-data="services" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">\r
+ <table data-tests-id="serviceModelsTable" id="sdcModelsTable" att-table table-data="services" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">\r
<thead att-table-row type="header">\r
<tr>\r
<th att-table-header key="action">Action</th>\r
<th att-table-header key="actions">Action</th>\r
</tr>\r
</thead>\r
- <tbody att-table-row type="body" row-repeat="service in services">\r
- <tr>\r
- <td att-table-body ><button class="deploy-service-class" type=button data-tests-id="deploy-{{service['uuid']}}" ng-click="deployService(service)" att-button btn-type="{{deployButtonType}}" size="small">Deploy</button></td>\r
- <td att-table-body ng-bind="service['uuid']"></td>\r
- <td att-table-body ng-bind="service['invariantUUID']"></td>\r
- <td att-table-body ng-bind="service['name']"></td>\r
- <td att-table-body ng-bind="service['version']"></td>\r
- <td att-table-body ng-bind="service['category']"></td>\r
- <td att-table-body ng-bind="service['distributionStatus']"></td>\r
- <td att-table-body ng-bind="service['lastUpdaterUserId']"></td>\r
- <td att-table-body ng-bind="service['toscaModelUrl']"></td>\r
- <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>\r
- <td att-table-body ng-show="!service.hasPreviousVersion"> </td>\r
- </tr> \r
- </tbody> \r
+ <tbody att-table-row type="body" row-repeat="service in services">\r
+ <tr class="sdcServiceModel" data-tests-id="Browse_SDC_Service_Models-uuid-{{service['uuid']}}">\r
+ <td class="deploy" att-table-body ><button class="deploy-service-class" type=button data-tests-id="deploy-{{service['uuid']}}" ng-click="deployService(service)" att-button btn-type="{{deployButtonType}}" size="small">Deploy</button></td>\r
+ <td class="uuid" att-table-body ng-bind="service['uuid']"></td>\r
+ <td class="invariantUUID" att-table-body data-tests-id="Invariant-{{service['invariantUUID']}}" ng-bind="service['invariantUUID']"></td>\r
+ <td class="name" att-table-body ng-bind="service['name']"></td>\r
+ <td class="version" att-table-body ng-bind="service['version']"></td>\r
+ <td class="category" att-table-body ng-bind="service['category']"></td>\r
+ <td class="distributionStatus" att-table-body ng-bind="service['distributionStatus']"></td>\r
+ <td class="lastUpdaterUserId" att-table-body ng-bind="service['lastUpdaterUserId']"></td>\r
+ <td class="toscaModelUrl" att-table-body ng-bind="service['toscaModelUrl']"></td>\r
+ <td class="PreviousVersion" att-table-body data-tests-id="PreviousVersion-{{service['invariantUUID']}}" 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>\r
+ <td class="hasPreviousVersion" att-table-body ng-show="!service.hasPreviousVersion"> </td>\r
+ </tr>\r
+ </tbody>\r
</table>\r
<table width='100%'>\r
<tr>\r
</td>\r
</tr>\r
</table>\r
- \r
+\r
</div>\r
</div>\r
\r