@@ -80,7 +80,6 @@ export default {
8080 generateParameters () {
8181 parameter_builder .methods .genParms (this .ariKey , this .ARIs ).then (response => {
8282 this .parameters = response[0 ];
83-
8483 this .description = response[1 ];
8584 this .finResult = response[2 ];
8685 this .finResultBase = this .finResult ;
@@ -106,69 +105,72 @@ export default {
106105
107106 let testResult = [];
108107 if (this .ariKey .actual ) {
109- this .$emit (" updateResult" , [{ type: " /ARITYPE/ OBJECT" , value: this .ariKey .display }]);
108+ this .$emit (" updateResult" , [{ type: " OBJECT" , value: this .ariKey .display }]);
110109 this .finResult = this .finResultBase ;
111110 } else {
112111 this .finResult .forEach ((element ) => {
113112 let type = element[" type" ];
114113 let value = element[" value" ];
115114 let currValue = [];
116115 switch (type) {
117- case " /ARITYPE/ TEXTSTR" :
118- testResult .push (encodeURIComponent ( JSON .stringify (value) ));
116+ case " TEXTSTR" :
117+ testResult .push (JSON .stringify (value));
119118 break ;
120- case " /ARITYPE/ BYTESTR" :
121- testResult .push (encodeURIComponent ( JSON .stringify (value) ));
119+ case " BYTESTR" :
120+ testResult .push (JSON .stringify (value));
122121 break ;
123- case " /ARITYPE/ BYTE" :
124- testResult .push (encodeURIComponent ( JSON .stringify (value) ));
122+ case " BYTE" :
123+ testResult .push (JSON .stringify (value));
125124 break ;
126- case " /ARITYPE/ INT" :
127- testResult .push (encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) ));
125+ case " INT" :
126+ testResult .push (JSON .stringify (value).replaceAll (' "' , " " ));
128127 break ;
129- case " /ARITYPE/ UINT" :
130- testResult .push (encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) ));
128+ case " UINT" :
129+ testResult .push (JSON .stringify (value).replaceAll (' "' , " " ));
131130 break ;
132- case " /ARITYPE/ VAST" :
133- testResult .push (encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) ));
131+ case " VAST" :
132+ testResult .push (JSON .stringify (value).replaceAll (' "' , " " ));
134133 break ;
135- case " /ARITYPE/ UVAST" :
134+ case " UVAST" :
136135 testResult .push (
137- encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) )
136+ JSON .stringify (value).replaceAll (' "' , " " )
138137 );
139138 break ;
140- case " /ARITYPE/ REAL32" :
139+ case " REAL32" :
141140 testResult .push (
142- encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) )
141+ JSON .stringify (value).replaceAll (' "' , " " )
143142 );
144143 break ;
145- case " /ARITYPE/ REAL64" :
144+ case " REAL64" :
146145 testResult .push (
147- encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) )
146+ JSON .stringify (value).replaceAll (' "' , " " )
148147 );
149148 break ;
150- case " /ARITYPE/ TP" :
151- testResult .push (encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) ));
149+ case " TP" :
150+ testResult .push (JSON .stringify (value).replaceAll (' "' , " " ));
152151 break ;
153- case " /ARITYPE/ TD" :
154- testResult .push (encodeURIComponent ( JSON .stringify (value).replaceAll (' "' , " " ) ));
152+ case " TD" :
153+ testResult .push (JSON .stringify (value).replaceAll (' "' , " " ));
155154 break ;
156- case " /ARITYPE//ARITYPE/ OBJECT" : // ari
155+ case " OBJECT" : // ari
157156 let head = value .includes (" ari:/" ) ? " " : " ari://" ;
158157
159158 testResult .push (JSON .stringify (head + value).replaceAll (' "' , " " ));
160159 break ;
161- case " /ARITYPE/AC" : // ac
162- currValue = [];
160+ case " AC" : // ac
161+ let curr_str= " "
162+ currValue = [];
163163 value .forEach ((ari ) => {
164- currValue .push (ari .replaceAll (' "' , " ' " ));
164+ currValue .push (ari .replaceAll (' "' , " " ));
165165 });
166-
167- testResult .push (JSON .stringify (currValue).replaceAll (' "' , " " ).replaceAll (" '" ,' "' ));
168-
166+ if (currValue .length = 1 ){
167+ testResult .push (currValue[0 ])
168+ }else {
169+ testResult .push (" /AC/(" + currValue .join (" ," )+ " )" );
170+ }
169171 break ;
170172
171- case " /ARITYPE/ EXPR" : // ac
173+ case " EXPR" : // ac
172174 currValue = [];
173175 var parts = value .split (" %" )
174176 parts[1 ].split (' ,' ).forEach ((ari ) => {
@@ -180,8 +182,10 @@ export default {
180182 break ;
181183 default :
182184 if (type .includes (" TYPEDEF" )){
183- testResult .push (JSON .stringify (ari[0 ]));
184- }else {testResult .push ((JSON .stringify (value)));}
185+ testResult .push (value[0 ]);
186+ }else {
187+
188+ testResult .push ((value));}
185189
186190 break ;
187191 }
@@ -203,6 +207,8 @@ export default {
203207 // if using in agentModal adding ari:/EXECSET/ portion
204208 if (typeof this .nonce !== ' undefined' ){
205209 // correlator_nonc
210+ // TODO currently random mayube make it increment or a choice
211+ // let nonce = Math.floor(Math.random() * 99999) + 1;
206212 this .finResultStr = " ari:/EXECSET/n=" + this .nonce + " ;(" + this .finResultStr + " )" ;
207213 }
208214 this .$emit (" updateResult" , [{ type: " ARI" , value: this .finResultStr }]);
0 commit comments