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
fc7d3009
Commit
fc7d3009
authored
8 years ago
by
kevalbhatt
Committed by
Madhan Neethiraj
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1756: UI update to allow user to edit tag attribute values
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
b2bee2cc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
223 additions
and
124 deletions
+223
-124
main.scss
dashboardv2/public/css/scss/main.scss
+43
-0
main.js
dashboardv2/public/js/main.js
+13
-2
VEntity.js
dashboardv2/public/js/models/VEntity.js
+2
-2
Router.js
dashboardv2/public/js/router/Router.js
+56
-34
addTagModalView_tmpl.html
...boardv2/public/js/templates/tag/addTagModalView_tmpl.html
+3
-0
UrlLinks.js
dashboardv2/public/js/utils/UrlLinks.js
+8
-0
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+5
-3
SchemaLayoutView.js
dashboardv2/public/js/views/schema/SchemaLayoutView.js
+7
-7
SearchDetailLayoutView.js
dashboardv2/public/js/views/search/SearchDetailLayoutView.js
+3
-2
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+3
-2
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+25
-3
addTagModalView.js
dashboardv2/public/js/views/tag/addTagModalView.js
+55
-69
No files found.
dashboardv2/public/css/scss/main.scss
View file @
fc7d3009
...
@@ -188,6 +188,9 @@ ul {
...
@@ -188,6 +188,9 @@ ul {
background-color
:
$transparent
;
background-color
:
$transparent
;
border
:
1px
solid
$color_jungle_green_approx
;
border
:
1px
solid
$color_jungle_green_approx
;
cursor
:
pointer
;
cursor
:
pointer
;
&
+
.auditDetailBtn
{
margin-left
:
5px
;
}
}
}
.add-seperator
{
.add-seperator
{
...
@@ -315,6 +318,10 @@ ul {
...
@@ -315,6 +318,10 @@ ul {
&
.editbutton
[
data-id
=
"editButton"
]
{
&
.editbutton
[
data-id
=
"editButton"
]
{
display
:
none
!
important
;
display
:
none
!
important
;
}
}
&
[
data-id
=
"delete"
],
&
[
data-id
=
"edit"
]
{
display
:
none
;
}
}
}
}
}
...
@@ -340,3 +347,39 @@ ul {
...
@@ -340,3 +347,39 @@ ul {
.no-padding
{
.no-padding
{
padding
:
0px
!
important
;
padding
:
0px
!
important
;
}
}
.no-padding-bottom
{
padding-bottom
:
0px
!
important
;
}
.no-padding-top
{
padding-top
:
0px
!
important
;
}
.no-padding-left
{
padding-left
:
0px
!
important
;
}
.no-padding-right
{
padding-right
:
0px
!
important
;
}
.no-margin
{
margin
:
0px
!
important
;
}
.no-margin-bottom
{
margin-bottom
:
0px
!
important
;
}
.no-margin-top
{
margin-top
:
0px
!
important
;
}
.no-margin-left
{
margin-left
:
0px
!
important
;
}
.no-margin-right
{
margin-right
:
0px
!
important
;
}
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/main.js
View file @
fc7d3009
...
@@ -168,15 +168,19 @@ require(['App',
...
@@ -168,15 +168,19 @@ require(['App',
'select2'
'select2'
],
function
(
App
,
Router
,
CommonViewFunction
,
Globals
,
UrlLinks
,
VEntityList
,
VTagList
)
{
],
function
(
App
,
Router
,
CommonViewFunction
,
Globals
,
UrlLinks
,
VEntityList
,
VTagList
)
{
var
that
=
this
;
var
that
=
this
;
this
.
asyncFetchCounter
=
3
;
this
.
asyncFetchCounter
=
4
;
this
.
entityDefCollection
=
new
VEntityList
();
this
.
entityDefCollection
=
new
VEntityList
();
this
.
entityDefCollection
.
url
=
UrlLinks
.
entitiesDefApiUrl
();
this
.
entityDefCollection
.
url
=
UrlLinks
.
entitiesDefApiUrl
();
this
.
typeHeaders
=
new
VTagList
();
this
.
typeHeaders
=
new
VTagList
();
this
.
typeHeaders
.
url
=
UrlLinks
.
typesApiUrl
();
this
.
typeHeaders
.
url
=
UrlLinks
.
typesApiUrl
();
this
.
enumDefCollection
=
new
VTagList
();
this
.
enumDefCollection
.
url
=
UrlLinks
.
enumDefApiUrl
();
this
.
enumDefCollection
.
modelAttrName
=
"enumDefs"
;
App
.
appRouter
=
new
Router
({
App
.
appRouter
=
new
Router
({
entityDefCollection
:
this
.
entityDefCollection
,
entityDefCollection
:
this
.
entityDefCollection
,
typeHeaders
:
this
.
typeHeaders
typeHeaders
:
this
.
typeHeaders
,
enumDefCollection
:
this
.
enumDefCollection
});
});
var
startApp
=
function
()
{
var
startApp
=
function
()
{
...
@@ -228,4 +232,11 @@ require(['App',
...
@@ -228,4 +232,11 @@ require(['App',
startApp
();
startApp
();
}
}
});
});
this
.
enumDefCollection
.
fetch
({
skipDefaultError
:
true
,
complete
:
function
()
{
--
that
.
asyncFetchCounter
;
startApp
();
}
});
});
});
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/models/VEntity.js
View file @
fc7d3009
...
@@ -52,8 +52,8 @@ define(['require',
...
@@ -52,8 +52,8 @@ define(['require',
return
this
.
constructor
.
nonCrudOperation
.
call
(
this
,
url
,
'GET'
,
options
);
return
this
.
constructor
.
nonCrudOperation
.
call
(
this
,
url
,
'GET'
,
options
);
},
},
saveTraitsEntity
:
function
(
options
)
{
saveTraitsEntity
:
function
(
token
,
options
)
{
var
url
=
UrlLinks
.
entitiesTraitsApiUrl
();
var
url
=
UrlLinks
.
entitiesTraitsApiUrl
(
token
);
options
=
_
.
extend
({
options
=
_
.
extend
({
contentType
:
'application/json'
,
contentType
:
'application/json'
,
dataType
:
'json'
dataType
:
'json'
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/router/Router.js
View file @
fc7d3009
...
@@ -42,12 +42,17 @@ define([
...
@@ -42,12 +42,17 @@ define([
'*actions'
:
'defaultAction'
'*actions'
:
'defaultAction'
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entityDefCollection'
,
'typeHeaders'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entityDefCollection'
,
'typeHeaders'
,
'enumDefCollection'
));
this
.
showRegions
();
this
.
showRegions
();
this
.
bindCommonEvents
();
this
.
bindCommonEvents
();
this
.
listenTo
(
this
,
'route'
,
this
.
postRouteExecute
,
this
);
this
.
listenTo
(
this
,
'route'
,
this
.
postRouteExecute
,
this
);
this
.
tagCollection
=
new
VTagList
();
this
.
tagCollection
=
new
VTagList
();
this
.
searchVent
=
new
Backbone
.
Wreqr
.
EventAggregator
();
this
.
searchVent
=
new
Backbone
.
Wreqr
.
EventAggregator
();
this
.
preFetchedCollectionLists
=
{
'entityDefCollection'
:
this
.
entityDefCollection
,
'typeHeaders'
:
this
.
typeHeaders
,
'enumDefCollection'
:
this
.
enumDefCollection
}
},
},
bindCommonEvents
:
function
()
{
bindCommonEvents
:
function
()
{
var
that
=
this
;
var
that
=
this
;
...
@@ -110,17 +115,29 @@ define([
...
@@ -110,17 +115,29 @@ define([
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
this
.
collection
=
new
VCatalogList
();
this
.
collection
=
new
VCatalogList
();
this
.
collection
.
url
=
url
;
this
.
collection
.
url
=
url
;
App
.
rNHeader
.
show
(
new
BusinessCatalogHeader
({
'url'
:
url
,
'collection'
:
this
.
collection
}));
App
.
rNHeader
.
show
(
new
BusinessCatalogHeader
(
_
.
extend
({
'url'
:
url
,
'collection'
:
this
.
collection
},
that
.
preFetchedCollectionLists
)
));
if
(
!
App
.
rSideNav
.
currentView
)
{
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'url'
:
url
,
'collection'
:
that
.
tagCollection
,
'typeHeaders'
:
that
.
typeHeaders
}));
App
.
rSideNav
.
show
(
new
SideNavLayoutView
(
_
.
extend
({
'url'
:
url
,
'collection'
:
that
.
tagCollection
},
that
.
preFetchedCollectionLists
)
));
}
else
{
}
else
{
App
.
rSideNav
.
currentView
.
RBusinessCatalogLayoutView
.
currentView
.
manualRender
(
"/"
+
url
);
App
.
rSideNav
.
currentView
.
RBusinessCatalogLayoutView
.
currentView
.
manualRender
(
"/"
+
url
);
App
.
rSideNav
.
currentView
.
selectTab
();
App
.
rSideNav
.
currentView
.
selectTab
();
}
}
App
.
rNContent
.
show
(
new
BusinessCatalogDetailLayoutView
({
App
.
rNContent
.
show
(
new
BusinessCatalogDetailLayoutView
(
_
.
extend
({
'url'
:
url
,
'url'
:
url
,
'collection'
:
this
.
collection
'collection'
:
this
.
collection
}));
},
that
.
preFetchedCollectionLists
)
));
this
.
collection
.
fetch
({
reset
:
true
});
this
.
collection
.
fetch
({
reset
:
true
});
}
else
{
}
else
{
that
.
defaultAction
()
that
.
defaultAction
()
...
@@ -139,16 +156,18 @@ define([
...
@@ -139,16 +156,18 @@ define([
this
.
entityCollection
=
new
VEntityList
([],
{});
this
.
entityCollection
=
new
VEntityList
([],
{});
App
.
rNHeader
.
show
(
new
Header
());
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
'collection'
:
that
.
tagCollection
,
'typeHeaders'
:
that
.
typeHeaders
}));
App
.
rSideNav
.
show
(
new
SideNavLayoutView
(
_
.
extend
({
'collection'
:
that
.
tagCollection
,
},
that
.
preFetchedCollectionLists
)
));
}
else
{
}
else
{
App
.
rSideNav
.
currentView
.
selectTab
();
App
.
rSideNav
.
currentView
.
selectTab
();
}
}
App
.
rNContent
.
show
(
new
DetailPageLayoutView
({
App
.
rNContent
.
show
(
new
DetailPageLayoutView
(
_
.
extend
(
{
'collection'
:
this
.
entityCollection
,
'collection'
:
this
.
entityCollection
,
'id'
:
id
,
'id'
:
id
,
'entityDefCollection'
:
that
.
entityDefCollection
,
},
that
.
preFetchedCollectionLists
)));
'typeHeaders'
:
that
.
typeHeaders
}));
this
.
entityCollection
.
url
=
UrlLinks
.
entitiesApiUrl
(
id
);
this
.
entityCollection
.
url
=
UrlLinks
.
entitiesApiUrl
(
id
);
this
.
entityCollection
.
fetch
({
reset
:
true
});
this
.
entityCollection
.
fetch
({
reset
:
true
});
});
});
...
@@ -164,23 +183,24 @@ define([
...
@@ -164,23 +183,24 @@ define([
],
function
(
Header
,
BusinessCatalogLayoutView
,
SideNavLayoutView
,
TagDetailLayoutView
)
{
],
function
(
Header
,
BusinessCatalogLayoutView
,
SideNavLayoutView
,
TagDetailLayoutView
)
{
App
.
rNHeader
.
show
(
new
Header
());
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
App
.
rSideNav
.
show
(
new
SideNavLayoutView
(
_
.
extend
({
'tag'
:
tagName
,
'tag'
:
tagName
,
'typeHeaders'
:
that
.
typeHeaders
,
'collection'
:
that
.
tagCollection
'collection'
:
that
.
tagCollection
}));
},
that
.
preFetchedCollectionLists
)
));
}
else
{
}
else
{
App
.
rSideNav
.
currentView
.
RTagLayoutView
.
currentView
.
manualRender
(
tagName
);
App
.
rSideNav
.
currentView
.
RTagLayoutView
.
currentView
.
manualRender
(
tagName
);
App
.
rSideNav
.
currentView
.
selectTab
();
App
.
rSideNav
.
currentView
.
selectTab
();
}
}
if
(
tagName
)
{
if
(
tagName
)
{
App
.
rNContent
.
show
(
new
TagDetailLayoutView
({
App
.
rNContent
.
show
(
new
TagDetailLayoutView
(
_
.
extend
({
'tag'
:
tagName
,
'tag'
:
tagName
,
'entityDefCollection'
:
that
.
entityDefCollection
,
'collection'
:
that
.
tagCollection
,
'collection'
:
that
.
tagCollection
,
'typeHeaders'
:
that
.
typeHeaders
},
that
.
preFetchedCollectionLists
)
}
));
));
}
}
});
});
},
},
...
@@ -195,10 +215,11 @@ define([
...
@@ -195,10 +215,11 @@ define([
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
App
.
rNHeader
.
show
(
new
Header
());
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
App
.
rSideNav
.
show
(
new
SideNavLayoutView
(
'collection'
:
that
.
tagCollection
,
_
.
extend
({
'typeHeaders'
:
that
.
typeHeaders
'collection'
:
that
.
tagCollection
}));
},
that
.
preFetchedCollectionLists
)
));
}
else
{
}
else
{
App
.
rSideNav
.
currentView
.
selectTab
();
App
.
rSideNav
.
currentView
.
selectTab
();
if
(
Utils
.
getUrlState
.
isTagTab
())
{
if
(
Utils
.
getUrlState
.
isTagTab
())
{
...
@@ -208,12 +229,12 @@ define([
...
@@ -208,12 +229,12 @@ define([
}
}
}
}
if
(
Globals
.
entityCreate
&&
Utils
.
getUrlState
.
isSearchTab
())
{
if
(
Globals
.
entityCreate
&&
Utils
.
getUrlState
.
isSearchTab
())
{
App
.
rNContent
.
show
(
new
SearchDetailLayoutView
({
App
.
rNContent
.
show
(
new
SearchDetailLayoutView
(
_
.
extend
({
'value'
:
paramObj
,
'value'
:
paramObj
,
'entityDefCollection'
:
that
.
entityDefCollection
,
'initialView'
:
true
'initialView'
:
true
,
},
that
.
preFetchedCollectionLists
)
'typeHeaders'
:
that
.
typeHeaders
));
}))
}
else
{
}
else
{
App
.
rNContent
.
$el
.
html
(
""
);
App
.
rNContent
.
$el
.
html
(
""
);
App
.
rNContent
.
destroy
();
App
.
rNContent
.
destroy
();
...
@@ -231,23 +252,24 @@ define([
...
@@ -231,23 +252,24 @@ define([
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
App
.
rNHeader
.
show
(
new
Header
());
App
.
rNHeader
.
show
(
new
Header
());
if
(
!
App
.
rSideNav
.
currentView
)
{
if
(
!
App
.
rSideNav
.
currentView
)
{
App
.
rSideNav
.
show
(
new
SideNavLayoutView
({
App
.
rSideNav
.
show
(
new
SideNavLayoutView
(
_
.
extend
({
'value'
:
paramObj
,
'value'
:
paramObj
,
'collection'
:
that
.
tagCollection
,
'collection'
:
that
.
tagCollection
,
'searchVent'
:
that
.
searchVent
,
'searchVent'
:
that
.
searchVent
'typeHeaders'
:
that
.
typeHeaders
},
that
.
preFetchedCollectionLists
)
}
));
));
}
else
{
}
else
{
App
.
rSideNav
.
currentView
.
RSearchLayoutView
.
currentView
.
manualRender
(
paramObj
);
App
.
rSideNav
.
currentView
.
RSearchLayoutView
.
currentView
.
manualRender
(
paramObj
);
}
}
App
.
rSideNav
.
currentView
.
selectTab
();
App
.
rSideNav
.
currentView
.
selectTab
();
App
.
rNContent
.
show
(
new
SearchDetailLayoutView
({
App
.
rNContent
.
show
(
new
SearchDetailLayoutView
(
_
.
extend
({
'value'
:
paramObj
,
'value'
:
paramObj
,
'entityDefCollection'
:
that
.
entityDefCollection
,
'typeHeaders'
:
that
.
typeHeaders
,
'searchVent'
:
that
.
searchVent
,
'searchVent'
:
that
.
searchVent
,
'initialView'
:
(
paramObj
.
type
||
(
paramObj
.
dslChecked
==
"true"
?
""
:
paramObj
.
tag
)
||
(
paramObj
.
query
?
paramObj
.
query
.
trim
()
:
""
)).
length
===
0
'initialView'
:
(
paramObj
.
type
||
(
paramObj
.
dslChecked
==
"true"
?
""
:
paramObj
.
tag
)
||
(
paramObj
.
query
?
paramObj
.
query
.
trim
()
:
""
)).
length
===
0
}));
},
that
.
preFetchedCollectionLists
)
));
});
});
},
},
defaultAction
:
function
(
actions
)
{
defaultAction
:
function
(
actions
)
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/tag/addTagModalView_tmpl.html
View file @
fc7d3009
...
@@ -16,8 +16,11 @@
...
@@ -16,8 +16,11 @@
-->
-->
<div>
<div>
<div
class=
"form-group hide"
>
<div
class=
"form-group hide"
>
{{#if tagModel}}
<h4>
{{tagModel.typeName}}
</h4>
{{else}}
<select
class=
"form-control row-margin-bottom"
data-id=
"addTagOptions"
required
>
<select
class=
"form-control row-margin-bottom"
data-id=
"addTagOptions"
required
>
</select>
</select>
{{/if}}
</div>
</div>
<div
class=
"row modalHeight"
>
<div
class=
"row modalHeight"
>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/UrlLinks.js
View file @
fc7d3009
...
@@ -52,6 +52,14 @@ define(['require', 'utils/Enums'], function(require, Enums) {
...
@@ -52,6 +52,14 @@ define(['require', 'utils/Enums'], function(require, Enums) {
return
entitieDefUrl
.
defs
+
'?type=entity'
;
return
entitieDefUrl
.
defs
+
'?type=entity'
;
}
}
},
},
enumDefApiUrl
:
function
(
name
)
{
var
enumDefApiUrl
=
this
.
typedefsUrl
();
if
(
name
)
{
return
enumDefApiUrl
.
def
+
'/name/'
+
name
+
'?type=enum'
;
}
else
{
return
enumDefApiUrl
.
defs
+
'?type=enum'
;
}
},
entitiesTraitsApiUrl
:
function
(
token
)
{
entitiesTraitsApiUrl
:
function
(
token
)
{
if
(
token
)
{
if
(
token
)
{
return
this
.
baseUrlV2
+
'/entity/guid/'
+
token
+
'/classifications'
;
return
this
.
baseUrlV2
+
'/entity/guid/'
+
token
+
'/classifications'
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
fc7d3009
...
@@ -104,7 +104,7 @@ define(['require',
...
@@ -104,7 +104,7 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'collection'
,
'id'
,
'entityDefCollection'
,
'typeHeaders'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'collection'
,
'id'
,
'entityDefCollection'
,
'typeHeaders'
,
'enumDefCollection'
));
this
.
bindEvents
();
this
.
bindEvents
();
},
},
bindEvents
:
function
()
{
bindEvents
:
function
()
{
...
@@ -171,7 +171,8 @@ define(['require',
...
@@ -171,7 +171,8 @@ define(['require',
entityName
:
this
.
name
,
entityName
:
this
.
name
,
typeHeaders
:
this
.
typeHeaders
,
typeHeaders
:
this
.
typeHeaders
,
entityDefCollection
:
this
.
entityDefCollection
,
entityDefCollection
:
this
.
entityDefCollection
,
fetchCollection
:
this
.
fetchCollection
.
bind
(
that
)
fetchCollection
:
this
.
fetchCollection
.
bind
(
that
),
enumDefCollection
:
this
.
enumDefCollection
}
}
this
.
getEntityDef
(
obj
);
this
.
getEntityDef
(
obj
);
this
.
renderTagTableLayoutView
(
obj
);
this
.
renderTagTableLayoutView
(
obj
);
...
@@ -325,7 +326,8 @@ define(['require',
...
@@ -325,7 +326,8 @@ define(['require',
that
.
fetchCollection
();
that
.
fetchCollection
();
},
},
showLoader
:
that
.
showLoader
.
bind
(
that
),
showLoader
:
that
.
showLoader
.
bind
(
that
),
hideLoader
:
that
.
hideLoader
.
bind
(
that
)
hideLoader
:
that
.
hideLoader
.
bind
(
that
),
enumDefCollection
:
that
.
enumDefCollection
});
});
view
.
modal
.
on
(
'ok'
,
function
()
{
view
.
modal
.
on
(
'ok'
,
function
()
{
Utils
.
showTitleLoader
(
that
.
$
(
'.page-title .fontLoader'
),
that
.
$
(
'.entityDetail'
));
Utils
.
showTitleLoader
(
that
.
$
(
'.page-title .fontLoader'
),
that
.
$
(
'.entityDetail'
));
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/schema/SchemaLayoutView.js
View file @
fc7d3009
...
@@ -48,8 +48,7 @@ define(['require',
...
@@ -48,8 +48,7 @@ define(['require',
showMoreLess
:
'[data-id="showMoreLess"]'
,
showMoreLess
:
'[data-id="showMoreLess"]'
,
showMoreLessTerm
:
'[data-id="showMoreLessTerm"]'
,
showMoreLessTerm
:
'[data-id="showMoreLessTerm"]'
,
addAssignTag
:
"[data-id='addAssignTag']"
,
addAssignTag
:
"[data-id='addAssignTag']"
,
checkDeletedEntity
:
"[data-id='checkDeletedEntity']"
,
checkDeletedEntity
:
"[data-id='checkDeletedEntity']"
},
},
/** ui events hash */
/** ui events hash */
events
:
function
()
{
events
:
function
()
{
...
@@ -95,7 +94,7 @@ define(['require',
...
@@ -95,7 +94,7 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'guid'
,
'entityDefCollection'
,
'attribute'
,
'referredEntities'
,
'fetchCollection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'guid'
,
'entityDefCollection'
,
'attribute'
,
'referredEntities'
,
'fetchCollection'
,
'enumDefCollection'
));
this
.
schemaCollection
=
new
VSchemaList
([],
{});
this
.
schemaCollection
=
new
VSchemaList
([],
{});
this
.
commonTableOptions
=
{
this
.
commonTableOptions
=
{
collection
:
this
.
schemaCollection
,
collection
:
this
.
schemaCollection
,
...
@@ -228,7 +227,7 @@ define(['require',
...
@@ -228,7 +227,7 @@ define(['require',
// return this;
// return this;
// }
// }
});
});
var
columns
=
new
columnCollection
(
that
.
getSchemaTableColumns
());
var
columns
=
new
columnCollection
(
that
.
getSchemaTableColumns
(
deleteEnity
));
//columns.setPositions().sort();
//columns.setPositions().sort();
that
.
RSchemaTableLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
that
.
RSchemaTableLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
columns
:
columns
columns
:
columns
...
@@ -247,7 +246,7 @@ define(['require',
...
@@ -247,7 +246,7 @@ define(['require',
});
});
});
});
},
},
getSchemaTableColumns
:
function
()
{
getSchemaTableColumns
:
function
(
deleteEnity
)
{
var
that
=
this
,
var
that
=
this
,
col
=
{
col
=
{
Check
:
{
Check
:
{
...
@@ -271,7 +270,7 @@ define(['require',
...
@@ -271,7 +270,7 @@ define(['require',
var
value
=
model
.
get
(
'attributes'
)[
key
];
var
value
=
model
.
get
(
'attributes'
)[
key
];
if
(
key
===
"name"
&&
model
.
get
(
'guid'
))
{
if
(
key
===
"name"
&&
model
.
get
(
'guid'
))
{
var
nameHtml
=
'<a href="#!/detailPage/'
+
model
.
get
(
'guid'
)
+
'">'
+
value
+
'</a>'
;
var
nameHtml
=
'<a href="#!/detailPage/'
+
model
.
get
(
'guid'
)
+
'">'
+
value
+
'</a>'
;
if
(
model
.
get
(
'status'
)
&&
Enums
.
entityStateReadOnly
[
model
.
get
(
'status'
)])
{
if
(
model
.
get
(
'status'
)
&&
Enums
.
entityStateReadOnly
[
model
.
get
(
'status'
)]
&&
deleteEnity
)
{
nameHtml
+=
'<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'
;
nameHtml
+=
'<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'
;
return
'<div class="readOnly readOnlyLink">'
+
nameHtml
+
'</div>'
;
return
'<div class="readOnly readOnlyLink">'
+
nameHtml
+
'</div>'
;
}
else
{
}
else
{
...
@@ -369,7 +368,8 @@ define(['require',
...
@@ -369,7 +368,8 @@ define(['require',
that
.
arr
=
[];
that
.
arr
=
[];
},
},
hideLoader
:
that
.
hideLoader
.
bind
(
that
),
hideLoader
:
that
.
hideLoader
.
bind
(
that
),
showLoader
:
that
.
showLoader
.
bind
(
that
)
showLoader
:
that
.
showLoader
.
bind
(
that
),
enumDefCollection
:
that
.
enumDefCollection
});
});
// view.saveTagData = function() {
// view.saveTagData = function() {
//override saveTagData function
//override saveTagData function
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchDetailLayoutView.js
View file @
fc7d3009
...
@@ -43,7 +43,7 @@ define(['require',
...
@@ -43,7 +43,7 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'initialView'
,
'entityDefCollection'
,
'typeHeaders'
,
'searchVent'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'initialView'
,
'entityDefCollection'
,
'typeHeaders'
,
'searchVent'
,
'enumDefCollection'
));
},
},
bindEvents
:
function
()
{},
bindEvents
:
function
()
{},
onRender
:
function
()
{
onRender
:
function
()
{
...
@@ -61,7 +61,8 @@ define(['require',
...
@@ -61,7 +61,8 @@ define(['require',
initialView
:
that
.
initialView
,
initialView
:
that
.
initialView
,
entityDefCollection
:
that
.
entityDefCollection
,
entityDefCollection
:
that
.
entityDefCollection
,
typeHeaders
:
that
.
typeHeaders
,
typeHeaders
:
that
.
typeHeaders
,
searchVent
:
that
.
searchVent
searchVent
:
that
.
searchVent
,
enumDefCollection
:
that
.
enumDefCollection
}));
}));
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
fc7d3009
...
@@ -126,7 +126,7 @@ define(['require',
...
@@ -126,7 +126,7 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'initialView'
,
'entityDefCollection'
,
'typeHeaders'
,
'searchVent'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'initialView'
,
'entityDefCollection'
,
'typeHeaders'
,
'searchVent'
,
'enumDefCollection'
));
var
pagination
=
""
;
var
pagination
=
""
;
this
.
entityModel
=
new
VEntity
();
this
.
entityModel
=
new
VEntity
();
this
.
searchCollection
=
new
VSearchList
();
this
.
searchCollection
=
new
VSearchList
();
...
@@ -490,7 +490,8 @@ define(['require',
...
@@ -490,7 +490,8 @@ define(['require',
},
},
tagList
:
that
.
getTagList
(
guid
,
multiple
),
tagList
:
that
.
getTagList
(
guid
,
multiple
),
showLoader
:
that
.
showLoader
.
bind
(
that
),
showLoader
:
that
.
showLoader
.
bind
(
that
),
hideLoader
:
that
.
hideLoader
.
bind
(
that
)
hideLoader
:
that
.
hideLoader
.
bind
(
that
),
enumDefCollection
:
that
.
enumDefCollection
});
});
});
});
},
},
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
fc7d3009
...
@@ -43,6 +43,7 @@ define(['require',
...
@@ -43,6 +43,7 @@ define(['require',
detailValue
:
"[data-id='detailValue']"
,
detailValue
:
"[data-id='detailValue']"
,
addTag
:
"[data-id='addTag']"
,
addTag
:
"[data-id='addTag']"
,
deleteTag
:
"[data-id='delete']"
,
deleteTag
:
"[data-id='delete']"
,
editTag
:
"[data-id='edit']"
,
},
},
/** ui events hash */
/** ui events hash */
events
:
function
()
{
events
:
function
()
{
...
@@ -53,6 +54,9 @@ define(['require',
...
@@ -53,6 +54,9 @@ define(['require',
events
[
"click "
+
this
.
ui
.
deleteTag
]
=
function
(
e
)
{
events
[
"click "
+
this
.
ui
.
deleteTag
]
=
function
(
e
)
{
this
.
deleteTagDataModal
(
e
);
this
.
deleteTagDataModal
(
e
);
};
};
events
[
"click "
+
this
.
ui
.
editTag
]
=
function
(
e
)
{
this
.
editTagDataModal
(
e
);
};
return
events
;
return
events
;
},
},
/**
/**
...
@@ -60,7 +64,7 @@ define(['require',
...
@@ -60,7 +64,7 @@ define(['require',
* @constructs
* @constructs
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'guid'
,
'term'
,
'entityName'
,
'fetchCollection'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'entity'
,
'guid'
,
'term'
,
'entityName'
,
'fetchCollection'
,
'enumDefCollection'
));
this
.
collectionObject
=
this
.
entity
;
this
.
collectionObject
=
this
.
entity
;
this
.
tagTermCollection
=
new
VTagList
();
this
.
tagTermCollection
=
new
VTagList
();
var
tagorterm
=
_
.
toArray
(
this
.
collectionObject
.
classifications
),
var
tagorterm
=
_
.
toArray
(
this
.
collectionObject
.
classifications
),
...
@@ -151,7 +155,7 @@ define(['require',
...
@@ -151,7 +155,7 @@ define(['require',
sortable
:
false
,
sortable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
fromRaw
:
function
(
rawValue
,
model
)
{
return
'<
a href="javascript:void(0)"><i class="fa fa-trash" data-id="delete" data-name="'
+
model
.
get
(
'typeName'
)
+
'"></i></a
>'
;
return
'<
button class="btn btn-atlasAction btn-atlas no-margin-bottom typeLOV" data-id="delete" data-name="'
+
model
.
get
(
'typeName'
)
+
'"><i class="fa fa-trash"></i></button> <button class="btn btn-atlasAction btn-atlas no-margin-bottom typeLOV" data-id="edit" data-name="'
+
model
.
get
(
'typeName'
)
+
'"><i class="fa fa-pencil"></i></button
>'
;
}
}
})
})
},
},
...
@@ -164,7 +168,8 @@ define(['require',
...
@@ -164,7 +168,8 @@ define(['require',
require
([
'views/tag/addTagModalView'
],
function
(
AddTagModalView
)
{
require
([
'views/tag/addTagModalView'
],
function
(
AddTagModalView
)
{
var
view
=
new
AddTagModalView
({
var
view
=
new
AddTagModalView
({
guid
:
that
.
guid
,
guid
:
that
.
guid
,
modalCollection
:
that
.
collection
modalCollection
:
that
.
collection
,
enumDefCollection
:
that
.
enumDefCollection
});
});
// view.saveTagData = function() {
// view.saveTagData = function() {
//override saveTagData function
//override saveTagData function
...
@@ -218,6 +223,23 @@ define(['require',
...
@@ -218,6 +223,23 @@ define(['require',
}
}
});
});
},
editTagDataModal
:
function
(
e
)
{
var
that
=
this
,
tagName
=
$
(
e
.
currentTarget
).
data
(
'name'
),
tagModel
=
_
.
findWhere
(
that
.
collectionObject
.
classifications
,
{
typeName
:
tagName
});
require
([
'views/tag/addTagModalView'
],
function
(
AddTagModalView
)
{
var
view
=
new
AddTagModalView
({
'tagModel'
:
tagModel
,
callback
:
function
()
{
that
.
fetchCollection
();
},
guid
:
that
.
guid
,
'enumDefCollection'
:
that
.
enumDefCollection
});
});
}
}
});
});
return
TagDetailTableLayoutView
;
return
TagDetailTableLayoutView
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/addTagModalView.js
View file @
fc7d3009
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