Remove unused Dockerfile view directive
This commit is contained in:
parent
70f26754b8
commit
255bebcc92
3 changed files with 0 additions and 69 deletions
|
@ -222,22 +222,6 @@
|
|||
font-size: 18px;
|
||||
}
|
||||
|
||||
.dockerfile-view {
|
||||
margin-top: 10px;
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
background: #F7F6F6;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.dockerfile-view .entry {
|
||||
font-family: Consolas, "Lucida Console", Monaco, monospace;
|
||||
}
|
||||
|
||||
.dockerfile-view .entry.comment {
|
||||
color: rgb(82, 172, 82);
|
||||
}
|
||||
|
||||
.dockerfile-command {
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<div class="dockerfile-view-element">
|
||||
<div class="dockerfile-line" ng-repeat="line in lines">
|
||||
<div ng-switch on="line.kind">
|
||||
<div class="command entry" ng-switch-when="command">
|
||||
<div class="dockerfile-command" command="line.text"></div>
|
||||
</div>
|
||||
<div class="comment entry" ng-switch-when="comment">
|
||||
{{ line.text || ' ' }}
|
||||
</div>
|
||||
<div class="text entry" ng-switch-default>
|
||||
{{ line.text || ' ' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,38 +0,0 @@
|
|||
/**
|
||||
* An element which displays the contents of a Dockerfile in a nicely formatted way.
|
||||
*/
|
||||
angular.module('quay').directive('dockerfileView', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/dockerfile-view.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'contents': '=contents'
|
||||
},
|
||||
controller: function($scope, $element, UtilService) {
|
||||
$scope.$watch('contents', function(contents) {
|
||||
$scope.lines = [];
|
||||
|
||||
var lines = contents ? contents.split('\n') : [];
|
||||
for (var i = 0; i < lines.length; ++i) {
|
||||
var line = $.trim(lines[i]);
|
||||
var kind = 'text';
|
||||
if (line && line[0] == '#') {
|
||||
kind = 'comment';
|
||||
} else if (line.match(/^([A-Z]+\s)/)) {
|
||||
kind = 'command';
|
||||
}
|
||||
|
||||
var lineInfo = {
|
||||
'text': line,
|
||||
'kind': kind
|
||||
};
|
||||
$scope.lines.push(lineInfo);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
Reference in a new issue