Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #19119: Add empty technique parameter in technique editor (6.2 only) #3574

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,12 @@ <h1>
<div class="param">
<div class="input-group">
<input type="text" class="form-control" ng-model="param.name" placeholder="Parameter name" required/>
<div class="input-group-btn">
<button class="btn btn-outline" title="{{ param.mayBeEmpty ? 'Parameter value can be empty.\nWhen adding a parameter to an existing technique, policy will be generated with an empty value and automatically deployed to your nodes, so be careful when adding one' : 'Parameter cannot be empty and needs a value.\nIf you add a parameter to an existing technique, policy generation will fail and you will need to update all directives with the new parameter value'}}"
ng-click="param.mayBeEmpty = !param.mayBeEmpty" ng-class="param.mayBeEmpty ? 'btn-outline-primary' : 'btn-info'" type="button" >
{{ param.mayBeEmpty ? "May be empty" : "Required"}}
</button>
</div>
<div class="input-group-btn">
<button class="btn btn-outline-secondary clipboard" type="button" data-clipboard-text="{{'${'+getBundleName(param.name)+'}'}}" title="Copy to clipboard">
<i class="ion ion-clipboard"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ ul.dropdown-menu > li > a{
}
.btn.btn-outline-primary{
color: #337ab7;
transition-property: background-color, color;
transition-duration: .2s;
}
.btn.btn-outline-primary:hover{
background-color: #286090;
transition-property: background-color, color;
transition-duration: .2s;
}
.popover{
max-width: 450px;
Expand Down Expand Up @@ -124,6 +128,19 @@ ul.dropdown-menu > li > a{
.btn.btn-danger.btn-outline:hover{
background-color: #c9302c;
}
.btn.btn-info.btn-outline,.btn.btn-info.btn-outline:active,.btn.btn-info.btn-outline:focus{
color: #31708f;
background-color: #fff;
border-color: #31708f;
transition-property: background-color, color;
transition-duration: .2s;
}
.btn.btn-info.btn-outline:hover{
background-color: #00acd6;
color: #fff;
transition-property: background-color, color;
transition-duration: .2s;
}
.no-margin{
margin: 0 !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ $scope.onImportFileChange = function (fileEl) {

$scope.addParameter = function() {
$scope.newParam.id = uuidv4();
$scope.newParam.mayBeEmpty = false;
$scope.selectedTechnique.parameter.push(angular.copy($scope.newParam));
$scope.newParam.name = "";
}
Expand Down