Damans227 commented on code in PR #14420:
URL: https://github.com/apache/cloudstack/pull/14420#discussion_r4295364120


##########
ui/src/views/compute/DeployVM.vue:
##########
@@ -2995,6 +2995,21 @@ export default {
       }
       this.fetchAllTemplates(params)
     },
+    isDeployableUserTemplate (template) {
+      // System / routing templates must not appear in Deploy Instance (admins 
see them via templatefilter=all)
+      return template && template.templatetype !== 'SYSTEM' && 
template.templatetype !== 'ROUTING'
+    },
+    filterDeployableTemplates (listTemplatesResponse) {
+      if (_.isEmpty(listTemplatesResponse)) {
+        return { count: 0, template: [] }
+      }
+      const templates = (listTemplatesResponse.template || 
[]).filter(this.isDeployableUserTemplate)
+      return {
+        ...listTemplatesResponse,
+        template: templates,
+        count: templates.length

Review Comment:
   wont this break paging? the pager reads this count as the total, so with 25 
templates it shows only the first 10 and no page 2



-- 
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