Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #330 so we can link to the details of a maven set of coordinates
- Loading branch information
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div ng-controller="Maven.ArtifactController"> | ||
<div class="row-fluid"> | ||
<div class="pull-right"> | ||
<a class="btn" href="{{versionsLink(row)}}">Versions</a> | ||
<a class="btn" target="javadoc" href="{{javadocLink(row)}}">JavaDoc</a> | ||
<a class="btn" target="source" href="{{sourceLink(row)}}">Source</a> | ||
</div> | ||
<div title="Name" class="title"> | ||
<p> | ||
{{row.name}} | ||
</p> | ||
|
||
<p> | ||
{{row.description}} | ||
</p> | ||
</div> | ||
</div> | ||
<div class="row-fluid"> | ||
<div title="Description" class="title"> | ||
<i class="expandable-indicator"></i> pom.xml | ||
</div> | ||
<ng-include src="'app/maven/html/pom.html'"></ng-include> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module Maven { | ||
|
||
export function ArtifactController($scope, $routeParams, workspace:Workspace, jolokia) { | ||
$scope.row = { | ||
groupId: $routeParams["group"] || "", | ||
artifactId: $routeParams["artifact"] || "", | ||
version: $routeParams["version"] || "", | ||
classifier: $routeParams["classifier"] || "", | ||
packaging: $routeParams["packaging"] || "" | ||
}; | ||
var row = $scope.row; | ||
|
||
$scope.id = getName(row); | ||
|
||
addMavenFunctions($scope); | ||
|
||
$scope.$on("$routeChangeSuccess", function (event, current, previous) { | ||
// lets do this asynchronously to avoid Error: $digest already in progress | ||
setTimeout(updateTableContents, 50); | ||
}); | ||
|
||
$scope.$watch('workspace.selection', function () { | ||
if (workspace.moveIfViewInvalid()) return; | ||
updateTableContents(); | ||
}); | ||
|
||
function updateTableContents() { | ||
var mbean = Maven.getMavenIndexerMBean(workspace); | ||
|
||
// lets query the name and description of the GAV | ||
if (mbean) { | ||
jolokia.execute(mbean, "search", | ||
row.groupId, row.artifactId, row.version, row.packaging, row.classifier, "", | ||
onSuccess(render)); | ||
} else { | ||
console.log("No MavenIndexerMBean!"); | ||
} | ||
} | ||
|
||
function render(response) { | ||
if (response && response.length) { | ||
var first = response[0]; | ||
row.name = first.name; | ||
row.description = first.description; | ||
} | ||
Core.$apply($scope); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters