ocket8888 commented on code in PR #6948:
URL: https://github.com/apache/trafficcontrol/pull/6948#discussion_r920738241


##########
traffic_portal/app/src/common/modules/form/server/form.server.tpl.html:
##########
@@ -110,14 +110,15 @@
                 <small ng-show="server.typeId"><a 
ng-href="/#!/types/{{server.typeId}}" target="_blank">View 
Details&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
             </div>
 
-            <label for="profile" ng-class="{'has-error': 
hasError(serverForm.profile)}">Profile *</label>
-            <div ng-class="{'has-error': hasError(serverForm.profile), 
'has-feedback': hasError(serverForm.profile)}">
-                <select id="profile" name="profile" class="form-control" 
ng-model="server.profileNames[0]" ng-options="profile.name as profile.name for 
profile in profiles" required>
-                    <option hidden selected disabled 
value="">Select...</option>
-                </select>
-                <small class="input-error" 
ng-show="hasPropertyError(serverForm.profile, 'required')">Required</small>
-                <small ng-show="server.profileNames.length>0"><a 
ng-href="{{getProfileID(server.profileNames[0])}}" target="_blank">View 
Details&nbsp;&nbsp;<i class="fa fs-xs fa-external-link"></i></a></small>
-            </div>
+            <fieldset>
+                <legend>Profiles<button name="addProfileBtn" class="btn 
btn-primary right-button btn-xs" type="button" title="add a new profile to the 
server" ng-click="addProfile()"><i class="fa fa-plus"></i></button></legend>
+                <fieldset ng-repeat="profile in server.profileNames track by 
$index">
+                    <select id="activeProfile-{{$index}}" 
name="activeProfile-{{$index}}" class="form-control" 
ng-model="server.profileNames[$index]" ng-options="profile.name as profile.name 
for profile in profiles|excludeFilter:profile:server.profileNames" 
required></select>
+                    <small class="input-error" 
ng-show="hasPropertyError(serverForm['activeProfile-'+$index], 
'required')">Required</small>
+                    <a ng-href="{{getProfileID(server.profileNames[$index])}}" 
target="_blank">View Details&nbsp;&nbsp;<i class="fa fs-xs 
fa-external-link"></i></a>

Review Comment:
   This link is always numeric, therefore always relative and never external.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to