Port cor-title and add file check endpoint
Fix some FA5 regressions Fix uploading cert files Add fix some icons
This commit is contained in:
parent
b5f630ba29
commit
561522c6d3
24 changed files with 159 additions and 56 deletions
3
config_app/js/components/cor-option/cor-option.html
Normal file
3
config_app/js/components/cor-option/cor-option.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<li>
|
||||
<a ng-click="optionClick()" ng-transclude></a>
|
||||
</li>
|
32
config_app/js/components/cor-option/cor-option.js
Normal file
32
config_app/js/components/cor-option/cor-option.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
const corOption = require('./cor-option.html');
|
||||
const corOptionsMenu = require('./cor-options-menu.html');
|
||||
|
||||
angular.module('quay-config')
|
||||
.directive('corOptionsMenu', function() {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 1,
|
||||
templateUrl: corOptionsMenu,
|
||||
replace: true,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
})
|
||||
.directive('corOption', function() {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 1,
|
||||
templateUrl: corOption,
|
||||
replace: true,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'optionClick': '&optionClick'
|
||||
},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
|
@ -0,0 +1,6 @@
|
|||
<span class="co-options-menu">
|
||||
<div class="dropdown" style="text-align: left;">
|
||||
<i class="fas fa-cog fa-lg dropdown-toggle" data-toggle="dropdown" data-title="Options" bs-tooltip></i>
|
||||
<ul class="dropdown-menu pull-right" ng-transclude></ul>
|
||||
</div>
|
||||
</span>
|
|
@ -0,0 +1,3 @@
|
|||
<div class="col-lg-6 col-md-6 col-sm-5 col-xs-12">
|
||||
<h2 class="co-nav-title-content co-fx-text-shadow" ng-transclude></h2>
|
||||
</div>
|
2
config_app/js/components/cor-title/cor-title.html
Normal file
2
config_app/js/components/cor-title/cor-title.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<div class="co-nav-title" ng-transclude></div>
|
||||
|
31
config_app/js/components/cor-title/cor-title.js
Normal file
31
config_app/js/components/cor-title/cor-title.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
const titleUrl = require('./cor-title.html');
|
||||
const titleContentUrl = require('./cor-title-content.html');
|
||||
|
||||
angular.module('quay-config')
|
||||
.directive('corTitleContent', function() {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 1,
|
||||
templateUrl: titleContentUrl,
|
||||
replace: true,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
})
|
||||
.directive('corTitle', function() {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 1,
|
||||
templateUrl: titleUrl,
|
||||
replace: true,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
|
@ -17,6 +17,7 @@ angular.module('quay-config').directive('fileUploadBox', function () {
|
|||
'filesValidated': '&filesValidated',
|
||||
|
||||
'extensions': '<extensions',
|
||||
'apiEndpoint': '@apiEndpoint',
|
||||
|
||||
'reset': '=?reset'
|
||||
},
|
||||
|
@ -103,13 +104,7 @@ angular.module('quay-config').directive('fileUploadBox', function () {
|
|||
$scope.currentlyUploadingFile = currentFile;
|
||||
$scope.uploadProgress = 0;
|
||||
|
||||
// ApiService.getFiledropUrl(data).then(function(resp) {
|
||||
// // Perform the upload.
|
||||
// conductUpload(currentFile, resp.url, resp.file_id, mimeType, progressCb, doneCb);
|
||||
// }, function() {
|
||||
// callback(false, 'Could not retrieve upload URL');
|
||||
// });
|
||||
conductUpload(currentFile, '/api/v1/configapp/tarconfig','fileIdIsUnused', mimeType, progressCb, doneCb);
|
||||
conductUpload(currentFile, $scope.apiEndpoint, $scope.selectedFiles[0].name, mimeType, progressCb, doneCb);
|
||||
};
|
||||
|
||||
// Start the uploading.
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<div class="modal-body">
|
||||
<span>Please upload the previous configuration</span>
|
||||
<div class="file-upload-box"
|
||||
api-endpoint="/api/v1/configapp/tarconfig"
|
||||
select-message="Select a previous configuration to modify. Must be in tar.gz format"
|
||||
files-selected="$ctrl.handleTarballSelected(files, callback)"
|
||||
files-cleared="$ctrl.handleFilesCleared()"
|
||||
|
|
Reference in a new issue