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
1c07f93b
Commit
1c07f93b
authored
5 years ago
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3766:- UI:Atlas Admin Audit UI pagination is not working
parent
a43b5488
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
198 additions
and
282 deletions
+198
-282
business-metadata.scss
dashboardv2/public/css/scss/business-metadata.scss
+0
-20
table.scss
dashboardv2/public/css/scss/table.scss
+27
-3
Router.js
dashboardv2/public/js/router/Router.js
+0
-0
TableLayout_tmpl.html
dashboardv2/public/js/templates/common/TableLayout_tmpl.html
+4
-8
TableLayout.js
dashboardv2/public/js/utils/TableLayout.js
+1
-1
AdminAuditTableLayoutView.js
...oardv2/public/js/views/audit/AdminAuditTableLayoutView.js
+28
-24
AuditTableLayoutView.js
dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+0
-30
CreateAuditTableLayoutView.js
...ardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+0
-1
ReplicationAuditTableLayoutView.js
.../public/js/views/audit/ReplicationAuditTableLayoutView.js
+20
-44
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+5
-3
GlossaryLayoutView.js
dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
+5
-3
Header.js
dashboardv2/public/js/views/site/Header.js
+6
-4
Statistics.js
dashboardv2/public/js/views/site/Statistics.js
+2
-2
business-metadata.scss
dashboardv3/public/css/scss/business-metadata.scss
+0
-20
table.scss
dashboardv3/public/css/scss/table.scss
+27
-3
theme.scss
dashboardv3/public/css/scss/theme.scss
+8
-0
Router.js
dashboardv3/public/js/router/Router.js
+0
-0
TableLayout_tmpl.html
dashboardv3/public/js/templates/common/TableLayout_tmpl.html
+4
-8
TableLayout.js
dashboardv3/public/js/utils/TableLayout.js
+1
-1
AdminAuditTableLayoutView.js
...oardv3/public/js/views/audit/AdminAuditTableLayoutView.js
+28
-24
AuditTableLayoutView.js
dashboardv3/public/js/views/audit/AuditTableLayoutView.js
+0
-30
CreateAuditTableLayoutView.js
...ardv3/public/js/views/audit/CreateAuditTableLayoutView.js
+0
-1
ReplicationAuditTableLayoutView.js
.../public/js/views/audit/ReplicationAuditTableLayoutView.js
+20
-44
DetailPageLayoutView.js
...ardv3/public/js/views/detail_page/DetailPageLayoutView.js
+5
-3
Statistics.js
dashboardv3/public/js/views/site/Statistics.js
+7
-5
No files found.
dashboardv2/public/css/scss/business-metadata.scss
View file @
1c07f93b
...
...
@@ -142,26 +142,6 @@
opacity
:
0
.2
;
}
.business-metadata-details
{
.backgrid
{
td
.expandable-content
{
max-width
:
none
;
background
:
#f8f8f8
;
div
{
table
{
width
:
100%
;
}
}
}
tbody
>
tr
:last-child
>
td
{
border-bottom
:
none
;
}
}
}
.business-metadata-attr-page
{
.modal-footer
{
text-align
:
center
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/css/scss/table.scss
View file @
1c07f93b
...
...
@@ -213,6 +213,29 @@ tr.empty {
text-align
:
center
;
}
}
.expandable
{
.expandable-content
{
max-width
:
none
;
background
:
#f8f8f8
;
div
{
table
{
width
:
100%
;
td
{
display
:
table-cell
;
}
tr
:last-child
>
td
{
border-bottom
:
none
;
}
}
}
}
}
}
td
{
...
...
@@ -255,8 +278,8 @@ td {
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
}
.auditStatusContainer
>
div
{
flex-grow
:
1
;
&
>
div
{
flex-grow
:
1
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/router/Router.js
View file @
1c07f93b
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/common/TableLayout_tmpl.html
View file @
1c07f93b
...
...
@@ -22,13 +22,6 @@
{{/unless}}
</div>
</div>
{{#if includeAtlasPagination}}
<div
class=
"row form-group pagination-box filter-box"
>
<div
class=
"col-sm-4"
>
<span
class=
"labelShowRecord pull-left"
data-id=
"pageRecordText"
>
</span>
</div>
</div>
{{/if}}
<div
class=
"position-relative thick-border"
>
<div
data-id=
"r_tableList"
class=
"table-responsive tableBorder"
>
</div>
{{#if includeTableLoader}}
...
...
@@ -70,7 +63,10 @@
</div>
{{/if}} {{#if includeAtlasPagination}}
<div
class=
"row pagination-box"
>
<div
class=
"col-sm-offset-4 col-sm-8"
>
<div
class=
"col-sm-4"
>
<span
class=
"labelShowRecord pull-left"
data-id=
"pageRecordText"
>
</span>
</div>
<div
class=
"col-sm-8"
>
<div
class=
"inline-content-fr"
>
<div
class=
"backgrid-paginator inline"
>
<ul
class=
""
data-id=
"paginationDiv"
style=
"display:none"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/TableLayout.js
View file @
1c07f93b
...
...
@@ -267,7 +267,7 @@ define(['require',
this
.
renderFooterRecords
(
this
.
collection
.
state
);
}
if
(
this
.
includeAtlasPagination
)
{
this
.
renderAtlasPagination
(
collection
,
options
);
this
.
renderAtlasPagination
(
options
);
}
},
this
);
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -77,30 +77,28 @@ define(['require',
_
.
extend
(
this
,
_
.
pick
(
options
,
'searchTableFilters'
,
'entityDefCollection'
,
'enumDefCollection'
));
this
.
entityCollection
=
new
VEntityList
();
this
.
limit
=
25
;
this
.
offset
=
0
;
this
.
entityCollection
.
url
=
UrlLinks
.
adminApiUrl
();
this
.
entityCollection
.
modelAttrName
=
"events"
;
this
.
commonTableOptions
=
{
collection
:
this
.
entityCollection
,
includeFilter
:
false
,
includePagination
:
true
,
includeFooterRecords
:
true
,
includePageSize
:
true
,
includeAtlasTableSorting
:
true
,
includeTableLoader
:
true
,
includePagination
:
false
,
includeAtlasPagination
:
true
,
includeFooterRecords
:
false
,
includeColumnManager
:
false
,
gridOpts
:
{
className
:
"table table-hover backgrid table-quickMenu"
,
emptyText
:
'No records found!'
includeOrderAbleColumns
:
false
,
includeSizeAbleColumns
:
false
,
includeTableLoader
:
true
,
includeAtlasPageSize
:
true
,
includeAtlasTableSorting
:
true
,
atlasPaginationOpts
:
{
limit
:
this
.
limit
,
offset
:
this
.
offset
,
fetchCollection
:
this
.
getAdminCollection
.
bind
(
this
),
},
columnOpts
:
{
opts
:
{
initialColumnsVisible
:
null
,
saveState
:
false
},
visibilityControlOpts
:
{
buttonTemplate
:
_
.
template
(
"<button class='btn btn-action btn-sm pull-right'>Columns <i class='fa fa-caret-down'></i></button>"
)
},
el
:
this
.
ui
.
colManager
gridOpts
:
{
emptyText
:
'No Record found!'
,
className
:
'table table-hover backgrid table-quickMenu colSort'
},
filterOpts
:
{},
paginatorOpts
:
{}
...
...
@@ -116,6 +114,7 @@ define(['require',
this
.
entityCollection
.
comparator
=
function
(
model
)
{
return
-
model
.
get
(
'timestamp'
);
}
this
.
renderTableLayoutView
();
},
bindEvents
:
function
()
{},
closeAttributeModel
:
function
()
{
...
...
@@ -172,10 +171,11 @@ define(['require',
}
if
(
isFilterValidate
)
{
that
.
closeAttributeModel
();
that
.
defaultPagination
();
that
.
getAdminCollection
();
}
},
getAdminCollection
:
function
()
{
getAdminCollection
:
function
(
option
)
{
var
that
=
this
,
options
=
{
isDateParsed
:
true
,
...
...
@@ -193,13 +193,12 @@ define(['require',
that
.
searchTableFilters
[
"adminAttrFilters"
]
=
CommonViewFunction
.
attributeFilter
.
generateUrl
({
value
:
auditQueryParam
,
formatedDateToLong
:
true
});
this
.
$
(
'.fontLoader'
).
show
();
this
.
$
(
'.tableOverlay'
).
show
();
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
limit
:
this
.
limit
,
offset
:
0
,
auditFilters
:
adminParam
});
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
auditFilters
:
adminParam
});
var
apiObj
=
{
sort
:
false
,
data
:
that
.
entityCollection
.
queryParams
,
success
:
function
(
dataOrCollection
,
response
)
{
that
.
entityCollection
.
fullCollection
.
reset
(
dataOrCollection
);
that
.
renderTableLayoutView
();
that
.
entityCollection
.
fullCollection
.
reset
(
dataOrCollection
,
option
);
that
.
$
(
'.fontLoader'
).
hide
();
that
.
$
(
'.tableOverlay'
).
hide
();
that
.
$
(
'.auditTable'
).
show
();
...
...
@@ -296,15 +295,20 @@ define(['require',
},
this
.
entityCollection
);
},
defaultPagination
:
function
()
{
$
.
extend
(
this
.
entityCollection
.
queryParams
,
{
limit
:
this
.
limit
,
offset
:
this
.
offset
});
this
.
renderTableLayoutView
();
},
onClickAdminType
:
function
(
e
,
value
)
{
this
.
onlyPurged
=
e
.
currentTarget
.
value
===
"Purged"
;
this
.
defaultPagination
();
this
.
getAdminCollection
();
},
onClickAdminEntity
:
function
(
e
)
{
var
that
=
this
;
require
([
'modules/Modal'
,
'views/audit/AuditTableLayoutView'
,
'views/audit/CreateAuditTableLayoutView'
,
],
function
(
Modal
,
AuditTableLayoutView
,
CreateAuditTableLayoutView
)
{
'modules/Modal'
,
'views/audit/AuditTableLayoutView'
],
function
(
Modal
,
AuditTableLayoutView
)
{
var
obj
=
{
guid
:
$
(
e
.
target
).
text
(),
},
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/audit/AuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -39,7 +39,6 @@ define(['require',
/** ui selector cache */
ui
:
{
auditCreate
:
"[data-id='auditCreate']"
,
previousAuditData
:
"[data-id='previousAuditData']"
,
nextAuditData
:
"[data-id='nextAuditData']"
,
pageRecordText
:
"[data-id='pageRecordText']"
,
...
...
@@ -48,7 +47,6 @@ define(['require',
/** ui events hash */
events
:
function
()
{
var
events
=
{};
events
[
"click "
+
this
.
ui
.
auditCreate
]
=
"onClickAuditCreate"
;
events
[
"click "
+
this
.
ui
.
nextAuditData
]
=
"onClickNextAuditData"
;
events
[
"click "
+
this
.
ui
.
previousAuditData
]
=
"onClickPreviousAuditData"
;
return
events
;
...
...
@@ -237,34 +235,6 @@ define(['require',
},
this
.
entityCollection
);
},
onClickAuditCreate
:
function
(
e
)
{
var
that
=
this
;
require
([
'modules/Modal'
,
'views/audit/CreateAuditTableLayoutView'
,
],
function
(
Modal
,
CreateAuditTableLayoutView
)
{
that
.
action
=
$
(
e
.
target
).
data
(
"action"
);
$
(
e
.
target
).
attr
(
'disabled'
,
true
);
var
eventModel
=
that
.
entityCollection
.
fullCollection
.
findWhere
({
'eventKey'
:
$
(
e
.
currentTarget
).
data
(
'modalid'
)
}).
toJSON
(),
collectionModel
=
new
that
.
entityCollection
.
model
(
eventModel
),
view
=
new
CreateAuditTableLayoutView
({
guid
:
that
.
guid
,
entityModel
:
collectionModel
,
action
:
that
.
action
,
entity
:
that
.
entity
,
entityName
:
that
.
entityName
,
attributeDefs
:
that
.
attributeDefs
});
var
modal
=
new
Modal
({
title
:
that
.
action
,
content
:
view
,
okCloses
:
true
,
showFooter
:
true
,
}).
open
();
view
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
view
.
$el
.
on
(
'click'
,
'td a'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
view
.
on
(
'hidden.bs.modal'
,
function
()
{
that
.
$
(
'.btn-action[data-id="auditCreate"]'
).
attr
(
'disabled'
,
false
);
});
});
},
onClickNextAuditData
:
function
()
{
var
that
=
this
;
this
.
ui
.
previousAuditData
.
removeAttr
(
"disabled"
);
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -59,7 +59,6 @@ define(['require',
/** ui events hash */
events
:
function
()
{
var
events
=
{};
events
[
"click "
+
this
.
ui
.
auditCreate
]
=
"onClickAuditCreate"
;
return
events
;
},
/**
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/audit/ReplicationAuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -41,13 +41,10 @@ define(['require',
},
/** ui selector cache */
ui
:
{
auditDetail
:
"[data-action='audit_detail']"
,
},
ui
:
{},
/** ui events hash */
events
:
function
()
{
var
events
=
{}
events
[
"click "
+
this
.
ui
.
auditDetail
]
=
"onClickAuditDetails"
;
return
events
;
},
/**
...
...
@@ -70,6 +67,8 @@ define(['require',
includeOrderAbleColumns
:
false
,
includeSizeAbleColumns
:
false
,
includeTableLoader
:
true
,
includeAtlasPageSize
:
true
,
includeAtlasTableSorting
:
true
,
atlasPaginationOpts
:
{
limit
:
this
.
limit
,
offset
:
this
.
offset
,
...
...
@@ -123,7 +122,21 @@ define(['require',
getColumn
:
function
(
argument
)
{
var
that
=
this
,
col
=
{};
col
[
'tools'
]
=
{
label
:
""
,
cell
:
"html"
,
editable
:
false
,
sortable
:
false
,
fixWidth
:
"20"
,
cell
:
Backgrid
.
ExpandableCell
,
accordion
:
false
,
expand
:
function
(
el
,
model
)
{
el
.
attr
(
'colspan'
,
'6'
);
var
result
=
JSON
.
parse
(
model
.
get
(
"resultSummary"
)),
view
=
"<table class='table table-bordered table-striped'>"
+
CommonViewFunction
.
propertyTable
({
scope
:
that
,
valueObject
:
result
,
attributeDefs
:
that
.
attributeDefs
})
+
"</table>"
;
$
(
el
).
append
(
$
(
'<div>'
).
html
(
view
));
}
};
col
[
'operation'
]
=
{
label
:
"Operation"
,
cell
:
"string"
,
...
...
@@ -175,46 +188,8 @@ define(['require',
}
})
};
col
[
'tools'
]
=
{
label
:
"Tools"
,
cell
:
"html"
,
editable
:
false
,
sortable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
'<div class="btn btn-action btn-sm" data-action="audit_detail" data-guid="'
+
model
.
get
(
'guid'
)
+
'">Detail</div>'
;
}
})
};
return
this
.
searchCollection
.
constructor
.
getTableCols
(
col
,
this
.
searchCollection
);
},
onClickAuditDetails
:
function
(
e
)
{
var
that
=
this
;
require
([
'modules/Modal'
,
'views/audit/CreateAuditTableLayoutView'
,
],
function
(
Modal
,
CreateAuditTableLayoutView
)
{
$
(
e
.
target
).
attr
(
'disabled'
,
true
);
var
guid
=
$
(
e
.
target
).
data
(
"guid"
),
model
=
that
.
searchCollection
.
fullCollection
.
findWhere
({
'guid'
:
guid
}),
result
=
JSON
.
parse
(
model
.
get
(
"resultSummary"
)),
view
=
"<table class='table table-bordered table-striped'>"
+
CommonViewFunction
.
propertyTable
({
scope
:
that
,
valueObject
:
result
,
attributeDefs
:
that
.
attributeDefs
})
+
"</table>"
;
var
modal
=
new
Modal
({
title
:
model
.
get
(
"operation"
)
+
" Details"
,
content
:
view
,
contentHtml
:
true
,
okCloses
:
true
,
showFooter
:
true
,
});
modal
.
open
();
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
modal
.
on
(
'hidden.bs.modal'
,
function
()
{
that
.
$
(
'.btn-action[data-action="audit_detail"]'
).
attr
(
'disabled'
,
false
);
});
});
},
}
});
return
ReplicationAuditTableLayoutView
;
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
1c07f93b
...
...
@@ -482,9 +482,11 @@ define(['require',
onClickAddTermBtn
:
function
(
e
)
{
var
that
=
this
,
entityGuid
=
that
.
id
,
associatedTerms
=
this
.
collection
.
first
().
get
(
'entity'
).
relationshipAttributes
.
meanings
;
entityObj
=
this
.
collection
.
first
().
get
(
'entity'
),
associatedTerms
=
[];
if
(
entityObj
&&
entityObj
.
relationshipAttributes
&&
entityObj
.
relationshipAttributes
.
meanings
)
{
associatedTerms
=
entityObj
.
relationshipAttributes
.
meanings
;
}
require
([
'views/glossary/AssignTermLayoutView'
],
function
(
AssignTermLayoutView
)
{
var
view
=
new
AssignTermLayoutView
({
guid
:
that
.
id
,
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
View file @
1c07f93b
...
...
@@ -142,9 +142,11 @@ define(['require',
that
[
$
(
this
).
find
(
'a'
).
data
(
'fn'
)](
e
)
});
}
this
.
importVent
.
on
(
"Import:Glossary:Update"
,
function
(
options
)
{
that
.
getGlossary
();
});
if
(
this
.
importVent
)
{
this
.
importVent
.
on
(
"Import:Glossary:Update"
,
function
(
options
)
{
that
.
getGlossary
();
});
}
},
onRender
:
function
()
{
this
.
changeLoaderState
(
true
);
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/site/Header.js
View file @
1c07f93b
...
...
@@ -299,10 +299,12 @@ define(['require',
],
function
(
ImportLayoutView
)
{
var
view
=
new
ImportLayoutView
({
callback
:
function
()
{
if
(
isGlossary
)
{
that
.
options
.
importVent
.
trigger
(
"Import:Glossary:Update"
);
}
else
{
that
.
options
.
importVent
.
trigger
(
"Import:BM:Update"
);
if
(
that
.
options
.
importVent
)
{
if
(
isGlossary
)
{
that
.
options
.
importVent
.
trigger
(
"Import:Glossary:Update"
);
}
else
{
that
.
options
.
importVent
.
trigger
(
"Import:BM:Update"
);
}
}
},
isGlossary
:
isGlossary
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/site/Statistics.js
View file @
1c07f93b
...
...
@@ -101,12 +101,12 @@ define(['require',
that
.
fetchMetricData
({
update
:
true
});
}
}]
}).
open
();
});
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
this
.
modal
=
modal
;
modal
.
open
();
}
},
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/css/scss/business-metadata.scss
View file @
1c07f93b
...
...
@@ -142,26 +142,6 @@
opacity
:
0
.2
;
}
.business-metadata-details
{
.backgrid
{
td
.expandable-content
{
max-width
:
none
;
background
:
#f8f8f8
;
div
{
table
{
width
:
100%
;
}
}
}
tbody
>
tr
:last-child
>
td
{
border-bottom
:
none
;
}
}
}
.business-metadata-attr-page
{
.modal-footer
{
text-align
:
center
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/css/scss/table.scss
View file @
1c07f93b
...
...
@@ -213,6 +213,29 @@ tr.empty {
text-align
:
center
;
}
}
.expandable
{
.expandable-content
{
max-width
:
none
;
background
:
#f8f8f8
;
div
{
table
{
width
:
100%
;
td
{
display
:
table-cell
;
}
tr
:last-child
>
td
{
border-bottom
:
none
;
}
}
}
}
}
}
td
{
...
...
@@ -255,8 +278,8 @@ td {
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
}
.auditStatusContainer
>
div
{
flex-grow
:
1
;
&
>
div
{
flex-grow
:
1
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv3/public/css/scss/theme.scss
View file @
1c07f93b
...
...
@@ -55,6 +55,14 @@ body {
}
}
.detail-page
{
.back-button
{
top
:
15px
;
font-size
:
45px
;
}
}
.atlas-page-header
{
height
:
70px
;
background-color
:
#d3e0eb
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/router/Router.js
View file @
1c07f93b
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/templates/common/TableLayout_tmpl.html
View file @
1c07f93b
...
...
@@ -22,13 +22,6 @@
{{/unless}}
</div>
</div>
{{#if includeAtlasPagination}}
<div
class=
"row form-group pagination-box filter-box"
>
<div
class=
"col-sm-4"
>
<span
class=
"labelShowRecord pull-left"
data-id=
"pageRecordText"
>
</span>
</div>
</div>
{{/if}}
<div
class=
"position-relative thick-border"
>
<div
data-id=
"r_tableList"
class=
"table-responsive tableBorder"
>
</div>
{{#if includeTableLoader}}
...
...
@@ -70,7 +63,10 @@
</div>
{{/if}} {{#if includeAtlasPagination}}
<div
class=
"row pagination-box"
>
<div
class=
"col-sm-offset-4 col-sm-8"
>
<div
class=
"col-sm-4"
>
<span
class=
"labelShowRecord pull-left"
data-id=
"pageRecordText"
>
</span>
</div>
<div
class=
"col-sm-8"
>
<div
class=
"inline-content-fr"
>
<div
class=
"backgrid-paginator inline"
>
<ul
class=
""
data-id=
"paginationDiv"
style=
"display:none"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/utils/TableLayout.js
View file @
1c07f93b
...
...
@@ -267,7 +267,7 @@ define(['require',
this
.
renderFooterRecords
(
this
.
collection
.
state
);
}
if
(
this
.
includeAtlasPagination
)
{
this
.
renderAtlasPagination
(
collection
,
options
);
this
.
renderAtlasPagination
(
options
);
}
},
this
);
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -77,30 +77,28 @@ define(['require',
_
.
extend
(
this
,
_
.
pick
(
options
,
'searchTableFilters'
,
'entityDefCollection'
,
'enumDefCollection'
));
this
.
entityCollection
=
new
VEntityList
();
this
.
limit
=
25
;
this
.
offset
=
0
;
this
.
entityCollection
.
url
=
UrlLinks
.
adminApiUrl
();
this
.
entityCollection
.
modelAttrName
=
"events"
;
this
.
commonTableOptions
=
{
collection
:
this
.
entityCollection
,
includeFilter
:
false
,
includePagination
:
true
,
includeFooterRecords
:
true
,
includePageSize
:
true
,
includeAtlasTableSorting
:
true
,
includeTableLoader
:
true
,
includePagination
:
false
,
includeAtlasPagination
:
true
,
includeFooterRecords
:
false
,
includeColumnManager
:
false
,
gridOpts
:
{
className
:
"table table-hover backgrid table-quickMenu"
,
emptyText
:
'No records found!'
includeOrderAbleColumns
:
false
,
includeSizeAbleColumns
:
false
,
includeTableLoader
:
true
,
includeAtlasPageSize
:
true
,
includeAtlasTableSorting
:
true
,
atlasPaginationOpts
:
{
limit
:
this
.
limit
,
offset
:
this
.
offset
,
fetchCollection
:
this
.
getAdminCollection
.
bind
(
this
),
},
columnOpts
:
{
opts
:
{
initialColumnsVisible
:
null
,
saveState
:
false
},
visibilityControlOpts
:
{
buttonTemplate
:
_
.
template
(
"<button class='btn btn-action btn-sm pull-right'>Columns <i class='fa fa-caret-down'></i></button>"
)
},
el
:
this
.
ui
.
colManager
gridOpts
:
{
emptyText
:
'No Record found!'
,
className
:
'table table-hover backgrid table-quickMenu colSort'
},
filterOpts
:
{},
paginatorOpts
:
{}
...
...
@@ -116,6 +114,7 @@ define(['require',
this
.
entityCollection
.
comparator
=
function
(
model
)
{
return
-
model
.
get
(
'timestamp'
);
}
this
.
renderTableLayoutView
();
},
bindEvents
:
function
()
{},
closeAttributeModel
:
function
()
{
...
...
@@ -172,10 +171,11 @@ define(['require',
}
if
(
isFilterValidate
)
{
that
.
closeAttributeModel
();
that
.
defaultPagination
();
that
.
getAdminCollection
();
}
},
getAdminCollection
:
function
()
{
getAdminCollection
:
function
(
option
)
{
var
that
=
this
,
options
=
{
isDateParsed
:
true
,
...
...
@@ -193,13 +193,12 @@ define(['require',
that
.
searchTableFilters
[
"adminAttrFilters"
]
=
CommonViewFunction
.
attributeFilter
.
generateUrl
({
value
:
auditQueryParam
,
formatedDateToLong
:
true
});
this
.
$
(
'.fontLoader'
).
show
();
this
.
$
(
'.tableOverlay'
).
show
();
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
limit
:
this
.
limit
,
offset
:
0
,
auditFilters
:
adminParam
});
$
.
extend
(
that
.
entityCollection
.
queryParams
,
{
auditFilters
:
adminParam
});
var
apiObj
=
{
sort
:
false
,
data
:
that
.
entityCollection
.
queryParams
,
success
:
function
(
dataOrCollection
,
response
)
{
that
.
entityCollection
.
fullCollection
.
reset
(
dataOrCollection
);
that
.
renderTableLayoutView
();
that
.
entityCollection
.
fullCollection
.
reset
(
dataOrCollection
,
option
);
that
.
$
(
'.fontLoader'
).
hide
();
that
.
$
(
'.tableOverlay'
).
hide
();
that
.
$
(
'.auditTable'
).
show
();
...
...
@@ -296,15 +295,20 @@ define(['require',
},
this
.
entityCollection
);
},
defaultPagination
:
function
()
{
$
.
extend
(
this
.
entityCollection
.
queryParams
,
{
limit
:
this
.
limit
,
offset
:
this
.
offset
});
this
.
renderTableLayoutView
();
},
onClickAdminType
:
function
(
e
,
value
)
{
this
.
onlyPurged
=
e
.
currentTarget
.
value
===
"Purged"
;
this
.
defaultPagination
();
this
.
getAdminCollection
();
},
onClickAdminEntity
:
function
(
e
)
{
var
that
=
this
;
require
([
'modules/Modal'
,
'views/audit/AuditTableLayoutView'
,
'views/audit/CreateAuditTableLayoutView'
,
],
function
(
Modal
,
AuditTableLayoutView
,
CreateAuditTableLayoutView
)
{
'modules/Modal'
,
'views/audit/AuditTableLayoutView'
],
function
(
Modal
,
AuditTableLayoutView
)
{
var
obj
=
{
guid
:
$
(
e
.
target
).
text
(),
},
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/audit/AuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -39,7 +39,6 @@ define(['require',
/** ui selector cache */
ui
:
{
auditCreate
:
"[data-id='auditCreate']"
,
previousAuditData
:
"[data-id='previousAuditData']"
,
nextAuditData
:
"[data-id='nextAuditData']"
,
pageRecordText
:
"[data-id='pageRecordText']"
,
...
...
@@ -48,7 +47,6 @@ define(['require',
/** ui events hash */
events
:
function
()
{
var
events
=
{};
events
[
"click "
+
this
.
ui
.
auditCreate
]
=
"onClickAuditCreate"
;
events
[
"click "
+
this
.
ui
.
nextAuditData
]
=
"onClickNextAuditData"
;
events
[
"click "
+
this
.
ui
.
previousAuditData
]
=
"onClickPreviousAuditData"
;
return
events
;
...
...
@@ -237,34 +235,6 @@ define(['require',
},
this
.
entityCollection
);
},
onClickAuditCreate
:
function
(
e
)
{
var
that
=
this
;
require
([
'modules/Modal'
,
'views/audit/CreateAuditTableLayoutView'
,
],
function
(
Modal
,
CreateAuditTableLayoutView
)
{
that
.
action
=
$
(
e
.
target
).
data
(
"action"
);
$
(
e
.
target
).
attr
(
'disabled'
,
true
);
var
eventModel
=
that
.
entityCollection
.
fullCollection
.
findWhere
({
'eventKey'
:
$
(
e
.
currentTarget
).
data
(
'modalid'
)
}).
toJSON
(),
collectionModel
=
new
that
.
entityCollection
.
model
(
eventModel
),
view
=
new
CreateAuditTableLayoutView
({
guid
:
that
.
guid
,
entityModel
:
collectionModel
,
action
:
that
.
action
,
entity
:
that
.
entity
,
entityName
:
that
.
entityName
,
attributeDefs
:
that
.
attributeDefs
});
var
modal
=
new
Modal
({
title
:
that
.
action
,
content
:
view
,
okCloses
:
true
,
showFooter
:
true
,
}).
open
();
view
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
view
.
$el
.
on
(
'click'
,
'td a'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
view
.
on
(
'hidden.bs.modal'
,
function
()
{
that
.
$
(
'.btn-action[data-id="auditCreate"]'
).
attr
(
'disabled'
,
false
);
});
});
},
onClickNextAuditData
:
function
()
{
var
that
=
this
;
this
.
ui
.
previousAuditData
.
removeAttr
(
"disabled"
);
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -59,7 +59,6 @@ define(['require',
/** ui events hash */
events
:
function
()
{
var
events
=
{};
events
[
"click "
+
this
.
ui
.
auditCreate
]
=
"onClickAuditCreate"
;
return
events
;
},
/**
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/audit/ReplicationAuditTableLayoutView.js
View file @
1c07f93b
...
...
@@ -41,13 +41,10 @@ define(['require',
},
/** ui selector cache */
ui
:
{
auditDetail
:
"[data-action='audit_detail']"
,
},
ui
:
{},
/** ui events hash */
events
:
function
()
{
var
events
=
{}
events
[
"click "
+
this
.
ui
.
auditDetail
]
=
"onClickAuditDetails"
;
return
events
;
},
/**
...
...
@@ -70,6 +67,8 @@ define(['require',
includeOrderAbleColumns
:
false
,
includeSizeAbleColumns
:
false
,
includeTableLoader
:
true
,
includeAtlasPageSize
:
true
,
includeAtlasTableSorting
:
true
,
atlasPaginationOpts
:
{
limit
:
this
.
limit
,
offset
:
this
.
offset
,
...
...
@@ -123,7 +122,21 @@ define(['require',
getColumn
:
function
(
argument
)
{
var
that
=
this
,
col
=
{};
col
[
'tools'
]
=
{
label
:
""
,
cell
:
"html"
,
editable
:
false
,
sortable
:
false
,
fixWidth
:
"20"
,
cell
:
Backgrid
.
ExpandableCell
,
accordion
:
false
,
expand
:
function
(
el
,
model
)
{
el
.
attr
(
'colspan'
,
'6'
);
var
result
=
JSON
.
parse
(
model
.
get
(
"resultSummary"
)),
view
=
"<table class='table table-bordered table-striped'>"
+
CommonViewFunction
.
propertyTable
({
scope
:
that
,
valueObject
:
result
,
attributeDefs
:
that
.
attributeDefs
})
+
"</table>"
;
$
(
el
).
append
(
$
(
'<div>'
).
html
(
view
));
}
};
col
[
'operation'
]
=
{
label
:
"Operation"
,
cell
:
"string"
,
...
...
@@ -175,46 +188,8 @@ define(['require',
}
})
};
col
[
'tools'
]
=
{
label
:
"Tools"
,
cell
:
"html"
,
editable
:
false
,
sortable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
'<div class="btn btn-action btn-sm" data-action="audit_detail" data-guid="'
+
model
.
get
(
'guid'
)
+
'">Detail</div>'
;
}
})
};
return
this
.
searchCollection
.
constructor
.
getTableCols
(
col
,
this
.
searchCollection
);
},
onClickAuditDetails
:
function
(
e
)
{
var
that
=
this
;
require
([
'modules/Modal'
,
'views/audit/CreateAuditTableLayoutView'
,
],
function
(
Modal
,
CreateAuditTableLayoutView
)
{
$
(
e
.
target
).
attr
(
'disabled'
,
true
);
var
guid
=
$
(
e
.
target
).
data
(
"guid"
),
model
=
that
.
searchCollection
.
fullCollection
.
findWhere
({
'guid'
:
guid
}),
result
=
JSON
.
parse
(
model
.
get
(
"resultSummary"
)),
view
=
"<table class='table table-bordered table-striped'>"
+
CommonViewFunction
.
propertyTable
({
scope
:
that
,
valueObject
:
result
,
attributeDefs
:
that
.
attributeDefs
})
+
"</table>"
;
var
modal
=
new
Modal
({
title
:
model
.
get
(
"operation"
)
+
" Details"
,
content
:
view
,
contentHtml
:
true
,
okCloses
:
true
,
showFooter
:
true
,
});
modal
.
open
();
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
modal
.
on
(
'hidden.bs.modal'
,
function
()
{
that
.
$
(
'.btn-action[data-action="audit_detail"]'
).
attr
(
'disabled'
,
false
);
});
});
},
}
});
return
ReplicationAuditTableLayoutView
;
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
View file @
1c07f93b
...
...
@@ -486,9 +486,11 @@ define(['require',
onClickAddTermBtn
:
function
(
e
)
{
var
that
=
this
,
entityGuid
=
that
.
id
,
associatedTerms
=
this
.
collection
.
first
().
get
(
'entity'
).
relationshipAttributes
.
meanings
;
entityObj
=
this
.
collection
.
first
().
get
(
'entity'
),
associatedTerms
=
[];
if
(
entityObj
&&
entityObj
.
relationshipAttributes
&&
entityObj
.
relationshipAttributes
.
meanings
)
{
associatedTerms
=
entityObj
.
relationshipAttributes
.
meanings
;
}
require
([
'views/glossary/AssignTermLayoutView'
],
function
(
AssignTermLayoutView
)
{
var
view
=
new
AssignTermLayoutView
({
guid
:
that
.
id
,
...
...
This diff is collapsed.
Click to expand it.
dashboardv3/public/js/views/site/Statistics.js
View file @
1c07f93b
...
...
@@ -83,18 +83,20 @@ define(['require',
that
.
fetchMetricData
({
update
:
true
});
}
}]
}).
open
();
});
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
this
.
modal
=
modal
;
modal
.
open
();
},
bindEvents
:
function
()
{
var
that
=
this
;
this
.
$el
.
on
(
'click'
,
'.linkClicked'
,
function
()
{
that
.
modal
.
close
();
})
if
(
this
.
modal
)
{
this
.
$el
.
on
(
'click'
,
'.linkClicked'
,
function
()
{
that
.
modal
.
close
();
})
}
},
fetchMetricData
:
function
(
options
)
{
var
that
=
this
;
...
...
This diff is collapsed.
Click to expand it.
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