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
22041f51
Commit
22041f51
authored
6 years ago
by
Abhishek Kadam
Committed by
kevalbhatt
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3005 Modal for metrics statistic added
Signed-off-by:
kevalbhatt
<
kbhatt@apache.org
>
parent
83fbe467
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
188 additions
and
3 deletions
+188
-3
common.scss
dashboardv2/public/css/scss/common.scss
+7
-0
theme.scss
dashboardv2/public/css/scss/theme.scss
+24
-3
Router.js
dashboardv2/public/js/router/Router.js
+7
-0
Statistics_tmpl.html
dashboardv2/public/js/templates/common/Statistics_tmpl.html
+67
-0
Header.html
dashboardv2/public/js/templates/site/Header.html
+1
-0
Statistics.js
dashboardv2/public/js/views/common/Statistics.js
+82
-0
No files found.
dashboardv2/public/css/scss/common.scss
View file @
22041f51
...
...
@@ -156,3 +156,9 @@ pre {
font-family
:
monospace
;
}
}
#accordion
{
.panel-default
>
.panel-heading
{
cursor
:
pointer
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv2/public/css/scss/theme.scss
View file @
22041f51
...
...
@@ -112,9 +112,7 @@ header {
h1
{
&
.title
{
word-break
:
break-all
;
}
// margin-top: 50px;
}
// margin-top: 50px;
margin-bottom
:
10px
;
font-weight
:
600
;
@include
ellipsis
();
...
...
@@ -283,6 +281,29 @@ hr[size="10"] {
z-index
:
999
;
}
.panel.expand_collapse_panel-icon
{
.panel-heading
{
.panel-title
{
display
:
inline-block
;
}
i
.ec-icon
:before
{
content
:
"\f078"
}
&
.collapsed
,
&
[
aria-expanded
=
"false"
]
{
i
.ec-icon
:before
{
content
:
"\f078"
}
}
&
[
aria-expanded
=
"true"
]
{
i
.ec-icon
:before
{
content
:
"\f077"
}
}
}
}
.no-padding
{
padding
:
0px
!
important
;
}
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/router/Router.js
View file @
22041f51
...
...
@@ -73,6 +73,13 @@ define([
},
bindCommonEvents
:
function
()
{
var
that
=
this
;
$
(
'body'
).
on
(
'click'
,
'a.show-stat'
,
function
()
{
require
([
'views/common/Statistics'
,
],
function
(
AboutAtlas
)
{
new
AboutAtlas
();
});
});
$
(
'body'
).
on
(
'click'
,
'li.aboutAtlas'
,
function
()
{
require
([
'views/common/AboutAtlas'
,
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/common/Statistics_tmpl.html
0 → 100644
View file @
22041f51
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<div
class=
"panel-group"
id=
"accordion"
>
<div
class=
"panel panel-default expand_collapse_panel-icon"
>
<div
class=
"panel-heading"
data-toggle=
"collapse"
href=
"#collapse1"
aria-expanded=
"true"
>
<h4
class=
"panel-title"
>
<a>
Active Entities
</a>
</h4>
<div
class=
"btn-group pull-right"
>
<button
type=
"button"
title=
"Collapse"
><i
class=
"ec-icon fa"
></i></button>
</div>
</div>
<div
id=
"collapse1"
class=
"panel-collapse collapse in"
>
<div
class=
"panel-body"
>
<table
class=
"table table-quickMenu"
>
<thead>
<tr>
<th>
Entity
</th>
<th>
Count
</th>
</tr>
</thead>
<tbody
data-id=
"entityActive"
>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"panel panel-default expand_collapse_panel-icon"
>
<div
class=
"panel-heading"
data-toggle=
"collapse"
href=
"#collapse2"
>
<h4
class=
"panel-title"
>
<a>
Deleted Entities
</a>
</h4>
<div
class=
"btn-group pull-right"
>
<button
type=
"button"
title=
"Collapse"
><i
class=
"ec-icon fa"
></i></button>
</div>
</div>
<div
id=
"collapse2"
class=
"panel-collapse collapse"
>
<div
class=
"panel-body"
>
<table
class=
"table table-quickMenu"
>
<thead>
<tr>
<th>
Entity
</th>
<th>
Count
</th>
</tr>
</thead>
<tbody
data-id=
"entityDelete"
>
</tbody>
</table>
</div>
</div>
</div>
</div>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/site/Header.html
View file @
22041f51
...
...
@@ -22,6 +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>
</ul>
<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
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>
<ul
class=
"dropdown-menu"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/common/Statistics.js
0 → 100644
View file @
22041f51
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
define
([
'require'
,
'backbone'
,
'hbs!tmpl/common/Statistics_tmpl'
,
'modules/Modal'
,
'models/VCommon'
,
'utils/UrlLinks'
,
'collection/VTagList'
,
'utils/CommonViewFunction'
],
function
(
require
,
Backbone
,
StatTmpl
,
Modal
,
VCommon
,
UrlLinks
,
VTagList
,
CommonViewFunction
)
{
'use strict'
;
var
StatisticsView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
/** @lends AboutAtlasView */
{
template
:
StatTmpl
,
/** Layout sub regions */
regions
:
{},
/** ui selector cache */
ui
:
{
entityActive
:
"[data-id='entityActive']"
,
entityDelete
:
"[data-id='entityDelete']"
},
/** ui events hash */
events
:
function
()
{},
/**
* intialize a new AboutAtlasView Layout
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
options
);
var
modal
=
new
Modal
({
title
:
'Statistics'
,
content
:
this
,
okCloses
:
true
,
showFooter
:
true
,
allowCancel
:
false
,
}).
open
();
modal
.
on
(
'closeModal'
,
function
()
{
modal
.
trigger
(
'cancel'
);
});
},
bindEvents
:
function
()
{},
onRender
:
function
()
{
var
that
=
this
;
var
entityCountCollection
=
new
VTagList
();
entityCountCollection
.
url
=
UrlLinks
.
entityCountApi
();
entityCountCollection
.
modelAttrName
=
"data"
;
entityCountCollection
.
fetch
({
success
:
function
(
data
)
{
var
data
=
_
.
first
(
data
.
toJSON
()),
no_records
=
'<tr class="empty text-center"><td colspan="2"><span>No records found!</span></td></tr>'
,
activeEntityTable
=
_
.
isEmpty
(
data
.
entity
.
entityActive
)
?
no_records
:
CommonViewFunction
.
propertyTable
({
scope
:
that
,
valueObject
:
data
.
entity
.
entityActive
}),
deleteEntityTable
=
_
.
isEmpty
(
data
.
entity
.
entityDelete
)
?
no_records
:
CommonViewFunction
.
propertyTable
({
scope
:
that
,
valueObject
:
data
.
entity
.
entityDelete
});
that
.
ui
.
entityActive
.
html
(
activeEntityTable
);
that
.
ui
.
entityDelete
.
html
(
deleteEntityTable
);
}
});
},
});
return
StatisticsView
;
});
\ No newline at end of file
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