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 #24213: Fix UI issues caused by bootstrap update in change-validation plugin #661

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
14 changes: 4 additions & 10 deletions change-validation/src/main/resources/template/changeRequest.html
Expand Up @@ -41,16 +41,10 @@ <h5 class="modal-title">Success</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<h4 class="text-center">
Change request state has been changed to <span id="newStatus">next status</span>
</h4>
</div>
</div>
<div id="successDialogContent">

</div>
<h5 class="text-center">
Change request state has been changed to <span id="newStatus">next status</span>
</h5>
<div id="successDialogContent"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-bs-dismiss="modal" aria-label="Close">Close</button>
Expand Down
Expand Up @@ -24,7 +24,7 @@ <h1>
<div class="lift:ChangeRequestManagement.filter">
<div id="content">
<div id="nameFilter">
<div id="actualFilter"></div>
<div id="actualFilter" class="mb-3"></div>
</div>
</div>
</div>
Expand Down
Expand Up @@ -67,15 +67,21 @@ <h1>
</div>
</div>
<div id="changeDisplay">
<ul id="changeRequestTabMenu">
<li><a href="#historyTab">Change history</a></li>
<li><a href="#diffTab">Diff</a></li>
<ul id="changeRequestTabMenu" class="nav nav-underline">
<li class="nav-item">
<button class="nav-link active" data-bs-toggle="tab" data-bs-target="#historyTab" type="button" role="tab" aria-controls="historyTab" aria-selected="true">Change history</button>
</li>
<li class="nav-item">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#diffTab" type="button" role="tab" aria-controls="diffTab" aria-selected="false">Diff</button>
</li>
</ul>
<div id="historyTab" style ="max-height:345px; overflow: auto; margin: -1px;">
<div id="history"></div>
</div>
<div id="diffTab" style="max-height:345px; overflow: auto; margin-top: -10px;">
<div id="diff" ></div>
<div class="tab-content my-3">
<div id="historyTab" class="tab-pane active" style ="max-height:345px; overflow: auto;">
<div id="history"></div>
</div>
<div id="diffTab" class="tab-pane" style="max-height:345px; overflow: auto; margin-top: -10px;">
<div id="diff" ></div>
</div>
</div>
</div>
</div>
Expand All @@ -97,19 +103,15 @@ <h5 class="modal-title">Change Request state</h5>

<component-popupContent>
<div class="modal-body">
<div class="row">
<div class="col-lg-12 text-center" id="intro"></div>
</div>
<div id="formError"></div>
<div class="space-top">
<b class="col-lg-3 col-sm-12 col-xs-12 text-right">Next state </b>
<div class="col-lg-9 col-sm-12 col-xs-12">
<span id="next">
Here comes change request status
</span>
</div>
</div>
<div id ="reason" class="space-top"></div>
<div id="intro"></div>
<div id="formError"></div>
<div class="mt-3 from-group">
<label><b>Next state </b></label>
<span id="next">
Here comes change request status
</span>
</div>
<div id ="reason" class="mt-3"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-bs-dismiss="modal" aria-label="Close">Cancel</button>
Expand Down
Expand Up @@ -193,7 +193,7 @@ class TwoValidationStepsWorkflowServiceImpl(
isCreator: Boolean
): WorkflowAction = {

def deployAction(action : (ChangeRequestId, EventActor, Option[String]) => Box[WorkflowNodeId]) = {
def deployAction(action: (ChangeRequestId, EventActor, Option[String]) => Box[WorkflowNodeId]) = {
if (canDeploy(isCreator, selfDeployment))
Seq((Deployed.id, action))
else Seq()
Expand All @@ -208,7 +208,7 @@ class TwoValidationStepsWorkflowServiceImpl(
}
WorkflowAction("Validate", validatorActions)

case Deployment.id =>
case Deployment.id =>
WorkflowAction("Deploy", deployAction(stepDeploymentToDeployed))

case Deployed.id => NoWorkflowAction
Expand Down
Expand Up @@ -120,8 +120,7 @@ class ChangeRequestChangesForm(
cr.rules.values.map(_.changes).toList,
cr.globalParams.values.map(_.changes).toList
))(form) ++
Script(JsRaw(s"""buildChangesTree("#changeTree","${S.contextPath}");
$$( "#changeDisplay" ).tabs();"""))
Script(JsRaw(s"""buildChangesTree("#changeTree","${S.contextPath}");"""))

case eb: EmptyBox =>
val e = eb ?~! "An error occurred when trying to get data from base. "
Expand Down
Expand Up @@ -313,7 +313,7 @@ class ChangeRequestDetails extends DispatchSnippet with Loggable {
nextSteps.map(v => (v, v._1.value)),
Full(nextChosen),
{ t: (WorkflowNodeId, stepChangeFunction) => nextChosen = t }
) % ("class" -> "form-select space-bottom")
) % ("class" -> "form-select mb-3")
}

def buildReasonField(mandatory: Boolean, containerClass: String) = {
Expand Down Expand Up @@ -371,16 +371,15 @@ class ChangeRequestDetails extends DispatchSnippet with Loggable {
}

val introMessage = {
<div>
<h4 class="col-lg-12 col-sm-12 col-xs-12 text-center">{
<h5 class="text-center">
{
nextSteps match {
case Nil => "You can't confirm"
case (next, _) :: Nil => s"The change request will be sent to the '${next}' status"
case list => s"Please, choose the next state for this Change request"
}
}
</h4>
</div>
</h5>
}
def content(default: (WorkflowNodeId, stepChangeFunction)) = {
val classForButton = action match {
Expand All @@ -401,7 +400,7 @@ class ChangeRequestDetails extends DispatchSnippet with Loggable {

def updateForm(default: (WorkflowNodeId, stepChangeFunction)) = SetHtml("popupContent", content(default))

def error(msg: String) = <span class="col-lg-12 errors-container">{msg}</span>
def error(msg: String) = <div class="alert alert-danger">{msg}</div>

def confirm(): JsCmd = {
if (formTracker.hasErrors) {
Expand Down
17 changes: 9 additions & 8 deletions change-validation/src/main/style/change-validation.css
Expand Up @@ -72,7 +72,7 @@ ul.clipboard-list > li:last-child{

#actualFilter > form{
display: flex;
align-items: flex-start;
align-items: center;
}
#actualFilter > form select.form-control{
width: auto;
Expand Down Expand Up @@ -130,6 +130,7 @@ ul.clipboard-list > li:last-child{
#changesContainer > div:last-child{
flex: 1;
border-left: 2px solid #E5E5E5;
padding: 0 15px;
}
#diff {
padding: 10px;
Expand Down Expand Up @@ -434,19 +435,19 @@ body.sidebar-mini.sidebar-collapse #supervised-targets-app .toolbar {
}

#changeRequestHeader .header-title > div > #CRStatus {
background-color: #eeeeee;
background-color: #eef1f9;
min-width: 160px;
line-height: 50px;
min-height: 50px;
color: #36474E;
color: #36474e;
float: right;
font-size: 15px;
font-weight: bold;
cursor: default;
text-align: center;
position: relative;
margin-top: -15px;
margin-right: 20px;
display: flex;
justify-content: center;
align-items: center;
}
#changeRequestHeader .header-title > div > #CRStatus:before {
position: absolute;
Expand All @@ -455,9 +456,9 @@ body.sidebar-mini.sidebar-collapse #supervised-targets-app .toolbar {
height: 0;
border-left: 80px solid transparent;
border-right: 80px solid transparent;
border-top: 20px solid #eeeeee;
border-top: 20px solid #eef1f9;
left: 0;
top: 50px;
bottom: -20px;
}
#CRSave{
margin-top: 10px;
Expand Down