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
dd744765
Commit
dd744765
authored
Feb 03, 2017
by
kevalbhatt
Committed by
Madhan Neethiraj
Feb 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1521 : Update UI to eliminate REST calls to obtain schema data
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
808eb1d1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
187 additions
and
172 deletions
+187
-172
VEntityList.js
dashboardv2/public/js/collection/VEntityList.js
+25
-14
main.js
dashboardv2/public/js/main.js
+25
-3
Modal.js
dashboardv2/public/js/modules/Modal.js
+2
-1
Router.js
dashboardv2/public/js/router/Router.js
+12
-19
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+30
-9
AuditTableLayoutView.js
dashboardv2/public/js/views/audit/AuditTableLayoutView.js
+3
-15
CreateAuditTableLayoutView.js
...ardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+17
-17
BusinessCatalogDetailLayoutView.js
...views/business_catalog/BusinessCatalogDetailLayoutView.js
+1
-1
BusinessCatalogHeader.js
...public/js/views/business_catalog/BusinessCatalogHeader.js
+1
-1
SideNavLayoutView.js
...dv2/public/js/views/business_catalog/SideNavLayoutView.js
+1
-5
TreeLayoutView.js
...oardv2/public/js/views/business_catalog/TreeLayoutView.js
+1
-1
aboutAtlas.js
dashboardv2/public/js/views/common/aboutAtlas.js
+1
-1
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+41
-63
EntityDetailTableLayoutView.js
...dv2/public/js/views/entity/EntityDetailTableLayoutView.js
+9
-8
LineageLayoutView.js
dashboardv2/public/js/views/graph/LineageLayoutView.js
+1
-1
SchemaLayoutView.js
dashboardv2/public/js/views/schema/SchemaLayoutView.js
+0
-0
SearchLayoutView.js
dashboardv2/public/js/views/search/SearchLayoutView.js
+1
-1
TagAttributeDetailLayoutView.js
...ardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
+1
-1
TagDetailLayoutView.js
dashboardv2/public/js/views/tag/TagDetailLayoutView.js
+1
-1
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+2
-4
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+10
-4
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+2
-2
No files found.
dashboardv2/public/js/collection/VEntityList.js
View file @
dd744765
...
...
@@ -39,22 +39,33 @@ define(['require',
// if (!this.modelAttrName) {
// throw new Error("this.modelAttrName not defined for " + this);
// }
if
(
this
.
modelAttrName
&&
this
.
modelAttrName
===
"createEntity"
)
{
var
arr
=
[];
arr
.
push
({
attributes
:
resp
.
attributes
,
classifications
:
resp
.
classifications
,
guid
:
resp
.
guid
,
typeName
:
resp
.
typeName
});
return
arr
;
}
else
{
if
(
resp
[
this
.
modelAttrName
])
{
return
resp
[
this
.
modelAttrName
];
}
else
{
return
resp
if
(
resp
.
entity
&&
resp
.
referredEntities
)
{
var
obj
=
{
entity
:
resp
.
entity
,
referredEntities
:
resp
.
referredEntities
}
return
obj
;
}
else
if
(
resp
[
this
.
modelAttrName
])
{
return
resp
[
this
.
modelAttrName
];
}
else
{
return
resp
}
// if (this.modelAttrName && this.modelAttrName === "createEntity") {
// var arr = [];
// arr.push({
// attributes: resp.attributes,
// classifications: resp.classifications,
// guid: resp.guid,
// typeName: resp.typeName
// });
// return arr;
// } else {
// if (resp[this.modelAttrName]) {
// return resp[this.modelAttrName];
// } else {
// return resp
// }
// }
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
dashboardv2/public/js/main.js
View file @
dd744765
...
...
@@ -160,12 +160,27 @@ require(['App',
'utils/CommonViewFunction'
,
'utils/Globals'
,
'utils/UrlLinks'
,
'collection/VEntityList'
,
'utils/Overrides'
,
'bootstrap'
,
'd3'
,
'select2'
],
function
(
App
,
Router
,
CommonViewFunction
,
Globals
,
UrlLinks
)
{
App
.
appRouter
=
new
Router
();
],
function
(
App
,
Router
,
CommonViewFunction
,
Globals
,
UrlLinks
,
VEntityList
)
{
var
that
=
this
;
this
.
asyncFetchCounter
=
2
;
this
.
entityDefCollection
=
new
VEntityList
();
that
.
entityDefCollection
.
url
=
UrlLinks
.
entitiesDefApiUrl
()
that
.
entityDefCollection
.
modelAttrName
=
'list'
;
App
.
appRouter
=
new
Router
({
entityDefCollection
:
this
.
entityDefCollection
});
var
startApp
=
function
()
{
if
(
that
.
asyncFetchCounter
===
0
)
{
App
.
start
();
}
};
CommonViewFunction
.
userDataFetch
({
url
:
UrlLinks
.
sessionApiUrl
(),
callback
:
function
(
response
)
{
...
...
@@ -192,7 +207,14 @@ require(['App',
}
}
}
App
.
start
();
--
that
.
asyncFetchCounter
;
startApp
();
}
});
that
.
entityDefCollection
.
fetch
({
complete
:
function
()
{
--
that
.
asyncFetchCounter
;
startApp
();
}
});
});
dashboardv2/public/js/modules/Modal.js
View file @
dd744765
...
...
@@ -82,6 +82,7 @@ define(function(require) {
okCloses
:
true
,
cancelText
:
'Cancel'
,
allowCancel
:
false
,
allowBackdrop
:
true
,
showFooter
:
true
,
escape
:
true
,
animate
:
true
,
...
...
@@ -145,7 +146,7 @@ define(function(require) {
//Create it
$el
.
modal
(
_
.
extend
({
keyboard
:
this
.
options
.
allowCancel
,
backdrop
:
this
.
options
.
allow
Cancel
?
true
:
'static'
backdrop
:
this
.
options
.
allow
Backdrop
?
'static'
:
true
},
this
.
options
.
modalOptions
));
//Focus OK button
...
...
dashboardv2/public/js/router/Router.js
View file @
dd744765
...
...
@@ -41,13 +41,11 @@ define([
// Default
'*actions'
:
'defaultAction'
},
initialize
:
function
()
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entityDefCollection'
));
this
.
showRegions
();
this
.
bindCommonEvents
();
this
.
listenTo
(
this
,
'route'
,
this
.
postRouteExecute
,
this
);
this
.
globalVent
=
new
Backbone
.
Wreqr
.
EventAggregator
();
this
.
catalogVent
=
new
Backbone
.
Wreqr
.
EventAggregator
();
this
.
tagVent
=
new
Backbone
.
Wreqr
.
EventAggregator
();
this
.
tagCollection
=
new
VTagList
();
},
bindCommonEvents
:
function
()
{
...
...
@@ -111,15 +109,14 @@ define([
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
this
.
collection
=
new
VCatalogList
();
this
.
collection
.
url
=
url
;
App
.
rNHeader
.
show
(
new
BusinessCatalogHeader
({
'
globalVent'
:
that
.
globalVent
,
'
url'
:
url
,
'collection'
:
this
.
collection
}));
App
.
rNHeader
.
show
(
new
BusinessCatalogHeader
({
'url'
:
url
,
'collection'
:
this
.
collection
}));
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'
globalVent'
:
that
.
globalVent
,
'
url'
:
url
,
'collection'
:
that
.
tagCollection
}));
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'url'
:
url
,
'collection'
:
that
.
tagCollection
}));
}
else
{
App
.
rSideNav
.
currentView
.
RBusinessCatalogLayoutView
.
currentView
.
manualRender
(
"/"
+
url
);
App
.
rSideNav
.
currentView
.
selectTab
();
}
App
.
rNContent
.
show
(
new
BusinessCatalogDetailLayoutView
({
'globalVent'
:
that
.
globalVent
,
'url'
:
url
,
'collection'
:
this
.
collection
}));
...
...
@@ -139,16 +136,16 @@ define([
'collection/VEntityList'
],
function
(
Header
,
DetailPageLayoutView
,
SideNavLayoutView
,
VEntityList
)
{
this
.
entityCollection
=
new
VEntityList
([],
{});
App
.
rNHeader
.
show
(
new
Header
(
{
'globalVent'
:
that
.
globalVent
}
));
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'
globalVent'
:
that
.
globalVent
,
'
collection'
:
that
.
tagCollection
}));
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'collection'
:
that
.
tagCollection
}));
}
else
{
App
.
rSideNav
.
currentView
.
selectTab
();
}
App
.
rNContent
.
show
(
new
DetailPageLayoutView
({
'globalVent'
:
that
.
globalVent
,
'collection'
:
this
.
entityCollection
,
'id'
:
id
,
'entityDefCollection'
:
that
.
entityDefCollection
,
}));
this
.
entityCollection
.
url
=
UrlLinks
.
entitiesApiUrl
(
id
);
this
.
entityCollection
.
fetch
({
reset
:
true
});
...
...
@@ -163,10 +160,9 @@ define([
'views/business_catalog/SideNavLayoutView'
,
'views/tag/TagDetailLayoutView'
,
],
function
(
Header
,
BusinessCatalogLayoutView
,
SideNavLayoutView
,
TagDetailLayoutView
)
{
App
.
rNHeader
.
show
(
new
Header
(
{
'globalVent'
:
that
.
globalVent
,
'vent'
:
that
.
catalogVent
}
));
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'globalVent'
:
that
.
globalVent
,
'tag'
:
tagName
,
'collection'
:
that
.
tagCollection
}));
...
...
@@ -177,7 +173,6 @@ define([
if
(
tagName
)
{
App
.
rNContent
.
show
(
new
TagDetailLayoutView
({
'globalVent'
:
that
.
globalVent
,
'tag'
:
tagName
,
'collection'
:
that
.
tagCollection
}));
...
...
@@ -193,10 +188,9 @@ define([
'views/search/SearchDetailLayoutView'
,
],
function
(
Header
,
BusinessCatalogLayoutView
,
SideNavLayoutView
,
SearchDetailLayoutView
)
{
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
App
.
rNHeader
.
show
(
new
Header
(
{
'globalVent'
:
that
.
globalVent
}
));
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'globalVent'
:
that
.
globalVent
,
'collection'
:
that
.
tagCollection
}));
}
else
{
...
...
@@ -209,8 +203,8 @@ define([
}
if
(
Globals
.
entityCreate
&&
Utils
.
getUrlState
.
isSearchTab
())
{
App
.
rNContent
.
show
(
new
SearchDetailLayoutView
({
'globalVent'
:
that
.
globalVent
,
'value'
:
paramObj
,
'entityDefCollection'
:
that
.
entityDefCollection
,
'initialView'
:
true
}))
}
else
{
...
...
@@ -228,10 +222,9 @@ define([
'views/search/SearchDetailLayoutView'
],
function
(
Header
,
BusinessCatalogLayoutView
,
SideNavLayoutView
,
SearchDetailLayoutView
)
{
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
App
.
rNHeader
.
show
(
new
Header
(
{
'globalVent'
:
that
.
globalVent
,
'vent'
:
that
.
catalogVent
}
));
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'globalVent'
:
that
.
globalVent
,
'value'
:
paramObj
,
'collection'
:
that
.
tagCollection
}));
...
...
@@ -240,8 +233,8 @@ define([
}
App
.
rSideNav
.
currentView
.
selectTab
();
App
.
rNContent
.
show
(
new
SearchDetailLayoutView
({
'globalVent'
:
that
.
globalVent
,
'value'
:
paramObj
,
'entityDefCollection'
:
that
.
entityDefCollection
,
'initialView'
:
paramObj
.
query
.
trim
().
length
===
0
}));
});
...
...
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
dd744765
...
...
@@ -36,6 +36,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
require
([
'models/VTag'
],
function
(
VTag
)
{
var
tagModel
=
new
VTag
();
if
(
options
&&
options
.
guid
&&
options
.
tagName
)
{
if
(
options
.
showLoader
)
{
options
.
showLoader
();
}
tagModel
.
deleteTag
(
options
.
guid
,
options
.
tagName
,
{
skipDefaultError
:
true
,
success
:
function
(
data
)
{
...
...
@@ -61,6 +64,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
response
&&
response
.
responseJSON
)
{
message
=
response
.
responseJSON
.
errorMessage
;
}
if
(
options
.
hideLoader
)
{
options
.
hideLoader
();
}
Utils
.
notifyError
({
content
:
message
});
...
...
@@ -69,6 +75,19 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
});
};
CommonViewFunction
.
findAndmergeRefEntity
=
function
(
attributeObject
,
referredEntities
)
{
_
.
each
(
attributeObject
,
function
(
obj
,
key
)
{
if
(
_
.
isObject
(
obj
))
{
if
(
_
.
isArray
(
obj
))
{
_
.
each
(
obj
,
function
(
value
)
{
_
.
extend
(
value
,
referredEntities
[
value
.
guid
]);
});
}
else
{
_
.
extend
(
obj
,
referredEntities
[
obj
.
guid
]);
}
}
});
}
CommonViewFunction
.
propertyTable
=
function
(
valueObject
,
scope
,
searchTable
)
{
var
table
=
""
,
fetchInputOutputValue
=
function
(
id
)
{
...
...
@@ -77,9 +96,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
++
scope
.
fetchList
}
scope
.
entityModel
.
getEntity
(
id
,
{
success
:
function
(
d
ata
)
{
success
:
function
(
serverD
ata
)
{
var
value
=
""
,
deleteButton
=
""
;
deleteButton
=
""
,
data
=
serverData
.
entity
;
if
(
data
&&
data
.
attributes
)
{
if
(
data
.
attributes
.
name
)
{
value
=
data
.
attributes
.
name
;
...
...
@@ -118,18 +138,19 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
key
=
_
.
escape
(
key
)
var
keyValue
=
valueObject
[
key
],
valueOfArray
=
[];
if
(
_
.
is
Array
(
keyValue
)
||
_
.
is
Object
(
keyValue
))
{
if
(
_
.
isObject
(
keyValue
))
{
if
(
!
_
.
isArray
(
keyValue
)
&&
_
.
isObject
(
keyValue
))
{
keyValue
=
[
keyValue
];
}
var
subLink
=
""
;
for
(
var
i
=
0
;
i
<
keyValue
.
length
;
i
++
)
{
var
inputOutputField
=
keyValue
[
i
],
id
=
inputOutputField
.
guid
||
inputOutputField
.
id
,
id
=
inputOutputField
.
guid
||
(
_
.
isObject
(
inputOutputField
.
id
)
?
inputOutputField
.
id
.
id
:
inputOutputField
.
id
)
,
tempLink
=
""
,
readOnly
=
false
;
if
(
Enums
.
entityStateReadOnly
[
inputOutputField
.
status
])
{
readOnly
=
inputOutputField
.
status
status
=
inputOutputField
.
status
||
(
_
.
isObject
(
inputOutputField
.
id
)
?
inputOutputField
.
id
.
state
:
inputOutputField
.
state
),
readOnly
=
Enums
.
entityStateReadOnly
[
status
];
if
(
!
inputOutputField
.
attributes
&&
inputOutputField
.
values
)
{
inputOutputField
[
'attributes'
]
=
inputOutputField
.
values
;
}
if
(
_
.
isString
(
inputOutputField
)
||
_
.
isBoolean
(
inputOutputField
)
||
_
.
isNumber
(
inputOutputField
))
{
if
(
inputOutputField
.
indexOf
(
"$"
)
==
-
1
)
{
...
...
@@ -289,7 +310,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
!
obj
)
{
return
""
;
}
var
traits
=
obj
.
classificationNames
,
var
traits
=
obj
.
classificationNames
||
_
.
pluck
(
obj
.
classifications
,
'typeName'
)
,
url
=
""
,
deleteHtml
=
""
,
html
=
""
,
...
...
@@ -332,7 +353,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
CommonViewFunction
.
tagForTable
=
function
(
obj
)
{
var
traits
=
obj
.
classificationNames
,
var
traits
=
obj
.
classificationNames
||
_
.
pluck
(
obj
.
classifications
,
'typeName'
)
,
atags
=
""
,
addTag
=
""
,
popTag
=
""
,
...
...
dashboardv2/public/js/views/audit/AuditTableLayoutView.js
View file @
dd744765
...
...
@@ -57,7 +57,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'g
lobalVent'
,
'guid'
,
'vent'
,
'entityObject
'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'g
uid'
,
'entity
'
));
this
.
entityCollection
=
new
VEntityList
();
this
.
count
=
26
;
this
.
entityCollection
.
url
=
UrlLinks
.
entityCollectionaudit
(
this
.
guid
);
...
...
@@ -78,7 +78,6 @@ define(['require',
paginatorOpts
:
{}
};
this
.
currPage
=
1
;
this
.
bindEvents
();
},
onRender
:
function
()
{
$
.
extend
(
this
.
entityCollection
.
queryParams
,
{
count
:
this
.
count
});
...
...
@@ -89,17 +88,7 @@ define(['require',
});
this
.
renderTableLayoutView
();
},
bindEvents
:
function
()
{
var
that
=
this
;
this
.
listenTo
(
this
.
vent
,
"reset:collection"
,
function
()
{
this
.
fetchCollection
({
next
:
this
.
ui
.
nextAuditData
,
nextClick
:
false
,
previous
:
this
.
ui
.
previousAuditData
});
},
this
);
},
bindEvents
:
function
()
{},
getToOffset
:
function
()
{
var
toOffset
=
0
;
if
(
this
.
entityCollection
.
models
.
length
<
this
.
count
)
{
...
...
@@ -169,7 +158,6 @@ define(['require',
require
([
'utils/TableLayout'
],
function
(
TableLayout
)
{
var
cols
=
new
Backgrid
.
Columns
(
that
.
getAuditTableColumns
());
that
.
RAuditTableLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
globalVent
:
that
.
globalVent
,
columns
:
cols
})));
if
(
!
(
that
.
entityCollection
.
models
.
length
<
that
.
count
))
{
...
...
@@ -236,7 +224,7 @@ define(['require',
that
.
action
=
$
(
e
.
target
).
data
(
"action"
);
var
eventModel
=
that
.
entityCollection
.
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
Object
:
that
.
entityObject
});
view
=
new
CreateAuditTableLayoutView
({
guid
:
that
.
guid
,
entityModel
:
collectionModel
,
action
:
that
.
action
,
entity
:
that
.
entity
});
var
modal
=
new
Modal
({
title
:
that
.
action
,
content
:
view
,
...
...
dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
View file @
dd744765
...
...
@@ -54,7 +54,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'g
lobalVent'
,
'guid'
,
'entityModel'
,
'action'
,
'entityObject
'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'g
uid'
,
'entityModel'
,
'action'
,
'entity
'
));
},
bindEvents
:
function
()
{},
onRender
:
function
()
{
...
...
@@ -63,24 +63,27 @@ define(['require',
auditTableGenerate
:
function
()
{
var
that
=
this
,
table
=
""
;
if
(
this
.
entityModel
.
get
(
'details'
).
search
(
'{'
)
>=
0
)
{
var
appendedString
=
"{"
+
this
.
entityModel
.
get
(
'details'
)
+
"}"
;
var
detailObj
=
this
.
entityModel
.
get
(
'details'
);
if
(
detailObj
&&
detailObj
.
search
(
':'
)
>=
0
)
{
var
parseDetailsObject
=
detailObj
;
var
appendedString
=
"{"
+
detailObj
+
"}"
;
var
auditData
=
appendedString
.
split
(
'"'
)[
0
].
split
(
':'
)[
0
].
split
(
"{"
)[
1
];
try
{
var
detailsObject
=
JSON
.
parse
(
appendedString
.
replace
(
"{"
+
auditData
+
":"
,
'{"'
+
auditData
+
'":'
))[
auditData
];
parseDetailsObject
=
JSON
.
parse
(
appendedString
.
replace
(
"{"
+
auditData
+
":"
,
'{"'
+
auditData
+
'":'
))[
auditData
];
var
name
=
_
.
escape
(
parseDetailsObject
.
typeName
);
}
catch
(
err
)
{
Utils
.
serverErrorHandler
();
}
//Append string for JSON parse
if
(
detailsObject
)
{
var
valueObject
=
detailsObject
.
values
;
if
(
parseDetailsObject
.
search
(
':'
)
>=
0
)
{
var
name
=
parseDetailsObject
.
split
(
":"
)[
1
];
}
}
if
((
this
.
action
==
Enums
.
auditAction
.
TAG_ADD
||
Enums
.
auditAction
.
ENTITY_CREATE
)
&&
detailsObject
)
{
this
.
ui
.
auditHeaderValue
.
html
(
'<th>'
+
(
this
.
action
===
Enums
.
auditAction
.
ENTITY_CREATE
?
Enums
.
auditAction
.
ENTITY_CREATE
:
Enums
.
auditAction
.
TAG_ADD
)
+
'</th>'
);
this
.
ui
.
auditValue
.
html
(
"<tr><td>"
+
_
.
escape
(
detailsObject
.
typeName
)
+
"</td></tr>"
);
}
else
{
var
values
=
parseDetailsObject
.
values
;
if
(
this
.
action
&&
(
Enums
.
auditAction
.
ENTITY_CREATE
!==
this
.
action
&&
Enums
.
auditAction
.
ENTITY_UPDATE
!==
this
.
action
)
&&
name
)
{
this
.
ui
.
auditHeaderValue
.
html
(
'<th>'
+
this
.
action
+
'</th>'
);
this
.
ui
.
auditValue
.
html
(
"<tr><td>"
+
name
+
"</td></tr>"
);
}
else
if
(
parseDetailsObject
&&
parseDetailsObject
.
values
)
{
this
.
ui
.
auditHeaderValue
.
html
(
'<th>Key</th><th>New Value</th>'
);
table
=
CommonViewFunction
.
propertyTable
(
valueObject
,
this
);
//CommonViewFunction.findAndmergeRefEntity(attributeObject, that.referredEntities);
table
=
CommonViewFunction
.
propertyTable
(
values
,
this
);
if
(
table
.
length
)
{
this
.
ui
.
noData
.
hide
();
this
.
ui
.
tableAudit
.
show
();
...
...
@@ -90,9 +93,6 @@ define(['require',
this
.
ui
.
tableAudit
.
hide
();
}
}
}
else
if
(
this
.
action
==
Enums
.
auditAction
.
TAG_DELETE
||
Enums
.
auditAction
.
ENTITY_DELETE
)
{
this
.
ui
.
auditHeaderValue
.
html
(
'<th>'
+
Enums
.
auditAction
.
TAG_DELETE
||
Enums
.
auditAction
.
ENTITY_DELETE
+
'</th>'
);
this
.
ui
.
auditValue
.
html
(
"<tr><td>"
+
(
this
.
entityObject
.
name
||
this
.
entityObject
.
qualifiedName
)
+
"</td></tr>"
);
}
},
...
...
dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js
View file @
dd744765
...
...
@@ -55,7 +55,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'
url'
,
'collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'url'
,
'collection'
));
this
.
bindEvents
();
},
bindEvents
:
function
()
{
...
...
dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js
View file @
dd744765
...
...
@@ -29,7 +29,7 @@ define(['require',
regions
:
{},
events
:
{},
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'
url'
,
'collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'url'
,
'collection'
));
this
.
value
=
[];
},
/**
...
...
dashboardv2/public/js/views/business_catalog/SideNavLayoutView.js
View file @
dd744765
...
...
@@ -66,7 +66,7 @@ define(['require',
return
events
;
},
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'url'
,
'value'
,
'tag'
,
'selectFirst'
,
'collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'
url'
,
'value'
,
'tag'
,
'selectFirst'
,
'collection'
));
if
(
Globals
.
taxonomy
)
{
this
.
tabClass
=
"tab col-sm-4"
;
}
else
{
...
...
@@ -88,7 +88,6 @@ define(['require',
var
that
=
this
;
require
([
'views/business_catalog/BusinessCatalogLayoutView'
],
function
(
BusinessCatalogLayoutView
)
{
that
.
RBusinessCatalogLayoutView
.
show
(
new
BusinessCatalogLayoutView
({
globalVent
:
that
.
globalVent
,
url
:
that
.
url
}));
});
...
...
@@ -97,7 +96,6 @@ define(['require',
var
that
=
this
;
require
([
'views/tag/TagLayoutView'
],
function
(
TagLayoutView
)
{
that
.
RTagLayoutView
.
show
(
new
TagLayoutView
({
globalVent
:
that
.
globalVent
,
collection
:
that
.
collection
,
tag
:
that
.
tag
}));
...
...
@@ -107,8 +105,6 @@ define(['require',
var
that
=
this
;
require
([
'views/search/SearchLayoutView'
],
function
(
SearchLayoutView
)
{
that
.
RSearchLayoutView
.
show
(
new
SearchLayoutView
({
globalVent
:
that
.
globalVent
,
vent
:
that
.
vent
,
value
:
that
.
value
}));
});
...
...
dashboardv2/public/js/views/business_catalog/TreeLayoutView.js
View file @
dd744765
...
...
@@ -92,7 +92,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'
url'
,
'viewBased'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'url'
,
'viewBased'
));
this
.
parentCollection
=
new
VCatalogList
();
this
.
childCollection
=
new
VCatalogList
();
this
.
taxanomy
=
new
VCatalogList
();
...
...
dashboardv2/public/js/views/common/aboutAtlas.js
View file @
dd744765
...
...
@@ -41,7 +41,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
)
);
_
.
extend
(
this
,
options
);
},
bindEvents
:
function
()
{
...
...
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
dd744765
...
...
@@ -102,14 +102,14 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'collection'
,
'vent'
,
'id
'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'
collection'
,
'id'
,
'entityDefCollection
'
));
this
.
bindEvents
();
this
.
auditVent
=
new
Backbone
.
Wreqr
.
EventAggregator
();
},
bindEvents
:
function
()
{
var
that
=
this
;
this
.
listenTo
(
this
.
collection
,
'reset'
,
function
()
{
var
collectionJSON
=
this
.
collection
.
first
().
toJSON
();
var
entityObject
=
this
.
collection
.
first
().
toJSON
();
var
collectionJSON
=
entityObject
.
entity
;
if
(
collectionJSON
&&
collectionJSON
.
guid
)
{
var
tagGuid
=
collectionJSON
.
guid
;
this
.
readOnly
=
Enums
.
entityStateReadOnly
[
collectionJSON
.
status
];
...
...
@@ -123,24 +123,13 @@ define(['require',
}
if
(
collectionJSON
)
{
if
(
collectionJSON
.
attributes
)
{
if
(
collectionJSON
.
attributes
.
name
)
{
this
.
name
=
collectionJSON
.
attributes
.
name
}
if
(
!
this
.
name
&&
collectionJSON
.
attributes
.
qualifiedName
)
{
this
.
name
=
collectionJSON
.
attributes
.
qualifiedName
;
}
if
(
!
this
.
name
&&
collectionJSON
.
displayText
)
{
this
.
name
=
collectionJSON
.
displayText
;
}
this
.
name
=
(
_
.
escape
(
collectionJSON
.
attributes
&&
collectionJSON
.
attributes
.
name
?
collectionJSON
.
attributes
.
name
:
null
)
||
_
.
escape
(
collectionJSON
.
displayText
)
||
collectionJSON
.
guid
);
if
(
this
.
name
&&
collectionJSON
.
typeName
)
{
this
.
name
=
this
.
name
+
' ('
+
collectionJSON
.
typeName
+
')'
;
}
if
(
!
this
.
name
&&
collectionJSON
.
typeName
)
{
this
.
name
=
collectionJSON
.
typeName
;
}
if
(
!
this
.
name
&&
this
.
id
)
{
this
.
name
=
this
.
id
;
}
this
.
description
=
collectionJSON
.
attributes
.
description
;
if
(
this
.
name
)
{
this
.
ui
.
title
.
show
();
...
...
@@ -173,12 +162,27 @@ define(['require',
}
}
this
.
hideLoader
();
this
.
renderEntityDetailTableLayoutView
();
this
.
renderAuditTableLayoutView
(
this
.
id
,
collectionJSON
.
attributes
);
this
.
renderTagTableLayoutView
(
tagGuid
);
this
.
renderTermTableLayoutView
(
tagGuid
);
this
.
renderLineageLayoutView
(
this
.
id
);
this
.
renderSchemaLayoutView
(
this
.
id
);
var
obj
=
{
entity
:
collectionJSON
,
referredEntities
:
entityObject
.
referredEntities
,
guid
:
this
.
id
,
assetName
:
this
.
name
,
entityDefCollection
:
this
.
entityDefCollection
,
fetchCollection
:
this
.
fetchCollection
.
bind
(
that
)
}
this
.
renderEntityDetailTableLayoutView
(
obj
);
this
.
renderAuditTableLayoutView
(
obj
);
this
.
renderTagTableLayoutView
(
obj
);
this
.
renderTermTableLayoutView
(
_
.
extend
({},
obj
,
{
term
:
true
}));
this
.
renderLineageLayoutView
(
obj
);
// To render Schema check attribute "schemaElementsAttribute"
var
schemaOptions
=
this
.
entityDefCollection
.
find
({
name
:
collectionJSON
.
typeName
}).
get
(
'options'
);
if
(
schemaOptions
&&
schemaOptions
.
hasOwnProperty
(
'schemaElementsAttribute'
)
&&
schemaOptions
.
schemaElementsAttribute
!==
""
)
{
this
.
$
(
'.schemaTable'
).
show
();
this
.
renderSchemaLayoutView
(
_
.
extend
({},
obj
,
{
attribute
:
collectionJSON
.
attributes
[
schemaOptions
.
schemaElementsAttribute
]
}));
}
},
this
);
this
.
listenTo
(
this
.
collection
,
'error'
,
function
(
model
,
response
)
{
this
.
$
(
'.fontLoader'
).
hide
();
...
...
@@ -265,7 +269,6 @@ define(['require',
var
that
=
this
;
require
([
'views/tag/addTagModalView'
],
function
(
AddTagModalView
)
{
var
view
=
new
AddTagModalView
({
vent
:
that
.
vent
,
guid
:
that
.
id
,
tagList
:
_
.
map
(
that
.
collection
.
first
().
toJSON
().
classifications
,
function
(
obj
)
{
return
obj
.
typeName
;
...
...
@@ -300,65 +303,40 @@ define(['require',
});
},
renderEntityDetailTableLayoutView
:
function
()
{
renderEntityDetailTableLayoutView
:
function
(
obj
)
{
var
that
=
this
;
require
([
'views/entity/EntityDetailTableLayoutView'
],
function
(
EntityDetailTableLayoutView
)
{
that
.
REntityDetailTableLayoutView
.
show
(
new
EntityDetailTableLayoutView
({
globalVent
:
that
.
globalVent
,
collection
:
that
.
collection
}));
that
.
REntityDetailTableLayoutView
.
show
(
new
EntityDetailTableLayoutView
(
obj
));
});
},
renderTagTableLayoutView
:
function
(
tagGuid
)
{
renderTagTableLayoutView
:
function
(
obj
)
{
var
that
=
this
;
require
([
'views/tag/TagDetailTableLayoutView'
],
function
(
TagDetailTableLayoutView
)
{
that
.
RTagTableLayoutView
.
show
(
new
TagDetailTableLayoutView
({
globalVent
:
that
.
globalVent
,
collection
:
that
.
collection
,
guid
:
tagGuid
,
assetName
:
that
.
name
}));
that
.
RTagTableLayoutView
.
show
(
new
TagDetailTableLayoutView
(
obj
));
});
},
render
LineageLayoutView
:
function
(
tagGuid
)
{
render
TermTableLayoutView
:
function
(
obj
)
{
var
that
=
this
;
require
([
'views/graph/LineageLayoutView'
],
function
(
LineageLayoutView
)
{
that
.
RLineageLayoutView
.
show
(
new
LineageLayoutView
({
globalVent
:
that
.
globalVent
,
guid
:
tagGuid
}));
require
([
'views/tag/TagDetailTableLayoutView'
],
function
(
TagDetailTableLayoutView
)
{
that
.
RTermTableLayoutView
.
show
(
new
TagDetailTableLayoutView
(
obj
));
});
},
render
SchemaLayoutView
:
function
(
tagGuid
)
{
render
LineageLayoutView
:
function
(
obj
)
{
var
that
=
this
;
require
([
'views/schema/SchemaLayoutView'
],
function
(
SchemaLayoutView
)
{
that
.
RSchemaTableLayoutView
.
show
(
new
SchemaLayoutView
({
globalVent
:
that
.
globalVent
,
guid
:
tagGuid
}));
require
([
'views/graph/LineageLayoutView'
],
function
(
LineageLayoutView
)
{
that
.
RLineageLayoutView
.
show
(
new
LineageLayoutView
(
obj
));
});
},
render
AuditTableLayoutView
:
function
(
tagGuid
,
entityObject
)
{
render
SchemaLayoutView
:
function
(
obj
)
{
var
that
=
this
;
require
([
'views/audit/AuditTableLayoutView'
],
function
(
AuditTableLayoutView
)
{
that
.
RAuditTableLayoutView
.
show
(
new
AuditTableLayoutView
({
globalVent
:
that
.
globalVent
,
guid
:
tagGuid
,
vent
:
that
.
auditVent
,
entityObject
:
entityObject
}));
require
([
'views/schema/SchemaLayoutView'
],
function
(
SchemaLayoutView
)
{
that
.
RSchemaTableLayoutView
.
show
(
new
SchemaLayoutView
(
obj
));
});
},
render
TermTableLayoutView
:
function
(
tagGuid
)
{
render
AuditTableLayoutView
:
function
(
obj
)
{
var
that
=
this
;
require
([
'views/tag/TagDetailTableLayoutView'
],
function
(
TagDetailTableLayoutView
)
{
that
.
RTermTableLayoutView
.
show
(
new
TagDetailTableLayoutView
({
globalVent
:
that
.
globalVent
,
collection
:
that
.
collection
,
guid
:
tagGuid
,
assetName
:
that
.
name
,
term
:
true
}));
require
([
'views/audit/AuditTableLayoutView'
],
function
(
AuditTableLayoutView
)
{
that
.
RAuditTableLayoutView
.
show
(
new
AuditTableLayoutView
(
obj
));
});
},
onClickEditEntity
:
function
(
e
)
{
...
...
dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
View file @
dd744765
...
...
@@ -19,8 +19,9 @@
define
([
'require'
,
'backbone'
,
'hbs!tmpl/entity/EntityDetailTableLayoutView_tmpl'
,
'utils/CommonViewFunction'
],
function
(
require
,
Backbone
,
EntityDetailTableLayoutView_tmpl
,
CommonViewFunction
)
{
'utils/CommonViewFunction'
,
'models/VEntity'
,
],
function
(
require
,
Backbone
,
EntityDetailTableLayoutView_tmpl
,
CommonViewFunction
,
VEntity
)
{
'use strict'
;
var
EntityDetailTableLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -47,9 +48,8 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'collection'
));
this
.
collectionObject
=
this
.
collection
.
toJSON
();
this
.
entityModel
=
new
this
.
collection
.
model
();
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'referredEntities'
));
this
.
entityModel
=
new
VEntity
({});
},
bindEvents
:
function
()
{},
onRender
:
function
()
{
...
...
@@ -57,13 +57,14 @@ define(['require',
},
entityTableGenerate
:
function
()
{
var
that
=
this
,
attributeObject
=
this
.
collection
.
first
().
toJSON
().
attributes
;
if
(
attributeObject
)
{
attributeObject
=
this
.
entity
.
attributes
;
CommonViewFunction
.
findAndmergeRefEntity
(
attributeObject
,
that
.
referredEntities
);
if
(
attributeObject
&&
attributeObject
.
columns
)
{
var
valueSorted
=
_
.
sortBy
(
attributeObject
.
columns
,
function
(
val
)
{
return
val
.
attributes
.
position
});
attributeObject
.
columns
=
valueSorted
;
}
attributeObject
.
columns
=
valueSorted
;
var
table
=
CommonViewFunction
.
propertyTable
(
attributeObject
,
this
);
that
.
ui
.
detailValue
.
append
(
table
);
}
...
...
dashboardv2/public/js/views/graph/LineageLayoutView.js
View file @
dd744765
...
...
@@ -56,7 +56,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'g
lobalVent'
,
'g
uid'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'guid'
));
this
.
entityModel
=
new
VEntity
();
this
.
collection
=
new
VLineageList
();
this
.
typeMap
=
{};
...
...
dashboardv2/public/js/views/schema/SchemaLayoutView.js
View file @
dd744765
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchLayoutView.js
View file @
dd744765
...
...
@@ -72,7 +72,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'
value'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
));
this
.
typecollection
=
new
VTagList
([],
{});
this
.
typecollection
.
url
=
UrlLinks
.
typesApiUrl
();
this
.
type
=
"fulltext"
;
...
...
dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js
View file @
dd744765
...
...
@@ -59,7 +59,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'
tag'
,
'collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'tag'
,
'collection'
));
},
bindEvents
:
function
()
{
this
.
listenTo
(
this
.
collection
,
'reset'
,
function
()
{
...
...
dashboardv2/public/js/views/tag/TagDetailLayoutView.js
View file @
dd744765
...
...
@@ -44,7 +44,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'
tag'
,
'collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'tag'
,
'collection'
));
},
bindEvents
:
function
()
{},
onRender
:
function
()
{
...
...
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
dd744765
...
...
@@ -60,8 +60,8 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'collection
'
,
'guid'
,
'term'
,
'assetName'
));
this
.
collectionObject
=
this
.
collection
.
first
().
toJSON
()
;
_
.
extend
(
this
,
_
.
pick
(
options
,
'
entity
'
,
'guid'
,
'term'
,
'assetName'
));
this
.
collectionObject
=
this
.
entity
;
this
.
tagTermCollection
=
new
VTagList
();
var
tagorterm
=
_
.
toArray
(
this
.
collectionObject
.
classifications
),
tagTermList
=
[],
...
...
@@ -102,7 +102,6 @@ define(['require',
require
([
'utils/TableLayout'
],
function
(
TableLayout
)
{
var
cols
=
new
Backgrid
.
Columns
(
that
.
getSchemaTableColumns
());
that
.
RTagTermTableLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
globalVent
:
that
.
globalVent
,
columns
:
cols
})));
});
...
...
@@ -164,7 +163,6 @@ define(['require',
var
that
=
this
;
require
([
'views/tag/addTagModalView'
],
function
(
AddTagModalView
)
{
var
view
=
new
AddTagModalView
({
vent
:
that
.
vent
,
guid
:
that
.
guid
,
modalCollection
:
that
.
collection
});
...
...
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
dd744765
...
...
@@ -58,7 +58,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'
globalVent'
,
'
tag'
,
'collection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'tag'
,
'collection'
));
},
bindEvents
:
function
()
{
var
that
=
this
;
...
...
@@ -143,7 +143,10 @@ define(['require',
return
model
.
get
(
'name'
).
toLowerCase
();
};
that
.
collection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
var
name
=
_
.
escape
(
model
.
get
(
'name'
))
var
name
=
_
.
escape
(
model
.
get
(
'name'
));
if
(
name
.
indexOf
(
"."
)
>
-
1
)
{
return
;
}
if
(
searchString
)
{
if
(
name
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
// data-name="<space>'<tagName>'" Space is required for DSL search Input
...
...
@@ -165,7 +168,7 @@ define(['require',
},
onClickCreateTag
:
function
(
e
)
{
var
that
=
this
;
$
(
e
.
currentTarget
).
blur
(
);
$
(
e
.
currentTarget
).
attr
(
"disabled"
,
"true"
);
require
([
'views/tag/CreateTagLayoutView'
,
'modules/Modal'
...
...
@@ -184,7 +187,7 @@ define(['require',
modal
.
$el
.
find
(
'button.ok'
).
removeAttr
(
"disabled"
);
});
view
.
ui
.
tagName
.
on
(
'keyup'
,
function
(
e
)
{
if
((
e
.
keyCode
==
8
||
e
.
keyCode
==
32
||
e
.
keyCode
==
46
)
&&
e
.
currentTarget
.
value
==
""
)
{
if
((
e
.
keyCode
==
8
||
e
.
keyCode
==
32
||
e
.
keyCode
==
46
)
&&
e
.
currentTarget
.
value
.
trim
()
==
""
)
{
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
"true"
);
}
});
...
...
@@ -196,10 +199,12 @@ define(['require',
});
});
modal
.
on
(
'ok'
,
function
()
{
modal
.
$el
.
find
(
'button.ok'
).
attr
(
"disabled"
,
"true"
);
that
.
onCreateButton
(
view
,
modal
);
});
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
that
.
ui
.
createTag
.
removeAttr
(
"disabled"
);
});
});
},
...
...
@@ -243,6 +248,7 @@ define(['require',
};
new
this
.
collection
.
model
().
set
(
this
.
json
).
save
(
null
,
{
success
:
function
(
model
,
response
)
{
that
.
ui
.
createTag
.
removeAttr
(
"disabled"
);
that
.
createTag
=
true
;
that
.
fetchCollections
();
that
.
collection
.
add
(
model
)
...
...
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
dd744765
...
...
@@ -48,7 +48,7 @@ define(['require',
*/
initialize
:
function
(
options
)
{
var
that
=
this
;
_
.
extend
(
this
,
_
.
pick
(
options
,
'
vent'
,
'
modalCollection'
,
'guid'
,
'callback'
,
'multiple'
,
'showLoader'
,
'hideLoader'
,
'tagList'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'modalCollection'
,
'guid'
,
'callback'
,
'multiple'
,
'showLoader'
,
'hideLoader'
,
'tagList'
));
this
.
collection
=
new
VTagList
();
this
.
commonCollection
=
new
VTagList
();
this
.
asyncAttrFetchCounter
=
0
;
...
...
@@ -81,7 +81,7 @@ define(['require',
if
(
Enums
.
entityStateReadOnly
[
entity
.
model
.
status
])
{
obj
.
deletedEntity
.
push
(
name
);
}
else
{
if
(
_
.
indexOf
(
entity
.
model
.
classificationNames
,
tagName
)
===
-
1
)
{
if
(
_
.
indexOf
(
(
entity
.
model
.
classificationNames
||
_
.
pluck
(
entity
.
model
.
classifications
,
'typeName'
))
,
tagName
)
===
-
1
)
{
obj
.
guid
.
push
(
entity
.
model
.
guid
)
}
else
{
obj
.
skipEntity
.
push
(
name
);
...
...
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