mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 05:47:38 -02:30
Merge pull request #7092 from gconsidine/ui/fix/dashboard-dropdown-alignment
ui/fix/dashboard for dropdown style and alignment
This commit is contained in:
@@ -57,6 +57,15 @@
|
|||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 20px;
|
||||||
|
|
||||||
|
& > span {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-graph {
|
.DashboardGraphs-graph {
|
||||||
@@ -76,21 +85,23 @@
|
|||||||
.DashboardGraphs-filterDropdownText:hover,
|
.DashboardGraphs-filterDropdownText:hover,
|
||||||
.DashboardGraphs-filterDropdownText:focus,
|
.DashboardGraphs-filterDropdownText:focus,
|
||||||
.DashboardGraphs-filterDropdownText:active {
|
.DashboardGraphs-filterDropdownText:active {
|
||||||
color: @db-graph-per-dd-txt;
|
color: @default-data-txt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-filterDropdownText {
|
.DashboardGraphs-filterDropdownText {
|
||||||
flex: initial;
|
|
||||||
background-color: @db-graph-per-dd-bg;
|
background-color: @db-graph-per-dd-bg;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
padding-left: 10px;
|
padding-left: 5px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border: 1px solid @b7grey;
|
border: 1px solid @b7grey;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
transition: background-color 0.2s;
|
transition: background-color 0.2s;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-filterDropdownText:hover {
|
.DashboardGraphs-filterDropdownText:hover {
|
||||||
@@ -101,8 +112,9 @@
|
|||||||
color: @db-graph-per-dd-icon;
|
color: @db-graph-per-dd-icon;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
padding-left:10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-filterDropdownItems {
|
.DashboardGraphs-filterDropdownItems {
|
||||||
@@ -113,6 +125,11 @@
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-color: @d7grey;
|
border-color: @d7grey;
|
||||||
|
min-width: 115px;
|
||||||
|
|
||||||
|
a > span {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-filterDropdownItems {
|
.DashboardGraphs-filterDropdownItems {
|
||||||
@@ -125,11 +142,25 @@
|
|||||||
.DashboardGraphs-jobTypeDropdown,
|
.DashboardGraphs-jobTypeDropdown,
|
||||||
.DashboardGraphs-statusDropdown {
|
.DashboardGraphs-statusDropdown {
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
padding-top:0px;
|
display: inline-block;
|
||||||
}
|
padding-top: 0px;
|
||||||
|
min-width: 115px;
|
||||||
|
width: inherit;
|
||||||
|
|
||||||
.DashboardGraphs-filterDropdownItems {
|
span {
|
||||||
min-width: 0;
|
height: 18px;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 18px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
height: 18px;
|
||||||
|
line-height: 18px;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-statusFilters{
|
.DashboardGraphs-statusFilters{
|
||||||
@@ -169,10 +200,12 @@
|
|||||||
|
|
||||||
.DashboardGraphs-filteringDropdowns {
|
.DashboardGraphs-filteringDropdowns {
|
||||||
display: inherit;
|
display: inherit;
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-filterDropdownItems {
|
.DashboardGraphs-filterDropdownItems {
|
||||||
li > a {
|
li > a {
|
||||||
|
text-align: left;
|
||||||
color: @default-interface-txt;
|
color: @default-interface-txt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,18 +216,28 @@
|
|||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.DashboardGraphs-filterDropdownItems {
|
||||||
|
left: 50%;
|
||||||
|
right: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
.DashboardGraphs-filteringDropdowns {
|
.DashboardGraphs-filteringDropdowns {
|
||||||
float: left;
|
float: left;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: -10px;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-filterLabel {
|
.DashboardGraphs-filterLabel {
|
||||||
|
margin-top: 10px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float:left;
|
float: left;
|
||||||
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.DashboardGraphs-periodDropdown {
|
.DashboardGraphs-periodDropdown,
|
||||||
|
.DashboardGraphs-jobTypeDropdown,
|
||||||
|
.DashboardGraphs-statusDropdown {
|
||||||
|
margin-top: 10px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,9 +122,15 @@ function JobStatusGraph($window, adjustGraphSize, templateUrl, i18n, graphDataSe
|
|||||||
// when the Period drop down filter is used, create a new graph based on the
|
// when the Period drop down filter is used, create a new graph based on the
|
||||||
$('.n').on("click", function(){
|
$('.n').on("click", function(){
|
||||||
period = this.getAttribute("id");
|
period = this.getAttribute("id");
|
||||||
|
|
||||||
$('#period-dropdown')
|
$('#period-dropdown')
|
||||||
.replaceWith("<a id=\"period-dropdown\" class=\"DashboardGraphs-filterDropdownText DashboardGraphs-filterDropdownItems--period\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+
|
.replaceWith(`
|
||||||
"<i class=\"fa fa-angle-down DashboardGraphs-filterIcon\"></i>\n");
|
<a id="period-dropdown" class="DashboardGraphs-filterDropdownText DashboardGraphs-filterDropdownItems--period" role="button"
|
||||||
|
data-toggle="dropdown" data-target="#" href="/page.html">
|
||||||
|
<span>${this.text}</span>
|
||||||
|
<i class="fa fa-angle-down DashboardGraphs-filterIcon"></i>
|
||||||
|
</a>`);
|
||||||
|
|
||||||
scope.$parent.isFailed = true;
|
scope.$parent.isFailed = true;
|
||||||
scope.$parent.isSuccessful = true;
|
scope.$parent.isSuccessful = true;
|
||||||
recreateGraph(period, job_type);
|
recreateGraph(period, job_type);
|
||||||
@@ -133,8 +139,15 @@ function JobStatusGraph($window, adjustGraphSize, templateUrl, i18n, graphDataSe
|
|||||||
//On click, update with new data
|
//On click, update with new data
|
||||||
$('.m').on("click", function(){
|
$('.m').on("click", function(){
|
||||||
job_type = this.getAttribute("id");
|
job_type = this.getAttribute("id");
|
||||||
$('#type-dropdown').replaceWith("<a id=\"type-dropdown\" class=\"DashboardGraphs-filterDropdownText DashboardGraphs-filterDropdownItems--jobType\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+
|
|
||||||
"<i class=\"fa fa-angle-down DashboardGraphs-filterIcon\"></i>\n");
|
$('#type-dropdown')
|
||||||
|
.replaceWith(`
|
||||||
|
<a id="type-dropdown" class="DashboardGraphs-filterDropdownText DashboardGraphs-filterDropdownItems--jobType" role="button"
|
||||||
|
data-toggle="dropdown" data-target="#" href="/page.html">
|
||||||
|
<span>${this.text}</span>
|
||||||
|
<i class="fa fa-angle-down DashboardGraphs-filterIcon"></i>
|
||||||
|
</a>`);
|
||||||
|
|
||||||
scope.$parent.isFailed = true;
|
scope.$parent.isFailed = true;
|
||||||
scope.$parent.isSuccessful = true;
|
scope.$parent.isSuccessful = true;
|
||||||
recreateGraph(period, job_type);
|
recreateGraph(period, job_type);
|
||||||
@@ -142,8 +155,15 @@ function JobStatusGraph($window, adjustGraphSize, templateUrl, i18n, graphDataSe
|
|||||||
|
|
||||||
$('.o').on('click', function() {
|
$('.o').on('click', function() {
|
||||||
var job_status = this.getAttribute('id');
|
var job_status = this.getAttribute('id');
|
||||||
$('#status-dropdown').replaceWith("<a id=\"status-dropdown\" class=\"DashboardGraphs-filterDropdownText DashboardGraphs-filterDropdownText--status\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+
|
|
||||||
"<i class=\"fa fa-angle-down DashboardGraphs-filterIcon\"></i>\n");
|
$('#status-dropdown')
|
||||||
|
.replaceWith(`
|
||||||
|
<a id="status-dropdown" class="DashboardGraphs-filterDropdownText DashboardGraphs-filterDropdownItems--status" role="button"
|
||||||
|
data-toggle="dropdown" data-target="#" href="/page.html">
|
||||||
|
<span>${this.text}</span>
|
||||||
|
<i class="fa fa-angle-down DashboardGraphs-filterIcon"></i>
|
||||||
|
</a>`);
|
||||||
|
|
||||||
scope.$broadcast("jobStatusChange", job_status);
|
scope.$broadcast("jobStatusChange", job_status);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -143,6 +143,7 @@
|
|||||||
|
|
||||||
.DashboardList-noJobs {
|
.DashboardList-noJobs {
|
||||||
color: @list-empty-txt;
|
color: @list-empty-txt;
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 360px) {
|
@media only screen and (max-width: 360px) {
|
||||||
|
|||||||
Reference in New Issue
Block a user