You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2016/02/03 11:56:33 UTC
[08/50] ignite git commit: IGNITE-843 Support retina images,
plugable logo.
IGNITE-843 Support retina images, plugable logo.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/394517d7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/394517d7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/394517d7
Branch: refs/heads/ignite-843-rc3
Commit: 394517d774c5a6b13797920dfbfaf70c4bdaeab2
Parents: b5060a3
Author: Andrey <an...@gridgain.com>
Authored: Fri Jan 29 17:38:58 2016 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jan 29 17:38:58 2016 +0700
----------------------------------------------------------------------
.../control-center-web/src/main/js/app/index.js | 6 +-
.../src/main/js/app/modules/logo/logo.jade | 18 ++++++
.../src/main/js/app/modules/logo/main.js | 59 +++++++++++++++++++
.../control-center-web/src/main/js/config.js | 1 +
.../src/main/js/gulpfile.js/tasks/copy.js | 3 +-
.../control-center-web/src/main/js/package.json | 4 ++
.../src/main/js/public/images/ignite_logo.png | Bin 0 -> 5280 bytes
.../main/js/public/images/ignite_logo@2x.png | Bin 0 -> 6479 bytes
.../src/main/js/public/images/logo.png | Bin 6479 -> 0 bytes
.../src/main/js/public/stylesheets/style.scss | 30 ++--------
.../src/main/js/views/includes/header.jade | 9 +--
11 files changed, 97 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/app/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js
index d41263a..f394b44 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -33,6 +33,7 @@ import 'angular-ui-grid';
import 'angular-loading';
import 'angular-drag-and-drop-lists';
import 'angular-nvd3';
+import 'angular-retina';
import 'bootstrap-carousel';
import 'file-saver';
@@ -76,6 +77,7 @@ import './modules/settings/main';
import './modules/configuration/sidebar/main';
import './modules/configuration/include-event-types/main';
import './modules/terms/main';
+import './modules/logo/main';
// endignite
// Directives.
@@ -102,6 +104,7 @@ angular
.module('ignite-console', [
'ui.router',
'ui.router.title',
+ 'ngRetina',
// Base modules.
'ignite-console.Auth',
'ignite-console.User',
@@ -122,7 +125,8 @@ angular
'ignite-console.userbar',
'ignite-console.configuration.sidebar',
'ignite-console.configuration.include-event-types',
- 'ignite-console.terms'
+ 'ignite-console.terms',
+ 'ignite-console.logo'
])
// Directives.
.directive(...igniteLoading)
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/app/modules/logo/logo.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/logo/logo.jade b/modules/control-center-web/src/main/js/app/modules/logo/logo.jade
new file mode 100644
index 0000000..b807921
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/logo/logo.jade
@@ -0,0 +1,18 @@
+//-
+ 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.
+
+a(href='/')
+ img.navbar-brand(ng-src='{{logo.url}}' height='40')
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/app/modules/logo/main.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/logo/main.js b/modules/control-center-web/src/main/js/app/modules/logo/main.js
new file mode 100644
index 0000000..e8b986e
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/logo/main.js
@@ -0,0 +1,59 @@
+/*
+ * 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 template from './logo.jade!';
+
+import angular from 'angular';
+
+angular
+ .module('ignite-console.logo', [
+
+ ])
+ .provider('igniteLogo', function() {
+ let _poweredBy = false;
+
+ let _url = '/images/ignite_logo.png';
+
+ this.url = function(url) {
+ _url = url;
+
+ _poweredBy = true;
+ };
+
+ this.$get = [function() {
+ return {
+ url: _url,
+ poweredBy: _poweredBy
+ };
+ }];
+ })
+ .directive('igniteLogo', ['igniteLogo', function(igniteLogo) {
+ function controller() {
+ const ctrl = this;
+
+ ctrl.url = igniteLogo.url;
+ ctrl.poweredBy = igniteLogo.poweredBy;
+ }
+
+ return {
+ restrict: 'E',
+ template,
+ controller,
+ controllerAs: 'logo',
+ replace: true
+ };
+ }]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/config.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/config.js b/modules/control-center-web/src/main/js/config.js
index 6dfaf69..159b618 100644
--- a/modules/control-center-web/src/main/js/config.js
+++ b/modules/control-center-web/src/main/js/config.js
@@ -25,6 +25,7 @@ System.config({
"angular-loading": "github:darthwade/angular-loading@0.1.4",
"angular-motion": "github:mgcrea/angular-motion@0.4.3",
"angular-nvd3": "github:krispo/angular-nvd3@1.0.5",
+ "angular-retina": "npm:angular-retina@0.3.1",
"angular-sanitize": "github:angular/bower-angular-sanitize@1.4.8",
"angular-smart-table": "github:lorenzofox3/Smart-Table@2.1.6",
"angular-strap": "github:akuznetsov-gridgain/angular-strap@fix-1852-2.3.6",
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js b/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
index c1dbb21..3caa82f 100644
--- a/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
+++ b/modules/control-center-web/src/main/js/gulpfile.js/tasks/copy.js
@@ -48,7 +48,8 @@ var igniteModulePaths = [
igniteModules + '/**/app/modules/*.js',
igniteModules + '/**/app/modules/**/*.js',
igniteModules + '/**/controllers/*.js',
- igniteModules + '/**/controllers/models/*.json'
+ igniteModules + '/**/controllers/models/*.json',
+ igniteModules + '/**/images/*.png'
];
gulp.task('copy', function(cb) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/package.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/package.json b/modules/control-center-web/src/main/js/package.json
index 53d56c7..226efed 100644
--- a/modules/control-center-web/src/main/js/package.json
+++ b/modules/control-center-web/src/main/js/package.json
@@ -74,6 +74,7 @@
"angular-loading": "github:darthwade/angular-loading@^0.1.4",
"angular-motion": "github:mgcrea/angular-motion@^0.4.3",
"angular-nvd3": "github:krispo/angular-nvd3@^1.0.4",
+ "angular-retina": "npm:angular-retina@^0.3.1",
"angular-sanitize": "github:angular/bower-angular-sanitize@^1.4.8",
"angular-smart-table": "github:lorenzofox3/Smart-Table@^2.1.4",
"angular-strap": "github:akuznetsov-gridgain/angular-strap@fix-1852-2.3.6",
@@ -241,6 +242,9 @@
},
"github:eligrey/Blob.js@master": {
"format": "global"
+ },
+ "npm:angular-retina@0.3.1": {
+ "main": "dist/angular-retina.js"
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/public/images/ignite_logo.png
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/images/ignite_logo.png b/modules/control-center-web/src/main/js/public/images/ignite_logo.png
new file mode 100644
index 0000000..39fdc58
Binary files /dev/null and b/modules/control-center-web/src/main/js/public/images/ignite_logo.png differ
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/public/images/ignite_logo@2x.png
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/images/ignite_logo@2x.png b/modules/control-center-web/src/main/js/public/images/ignite_logo@2x.png
new file mode 100644
index 0000000..4545a70
Binary files /dev/null and b/modules/control-center-web/src/main/js/public/images/ignite_logo@2x.png differ
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/public/images/logo.png
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/images/logo.png b/modules/control-center-web/src/main/js/public/images/logo.png
deleted file mode 100644
index 4545a70..0000000
Binary files a/modules/control-center-web/src/main/js/public/images/logo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 1bac6c3..f29c956 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -60,11 +60,15 @@ hr {
.navbar-default .navbar-brand, .navbar-default .navbar-brand:hover {
position: absolute;
- width: 100%;
left: 0;
text-align: center;
}
+.navbar-brand {
+ padding: 5px 0;
+ margin-right: 15px;
+}
+
.modal.center .modal-dialog {
position: fixed;
top: 50%;
@@ -220,22 +224,6 @@ ul.navbar-nav, .sidebar-nav {
padding: 15px;
}
-.header h1.navbar-brand {
- height: 40px;
- width: 200px;
- padding: 0;
- margin: 5px 15px 0 0;
-}
-
-.header h1.navbar-brand a {
- text-indent: -99999px;
- background: no-repeat center center;
- display: block;
- width: 100%;
- height: 100%;
- background-size: contain;
-}
-
.header .nav.navbar-nav.pull-right {
position: relative;
right: -15px;
@@ -298,14 +286,6 @@ h1, h2, h3, h4, h5, h6 {
margin-bottom: 10px;
}
-.header h1.navbar-brand a {
- background-image: url("#{$logo-path}");
-}
-
-.header h1.navbar-brand {
- width: 96px;
-}
-
.container-footer {
margin-top: 20px;
margin-bottom: 20px;
http://git-wip-us.apache.org/repos/asf/ignite/blob/394517d7/modules/control-center-web/src/main/js/views/includes/header.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/header.jade b/modules/control-center-web/src/main/js/views/includes/header.jade
index 9566611..2a8b229 100644
--- a/modules/control-center-web/src/main/js/views/includes/header.jade
+++ b/modules/control-center-web/src/main/js/views/includes/header.jade
@@ -15,13 +15,10 @@
limitations under the License.
header#header.header
- .viewedUser(ng-show='$root.user.becomeUsed') Currently assuming "
- strong {{$root.user.username}}
- | ",
- a(ng-click='$root.revertIdentity()') revert to your identity.
+ .viewedUser(ng-show='$root.user.becomeUsed')
+ | Currently assuming #[strong {{$root.user.username}}], #[a(ng-click='$root.revertIdentity()') revert to your identity].
.container
- h1.navbar-brand
- a(href='/') Apache Ignite Web Console
+ ignite-logo
.navbar-collapse.collapse(ng-if='$root.user')
ul.nav.navbar-nav(ignite-configuration-sidebar ignite-navbar)
li(ng-class='{active: $state.includes("base.configuration")}')