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
6148b22a
Commit
6148b22a
authored
8 years ago
by
Suma Shivaprasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-843 Atlas UI: Feature to search terms in left navigation. (Kalyanikashikar via sumasai)
parent
a05f752d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
31 deletions
+90
-31
BusinessCatalogLayoutView_tmpl.html
...ates/business_catalog/BusinessCatalogLayoutView_tmpl.html
+5
-2
Utils.js
dashboardv2/public/js/utils/Utils.js
+8
-3
BusinessCatalogLayoutView.js
...ic/js/views/business_catalog/BusinessCatalogLayoutView.js
+76
-26
release-log.txt
release-log.txt
+1
-0
No files found.
dashboardv2/public/js/templates/business_catalog/BusinessCatalogLayoutView_tmpl.html
View file @
6148b22a
...
...
@@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<div
class=
"form-group"
>
<select
type=
"text"
class=
"form-control"
data-id=
"searchTermInput"
placeholder=
"Search term"
></select>
</div>
<div
class=
"row"
>
<button
class=
"btn btn-taxanomyBack btn-atlas"
data-id=
"backTaxanomy"
><i
class=
"fa fa-chevron-left"
></i>
Back
</button>
</div>
...
...
@@ -21,8 +24,8 @@
<ul
class=
"taxonomyTree"
>
<div
class=
"contentLoading"
></div>
<li
class=
"children parent"
data-id=
"Parent"
></li>
<li
class=
"chil
eds parentChile
d"
>
<ul
data-id=
"chil
e
dList"
>
<li
class=
"chil
ds parentChil
d"
>
<ul
data-id=
"childList"
>
</ul>
</li>
</ul>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/Utils.js
View file @
6148b22a
...
...
@@ -75,11 +75,18 @@ define(['require', 'utils/Globals'], function(require, Globals) {
});
};
Utils
.
defaultErrorHandler
=
function
(
model
,
error
)
{
/*require(['views/common/ErrorView', 'App'], function(vError, App) {*/
if
(
error
.
status
==
401
)
{
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
419
)
{
window
.
location
=
'login.jsp'
}
else
if
(
error
.
status
==
403
)
{
var
message
=
"You are not authorized"
;
if
(
error
.
statusText
)
{
message
=
JSON
.
parse
(
error
.
statusText
).
AuthorizationError
;
}
Utils
.
notifyError
({
content
:
message
});
}
else
if
(
error
.
status
==
"0"
)
{
var
diffTime
=
(
new
Date
().
getTime
()
-
prevNetworkErrorTime
);
if
(
diffTime
>
3000
)
{
...
...
@@ -90,8 +97,6 @@ define(['require', 'utils/Globals'], function(require, Globals) {
});
}
}
/*});*/
};
Utils
.
localStorage
=
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/business_catalog/BusinessCatalogLayoutView.js
View file @
6148b22a
...
...
@@ -37,10 +37,11 @@ define(['require',
/** ui selector cache */
ui
:
{
Parent
:
'[data-id="Parent"]'
,
chil
edList
:
'[data-id="chile
dList"]'
,
chil
dList
:
'[data-id="chil
dList"]'
,
liClick
:
'li a[data-href]'
,
backTaxanomy
:
'[data-id="backTaxanomy"]'
,
expandArrow
:
'[data-id="expandArrow"]'
expandArrow
:
'[data-id="expandArrow"]'
,
searchTermInput
:
'[data-id="searchTermInput"]'
},
/** ui events hash */
events
:
function
()
{
...
...
@@ -56,6 +57,11 @@ define(['require',
};
events
[
'click '
+
this
.
ui
.
backTaxanomy
]
=
'backButtonTaxanomy'
;
events
[
'click '
+
this
.
ui
.
expandArrow
]
=
'changeArrowState'
;
events
[
"change "
+
this
.
ui
.
searchTermInput
]
=
function
()
{
this
.
singleClick
=
false
;
var
termUrl
=
this
.
termCollection
.
url
.
split
(
"/"
,
5
).
join
(
"/"
)
+
"/"
+
this
.
ui
.
searchTermInput
.
val
().
split
(
"."
).
join
(
"/terms/"
);
this
.
forwardClick
(
undefined
,
true
,
termUrl
);
};
return
events
;
},
/**
...
...
@@ -65,7 +71,9 @@ define(['require',
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'globalVent'
,
'url'
));
this
.
parentCollection
=
new
VCatalogList
();
this
.
chiledCollection
=
new
VCatalogList
();
this
.
childCollection
=
new
VCatalogList
();
this
.
taxanomy
=
new
VCatalogList
();
this
.
termCollection
=
new
VCatalogList
();
this
.
dblClick
=
false
;
this
.
singleClick
=
false
;
},
...
...
@@ -75,11 +83,17 @@ define(['require',
this
.
dblClick
=
false
;
this
.
generateTree
(
true
);
},
this
);
this
.
listenTo
(
this
.
chil
e
dCollection
,
'reset'
,
function
()
{
this
.
listenTo
(
this
.
childCollection
,
'reset'
,
function
()
{
this
.
dblClick
=
false
;
this
.
generateTree
();
},
this
);
this
.
listenTo
(
this
.
chiledCollection
,
'error'
,
function
(
model
,
response
)
{
this
.
listenTo
(
this
.
taxanomy
,
'reset'
,
function
()
{
this
.
searchResult
();
},
this
);
this
.
listenTo
(
this
.
termCollection
,
'reset'
,
function
()
{
this
.
termSearchData
();
},
this
);
this
.
listenTo
(
this
.
childCollection
,
'error'
,
function
(
model
,
response
)
{
if
(
response
&&
response
.
responseJSON
&&
response
.
responseJSON
.
message
)
{
Utils
.
notifyError
({
content
:
response
.
responseJSON
.
message
...
...
@@ -102,7 +116,9 @@ define(['require',
var
that
=
this
;
this
.
bindEvents
();
that
.
ui
.
backTaxanomy
.
hide
();
this
.
fetchCollection
(
this
.
url
,
true
);
$
(
'body'
).
on
(
"click"
,
'.termPopoverList li'
,
function
(
e
)
{
that
[
$
(
this
).
find
(
"a"
).
data
(
'fn'
)](
e
);
});
...
...
@@ -114,6 +130,7 @@ define(['require',
that
.
$
(
'.termPopover'
).
popover
(
'hide'
);
}
});
this
.
fetchTaxanomyCollections
();
},
manualRender
:
function
(
url
,
isParent
,
back
)
{
if
(
back
)
{
...
...
@@ -143,16 +160,16 @@ define(['require',
scope
.
removeClass
(
'fa-chevron-down'
);
scope
.
addClass
(
'fa-chevron-right'
);
this
.
addActiveClass
(
scope
[
0
]);
this
.
ui
.
chil
e
dList
.
hide
();
this
.
ui
.
childList
.
hide
();
}
else
{
if
(
e
&&
$
(
e
.
currentTarget
).
parents
(
'li.parentChil
e
d'
).
length
)
{
if
(
e
&&
$
(
e
.
currentTarget
).
parents
(
'li.parentChild'
).
length
)
{
scope
.
parent
(
'li'
).
find
(
'.tools .taxanomyloader'
).
show
();
this
.
forwardClick
(
e
,
true
);
}
else
{
scope
.
addClass
(
'fa-chevron-down'
);
scope
.
removeClass
(
'fa-chevron-right'
);
this
.
singleClick
=
false
;
this
.
ui
.
chil
e
dList
.
show
();
this
.
ui
.
childList
.
show
();
}
}
...
...
@@ -177,9 +194,9 @@ define(['require',
this
.
parentCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
parentCollection
.
fetch
({
reset
:
true
});
}
else
{
this
.
chil
e
dCollection
.
url
=
this
.
url
+
"?hierarchy/path:."
;
this
.
chil
e
dCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
chil
e
dCollection
.
fetch
({
reset
:
true
});
this
.
childCollection
.
url
=
this
.
url
+
"?hierarchy/path:."
;
this
.
childCollection
.
fullCollection
.
reset
(
undefined
,
{
silent
:
true
});
this
.
childCollection
.
fetch
({
reset
:
true
});
}
},
forwardClick
:
function
(
e
,
forward
,
url
)
{
...
...
@@ -190,22 +207,29 @@ define(['require',
if
(
url
)
{
hrefUrl
=
url
;
}
if
(
!
e
&&
!
url
)
{
var
dataHref
=
this
.
ui
.
Parent
.
find
(
'a'
).
data
(
'href'
);
if
(
dataHref
)
{
hrefUrl
=
dataHref
;
}
}
if
(
forward
)
{
this
.
dblClick
=
true
;
this
.
ui
.
chil
e
dList
.
show
();
this
.
ui
.
childList
.
show
();
this
.
fetchCollection
(
hrefUrl
,
true
);
}
else
{
this
.
singleClick
=
true
;
}
Utils
.
setUrl
({
url
:
'#!/taxonomy/detailCatalog'
+
hrefUrl
,
mergeBrowserUrl
:
false
,
updateTabState
:
function
()
{
return
{
taxonomyUrl
:
this
.
url
,
stateChanged
:
false
};
},
trigger
:
true
});
if
(
hrefUrl
.
length
>
1
)
{
Utils
.
setUrl
({
url
:
'#!/taxonomy/detailCatalog'
+
hrefUrl
,
mergeBrowserUrl
:
false
,
updateTabState
:
function
()
{
return
{
taxonomyUrl
:
this
.
url
,
stateChanged
:
false
};
},
trigger
:
true
});
}
if
(
e
)
{
this
.
addActiveClass
(
e
);
}
...
...
@@ -216,7 +240,7 @@ define(['require',
},
generateTree
:
function
(
isParent
)
{
var
parentLi
=
""
,
chil
e
dLi
=
""
,
childLi
=
""
,
that
=
this
;
function
createTaxonomy
(
url
)
{
...
...
@@ -246,18 +270,18 @@ define(['require',
var
hrefUrl
=
"/api"
+
href
.
split
(
"/api"
)[
1
];
that
.
fetchCollection
(
hrefUrl
);
}
that
.
ui
.
chil
e
dList
.
html
(
''
);
that
.
ui
.
childList
.
html
(
''
);
that
.
ui
.
Parent
.
addClass
(
'active'
);
that
.
ui
.
Parent
.
html
(
parentLi
);
}
function
createTerm
()
{
_
.
each
(
that
.
chil
e
dCollection
.
fullCollection
.
models
,
function
(
model
,
key
)
{
_
.
each
(
that
.
childCollection
.
fullCollection
.
models
,
function
(
model
,
key
)
{
var
name
=
Utils
.
checkTagOrTerm
(
model
.
get
(
'name'
));
var
hrefUrl
=
"/api"
+
model
.
get
(
'href'
).
split
(
"/api"
)[
1
]
chil
e
dLi
+=
'<li class="children"><div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover" ></i></div><i class="fa fa-chevron-right toggleArrow" data-id="expandArrow" data-href="'
+
hrefUrl
+
'"></i><a href="javascript:void(0)" data-href="'
+
hrefUrl
+
'" data-name="`'
+
model
.
get
(
'name'
)
+
'`">'
+
name
.
name
+
'</a></li>'
;
childLi
+=
'<li class="children"><div class="tools"><i class="fa fa-refresh fa-spin-custom taxanomyloader"></i><i class="fa fa-ellipsis-h termPopover" ></i></div><i class="fa fa-chevron-right toggleArrow" data-id="expandArrow" data-href="'
+
hrefUrl
+
'"></i><a href="javascript:void(0)" data-href="'
+
hrefUrl
+
'" data-name="`'
+
model
.
get
(
'name'
)
+
'`">'
+
name
.
name
+
'</a></li>'
;
});
that
.
ui
.
chil
edList
.
html
(
chile
dLi
);
that
.
ui
.
chil
dList
.
html
(
chil
dLi
);
}
if
(
isParent
)
{
...
...
@@ -422,6 +446,32 @@ define(['require',
}
});
}
},
fetchTaxanomyCollections
:
function
()
{
this
.
taxanomy
.
fetch
({
reset
:
true
});
},
searchResult
:
function
()
{
var
that
=
this
;
_
.
each
(
this
.
taxanomy
.
models
,
function
(
model
,
key
)
{
var
name
=
model
.
get
(
'name'
);
that
.
termCollection
.
url
=
"/api/atlas/v1/taxonomies/"
+
name
+
"/terms"
;
});
this
.
termCollection
.
fetch
({
reset
:
true
});
},
termSearchData
:
function
()
{
var
that
=
this
;
var
str
=
'<option></option>'
;
for
(
var
j
=
0
;
j
<
this
.
termCollection
.
models
.
length
;
j
++
)
{
var
terms
=
this
.
termCollection
.
models
[
j
].
attributes
.
name
;
str
+=
'<option>'
+
terms
+
'</option>'
;
this
.
ui
.
searchTermInput
.
html
(
str
);
}
// this.ui.searchTermInput.setAttribute('data-href' : that.termCollection.url);
this
.
ui
.
searchTermInput
.
select2
({
placeholder
:
"Search Term"
,
allowClear
:
true
});
}
});
return
BusinessCatalogLayoutView
;
...
...
This diff is collapsed.
Click to expand it.
release-log.txt
View file @
6148b22a
...
...
@@ -22,6 +22,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES:
ATLAS-843 Atlas UI: Feature to search terms in left navigation. (Kalyanikashikar via sumasai)
ATLAS-731 Remove dashboard module in Atlas, replaced by dashboardv2 (kevalbhatt18 via sumasai)
ATLAS-664 UI: Add Support for Versioning / History (Kalyanikashikar via yhemanth)
ATLAS-833 Make default build profile for External HBase and Solr (tbeerbower via yhemanth)
...
...
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