Uploaded image for project: 'Hawkular'
  1. Hawkular
  2. HAWKULAR-906

angular-patternfly "pf-select" directive not working/throws error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.0.Alpha 9
    • 1.0.0.Alpha8
    • User Interface
    • None

    Description

      The directive pf-select being used in several places of the Hawkular console isn't working properly, it throws the following error:

      TypeError: element.selectpicker is not a function
          at angular.module.directive.$timeout.link (http://localhost:8080/libs/angular-patternfly/dist/angular-patternfly.js?v=1450883846399:3344:15)
          at http://localhost:8080/libs/angular/angular.js?v=1450883846399:8835:44
          at invokeLinkFn (http://localhost:8080/libs/angular/angular.js?v=1450883846399:8841:9)
          at nodeLinkFn (http://localhost:8080/libs/angular/angular.js?v=1450883846399:8335:11)
          at compositeLinkFn (http://localhost:8080/libs/angular/angular.js?v=1450883846399:7731:13)
          at nodeLinkFn (http://localhost:8080/libs/angular/angular.js?v=1450883846399:8330:24)
          at http://localhost:8080/libs/angular/angular.js?v=1450883846399:8572:13
          at processQueue (http://localhost:8080/libs/angular/angular.js?v=1450883846399:14792:28)
          at http://localhost:8080/libs/angular/angular.js?v=1450883846399:14808:27
          at Scope.$eval (http://localhost:8080/libs/angular/angular.js?v=1450883846399:16052:28) <select pf-select="" ng-model="responseUnit" id="responseUnit" ng-disabled="hkDisabled" ng-options="item.value as item.label for item in timeUnits" ng-change="computeTimeInUnits()" class="ng-pristine ng-untouched ng-valid ng-isolate-scope"> 
      

      This is due to patternfly (and angular-patternfly) declaring their dependencies as devDependencies, which causes them not to be implicitly included, thus we are missing "bootstrap-select" library. This is already reported as an issue at https://github.com/patternfly/angular-patternfly/issues/151

      As a (temporary?) solution we must depend explicitly on bootstrap-select

      Attachments

        Activity

          People

            alexandrem_jira Alexandre Mendonça (Inactive)
            alexandrem_jira Alexandre Mendonça (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: