mirror of https://github.com/portainer/portainer
Add builder partial
parent
c4b0a2257f
commit
fc01c93c27
|
@ -101,3 +101,12 @@
|
|||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#editor {
|
||||
height: 300px;
|
||||
width: 475px;
|
||||
border: 1px solid #DDD;
|
||||
border-radius: 4px;
|
||||
border-bottom-right-radius: 0px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ angular.module('dockerui', ['dockerui.services', 'dockerui.filters'])
|
|||
$routeProvider.when('/images/', {templateUrl: 'partials/images.html', controller: 'ImagesController'});
|
||||
$routeProvider.when('/images/:id/', {templateUrl: 'partials/image.html', controller: 'ImageController'});
|
||||
$routeProvider.when('/settings', {templateUrl: 'partials/settings.html', controller: 'SettingsController'});
|
||||
$routeProvider.when('/build', {templateUrl: 'partials/builder.html', controller: 'BuilderController'});
|
||||
$routeProvider.otherwise({redirectTo: '/'});
|
||||
}])
|
||||
// This is your docker url that the api will use to make requests
|
||||
|
|
|
@ -278,6 +278,10 @@ function StartContainerController($scope, $routeParams, $location, Container) {
|
|||
};
|
||||
}
|
||||
|
||||
function BuilderController($scope, Image) {
|
||||
$('#response').hide();
|
||||
}
|
||||
|
||||
function setSuccessfulResponse($scope, msg, msgId) {
|
||||
$scope.alertClass = 'success';
|
||||
$scope.response = msg;
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<!--<script src="/lib/ace/src/ace.js" type="text/javascript" charset="utf-8"></script>-->
|
||||
|
||||
<h2>Builder:</h2>
|
||||
|
||||
<div id="response" class="alert alert-{{ alertClass }}">
|
||||
{{ response }}
|
||||
</div>
|
||||
|
||||
<div id="editor">
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var editor = ace.edit("editor");
|
||||
editor.setTheme("/lib/ace/theme/monokai");
|
||||
editor.getSession().setMode("/lib/ace/mode/javascript");
|
||||
</script>
|
|
@ -2,9 +2,9 @@
|
|||
<h2>Images:</h2>
|
||||
|
||||
<div id="response" class="alert alert-{{ alertClass }}">
|
||||
{{ response }}
|
||||
{{ response }}
|
||||
</div>
|
||||
|
||||
<a href="/#/build/">Build Image</a>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue