X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2F3rd_party%2Fstatic%2Ftestapi-ui%2Fapp.js;h=5f5b86159a1d624f513e29d39ee9943cb382a2c4;hb=7e1a08a284e01c43708f42505cef86f0f853356e;hp=8c701c36ca1e6e3eacb1c0bd27390467da255b10;hpb=e9383ded0d640e372d29c3d191ef68868ea0aa02;p=releng.git diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/app.js b/utils/test/testapi/3rd_party/static/testapi-ui/app.js index 8c701c36c..5f5b86159 100644 --- a/utils/test/testapi/3rd_party/static/testapi-ui/app.js +++ b/utils/test/testapi/3rd_party/static/testapi-ui/app.js @@ -26,6 +26,22 @@ .module('testapiApp') .config(configureRoutes); + angular + .module('testapiApp') + .directive('dynamicModel', ['$compile', '$parse', function ($compile, $parse) { + return { + restrict: 'A', + terminal: true, + priority: 100000, + link: function (scope, elem) { + var name = $parse(elem.attr('dynamic-model'))(scope); + elem.removeAttr('dynamic-model'); + elem.attr('ng-model', name); + $compile(elem)(scope); + } + }; + }]); + configureRoutes.$inject = ['$stateProvider', '$urlRouterProvider']; /** @@ -43,10 +59,10 @@ url: '/about', templateUrl: 'testapi-ui/components/about/about.html' }). - state('guidelines', { - url: '/guidelines', - templateUrl: 'testapi-ui/components/guidelines/guidelines.html', - controller: 'GuidelinesController as ctrl' + state('pods', { + url: '/pods', + templateUrl: 'testapi-ui/components/pods/pods.html', + controller: 'PodsController as ctrl' }). state('communityResults', { url: '/community_results', @@ -54,8 +70,8 @@ controller: 'ResultsController as ctrl' }). state('userResults', { - url: 'user_results', - templateUrl: '/testapi-ui/components/results/results.html', + url: '/user_results', + templateUrl: 'testapi-ui/components/results/results.html', controller: 'ResultsController as ctrl' }). state('resultsDetail', { @@ -66,7 +82,7 @@ }). state('profile', { url: '/profile', - templateUrl: '/testapi-ui/components/profile/profile.html', + templateUrl: 'testapi-ui/components/profile/profile.html', controller: 'ProfileController as ctrl' }). state('authFailure', {