ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-843 Getting started module.
Date Tue, 02 Feb 2016 04:14:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 ff3eb24fd -> ecf4c43ad


IGNITE-843 Getting started module.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ecf4c43a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ecf4c43a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ecf4c43a

Branch: refs/heads/ignite-843-rc2
Commit: ecf4c43adf6182f13e7d92ce5b40c28052f38edc
Parents: ff3eb24
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Feb 2 11:13:58 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Feb 2 11:13:58 2016 +0700

----------------------------------------------------------------------
 .../control-center-web/src/main/js/app/index.js |   6 +-
 .../main/js/app/modules/getting-started/main.js | 100 +++++++++++++++++++
 .../js/app/services/GettingStarted/index.js     |  85 ----------------
 3 files changed, 103 insertions(+), 88 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ecf4c43a/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 f394b44..7ce2fb0 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -78,6 +78,7 @@ import './modules/configuration/sidebar/main';
 import './modules/configuration/include-event-types/main';
 import './modules/terms/main';
 import './modules/logo/main';
+import './modules/getting-started/main';
 // endignite
 
 // Directives.
@@ -92,7 +93,6 @@ import igniteFormFieldJavaClass from './directives/form-field-java-class/form-fi
 
 // Services.
 import IgniteUiAceOnLoad from './services/UiAceOnLoad/service';
-import IgniteGettingStarted from './services/GettingStarted/index';
 
 // Providers
 import igniteCountries from './providers/Countries/index';
@@ -126,7 +126,8 @@ angular
     'ignite-console.configuration.sidebar',
     'ignite-console.configuration.include-event-types',
     'ignite-console.terms',
-    'ignite-console.logo'
+    'ignite-console.logo',
+    'ignite-console.getting-started'
 ])
 // Directives.
 .directive(...igniteLoading)
@@ -139,7 +140,6 @@ angular
 .directive(...igniteFormFieldJavaClass)
 // Services.
 .service(...IgniteUiAceOnLoad)
-.service(...IgniteGettingStarted)
 // Providers.
 .provider(...igniteCountries)
 // Filters.

http://git-wip-us.apache.org/repos/asf/ignite/blob/ecf4c43a/modules/control-center-web/src/main/js/app/modules/getting-started/main.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/getting-started/main.js b/modules/control-center-web/src/main/js/app/modules/getting-started/main.js
new file mode 100644
index 0000000..e124374
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/modules/getting-started/main.js
@@ -0,0 +1,100 @@
+/*
+ * 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 angular from 'angular';
+
+// Getting started pages.
+import PAGES from 'app/data/getting-started.json!';
+
+angular
+    .module('ignite-console.getting-started', [])
+    .provider('igniteGettingStarted', function() {
+        const items = PAGES;
+
+        this.push = (data) => {
+            items.splice(items.length - 1, 0, data);
+        };
+
+        this.$get = [function() {
+            return items;
+        }];
+    })
+    .service('IgniteGettingStarted', ['$rootScope', '$modal', 'igniteGettingStarted', function($root,
$modal, igniteGettingStarted) {
+        const _model = igniteGettingStarted;
+
+        let _page = 0;
+
+        const scope = $root.$new();
+
+        scope.ui = {
+            showGettingStarted: false
+        };
+
+        function _fillPage() {
+            scope.title = _model[_page].title;
+            scope.message = _model[_page].message.join(' ');
+        }
+
+        scope.isFirst = () => _page === 0;
+
+        scope.isLast = () => _page === _model.length - 1;
+
+        scope.next = () => {
+            _page += 1;
+
+            _fillPage();
+        };
+
+        scope.prev = () => {
+            _page -= 1;
+
+            _fillPage();
+        };
+
+        const dialog = $modal({templateUrl: '/templates/getting-started.html', scope, placement:
'center', show: false, backdrop: 'static'});
+
+        scope.close = () => {
+            try {
+                localStorage.showGettingStarted = scope.ui.showGettingStarted;
+            }
+            catch (ignore) {
+                // No-op.
+            }
+
+            dialog.hide();
+        };
+
+        return {
+            tryShow: (force) => {
+                try {
+                    scope.ui.showGettingStarted = typeof localStorage.showGettingStarted
=== 'undefined'
+                        || localStorage.showGettingStarted === 'true';
+                }
+                catch (ignore) {
+                    // No-op.
+                }
+
+                if (force || scope.ui.showGettingStarted) {
+                    _page = 0;
+
+                    _fillPage();
+
+                    dialog.show();
+                }
+            }
+        };
+    }]);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ecf4c43a/modules/control-center-web/src/main/js/app/services/GettingStarted/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/services/GettingStarted/index.js b/modules/control-center-web/src/main/js/app/services/GettingStarted/index.js
deleted file mode 100644
index 158f8f3..0000000
--- a/modules/control-center-web/src/main/js/app/services/GettingStarted/index.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.
- */
-
-// Getting started pages.
-import PAGES from 'app/data/getting-started.json!';
-
-export default ['IgniteGettingStarted', ['$rootScope', '$modal', function($root, $modal)
{
-    const _model = PAGES;
-
-    let _page = 0;
-
-    const scope = $root.$new();
-
-    scope.ui = {
-        showGettingStarted: false
-    };
-
-    function _fillPage() {
-        scope.title = _model[_page].title;
-        scope.message = _model[_page].message.join(' ');
-    }
-
-    scope.isFirst = () => _page === 0;
-
-    scope.isLast = () => _page === _model.length - 1;
-
-    scope.next = () => {
-        _page += 1;
-
-        _fillPage();
-    };
-
-    scope.prev = () => {
-        _page -= 1;
-
-        _fillPage();
-    };
-
-    const dialog = $modal({templateUrl: '/templates/getting-started.html', scope, placement:
'center', show: false, backdrop: 'static'});
-
-    scope.close = () => {
-        try {
-            localStorage.showGettingStarted = scope.ui.showGettingStarted;
-        }
-        catch (ignore) {
-            // No-op.
-        }
-
-        dialog.hide();
-    };
-
-    return {
-        tryShow: (force) => {
-            try {
-                scope.ui.showGettingStarted = typeof localStorage.showGettingStarted ===
'undefined'
-                    || localStorage.showGettingStarted === 'true';
-            }
-            catch (ignore) {
-                // No-op.
-            }
-
-            if (force || scope.ui.showGettingStarted) {
-                _page = 0;
-
-                _fillPage();
-
-                dialog.show();
-            }
-        }
-    };
-}]];


Mime
View raw message