Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
4ab49623
Commit
4ab49623
authored
Oct 08, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3978: In Administration, Audits filter for 'OR' condition does not work
parent
70c1087a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
62 deletions
+8
-62
TableLayout.js
dashboardv2/public/js/utils/TableLayout.js
+1
-0
AdminAuditTableLayoutView.js
...oardv2/public/js/views/audit/AdminAuditTableLayoutView.js
+3
-31
TableLayout.js
dashboardv3/public/js/utils/TableLayout.js
+1
-0
AdminAuditTableLayoutView.js
...oardv3/public/js/views/audit/AdminAuditTableLayoutView.js
+3
-31
No files found.
dashboardv2/public/js/utils/TableLayout.js
View file @
4ab49623
...
@@ -459,6 +459,7 @@ define(['require',
...
@@ -459,6 +459,7 @@ define(['require',
this
.
activePage
=
Math
.
round
(
this
.
pageTo
/
this
.
limit
);
this
.
activePage
=
Math
.
round
(
this
.
pageTo
/
this
.
limit
);
this
.
ui
.
activePage
.
attr
(
'title'
,
"Page "
+
this
.
activePage
);
this
.
ui
.
activePage
.
attr
(
'title'
,
"Page "
+
this
.
activePage
);
this
.
ui
.
activePage
.
text
(
this
.
activePage
);
this
.
ui
.
activePage
.
text
(
this
.
activePage
);
this
.
ui
.
showPage
.
val
(
this
.
limit
).
trigger
(
'change'
,
{
"skipViewChange"
:
true
});
},
},
/**
/**
...
...
dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
View file @
4ab49623
...
@@ -127,19 +127,6 @@ define(['require',
...
@@ -127,19 +127,6 @@ define(['require',
that
.
ui
.
attrFilter
.
find
(
'.fa-angle-right'
).
toggleClass
(
'fa-angle-down'
);
that
.
ui
.
attrFilter
.
find
(
'.fa-angle-right'
).
toggleClass
(
'fa-angle-down'
);
that
.
$
(
'.attribute-filter-container, .attr-filter-overlay'
).
toggleClass
(
'hide'
);
that
.
$
(
'.attribute-filter-container, .attr-filter-overlay'
).
toggleClass
(
'hide'
);
},
},
getAttributes
:
function
(
options
)
{
var
adminAttributes
=
[];
if
(
options
.
isFilter
)
{
_
.
each
(
options
.
isFilter
,
function
(
adminFilter
)
{
adminAttributes
.
push
({
"attributeName"
:
adminFilter
.
id
,
"operator"
:
adminFilter
.
operator
,
"attributeValue"
:
(
adminFilter
.
type
==
"date"
&&
options
.
isDateParsed
)
?
Date
.
parse
(
adminFilter
.
value
).
toString
()
:
adminFilter
.
value
})
})
}
return
adminAttributes
;
},
onClickAttrFilter
:
function
()
{
onClickAttrFilter
:
function
()
{
var
that
=
this
;
var
that
=
this
;
this
.
ui
.
adminRegion
.
show
();
this
.
ui
.
adminRegion
.
show
();
...
@@ -154,6 +141,7 @@ define(['require',
...
@@ -154,6 +141,7 @@ define(['require',
if
(
queryBuilderRef
.
data
(
"queryBuilder"
))
{
if
(
queryBuilderRef
.
data
(
"queryBuilder"
))
{
var
queryBuilder
=
queryBuilderRef
.
queryBuilder
(
"getRules"
);
var
queryBuilder
=
queryBuilderRef
.
queryBuilder
(
"getRules"
);
if
(
queryBuilder
)
{
if
(
queryBuilder
)
{
that
.
ruleUrl
=
that
.
searchTableFilters
[
"adminAttrFilters"
]
=
CommonViewFunction
.
attributeFilter
.
generateUrl
({
value
:
queryBuilder
,
formatedDateToLong
:
true
});
that
.
isFilters
=
queryBuilder
.
rules
.
length
?
queryBuilder
.
rules
:
null
;
that
.
isFilters
=
queryBuilder
.
rules
.
length
?
queryBuilder
.
rules
:
null
;
}
else
{
}
else
{
isFilterValidate
=
false
isFilterValidate
=
false
...
@@ -167,24 +155,8 @@ define(['require',
...
@@ -167,24 +155,8 @@ define(['require',
},
},
getAdminCollection
:
function
(
option
)
{
getAdminCollection
:
function
(
option
)
{
var
that
=
this
,
var
that
=
this
,
options
=
{
auditFilters
=
CommonViewFunction
.
attributeFilter
.
generateAPIObj
(
that
.
ruleUrl
);
isDateParsed
:
true
,
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
auditFilters
:
that
.
isFilters
?
auditFilters
:
null
});
isFilter
:
this
.
isFilters
},
adminParam
=
{
condition
:
"AND"
,
criterion
:
that
.
getAttributes
(
options
)
};
options
.
isDateParsed
=
false
;
if
(
this
.
isFilters
)
{
var
auditQueryParam
=
{
condition
:
"AND"
,
criterion
:
that
.
getAttributes
(
options
)
};
that
.
searchTableFilters
[
"adminAttrFilters"
]
=
CommonViewFunction
.
attributeFilter
.
generateUrl
({
value
:
auditQueryParam
,
formatedDateToLong
:
true
});
}
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
auditFilters
:
that
.
isFilters
?
adminParam
:
null
});
var
apiObj
=
{
var
apiObj
=
{
sort
:
false
,
sort
:
false
,
data
:
that
.
entityCollection
.
queryParams
,
data
:
that
.
entityCollection
.
queryParams
,
...
...
dashboardv3/public/js/utils/TableLayout.js
View file @
4ab49623
...
@@ -459,6 +459,7 @@ define(['require',
...
@@ -459,6 +459,7 @@ define(['require',
this
.
activePage
=
Math
.
round
(
this
.
pageTo
/
this
.
limit
);
this
.
activePage
=
Math
.
round
(
this
.
pageTo
/
this
.
limit
);
this
.
ui
.
activePage
.
attr
(
'title'
,
"Page "
+
this
.
activePage
);
this
.
ui
.
activePage
.
attr
(
'title'
,
"Page "
+
this
.
activePage
);
this
.
ui
.
activePage
.
text
(
this
.
activePage
);
this
.
ui
.
activePage
.
text
(
this
.
activePage
);
this
.
ui
.
showPage
.
val
(
this
.
limit
).
trigger
(
'change'
,
{
"skipViewChange"
:
true
});
},
},
/**
/**
...
...
dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
View file @
4ab49623
...
@@ -127,19 +127,6 @@ define(['require',
...
@@ -127,19 +127,6 @@ define(['require',
that
.
ui
.
attrFilter
.
find
(
'.fa-angle-right'
).
toggleClass
(
'fa-angle-down'
);
that
.
ui
.
attrFilter
.
find
(
'.fa-angle-right'
).
toggleClass
(
'fa-angle-down'
);
that
.
$
(
'.attribute-filter-container, .attr-filter-overlay'
).
toggleClass
(
'hide'
);
that
.
$
(
'.attribute-filter-container, .attr-filter-overlay'
).
toggleClass
(
'hide'
);
},
},
getAttributes
:
function
(
options
)
{
var
adminAttributes
=
[];
if
(
options
.
isFilter
)
{
_
.
each
(
options
.
isFilter
,
function
(
adminFilter
)
{
adminAttributes
.
push
({
"attributeName"
:
adminFilter
.
id
,
"operator"
:
adminFilter
.
operator
,
"attributeValue"
:
(
adminFilter
.
type
==
"date"
&&
options
.
isDateParsed
)
?
Date
.
parse
(
adminFilter
.
value
).
toString
()
:
adminFilter
.
value
})
})
}
return
adminAttributes
;
},
onClickAttrFilter
:
function
()
{
onClickAttrFilter
:
function
()
{
var
that
=
this
;
var
that
=
this
;
this
.
ui
.
adminRegion
.
show
();
this
.
ui
.
adminRegion
.
show
();
...
@@ -154,6 +141,7 @@ define(['require',
...
@@ -154,6 +141,7 @@ define(['require',
if
(
queryBuilderRef
.
data
(
"queryBuilder"
))
{
if
(
queryBuilderRef
.
data
(
"queryBuilder"
))
{
var
queryBuilder
=
queryBuilderRef
.
queryBuilder
(
"getRules"
);
var
queryBuilder
=
queryBuilderRef
.
queryBuilder
(
"getRules"
);
if
(
queryBuilder
)
{
if
(
queryBuilder
)
{
that
.
ruleUrl
=
that
.
searchTableFilters
[
"adminAttrFilters"
]
=
CommonViewFunction
.
attributeFilter
.
generateUrl
({
value
:
queryBuilder
,
formatedDateToLong
:
true
});
that
.
isFilters
=
queryBuilder
.
rules
.
length
?
queryBuilder
.
rules
:
null
;
that
.
isFilters
=
queryBuilder
.
rules
.
length
?
queryBuilder
.
rules
:
null
;
}
else
{
}
else
{
isFilterValidate
=
false
isFilterValidate
=
false
...
@@ -167,24 +155,8 @@ define(['require',
...
@@ -167,24 +155,8 @@ define(['require',
},
},
getAdminCollection
:
function
(
option
)
{
getAdminCollection
:
function
(
option
)
{
var
that
=
this
,
var
that
=
this
,
options
=
{
auditFilters
=
CommonViewFunction
.
attributeFilter
.
generateAPIObj
(
that
.
ruleUrl
);
isDateParsed
:
true
,
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
auditFilters
:
that
.
isFilters
?
auditFilters
:
null
});
isFilter
:
this
.
isFilters
},
adminParam
=
{
condition
:
"AND"
,
criterion
:
that
.
getAttributes
(
options
)
};
options
.
isDateParsed
=
false
;
if
(
this
.
isFilters
)
{
var
auditQueryParam
=
{
condition
:
"AND"
,
criterion
:
that
.
getAttributes
(
options
)
};
that
.
searchTableFilters
[
"adminAttrFilters"
]
=
CommonViewFunction
.
attributeFilter
.
generateUrl
({
value
:
auditQueryParam
,
formatedDateToLong
:
true
});
}
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
auditFilters
:
that
.
isFilters
?
adminParam
:
null
});
var
apiObj
=
{
var
apiObj
=
{
sort
:
false
,
sort
:
false
,
data
:
that
.
entityCollection
.
queryParams
,
data
:
that
.
entityCollection
.
queryParams
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment