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
95923fba
Commit
95923fba
authored
Apr 01, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3706 : UI: Audit change for Business metadata/labels/user-define property
parent
2fbfb557
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
189 additions
and
136 deletions
+189
-136
CreateAuditTableLayoutView_tmpl.html
...c/js/templates/audit/CreateAuditTableLayoutView_tmpl.html
+1
-1
Enums.js
dashboardv2/public/js/utils/Enums.js
+5
-2
CreateAuditTableLayoutView.js
...ardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+75
-63
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+6
-0
EntityLabelDefineView.js
dashboardv2/public/js/views/entity/EntityLabelDefineView.js
+4
-1
EntityUserDefineView.js
dashboardv2/public/js/views/entity/EntityUserDefineView.js
+4
-1
table.scss
dashboardv3/public/css/scss/table.scss
+1
-0
CreateAuditTableLayoutView_tmpl.html
...c/js/templates/audit/CreateAuditTableLayoutView_tmpl.html
+1
-1
Enums.js
dashboardv3/public/js/utils/Enums.js
+3
-1
CreateAuditTableLayoutView.js
...ardv3/public/js/views/audit/CreateAuditTableLayoutView.js
+75
-64
DetailPageLayoutView.js
...ardv3/public/js/views/detail_page/DetailPageLayoutView.js
+6
-0
EntityLabelDefineView.js
dashboardv3/public/js/views/entity/EntityLabelDefineView.js
+4
-1
EntityUserDefineView.js
dashboardv3/public/js/views/entity/EntityUserDefineView.js
+4
-1
No files found.
dashboardv2/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html
View file @
95923fba
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<h4
style=
"word-break: break-word;"
>
Name:
<span
data-id=
"name"
></span
></h4>
<h4
style=
"word-break: break-word;"
data-id=
"name"
></h4>
<div
class=
"panel-group server-stats-container statsContainer "
id=
"accordion"
>
<div
class=
"panel panel-default custom-panel expand_collapse_panel-icon hide"
data-id=
"detailsAttribute"
>
<div
class=
"panel-heading"
data-toggle=
"collapse"
href=
"#detailAttributeTableCollapse"
aria-expanded=
"true"
>
...
...
dashboardv2/public/js/utils/Enums.js
View file @
95923fba
...
...
@@ -38,7 +38,9 @@ define(['require'], function(require) {
TERM_DELETE
:
"Term Deleted"
,
LABEL_ADD
:
"Label(s) Added"
,
LABEL_DELETE
:
"Label(s) Deleted"
,
ENTITY_PURGE
:
"Entity Purged"
ENTITY_PURGE
:
"Entity Purged"
,
BUSINESS_ATTRIBUTE_ADD
:
"Business Attribute(s) Added"
,
BUSINESS_ATTRIBUTE_DELETE
:
"Business Attribute(s) Deleted"
}
Enums
.
entityStateReadOnly
=
{
...
...
@@ -212,4 +214,4 @@ define(['require'], function(require) {
1
:
"true"
};
return
Enums
;
});
});
\ No newline at end of file
dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
View file @
95923fba
...
...
@@ -82,7 +82,7 @@ define(['require',
},
updateName
:
function
(
name
)
{
this
.
ui
.
name
.
text
(
name
);
this
.
ui
.
name
.
html
(
"<span>Name: </span><span>"
+
name
+
"</span>"
);
},
noDetailsShow
:
function
()
{
this
.
ui
.
noData
.
removeClass
(
'hide'
);
...
...
@@ -91,73 +91,85 @@ define(['require',
var
that
=
this
,
table
=
""
;
var
detailObj
=
this
.
entityModel
.
get
(
'details'
);
if
(
detailObj
&&
detailObj
.
search
(
':'
)
>=
0
)
{
var
parseDetailsObject
=
detailObj
.
split
(
':'
);
if
(
parseDetailsObject
.
length
>
1
)
{
parseDetailsObject
.
shift
();
var
auditData
=
parseDetailsObject
.
join
(
":"
);
}
try
{
parseDetailsObject
=
JSON
.
parse
(
auditData
);
var
skipAttribute
=
parseDetailsObject
.
typeName
?
"guid"
:
null
,
name
=
Utils
.
getName
(
parseDetailsObject
,
null
,
skipAttribute
);
if
(
name
==
"-"
)
{
name
=
_
.
escape
(
parseDetailsObject
.
typeName
);
if
(
detailObj
)
{
if
(
detailObj
.
search
(
':'
)
>=
0
)
{
var
parseDetailsObject
=
detailObj
.
split
(
':'
),
type
=
""
,
auditData
=
""
;
if
(
parseDetailsObject
.
length
>
1
)
{
type
=
parseDetailsObject
[
0
];
parseDetailsObject
.
shift
();
auditData
=
parseDetailsObject
.
join
(
":"
);
}
var
name
=
((
name
?
name
:
this
.
entityName
));
that
.
updateName
(
name
);
if
(
parseDetailsObject
)
{
var
attributesDetails
=
parseDetailsObject
.
attributes
,
customAttr
=
parseDetailsObject
.
customAttributes
,
labelsDetails
=
parseDetailsObject
.
labels
,
relationshipAttributes
=
parseDetailsObject
.
relationshipAttributes
;
if
(
attributesDetails
)
{
that
.
ui
.
attributeDetails
.
removeClass
(
'hide'
);
that
.
action
.
indexOf
(
"Classification"
)
===
-
1
?
that
.
ui
.
panelAttrHeading
.
html
(
"Technical properties "
)
:
that
.
ui
.
panelAttrHeading
.
html
(
"Properties "
);
var
attrTable
=
that
.
createTableWithValues
(
attributesDetails
);
that
.
ui
.
attributeCard
.
html
(
attrTable
);
}
if
(
!
_
.
isEmpty
(
customAttr
))
{
that
.
ui
.
customAttributeDetails
.
removeClass
(
'hide'
);
var
customAttrTable
=
that
.
createTableWithValues
(
customAttr
);
that
.
ui
.
customAttrCard
.
html
(
customAttrTable
);
}
if
(
!
_
.
isEmpty
(
labelsDetails
))
{
this
.
ui
.
labelsDetailsTable
.
removeClass
(
'hide'
);
var
labelsTable
=
''
;
_
.
each
(
labelsDetails
,
function
(
value
,
key
,
list
)
{
labelsTable
+=
"<label class='label badge-default'>"
+
value
+
"</label>"
;
});
that
.
ui
.
labelCard
.
html
(
labelsTable
);
}
if
(
!
_
.
isEmpty
(
relationshipAttributes
))
{
that
.
ui
.
relationShipAttributeDetails
.
removeClass
(
'hide'
);
var
relationshipAttrTable
=
that
.
createTableWithValues
(
relationshipAttributes
);
that
.
ui
.
relationshipAttrCard
.
html
(
relationshipAttrTable
);
}
if
(
!
attributesDetails
&&
!
customAttr
&&
!
labelsDetails
&&
!
relationshipAttributes
)
{
that
.
ui
.
detailsAttribute
.
removeClass
(
'hide'
);
var
attrDetailTable
=
that
.
createTableWithValues
(
parseDetailsObject
);
that
.
ui
.
attributeDetailCard
.
html
(
attrDetailTable
);
if
(
auditData
.
search
(
'{'
)
===
-
1
)
{
if
(
type
.
trim
()
===
"Added labels"
||
type
.
trim
()
===
"Deleted labels"
)
{
this
.
updateName
(
auditData
.
trim
().
split
(
" "
).
join
(
","
));
}
else
{
this
.
updateName
(
auditData
);
}
}
else
{
that
.
noDetailsShow
();
}
}
catch
(
err
)
{
if
(
_
.
isArray
(
parseDetailsObject
))
{
var
name
=
_
.
escape
(
parseDetailsObject
[
0
]);
try
{
parseDetailsObject
=
JSON
.
parse
(
auditData
);
var
skipAttribute
=
parseDetailsObject
.
typeName
?
"guid"
:
null
,
name
=
Utils
.
getName
(
parseDetailsObject
,
null
,
skipAttribute
);
if
(
name
==
"-"
)
{
name
=
_
.
escape
(
parseDetailsObject
.
typeName
);
}
var
name
=
((
name
?
name
:
this
.
entityName
));
that
.
updateName
(
name
);
if
(
parseDetailsObject
)
{
var
attributesDetails
=
parseDetailsObject
.
attributes
,
customAttr
=
parseDetailsObject
.
customAttributes
,
labelsDetails
=
parseDetailsObject
.
labels
,
relationshipAttributes
=
parseDetailsObject
.
relationshipAttributes
;
if
(
attributesDetails
)
{
that
.
ui
.
attributeDetails
.
removeClass
(
'hide'
);
that
.
action
.
indexOf
(
"Classification"
)
===
-
1
?
that
.
ui
.
panelAttrHeading
.
html
(
"Technical properties "
)
:
that
.
ui
.
panelAttrHeading
.
html
(
"Properties "
);
var
attrTable
=
that
.
createTableWithValues
(
attributesDetails
);
that
.
ui
.
attributeCard
.
html
(
attrTable
);
}
if
(
!
_
.
isEmpty
(
customAttr
))
{
that
.
ui
.
customAttributeDetails
.
removeClass
(
'hide'
);
var
customAttrTable
=
that
.
createTableWithValues
(
customAttr
);
that
.
ui
.
customAttrCard
.
html
(
customAttrTable
);
}
if
(
!
_
.
isEmpty
(
labelsDetails
))
{
this
.
ui
.
labelsDetailsTable
.
removeClass
(
'hide'
);
var
labelsTable
=
''
;
_
.
each
(
labelsDetails
,
function
(
value
,
key
,
list
)
{
labelsTable
+=
"<label class='label badge-default'>"
+
value
+
"</label>"
;
});
that
.
ui
.
labelCard
.
html
(
labelsTable
);
}
if
(
!
_
.
isEmpty
(
relationshipAttributes
))
{
that
.
ui
.
relationShipAttributeDetails
.
removeClass
(
'hide'
);
var
relationshipAttrTable
=
that
.
createTableWithValues
(
relationshipAttributes
);
that
.
ui
.
relationshipAttrCard
.
html
(
relationshipAttrTable
);
}
if
(
!
attributesDetails
&&
!
customAttr
&&
!
labelsDetails
&&
!
relationshipAttributes
)
{
that
.
ui
.
detailsAttribute
.
removeClass
(
'hide'
);
var
attrDetailTable
=
that
.
createTableWithValues
(
parseDetailsObject
);
that
.
ui
.
attributeDetailCard
.
html
(
attrDetailTable
);
}
}
else
{
that
.
noDetailsShow
();
}
}
catch
(
err
)
{
if
(
_
.
isArray
(
parseDetailsObject
))
{
var
name
=
_
.
escape
(
parseDetailsObject
[
0
]);
}
that
.
updateName
(
name
);
that
.
noDetailsShow
();
}
}
that
.
updateName
(
name
);
th
at
.
noDetailsShow
(
);
}
else
if
(
detailObj
==
"Deleted entity"
||
detailObj
==
"Purged entity"
)
{
th
is
.
entityName
?
this
.
updateName
(
this
.
entityName
)
:
(
this
.
ui
.
name
.
hide
()
&&
this
.
ui
.
noData
.
removeClass
(
"hide"
)
);
}
}
else
if
(
detailObj
==
"Deleted entity"
)
{
that
.
updateName
(
this
.
entityName
);
}
}
});
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
95923fba
...
...
@@ -170,6 +170,9 @@ define(['require',
if
(
collectionJSON
)
{
this
.
name
=
Utils
.
getName
(
collectionJSON
);
if
(
collectionJSON
.
attributes
)
{
if
(
collectionJSON
.
typeName
)
{
collectionJSON
.
attributes
.
typeName
=
_
.
escape
(
collectionJSON
.
typeName
);
}
if
(
this
.
name
&&
collectionJSON
.
typeName
)
{
this
.
name
=
this
.
name
+
' ('
+
_
.
escape
(
collectionJSON
.
typeName
)
+
')'
;
}
...
...
@@ -244,6 +247,9 @@ define(['require',
})(),
editEntity
:
this
.
editEntity
||
false
}
obj
[
"renderAuditTableLayoutView"
]
=
function
()
{
that
.
renderAuditTableLayoutView
(
obj
);
};
this
.
renderEntityDetailTableLayoutView
(
obj
);
this
.
renderEntityUserDefineView
(
obj
);
this
.
renderEntityLabelDefineView
(
obj
);
...
...
dashboardv2/public/js/views/entity/EntityLabelDefineView.js
View file @
95923fba
...
...
@@ -55,7 +55,7 @@ define(['require',
},
initialize
:
function
(
options
)
{
var
self
=
this
;
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
,
'renderAuditTableLayoutView'
));
this
.
swapItem
=
false
,
this
.
saveLabels
=
false
;
this
.
readOnlyEntity
=
this
.
customFilter
===
undefined
?
Enums
.
entityStateReadOnly
[
this
.
entity
.
status
]
:
this
.
customFilter
;
this
.
entityModel
=
new
VEntity
(
this
.
entity
);
...
...
@@ -164,6 +164,9 @@ define(['require',
that
.
swapItem
=
false
;
that
.
saveLabels
=
false
;
that
.
render
();
if
(
that
.
renderAuditTableLayoutView
)
{
that
.
renderAuditTableLayoutView
();
}
},
error
:
function
(
e
)
{
that
.
ui
.
saveLabels
&&
that
.
ui
.
saveLabels
.
length
>
0
&&
that
.
ui
.
saveLabels
[
0
].
setAttribute
(
"disabled"
,
false
);
...
...
dashboardv2/public/js/views/entity/EntityUserDefineView.js
View file @
95923fba
...
...
@@ -53,7 +53,7 @@ define(['require',
return
events
;
},
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
,
'renderAuditTableLayoutView'
));
this
.
userDefineAttr
=
this
.
entity
&&
this
.
entity
.
customAttributes
||
[];
this
.
initialCall
=
false
;
this
.
swapItem
=
false
,
this
.
saveAttrItems
=
false
;
...
...
@@ -136,6 +136,9 @@ define(['require',
that
.
swapItem
=
false
;
that
.
saveAttrItems
=
false
;
that
.
render
();
if
(
that
.
renderAuditTableLayoutView
)
{
that
.
renderAuditTableLayoutView
();
}
},
error
:
function
(
e
)
{
that
.
initialCall
=
false
;
...
...
dashboardv3/public/css/scss/table.scss
View file @
95923fba
...
...
@@ -254,6 +254,7 @@ td {
.auditStatusContainer
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
}
...
...
dashboardv3/public/js/templates/audit/CreateAuditTableLayoutView_tmpl.html
View file @
95923fba
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<h4
class=
"entity-name"
style=
"word-break: break-word;"
data-id=
"nameContainer"
>
Name:
<span
data-id=
"name"
></span
></h4>
<h4
style=
"word-break: break-word;"
data-id=
"name"
></h4>
<div
class=
"panel-group server-stats-container auditStatusContainer clearfix"
id=
"accordion"
>
<div
class=
"panel panel-default custom-panel expand_collapse_panel-icon hide col-sm-5"
data-id=
"detailsAttribute"
>
<div
class=
"panel-heading"
data-toggle=
"collapse"
href=
"#detailAttributeTableCollapse"
aria-expanded=
"true"
>
...
...
dashboardv3/public/js/utils/Enums.js
View file @
95923fba
...
...
@@ -38,7 +38,9 @@ define(['require'], function(require) {
TERM_DELETE
:
"Term Deleted"
,
LABEL_ADD
:
"Label(s) Added"
,
LABEL_DELETE
:
"Label(s) Deleted"
,
ENTITY_PURGE
:
"Entity Purged"
ENTITY_PURGE
:
"Entity Purged"
,
BUSINESS_ATTRIBUTE_ADD
:
"Business Attribute(s) Added"
,
BUSINESS_ATTRIBUTE_DELETE
:
"Business Attribute(s) Deleted"
}
Enums
.
entityStateReadOnly
=
{
...
...
dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
View file @
95923fba
...
...
@@ -39,7 +39,6 @@ define(['require',
ui
:
{
auditValue
:
"[data-id='auditValue']"
,
name
:
"[data-id='name']"
,
nameContainer
:
"[data-id='nameContainer']"
,
noData
:
"[data-id='noData']"
,
tableAudit
:
"[data-id='tableAudit']"
,
auditHeaderValue
:
"[data-id='auditHeaderValue']"
,
...
...
@@ -83,7 +82,7 @@ define(['require',
},
updateName
:
function
(
name
)
{
this
.
ui
.
name
.
text
(
name
);
this
.
ui
.
name
.
html
(
"<span>Name: </span><span>"
+
name
+
"</span>"
);
},
noDetailsShow
:
function
()
{
this
.
ui
.
noData
.
removeClass
(
'hide'
);
...
...
@@ -92,73 +91,85 @@ define(['require',
var
that
=
this
,
table
=
""
;
var
detailObj
=
this
.
entityModel
.
get
(
'details'
);
if
(
detailObj
&&
detailObj
.
search
(
':'
)
>=
0
)
{
var
parseDetailsObject
=
detailObj
.
split
(
':'
);
if
(
parseDetailsObject
.
length
>
1
)
{
parseDetailsObject
.
shift
();
var
auditData
=
parseDetailsObject
.
join
(
":"
);
}
try
{
parseDetailsObject
=
JSON
.
parse
(
auditData
);
var
skipAttribute
=
parseDetailsObject
.
typeName
?
"guid"
:
null
,
name
=
Utils
.
getName
(
parseDetailsObject
,
null
,
skipAttribute
);
if
(
name
==
"-"
)
{
name
=
_
.
escape
(
parseDetailsObject
.
typeName
);
if
(
detailObj
)
{
if
(
detailObj
.
search
(
':'
)
>=
0
)
{
var
parseDetailsObject
=
detailObj
.
split
(
':'
),
type
=
""
,
auditData
=
""
;
if
(
parseDetailsObject
.
length
>
1
)
{
type
=
parseDetailsObject
[
0
];
parseDetailsObject
.
shift
();
auditData
=
parseDetailsObject
.
join
(
":"
);
}
var
name
=
((
name
?
name
:
this
.
entityName
));
that
.
updateName
(
name
);
if
(
parseDetailsObject
)
{
var
attributesDetails
=
parseDetailsObject
.
attributes
,
customAttr
=
parseDetailsObject
.
customAttributes
,
labelsDetails
=
parseDetailsObject
.
labels
,
relationshipAttributes
=
parseDetailsObject
.
relationshipAttributes
;
if
(
attributesDetails
)
{
that
.
ui
.
attributeDetails
.
removeClass
(
'hide'
);
that
.
action
.
indexOf
(
"Classification"
)
===
-
1
?
that
.
ui
.
panelAttrHeading
.
html
(
"Technical properties "
)
:
that
.
ui
.
panelAttrHeading
.
html
(
"Properties "
);
var
attrTable
=
that
.
createTableWithValues
(
attributesDetails
);
that
.
ui
.
attributeCard
.
html
(
attrTable
);
}
if
(
!
_
.
isEmpty
(
customAttr
))
{
that
.
ui
.
customAttributeDetails
.
removeClass
(
'hide'
);
var
customAttrTable
=
that
.
createTableWithValues
(
customAttr
);
that
.
ui
.
customAttrCard
.
html
(
customAttrTable
);
}
if
(
!
_
.
isEmpty
(
labelsDetails
))
{
this
.
ui
.
labelsDetailsTable
.
removeClass
(
'hide'
);
var
labelsTable
=
''
;
_
.
each
(
labelsDetails
,
function
(
value
,
key
,
list
)
{
labelsTable
+=
"<label class='label badge-default'>"
+
value
+
"</label>"
;
});
that
.
ui
.
labelCard
.
html
(
labelsTable
);
}
if
(
!
_
.
isEmpty
(
relationshipAttributes
))
{
that
.
ui
.
relationShipAttributeDetails
.
removeClass
(
'hide'
);
var
relationshipAttrTable
=
that
.
createTableWithValues
(
relationshipAttributes
);
that
.
ui
.
relationshipAttrCard
.
html
(
relationshipAttrTable
);
}
if
(
!
attributesDetails
&&
!
customAttr
&&
!
labelsDetails
&&
!
relationshipAttributes
)
{
that
.
ui
.
detailsAttribute
.
removeClass
(
'hide'
);
var
attrDetailTable
=
that
.
createTableWithValues
(
parseDetailsObject
);
that
.
ui
.
attributeDetailCard
.
html
(
attrDetailTable
);
if
(
auditData
.
search
(
'{'
)
===
-
1
)
{
if
(
type
.
trim
()
===
"Added labels"
||
type
.
trim
()
===
"Deleted labels"
)
{
this
.
updateName
(
auditData
.
trim
().
split
(
" "
).
join
(
","
));
}
else
{
this
.
updateName
(
auditData
);
}
}
else
{
that
.
noDetailsShow
();
}
}
catch
(
err
)
{
if
(
_
.
isArray
(
parseDetailsObject
))
{
var
name
=
_
.
escape
(
parseDetailsObject
[
0
]);
try
{
parseDetailsObject
=
JSON
.
parse
(
auditData
);
var
skipAttribute
=
parseDetailsObject
.
typeName
?
"guid"
:
null
,
name
=
Utils
.
getName
(
parseDetailsObject
,
null
,
skipAttribute
);
if
(
name
==
"-"
)
{
name
=
_
.
escape
(
parseDetailsObject
.
typeName
);
}
var
name
=
((
name
?
name
:
this
.
entityName
));
that
.
updateName
(
name
);
if
(
parseDetailsObject
)
{
var
attributesDetails
=
parseDetailsObject
.
attributes
,
customAttr
=
parseDetailsObject
.
customAttributes
,
labelsDetails
=
parseDetailsObject
.
labels
,
relationshipAttributes
=
parseDetailsObject
.
relationshipAttributes
;
if
(
attributesDetails
)
{
that
.
ui
.
attributeDetails
.
removeClass
(
'hide'
);
that
.
action
.
indexOf
(
"Classification"
)
===
-
1
?
that
.
ui
.
panelAttrHeading
.
html
(
"Technical properties "
)
:
that
.
ui
.
panelAttrHeading
.
html
(
"Properties "
);
var
attrTable
=
that
.
createTableWithValues
(
attributesDetails
);
that
.
ui
.
attributeCard
.
html
(
attrTable
);
}
if
(
!
_
.
isEmpty
(
customAttr
))
{
that
.
ui
.
customAttributeDetails
.
removeClass
(
'hide'
);
var
customAttrTable
=
that
.
createTableWithValues
(
customAttr
);
that
.
ui
.
customAttrCard
.
html
(
customAttrTable
);
}
if
(
!
_
.
isEmpty
(
labelsDetails
))
{
this
.
ui
.
labelsDetailsTable
.
removeClass
(
'hide'
);
var
labelsTable
=
''
;
_
.
each
(
labelsDetails
,
function
(
value
,
key
,
list
)
{
labelsTable
+=
"<label class='label badge-default'>"
+
value
+
"</label>"
;
});
that
.
ui
.
labelCard
.
html
(
labelsTable
);
}
if
(
!
_
.
isEmpty
(
relationshipAttributes
))
{
that
.
ui
.
relationShipAttributeDetails
.
removeClass
(
'hide'
);
var
relationshipAttrTable
=
that
.
createTableWithValues
(
relationshipAttributes
);
that
.
ui
.
relationshipAttrCard
.
html
(
relationshipAttrTable
);
}
if
(
!
attributesDetails
&&
!
customAttr
&&
!
labelsDetails
&&
!
relationshipAttributes
)
{
that
.
ui
.
detailsAttribute
.
removeClass
(
'hide'
);
var
attrDetailTable
=
that
.
createTableWithValues
(
parseDetailsObject
);
that
.
ui
.
attributeDetailCard
.
html
(
attrDetailTable
);
}
}
else
{
that
.
noDetailsShow
();
}
}
catch
(
err
)
{
if
(
_
.
isArray
(
parseDetailsObject
))
{
var
name
=
_
.
escape
(
parseDetailsObject
[
0
]);
}
that
.
updateName
(
name
);
that
.
noDetailsShow
();
}
}
that
.
updateName
(
name
);
th
at
.
noDetailsShow
(
);
}
else
if
(
detailObj
==
"Deleted entity"
||
detailObj
==
"Purged entity"
)
{
th
is
.
entityName
?
this
.
updateName
(
this
.
entityName
)
:
(
this
.
ui
.
name
.
hide
()
&&
this
.
ui
.
noData
.
removeClass
(
"hide"
)
);
}
}
else
if
(
detailObj
==
"Deleted entity"
||
detailObj
==
"Purged entity"
)
{
this
.
entityName
?
that
.
updateName
(
this
.
entityName
)
:
this
.
ui
.
nameContainer
.
empty
().
append
(
"<h4 class='text-center'><i>No Records Found!</i></h4>"
);
}
}
});
...
...
dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
View file @
95923fba
...
...
@@ -176,6 +176,9 @@ define(['require',
if
(
collectionJSON
)
{
this
.
name
=
Utils
.
getName
(
collectionJSON
);
if
(
collectionJSON
.
attributes
)
{
if
(
collectionJSON
.
typeName
)
{
collectionJSON
.
attributes
.
typeName
=
_
.
escape
(
collectionJSON
.
typeName
);
}
if
(
this
.
name
&&
collectionJSON
.
typeName
)
{
this
.
name
=
this
.
name
+
' ('
+
_
.
escape
(
collectionJSON
.
typeName
)
+
')'
;
}
...
...
@@ -252,6 +255,9 @@ define(['require',
})(),
editEntity
:
this
.
editEntity
||
false
}
obj
[
"renderAuditTableLayoutView"
]
=
function
()
{
that
.
renderAuditTableLayoutView
(
obj
);
};
this
.
renderEntityDetailTableLayoutView
(
obj
);
this
.
renderEntityUserDefineView
(
obj
);
this
.
renderEntityLabelDefineView
(
obj
);
...
...
dashboardv3/public/js/views/entity/EntityLabelDefineView.js
View file @
95923fba
...
...
@@ -55,7 +55,7 @@ define(['require',
},
initialize
:
function
(
options
)
{
var
self
=
this
;
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
,
'renderAuditTableLayoutView'
));
this
.
swapItem
=
false
,
this
.
saveLabels
=
false
;
this
.
readOnlyEntity
=
this
.
customFilter
===
undefined
?
Enums
.
entityStateReadOnly
[
this
.
entity
.
status
]
:
this
.
customFilter
;
this
.
entityModel
=
new
VEntity
(
this
.
entity
);
...
...
@@ -164,6 +164,9 @@ define(['require',
that
.
swapItem
=
false
;
that
.
saveLabels
=
false
;
that
.
render
();
if
(
that
.
renderAuditTableLayoutView
)
{
that
.
renderAuditTableLayoutView
();
}
},
error
:
function
(
e
)
{
that
.
ui
.
saveLabels
.
attr
(
"disabled"
,
false
);
...
...
dashboardv3/public/js/views/entity/EntityUserDefineView.js
View file @
95923fba
...
...
@@ -53,7 +53,7 @@ define(['require',
return
events
;
},
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'customFilter'
,
'renderAuditTableLayoutView'
));
this
.
userDefineAttr
=
this
.
entity
&&
this
.
entity
.
customAttributes
||
[];
this
.
initialCall
=
false
;
this
.
swapItem
=
false
,
this
.
saveAttrItems
=
false
;
...
...
@@ -136,6 +136,9 @@ define(['require',
that
.
swapItem
=
false
;
that
.
saveAttrItems
=
false
;
that
.
render
();
if
(
that
.
renderAuditTableLayoutView
)
{
that
.
renderAuditTableLayoutView
();
}
},
error
:
function
(
e
)
{
that
.
initialCall
=
false
;
...
...
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