Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Kick off patching controller for #37
  • Loading branch information
gashcrumb committed Jun 26, 2013
1 parent 7843825 commit fa46521
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 9 deletions.
3 changes: 3 additions & 0 deletions hawtio-web/src/main/webapp/app/fabric/html/layoutFabric.html
Expand Up @@ -25,6 +25,9 @@
<li ng-show="droolsHref">
<a ng-href="{{droolsHref}}" target="drools" title="View and manage the rules and workflows in this Fabric">Rules</a>
</li>
<li ng-show="canUpload">
<a ng-href="#/fabric/patching" title="Upload and apply patches to this fabric">Patching</a>
</li>
</ul>
<div class="row-fluid">
<div ng-view></div>
Expand Down
12 changes: 12 additions & 0 deletions hawtio-web/src/main/webapp/app/fabric/html/patching.html
@@ -0,0 +1,12 @@
<div ng-controller="Fabric.PatchingController">

<div class="row-fluid">


<div class="span5">
<div hawtio-file-upload="files" target="patches"></div>
</div>
</div>


</div>
3 changes: 2 additions & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/fabricPlugin.ts
Expand Up @@ -10,7 +10,8 @@ module Fabric {
when('/fabric/profile/:versionId/:profileId', {templateUrl: 'app/fabric/html/profile.html'}).
when('/fabric/profile/:versionId/:profileId/editFeatures', {templateUrl: 'app/fabric/html/editFeatures.html'}).
when('/fabric/profile/:versionId/:profileId/:fname', {templateUrl: 'app/fabric/html/pid.html'}).
when('/fabric/view', { templateUrl: 'app/fabric/html/fabricView.html', reloadOnSearch: false });
when('/fabric/view', { templateUrl: 'app/fabric/html/fabricView.html', reloadOnSearch: false }).
when('/fabric/patching', { templateUrl: 'app/fabric/html/patching.html' });
}).
run(($location: ng.ILocationService, workspace: Workspace, jolokia, viewRegistry, pageTitle) => {

Expand Down
3 changes: 2 additions & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/navbar.ts
Expand Up @@ -21,6 +21,7 @@ module Fabric {
Fabric.containerWebAppURL(jolokia, "org.fusesource.insight.insight-kibana3", containerId, onKibanaUrl, onKibanaUrl);
Fabric.containerWebAppURL(jolokia, "drools-wb-distribution-wars", containerId, onDroolsUrl, onDroolsUrl);
$scope.hasMetrics = workspace.treeContainsDomainAndProperties('org.elasticsearch', {service: 'restjmx'});
$scope.canUpload = workspace.treeContainsDomainAndProperties('io.hawt.jmx', {type: 'UploadManager'});
}

function onKibanaUrl(response) {
Expand All @@ -37,4 +38,4 @@ module Fabric {
Core.$apply($scope);
}
}
}
}
7 changes: 7 additions & 0 deletions hawtio-web/src/main/webapp/app/fabric/js/patching.ts
@@ -0,0 +1,7 @@
module Fabric {
export function PatchingController($scope, jolokia) {

$scope.files = [];

}
}
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/ui/html/fileUpload.html
Expand Up @@ -30,7 +30,7 @@
<input type="file" style="display: none;" name="files[]" multiple>
<div class="input-prepend">
<input type="button" class="btn" value="Add">
<div class="span2 progress progress-striped">
<div class="progress progress-striped">
<div class="bar" style="width: {{percentComplete}}%;"></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/ui/html/test.html
Expand Up @@ -18,7 +18,7 @@

<div class="row-fluid">
<p>Showing files</p>
<div hawtio-file-upload="files" target="test"></div>
<div hawtio-file-upload="files" target="patches"></div>
<p>Not showing files</p>
<div hawtio-file-upload="files" target="test" show-files="false"></div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions hawtio-web/src/main/webapp/css/site-base.less
Expand Up @@ -1558,11 +1558,11 @@ td.adding {
float: left;
}
.input-prepend .progress {
float:left;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
position: relative;
left: -35px;
left: 1px;
top: 0px;
min-height: 28px;
width: 160px;
}
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/index.html
Expand Up @@ -145,7 +145,7 @@
<script type="text/javascript" src="lib/jquery.xml2json.js"></script>

<!-- jquery form -->
<script type="text/javascript" src="lib/debug/jquery.form.js"></script>
<script type="text/javascript" src="lib/jquery.form.min.js"></script>


<!-- toastr notifications -->
Expand Down

0 comments on commit fa46521

Please sign in to comment.