Skip to content

Commit

Permalink
Fix app wall table app link (#1348)
Browse files Browse the repository at this point in the history
* Fix the app wall table app link
- Default hashbang prefix is now '!'
- Instead of adding '!', update to use ui-sref
- See https://docs.angularjs.org/guide/migration#commit-aa077e8

* Fix lint issue

* trivial change to retrigger pipeline

* Fix lint
  • Loading branch information
richard-cox authored and Irfan Habib committed Oct 31, 2017
1 parent 68c0057 commit b8b51ed
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,8 @@
}
});

this.getAppSummaryLink = getAppSummaryLink;
this.stMiddleware = stMiddleware;

/**
* @name getAppSummaryLink
* @description Get link to application summary page
* @param {object} app The application object
* @returns {string} returns the link to the app summary page
*/
function getAppSummaryLink(app) {
return '#/cf/applications/' + app.clusterId + '/app/' + app.metadata.guid + '/summary';
}

function stMiddleware(tableState) {
var stSort = tableState.sort.predicate + '_' + !tableState.sort.reverse;
var sort = model.currentSortOption + '_' + model.sortAscending;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<tbody>
<tr ng-repeat="app in tableViewCtrl.stApps">
<td class="table-view-app-name">
<a ng-href="{{ tableViewCtrl.getAppSummaryLink(app) }}">{{ app.entity.name }}</a>
<a ui-sref="cf.applications.application.summary({ cnsiGuid: app.clusterId, guid: app.metadata.guid })">{{ app.entity.name }}</a>
</td>
<td>
<div class="app-state-column">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
expect(applicationsTableDirectiveCtrl).toBeDefined();
});

it('should return correct URL', function () {
var urlString = applicationsTableDirectiveCtrl.getAppSummaryLink(apps[0]);
expect(urlString).toEqual('#/cf/applications/testGuid/app/appGuid/summary');
});

});

});
Expand Down

0 comments on commit b8b51ed

Please sign in to comment.