You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2020/03/30 09:35:09 UTC
[atlas] 01/02: ATLAS-3705 : UI : Remove notification section from
Server Statistics: migration page
This is an automated email from the ASF dual-hosted git repository.
kbhatt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
commit e58e7d42b47326feb97779f4e4147c78cefc866c
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Mon Mar 30 14:34:30 2020 +0530
ATLAS-3705 : UI : Remove notification section from Server Statistics: migration page
---
dashboardv2/gruntfile.js | 1 +
dashboardv2/public/css/scss/migration-style.scss | 28 ++++++++++++++++++++++
dashboardv2/public/css/scss/stats.scss | 15 ++++++++++++
.../public/js/templates/site/Statistics_tmpl.html | 7 ++++--
.../public/js/views/migration/MigrationView.js | 2 +-
dashboardv2/public/js/views/site/Statistics.js | 22 +++++++++++++----
dashboardv2/public/migration-status.html.tpl | 17 +------------
7 files changed, 69 insertions(+), 23 deletions(-)
diff --git a/dashboardv2/gruntfile.js b/dashboardv2/gruntfile.js
index efb1475..e4d4f5c 100644
--- a/dashboardv2/gruntfile.js
+++ b/dashboardv2/gruntfile.js
@@ -209,6 +209,7 @@ module.exports = function(grunt) {
build: {
files: {
[distPath + '/css/style.css']: modulesPath + 'css/scss/style.scss',
+ [distPath + '/css/migration-style.css']: modulesPath + 'css/scss/migration-style.scss',
[distPath + '/css/login.css']: modulesPath + 'css/scss/login.scss'
}
}
diff --git a/dashboardv2/public/css/scss/migration-style.scss b/dashboardv2/public/css/scss/migration-style.scss
new file mode 100644
index 0000000..a54bcef
--- /dev/null
+++ b/dashboardv2/public/css/scss/migration-style.scss
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+@import "__mixin.scss";
+@import "__variable.scss";
+@import "common.scss";
+@import "table.scss";
+@import "form.scss";
+@import "panel.scss";
+@import "loader.scss";
+@import "theme.scss";
+@import "stats.scss";
+@import "override.scss";
\ No newline at end of file
diff --git a/dashboardv2/public/css/scss/stats.scss b/dashboardv2/public/css/scss/stats.scss
index 723b87d..2114117 100644
--- a/dashboardv2/public/css/scss/stats.scss
+++ b/dashboardv2/public/css/scss/stats.scss
@@ -111,4 +111,19 @@
}
}
+}
+
+.refresh-container {
+ background: white;
+ position: fixed;
+ z-index: 9999;
+ right: 23px;
+ top: 7px;
+ border-radius: 23px;
+
+ .btn {
+ margin: 0px;
+ border-radius: 23px;
+ padding: 10px 10px;
+ }
}
\ No newline at end of file
diff --git a/dashboardv2/public/js/templates/site/Statistics_tmpl.html b/dashboardv2/public/js/templates/site/Statistics_tmpl.html
index 5bf0a9c..ce4b9ee 100644
--- a/dashboardv2/public/js/templates/site/Statistics_tmpl.html
+++ b/dashboardv2/public/js/templates/site/Statistics_tmpl.html
@@ -14,7 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
-<div class="panel-group server-stats-container statsContainer hide" id="accordion">
+<div class="refresh-container statisticsRefresh hide" data-id="statisticsRefresh">
+ <button type="button" class="btn fa fa-refresh pull-right btn-sm btn-action" title="Refresh Data"></button>
+</div>
+<div class="panel-group server-stats-container statsContainer hide col-md-12" id="accordion">
<div class="panel panel-default custom-panel expand_collapse_panel-icon" data-id="entity">
<div class="panel-heading" data-toggle="collapse" href="#entityCountCollapse" aria-expanded="true">
<h4 class="panel-title">
@@ -89,7 +92,7 @@
</div>
</div>
<div class="col-sm-12">
- <div class="card-container panel panel-primary">
+ <div class="card-container panel panel-primary hide" data-id="notificationDetails">
<div class="panel-heading">Notification Details</div>
<div class="panel-body">
<table data-id="offset-card" class="table stat-table notification-table table-striped ">
diff --git a/dashboardv2/public/js/views/migration/MigrationView.js b/dashboardv2/public/js/views/migration/MigrationView.js
index 8f4b0b0..e7000f3 100644
--- a/dashboardv2/public/js/views/migration/MigrationView.js
+++ b/dashboardv2/public/js/views/migration/MigrationView.js
@@ -60,7 +60,7 @@ define(['require',
that.metricCollection = new VTagList();
that.metricCollection.url = UrlLinks.metricsApiUrl();
that.metricCollection.modelAttrName = "data";
- that.RStatisticsView.show(new Statistics({ hideModal: false, metricCollection: that.metricCollection }));
+ that.RStatisticsView.show(new Statistics({ metricCollection: that.metricCollection, isMigrationView: true }));
})
}
});
diff --git a/dashboardv2/public/js/views/site/Statistics.js b/dashboardv2/public/js/views/site/Statistics.js
index 4bef471..a71a2ad 100644
--- a/dashboardv2/public/js/views/site/Statistics.js
+++ b/dashboardv2/public/js/views/site/Statistics.js
@@ -55,10 +55,20 @@ define(['require',
osCard: "[data-id='os-card']",
runtimeCard: "[data-id='runtime-card']",
memoryCard: "[data-id='memory-card']",
- memoryPoolUsage: "[data-id='memory-pool-usage-card']"
+ memoryPoolUsage: "[data-id='memory-pool-usage-card']",
+ statisticsRefresh: "[data-id='statisticsRefresh']",
+ notificationDetails: "[data-id='notificationDetails']"
},
/** ui events hash */
- events: function() {},
+ events: function() {
+ var events = {};
+ events["click " + this.ui.statisticsRefresh] = function(e) {
+ this.$('.statsContainer,.statsNotificationContainer,.statisticsRefresh').addClass('hide');
+ this.$('.statsLoader,.statsNotificationLoader').addClass('show');
+ this.fetchMetricData();
+ };
+ return events;
+ },
/**
* intialize a new AboutAtlasView Layout
* @constructs
@@ -67,7 +77,7 @@ define(['require',
_.extend(this, options);
var that = this;
this.DATA_MAX_LENGTH = 25;
- if (this.hideModal !== false) {
+ if (this.isMigrationView !== true) {
var modal = new Modal({
title: 'Statistics',
content: this,
@@ -111,6 +121,9 @@ define(['require',
that.renderSystemDeatils({ data: data });
that.renderClassifications({ data: data });
that.$('.statsContainer,.statsNotificationContainer').removeClass('hide');
+ if (that.isMigrationView) {
+ that.$('.statisticsRefresh').removeClass('hide');
+ }
that.$('.statsLoader,.statsNotificationLoader').removeClass('show');
if (options && options.update) {
if (that.modal) {
@@ -280,7 +293,7 @@ define(['require',
});
return tableBody;
};
- if (data.Notification) {
+ if (!that.isMigrationView && data.Notification) {
var tableCol = [{
label: "Total <br> (from " + (that.getValue({
"value": data.Server["startTimeStamp"],
@@ -348,6 +361,7 @@ define(['require',
}
})
)
+ that.ui.notificationDetails.removeClass('hide');
}
if (data.Server) {
diff --git a/dashboardv2/public/migration-status.html.tpl b/dashboardv2/public/migration-status.html.tpl
index 0048826..74d94d7 100644
--- a/dashboardv2/public/migration-status.html.tpl
+++ b/dashboardv2/public/migration-status.html.tpl
@@ -38,25 +38,10 @@
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" type="text/css" href="css/animate.min.css?bust=<%- bust %>" />
<link rel="stylesheet" href="js/libs/backgrid/css/backgrid.css?bust=<%- bust %>" />
- <link rel="stylesheet" href="js/libs/backgrid-filter/css/backgrid-filter.min.css?bust=<%- bust %>" />
- <link rel="stylesheet" href="js/libs/backgrid-paginator/css/backgrid-paginator.css?bust=<%- bust %>" />
- <link rel="stylesheet" href="js/libs/backgrid-orderable-columns/css/backgrid-orderable-columns.css?bust=<%- bust %>" />
- <link rel="stylesheet" href="js/libs/backgrid-sizeable-columns/css/backgrid-sizeable-columns.css?bust=<%- bust %>" />
- <link rel="stylesheet" href="js/external_lib/backgrid-columnmanager/css/Backgrid.ColumnManager.css?bust=<%- bust %>" />
- <link rel="stylesheet" href="js/libs/select2/css/select2.min.css?bust=<%- bust %>" />
<link rel="stylesheet" href="js/libs/bootstrap/css/bootstrap.min.css?bust=<%- bust %>" />
- <link rel="stylesheet" href="js/libs/jquery-asBreadcrumbs/css/asBreadcrumbs.min.css?bust=<%- bust %>" />
<link rel="stylesheet" href="css/googlefonts.css?bust=<%- bust %>" type="text/css" />
- <link rel="stylesheet" type="text/css" href="js/external_lib/jquery-ui/jquery-ui.min.css?bust=<%- bust %>" />
- <link href="css/bootstrap-sidebar.css?bust=<%- bust %>" rel="stylesheet" />
<link href="js/libs/font-awesome/css/font-awesome.min.css?bust=<%- bust %>" rel="stylesheet" />
- <link href="js/external_lib/pnotify/pnotify.custom.min.css?bust=<%- bust %>" rel="stylesheet" />
- <link href="js/libs/jQueryQueryBuilder/css/query-builder.default.min.css?bust=<%- bust %>" rel="stylesheet" />
- <link href="js/libs/bootstrap-daterangepicker/css/daterangepicker.css?bust=<%- bust %>" rel="stylesheet" />
- <link rel="stylesheet" href="js/libs/nvd3/css/nv.d3.min.css?bust=<%- bust %>" />
- <link href="js/libs/jstree/css/default/default-theme.min.css?bust=<%- bust %>" rel="stylesheet" />
- <link href="js/libs/pretty-checkbox/css/pretty-checkbox.min.css?bust=<%- bust %>" rel="stylesheet" />
- <link href="css/style.css?bust=<%- bust %>" rel="stylesheet" />
+ <link href="css/migration-style.css?bust=<%- bust %>" rel="stylesheet" />
</head>
<body>