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
519fc2bf
Commit
519fc2bf
authored
Jul 12, 2019
by
Saqeeb Shaikh
Committed by
Madhan Neethiraj
Jul 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3331: updated metrics UI to display notification consumption details per topic
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
ef402516
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
3 deletions
+77
-3
Statistics_Topic_Offset_table_tmpl.html
...js/templates/site/Statistics_Topic_Offset_table_tmpl.html
+37
-0
Statistics_tmpl.html
dashboardv2/public/js/templates/site/Statistics_tmpl.html
+11
-0
Enums.js
dashboardv2/public/js/utils/Enums.js
+2
-1
Statistics.js
dashboardv2/public/js/views/site/Statistics.js
+27
-2
No files found.
dashboardv2/public/js/templates/site/Statistics_Topic_Offset_table_tmpl.html
0 → 100644
View file @
519fc2bf
<!--
* 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.
-->
<thead>
<tr>
<th>
Kafka Topic
</th>
<th>
Current Offset
</th>
<th>
Start Offset
</th>
</tr>
</thead>
{{#if data}}
<tbody>
{{#each tableCol}}
<tr>
<td>
{{{this.label}}}
</td>
{{#each ../tableHeader}}
<td>
{{callmyfunction ../../getTmplValue ../this this}}
</td>
{{/each }}
</tr>
{{/each}}
</tbody>
{{/if}}
\ No newline at end of file
dashboardv2/public/js/templates/site/Statistics_tmpl.html
View file @
519fc2bf
...
@@ -81,9 +81,20 @@
...
@@ -81,9 +81,20 @@
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<hr>
</hr>
<table
data-id=
"offset-card"
class=
"table stat-table notification-table table-striped "
>
<tbody>
<tr
class=
"empty text-center"
>
<td
colspan=
"2"
><span>
No records found!
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
dashboardv2/public/js/utils/Enums.js
View file @
519fc2bf
...
@@ -184,7 +184,8 @@ define(['require'], function(require) {
...
@@ -184,7 +184,8 @@ define(['require'], function(require) {
"totalCreates"
:
"number"
,
"totalCreates"
:
"number"
,
"totalDeletes"
:
"number"
,
"totalDeletes"
:
"number"
,
"totalFailed"
:
"number"
,
"totalFailed"
:
"number"
,
"totalUpdates"
:
"number"
"totalUpdates"
:
"number"
,
"topicOffsets"
:
"number"
}
}
};
};
return
Enums
;
return
Enums
;
...
...
dashboardv2/public/js/views/site/Statistics.js
View file @
519fc2bf
...
@@ -20,6 +20,7 @@ define(['require',
...
@@ -20,6 +20,7 @@ define(['require',
'backbone'
,
'backbone'
,
'hbs!tmpl/site/Statistics_tmpl'
,
'hbs!tmpl/site/Statistics_tmpl'
,
'hbs!tmpl/site/Statistics_Notification_table_tmpl'
,
'hbs!tmpl/site/Statistics_Notification_table_tmpl'
,
'hbs!tmpl/site/Statistics_Topic_Offset_table_tmpl'
,
'hbs!tmpl/site/entity_tmpl'
,
'hbs!tmpl/site/entity_tmpl'
,
'modules/Modal'
,
'modules/Modal'
,
'models/VCommon'
,
'models/VCommon'
,
...
@@ -30,7 +31,7 @@ define(['require',
...
@@ -30,7 +31,7 @@ define(['require',
'moment'
,
'moment'
,
'utils/Utils'
,
'utils/Utils'
,
'moment-timezone'
'moment-timezone'
],
function
(
require
,
Backbone
,
StatTmpl
,
StatsNotiTable
,
EntityTable
,
Modal
,
VCommon
,
UrlLinks
,
VTagList
,
CommonViewFunction
,
Enums
,
moment
,
Utils
)
{
],
function
(
require
,
Backbone
,
StatTmpl
,
StatsNotiTable
,
TopicOffsetTable
,
EntityTable
,
Modal
,
VCommon
,
UrlLinks
,
VTagList
,
CommonViewFunction
,
Enums
,
moment
,
Utils
)
{
'use strict'
;
'use strict'
;
var
StatisticsView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
var
StatisticsView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
@@ -48,7 +49,8 @@ define(['require',
...
@@ -48,7 +49,8 @@ define(['require',
notificationCard
:
"[data-id='notification-card']"
,
notificationCard
:
"[data-id='notification-card']"
,
statsNotificationTable
:
"[data-id='stats-notification-table']"
,
statsNotificationTable
:
"[data-id='stats-notification-table']"
,
notificationSmallCard
:
"[data-id='notification-small-card']"
,
notificationSmallCard
:
"[data-id='notification-small-card']"
,
entityCard
:
"[data-id='entity-card']"
entityCard
:
"[data-id='entity-card']"
,
offsetCard
:
"[data-id='offset-card']"
},
},
/** ui events hash */
/** ui events hash */
events
:
function
()
{},
events
:
function
()
{},
...
@@ -241,6 +243,29 @@ define(['require',
...
@@ -241,6 +243,29 @@ define(['require',
"data"
:
_
.
pick
(
data
.
Notification
,
'lastMessageProcessedTime'
,
'offsetCurrent'
,
'offsetStart'
)
"data"
:
_
.
pick
(
data
.
Notification
,
'lastMessageProcessedTime'
,
'offsetCurrent'
,
'offsetStart'
)
})
})
);
);
var
offsetTableColumn
=
function
(
obj
)
{
var
returnObj
=
[]
_
.
each
(
obj
,
function
(
value
,
key
)
{
returnObj
.
push
({
"label"
:
key
,
"dataValue"
:
value
});
});
return
returnObj
}
that
.
ui
.
offsetCard
.
html
(
TopicOffsetTable
({
"enums"
:
Enums
.
stats
.
Notification
,
"data"
:
data
.
Notification
.
topicOffsets
,
"tableHeader"
:
[
'offsetCurrent'
,
'offsetStart'
],
"tableCol"
:
offsetTableColumn
(
data
.
Notification
.
topicOffsets
),
"getTmplValue"
:
function
(
argument
,
args
)
{
console
.
log
(
argument
,
args
)
var
returnVal
=
data
.
Notification
.
topicOffsets
[
argument
.
label
][
args
];
return
returnVal
?
_
.
numberFormatWithComa
(
returnVal
)
:
0
;
}
})
)
}
}
if
(
data
.
Server
)
{
if
(
data
.
Server
)
{
...
...
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