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
dfc346d3
Commit
dfc346d3
authored
May 06, 2019
by
kevalbhatt
Committed by
Sarath Subramanian
May 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3190: UI : Allow user to refresh metric data inside popup
Signed-off-by:
Sarath Subramanian
<
ssubramanian@hortonworks.com
>
parent
bd7f5eec
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
8 deletions
+66
-8
override.scss
dashboardv2/public/css/scss/override.scss
+15
-0
Modal.js
dashboardv2/public/js/modules/Modal.js
+10
-0
Modal.html
dashboardv2/public/js/templates/common/Modal.html
+7
-0
LineageLayoutView_tmpl.html
...dv2/public/js/templates/graph/LineageLayoutView_tmpl.html
+3
-3
Header.html
dashboardv2/public/js/templates/site/Header.html
+1
-1
LineageLayoutView.js
dashboardv2/public/js/views/graph/LineageLayoutView.js
+6
-0
Statistics.js
dashboardv2/public/js/views/site/Statistics.js
+24
-4
No files found.
dashboardv2/public/css/scss/override.scss
View file @
dfc346d3
...
@@ -30,6 +30,21 @@
...
@@ -30,6 +30,21 @@
.modal-header
{
.modal-header
{
padding
:
15px
;
padding
:
15px
;
border-bottom
:
1px
solid
#DEDEDE
;
border-bottom
:
1px
solid
#DEDEDE
;
.header-button
{
float
:
right
;
opacity
:
.2
;
color
:
$black
;
margin-top
:
-2px
;
&
:hover
{
color
:
$black
;
text-decoration
:
none
;
cursor
:
pointer
;
filter
:
alpha
(
opacity
=
50
);
opacity
:
.5
;
}
}
}
}
.modal-title
{
.modal-title
{
...
...
dashboardv2/public/js/modules/Modal.js
View file @
dfc346d3
...
@@ -138,6 +138,7 @@ define(['require', 'backbone', 'hbs!tmpl/common/Modal'], function(require, Backb
...
@@ -138,6 +138,7 @@ define(['require', 'backbone', 'hbs!tmpl/common/Modal'], function(require, Backb
*/
*/
open
:
function
(
cb
)
{
open
:
function
(
cb
)
{
if
(
!
this
.
isRendered
)
this
.
render
();
if
(
!
this
.
isRendered
)
this
.
render
();
$
(
".tooltip"
).
tooltip
(
"hide"
);
var
self
=
this
,
var
self
=
this
,
$el
=
this
.
$el
;
$el
=
this
.
$el
;
...
@@ -201,6 +202,14 @@ define(['require', 'backbone', 'hbs!tmpl/common/Modal'], function(require, Backb
...
@@ -201,6 +202,14 @@ define(['require', 'backbone', 'hbs!tmpl/common/Modal'], function(require, Backb
$el
.
one
(
'shown.bs.modal'
,
function
()
{
$el
.
one
(
'shown.bs.modal'
,
function
()
{
self
.
trigger
(
'shownModal'
);
self
.
trigger
(
'shownModal'
);
});
});
$el
.
find
(
'.header-button'
).
on
(
'click'
,
'button'
,
function
()
{
var
headerButtons
=
self
.
options
.
headerButtons
,
clickedButtonIndex
=
$
(
this
).
data
(
"index"
),
clickedButtonObj
=
headerButtons
&&
headerButtons
[
clickedButtonIndex
];
if
(
clickedButtonObj
&&
clickedButtonObj
.
onClick
)
{
clickedButtonObj
.
onClick
.
apply
(
this
,
arguments
);
}
});
return
this
;
return
this
;
},
},
...
@@ -216,6 +225,7 @@ define(['require', 'backbone', 'hbs!tmpl/common/Modal'], function(require, Backb
...
@@ -216,6 +225,7 @@ define(['require', 'backbone', 'hbs!tmpl/common/Modal'], function(require, Backb
this
.
_preventClose
=
false
;
this
.
_preventClose
=
false
;
return
;
return
;
}
}
$
(
".tooltip"
).
tooltip
(
"hide"
);
$el
.
one
(
'hidden.bs.modal'
,
function
onHidden
(
e
)
{
$el
.
one
(
'hidden.bs.modal'
,
function
onHidden
(
e
)
{
// Ignore events propagated from interior objects, like bootstrap tooltips
// Ignore events propagated from interior objects, like bootstrap tooltips
...
...
dashboardv2/public/js/templates/common/Modal.html
View file @
dfc346d3
...
@@ -19,6 +19,13 @@
...
@@ -19,6 +19,13 @@
{{#if title}}
{{#if title}}
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<a
class=
"close"
>
×
</a>
<a
class=
"close"
>
×
</a>
{{#if headerButtons}}
<div
class=
"header-button"
>
{{#each headerButtons}}
<button
type=
"button"
data-index=
{{@index}}
{{#
if
this
.
title
}}
title=
"{{this.title}}"
{{/
if
}}
class=
"btn {{this.btnClass}}"
>
{{this.text}}
</button>
{{/each}}
</div>
{{/if}}
<h4
class=
"modal-title"
>
<h4
class=
"modal-title"
>
{{#if titleHtml}}
{{#if titleHtml}}
{{{tt title}}}
{{{tt title}}}
...
...
dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
View file @
dfc346d3
...
@@ -108,13 +108,13 @@
...
@@ -108,13 +108,13 @@
<div>
<div>
<button
type=
"button"
data-id=
"search-toggler"
title=
"Search"
class=
"btn btn-action btn-gray btn-sm"
><i
class=
"fa fa-search"
></i></button>
<button
type=
"button"
data-id=
"search-toggler"
title=
"Search"
class=
"btn btn-action btn-gray btn-sm"
><i
class=
"fa fa-search"
></i></button>
</div>
</div>
<div>
<button
type=
"button"
data-id=
"fullScreen-toggler"
title=
"Full screen"
class=
"btn btn-action btn-gray btn-sm fullscreen_lineage"
><i
class=
"fa fa-expand"
></i></button>
</div>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<button
type=
"button"
id=
"zoom_in"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom In"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-plus"
></i></button>
<button
type=
"button"
id=
"zoom_in"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom In"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-plus"
></i></button>
<button
type=
"button"
id=
"zoom_out"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom Out"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-minus"
></i></button>
<button
type=
"button"
id=
"zoom_out"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom Out"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-minus"
></i></button>
</div>
</div>
<div>
<button
type=
"button"
data-id=
"fullScreen-toggler"
title=
"Full screen"
class=
"btn btn-action btn-gray btn-sm fullscreen_lineage"
><i
class=
"fa fa-expand"
></i></button>
</div>
</div>
</div>
<div
class=
"box-panel size-lg node-details slide-from-left lineage-node-detail"
>
<div
class=
"box-panel size-lg node-details slide-from-left lineage-node-detail"
>
<div
class=
"header clearfix"
>
<div
class=
"header clearfix"
>
...
...
dashboardv2/public/js/templates/site/Header.html
View file @
dfc346d3
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<li
class=
"details-backbutton"
><a
href=
"javascript:void(0);"
data-id=
"backButton"
><i
class=
"fa fa-chevron-left"
></i>
Back To Results
</a></li>
<li
class=
"details-backbutton"
><a
href=
"javascript:void(0);"
data-id=
"backButton"
><i
class=
"fa fa-chevron-left"
></i>
Back To Results
</a></li>
</ul>
</ul>
<div
class=
"btn-group pull-right header-menu "
>
<div
class=
"btn-group pull-right header-menu "
>
<a
class=
"show-stat"
href=
"javascript:void(0);"
><i
class=
"fa fa-bar-chart"
></i></a>
<a
class=
"show-stat"
href=
"javascript:void(0);"
title=
"Statistics"
><i
class=
"fa fa-bar-chart"
></i></a>
<a
target=
"_blank"
href=
"http://atlas.apache.org/"
><i
class=
"fa fa-question-circle"
></i></a>
<a
target=
"_blank"
href=
"http://atlas.apache.org/"
><i
class=
"fa fa-question-circle"
></i></a>
<a
href=
"javascript:void(0);"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
class=
"user-dropdown"
><i
class=
"fa fa-user user-circle "
></i><span
class=
"userName"
></span></a>
<a
href=
"javascript:void(0);"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
class=
"user-dropdown"
><i
class=
"fa fa-user user-circle "
></i><span
class=
"userName"
></span></a>
<ul
class=
"dropdown-menu"
>
<ul
class=
"dropdown-menu"
>
...
...
dashboardv2/public/js/views/graph/LineageLayoutView.js
View file @
dfc346d3
...
@@ -161,6 +161,11 @@ define(['require',
...
@@ -161,6 +161,11 @@ define(['require',
var
icon
=
$
(
e
.
currentTarget
).
find
(
'i'
),
var
icon
=
$
(
e
.
currentTarget
).
find
(
'i'
),
panel
=
$
(
e
.
target
).
parents
(
'.tab-pane'
).
first
();
panel
=
$
(
e
.
target
).
parents
(
'.tab-pane'
).
first
();
icon
.
toggleClass
(
'fa-expand fa-compress'
);
icon
.
toggleClass
(
'fa-expand fa-compress'
);
if
(
icon
.
hasClass
(
'fa-expand'
)){
icon
.
parent
(
'button'
).
attr
(
"data-original-title"
,
"Full Screen"
);
}
else
{
icon
.
parent
(
'button'
).
attr
(
"data-original-title"
,
"Default View"
);
}
panel
.
toggleClass
(
'fullscreen-mode'
);
panel
.
toggleClass
(
'fullscreen-mode'
);
},
},
onCheckUnwantedEntity
:
function
(
e
)
{
onCheckUnwantedEntity
:
function
(
e
)
{
...
@@ -991,6 +996,7 @@ define(['require',
...
@@ -991,6 +996,7 @@ define(['require',
Utils
.
notifyError
({
Utils
.
notifyError
({
content
:
"There was an error in downloading Lineage!"
content
:
"There was an error in downloading Lineage!"
});
});
that
.
toggleLoader
(
loaderTargetDiv
);
return
;
return
;
}
}
a
.
href
=
DOMURL
.
createObjectURL
(
blob
);
a
.
href
=
DOMURL
.
createObjectURL
(
blob
);
...
...
dashboardv2/public/js/views/site/Statistics.js
View file @
dfc346d3
...
@@ -58,23 +58,34 @@ define(['require',
...
@@ -58,23 +58,34 @@ define(['require',
*/
*/
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
options
);
_
.
extend
(
this
,
options
);
var
that
=
this
;
var
modal
=
new
Modal
({
var
modal
=
new
Modal
({
title
:
'Statistics'
,
title
:
'Statistics'
,
content
:
this
,
content
:
this
,
okCloses
:
true
,
okCloses
:
true
,
okText
:
"Close"
,
showFooter
:
true
,
showFooter
:
true
,
allowCancel
:
false
,
allowCancel
:
false
,
width
:
"60%"
width
:
"60%"
,
headerButtons
:
[{
title
:
"Refresh Data"
,
btnClass
:
"fa fa-refresh"
,
onClick
:
function
()
{
modal
.
$el
.
find
(
'.header-button .fa-refresh'
).
tooltip
(
'hide'
).
prop
(
'disabled'
,
true
).
addClass
(
'fa-spin'
);
that
.
fetchMetricData
({
update
:
true
});
}
}]
}).
open
();
}).
open
();
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
modal
.
trigger
(
'cancel'
);
});
});
this
.
modal
=
modal
;
},
},
bindEvents
:
function
()
{},
bindEvents
:
function
()
{},
onRender
:
function
(
)
{
fetchMetricData
:
function
(
options
)
{
var
that
=
this
;
var
that
=
this
,
var
entityCountCollection
=
new
VTagList
();
entityCountCollection
=
new
VTagList
();
entityCountCollection
.
url
=
UrlLinks
.
entityCountApi
();
entityCountCollection
.
url
=
UrlLinks
.
entityCountApi
();
entityCountCollection
.
modelAttrName
=
"data"
;
entityCountCollection
.
modelAttrName
=
"data"
;
entityCountCollection
.
fetch
({
entityCountCollection
.
fetch
({
...
@@ -84,9 +95,18 @@ define(['require',
...
@@ -84,9 +95,18 @@ define(['require',
that
.
renderEntities
({
data
:
data
});
that
.
renderEntities
({
data
:
data
});
that
.
$
(
'.statsContainer,.statsNotificationContainer'
).
removeClass
(
'hide'
);
that
.
$
(
'.statsContainer,.statsNotificationContainer'
).
removeClass
(
'hide'
);
that
.
$
(
'.statsLoader,.statsNotificationLoader'
).
removeClass
(
'show'
);
that
.
$
(
'.statsLoader,.statsNotificationLoader'
).
removeClass
(
'show'
);
if
(
options
&&
options
.
update
)
{
that
.
modal
.
$el
.
find
(
'.header-button .fa-refresh'
).
prop
(
'disabled'
,
false
).
removeClass
(
'fa-spin'
);
Utils
.
notifySuccess
({
content
:
"Metric data is refreshed"
})
}
}
}
});
});
},
},
onRender
:
function
()
{
this
.
fetchMetricData
();
},
genrateStatusData
:
function
(
stateObject
)
{
genrateStatusData
:
function
(
stateObject
)
{
var
that
=
this
,
var
that
=
this
,
stats
=
{};
stats
=
{};
...
...
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