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
f5ffd064
Commit
f5ffd064
authored
Oct 06, 2020
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3981: UI: Create Entity button is shown for a user without create entity permission in ranger
parent
8098bc56
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
12 deletions
+17
-12
Router.js
dashboardv2/public/js/router/Router.js
+1
-1
SearchResultLayoutView_tmpl.html
...blic/js/templates/search/SearchResultLayoutView_tmpl.html
+4
-3
GlossaryLayoutView.js
dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
+4
-2
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+2
-2
SearchDefaultLayoutView_tmpl.html
...lic/js/templates/search/SearchDefaultLayoutView_tmpl.html
+2
-2
SearchResultLayoutView_tmpl.html
...blic/js/templates/search/SearchResultLayoutView_tmpl.html
+2
-0
SearchResultLayoutView.js
dashboardv3/public/js/views/search/SearchResultLayoutView.js
+2
-2
No files found.
dashboardv2/public/js/router/Router.js
View file @
f5ffd064
...
...
@@ -384,7 +384,7 @@ define([
}
});
if
(
Globals
.
entityCreate
&&
Utils
.
getUrlState
.
isSearchTab
())
{
if
(
Utils
.
getUrlState
.
isSearchTab
())
{
App
.
rNContent
.
show
(
new
SearchDetailLayoutView
(
_
.
extend
({
'value'
:
paramObj
,
'initialView'
:
true
},
options
)));
}
else
{
if
(
App
.
rNContent
.
currentView
)
{
...
...
dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
View file @
f5ffd064
...
...
@@ -69,13 +69,14 @@
</div>
<div
id=
"r_searchResultTableLayoutView"
>
{{#if isSearchTab}}
<h1><b>
{{searchType}}
</b></h1>
{{/if}}
{{#if entityCreate}}
<div
class=
"entityLink"
style=
"display:none"
>
<p
class=
"entityLink"
>
Search Atlas for existing entities or
<p
class=
"entityLink"
>
Search Atlas for existing entities
{{#if entityCreate}}
or
<a
href=
"javascript:void(0)"
data-id=
'createEntity'
>
create new entity
</a>
{{/if}}
</p>
</div>
{{/if}}
</div>
<div
class=
"pagination-box searach-result-pagination row"
style=
"display: none"
>
<div
class=
"col-sm-4"
>
...
...
dashboardv2/public/js/views/glossary/GlossaryLayoutView.js
View file @
f5ffd064
...
...
@@ -221,8 +221,10 @@ define(['require',
$tree
.
jstree
(
'activate_node'
,
obj
.
guid
);
}
}
else
{
setDefaultSelector
();
$tree
.
jstree
(
'activate_node'
,
that
.
glossary
.
selectedItem
.
guid
);
if
(
that
.
glossaryCollection
.
fullCollection
.
length
)
{
setDefaultSelector
();
$tree
.
jstree
(
'activate_node'
,
that
.
glossary
.
selectedItem
.
guid
);
}
}
this
.
query
[
this
.
viewType
]
=
_
.
extend
(
obj
,
_
.
pick
(
this
.
glossary
.
selectedItem
,
'model'
,
'guid'
,
'gType'
,
'type'
),
{
"viewType"
:
this
.
viewType
,
"isNodeNotFoundAtLoad"
:
this
.
query
[
this
.
viewType
].
isNodeNotFoundAtLoad
});
var
url
=
_
.
isEmpty
(
this
.
glossary
.
selectedItem
)
?
'#!/glossary'
:
'#!/glossary/'
+
this
.
glossary
.
selectedItem
.
guid
;
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
f5ffd064
...
...
@@ -668,7 +668,7 @@ define(['require',
var
obj
=
model
.
toJSON
(),
nameHtml
=
""
,
name
=
Utils
.
getName
(
obj
);
if
(
obj
.
attributes
.
serviceType
===
undefined
)
{
if
(
!
obj
.
attributes
||
obj
.
attributes
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
&&
that
.
entityDefCollection
)
{
var
defObj
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
obj
.
typeName
});
if
(
defObj
)
{
...
...
@@ -676,7 +676,7 @@ define(['require',
}
}
}
else
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
obj
.
attributes
.
serviceType
;
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
obj
.
attributes
?
obj
.
attributes
.
serviceType
:
null
;
}
obj
.
serviceType
=
Globals
.
serviceTypeMap
[
obj
.
typeName
];
if
(
obj
.
guid
)
{
...
...
dashboardv3/public/js/templates/search/SearchDefaultLayoutView_tmpl.html
View file @
f5ffd064
...
...
@@ -16,11 +16,11 @@
-->
<div
class=
"f-right clearfix"
data-id=
"resizable"
style=
"transition: width ease 0.2s;padding-bottom: 41px;"
>
<div
class=
"search-container center"
>
{{#if entityCreate}}
<div
class=
"create-entity"
>
{{#if entityCreate}}
<div
class=
"inline"
><button
style=
"margin-top: 10px"
class=
"btn btn-action btn-sm"
data-id=
"createNewEntity"
><i
class=
"fa fa-plus"
></i>
Create Entity
</button></div>
{{/if}}
</div>
{{/if}}
<div
class=
"default-global-search row group-box"
>
<div
id=
"r_globalSearchLayoutView"
class=
"global-search-container col-sm-12"
></div>
</div>
...
...
dashboardv3/public/js/templates/search/SearchResultLayoutView_tmpl.html
View file @
f5ffd064
...
...
@@ -40,7 +40,9 @@
<div
class=
"pull-right inline-content-fr no-padding-left"
>
{{#if isSearchTab}}
<div
class=
"inline"
data-id=
"colManager"
></div>
{{#if entityCreate}}
<div
class=
"inline"
><button
class=
"btn btn-action btn-sm"
data-id=
"createEntity"
><i
class=
"fa fa-plus"
></i>
Create Entity
</button></div>
{{/if}}
<div
class=
"inline"
><button
title=
"Save as custom filter"
class=
"btn btn-action btn-sm"
data-id=
"saveFilter"
><i
class=
"fa fa-save"
></i>
Save Filter
</button></div>
{{/if}}
<div
class=
"inline"
>
...
...
dashboardv3/public/js/views/search/SearchResultLayoutView.js
View file @
f5ffd064
...
...
@@ -680,7 +680,7 @@ define(['require',
var
obj
=
model
.
toJSON
(),
nameHtml
=
""
,
name
=
Utils
.
getName
(
obj
);
if
(
obj
.
attributes
.
serviceType
===
undefined
)
{
if
(
!
obj
.
attributes
||
obj
.
attributes
.
serviceType
===
undefined
)
{
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
&&
that
.
entityDefCollection
)
{
var
defObj
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
obj
.
typeName
});
if
(
defObj
)
{
...
...
@@ -688,7 +688,7 @@ define(['require',
}
}
}
else
if
(
Globals
.
serviceTypeMap
[
obj
.
typeName
]
===
undefined
)
{
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
obj
.
attributes
.
serviceType
;
Globals
.
serviceTypeMap
[
obj
.
typeName
]
=
obj
.
attributes
?
obj
.
attributes
.
serviceType
:
null
;
}
obj
.
serviceType
=
Globals
.
serviceTypeMap
[
obj
.
typeName
];
if
(
obj
.
guid
)
{
...
...
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