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 2018/12/17 09:33:50 UTC
[1/3] ignite git commit: IGNITE-10239 Update navigation and top menu.
- Fixes #5630.
Repository: ignite
Updated Branches:
refs/heads/master 8ef84661f -> 9dc251cd0
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/header-logo.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-logo.pug b/modules/web-console/frontend/app/modules/branding/header-logo.pug
deleted file mode 100644
index f0453d3..0000000
--- a/modules/web-console/frontend/app/modules/branding/header-logo.pug
+++ /dev/null
@@ -1,18 +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.
-
-a(ui-sref='signin')
- img.navbar-brand(ng-src='{{logo.url}}')
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/header-title.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-title.directive.js b/modules/web-console/frontend/app/modules/branding/header-title.directive.js
deleted file mode 100644
index f67439c..0000000
--- a/modules/web-console/frontend/app/modules/branding/header-title.directive.js
+++ /dev/null
@@ -1,44 +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.
- */
-
-const template = `
- <h1
- style="margin: 0;font-size: 1.4em;"
- >{{::title.text}}</h1>
-`;
-
-/**
- * @param {import('./branding.service').default} branding
- */
-export default function factory(branding) {
- function controller() {
- const ctrl = this;
-
- ctrl.text = branding.headerText;
- }
-
- return {
- restrict: 'E',
- template,
- controller,
- controllerAs: 'title',
- replace: true
- };
-}
-
-factory.$inject = ['IgniteBranding'];
-
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js b/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
deleted file mode 100644
index 3f8b3de..0000000
--- a/modules/web-console/frontend/app/modules/branding/powered-by-apache.directive.js
+++ /dev/null
@@ -1,39 +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.
- */
-
-import template from './powered-by-apache.pug';
-
-/**
- * @param {import('./branding.service').default} branding
- */
-export default function factory(branding) {
- function controller() {
- const ctrl = this;
-
- ctrl.show = branding.showIgniteLogo;
- }
-
- return {
- restrict: 'E',
- template,
- controller,
- controllerAs: 'poweredBy'
- };
-}
-
-factory.$inject = ['IgniteBranding'];
-
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug b/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug
deleted file mode 100644
index 6031235..0000000
--- a/modules/web-console/frontend/app/modules/branding/powered-by-apache.pug
+++ /dev/null
@@ -1,18 +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.
-
-a(ng-if='poweredBy.show' href='//ignite.apache.org' target='_blank')
- img(ng-src='/images/pb-ignite.png')
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/demo/Demo.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/demo/Demo.module.js b/modules/web-console/frontend/app/modules/demo/Demo.module.js
index 6c14e4a..9416bca 100644
--- a/modules/web-console/frontend/app/modules/demo/Demo.module.js
+++ b/modules/web-console/frontend/app/modules/demo/Demo.module.js
@@ -71,34 +71,7 @@ function demoInterceptor(Demo) {
demoInterceptor.$inject = ['Demo'];
-/**
- * @param {ng.IScope} $scope
- * @param {import('@uirouter/angularjs').StateService} $state
- * @param {ng.IWindowService} $window
- * @param {ReturnType<typeof import('app/services/Confirm.service').default>} Confirm
- */
-function demoController($scope, $state, $window, Confirm) {
- const _openTab = (stateName) => $window.open($state.href(stateName), '_blank');
-
- $scope.startDemo = () => {
- if (!$scope.user.demoCreated)
- return _openTab('demo.reset');
-
- Confirm.confirm('Would you like to continue with previous demo session?', true, false)
- .then((resume) => {
- if (resume)
- return _openTab('demo.resume');
-
- _openTab('demo.reset');
- });
- };
-
- $scope.closeDemo = () => {
- $window.close();
- };
-}
-demoController.$inject = ['$scope', '$state', '$window', 'IgniteConfirm'];
function igniteDemoInfoProvider() {
const items = DEMO_INFO;
@@ -211,6 +184,5 @@ angular
.config(config)
.provider('Demo', DemoProvider)
.factory('demoInterceptor', demoInterceptor)
-.controller('demoController', demoController)
.provider('igniteDemoInfo', igniteDemoInfoProvider)
.service('DemoInfo', DemoInfo);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js b/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js
deleted file mode 100644
index 9b905d7..0000000
--- a/modules/web-console/frontend/app/modules/navbar/Navbar.provider.js
+++ /dev/null
@@ -1,30 +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.
- */
-
-export default function() {
- const items = [];
-
- this.push = function(data) {
- items.push(data);
- };
-
- this.$get = function() {
- return items;
- };
-
- return this;
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/navbar/navbar.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/navbar.directive.js b/modules/web-console/frontend/app/modules/navbar/navbar.directive.js
deleted file mode 100644
index e400cf7..0000000
--- a/modules/web-console/frontend/app/modules/navbar/navbar.directive.js
+++ /dev/null
@@ -1,32 +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.
- */
-
-export default function factory(IgniteNavbar) {
- function controller() {
- const ctrl = this;
-
- ctrl.items = IgniteNavbar;
- }
-
- return {
- restrict: 'A',
- controller,
- controllerAs: 'navbar'
- };
-}
-
-factory.$inject = ['IgniteNavbar'];
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/navbar/navbar.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/navbar.module.js b/modules/web-console/frontend/app/modules/navbar/navbar.module.js
index 63588c7..e2a4f83 100644
--- a/modules/web-console/frontend/app/modules/navbar/navbar.module.js
+++ b/modules/web-console/frontend/app/modules/navbar/navbar.module.js
@@ -17,17 +17,10 @@
import angular from 'angular';
-import IgniteNavbar from './Navbar.provider';
import IgniteUserbar from './Userbar.provider';
-import igniteNavbar from './navbar.directive';
-import igniteUserbar from './userbar.directive';
-
angular
.module('ignite-console.navbar', [
])
-.provider('IgniteNavbar', IgniteNavbar)
-.provider('IgniteUserbar', IgniteUserbar)
-.directive('igniteNavbar', igniteNavbar)
-.directive('igniteUserbar', igniteUserbar);
+.provider('IgniteUserbar', IgniteUserbar);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/navbar/userbar.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/navbar/userbar.directive.js b/modules/web-console/frontend/app/modules/navbar/userbar.directive.js
deleted file mode 100644
index b636a34..0000000
--- a/modules/web-console/frontend/app/modules/navbar/userbar.directive.js
+++ /dev/null
@@ -1,59 +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.
- */
-
-/**
- * @param {ng.IRootScopeService} $root
- * @param {unknown} IgniteUserbar
- * @param {unknown} AclService
- */
-function controller($root, IgniteUserbar, AclService) {
- const ctrl = this;
-
- this.$onInit = () => {
- ctrl.items = [
- {text: 'Profile', sref: 'base.settings.profile'},
- {text: 'Getting started', click: 'gettingStarted.tryShow(true)'}
- ];
-
- const _rebuildSettings = () => {
- ctrl.items.splice(2);
-
- if (AclService.can('admin_page'))
- ctrl.items.push({text: 'Admin panel', sref: 'base.settings.admin'});
-
- ctrl.items.push(...IgniteUserbar);
-
- if (AclService.can('logout'))
- ctrl.items.push({text: 'Log out', sref: 'logout'});
- };
-
- if ($root.user)
- _rebuildSettings(null, $root.user);
-
- $root.$on('user', _rebuildSettings);
- };
-}
-
-controller.$inject = ['$rootScope', 'IgniteUserbar', 'AclService'];
-
-export default function() {
- return {
- restrict: 'A',
- controller,
- controllerAs: 'userbar'
- };
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/services/store.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/services/store.ts b/modules/web-console/frontend/app/services/store.ts
new file mode 100644
index 0000000..19dde69
--- /dev/null
+++ b/modules/web-console/frontend/app/services/store.ts
@@ -0,0 +1,75 @@
+/*
+ * 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 {BehaviorSubject} from 'rxjs/BehaviorSubject';
+import {Subject} from 'rxjs/Subject';
+import {scan, tap} from 'rxjs/operators';
+import {merge} from 'rxjs/observable/merge';
+
+interface Reducer<State, Actions> {
+ (state: State, action: Actions): State
+}
+
+export class Store<Actions, State> {
+ static $inject = ['$injector'];
+
+ actions$: Subject<Actions>
+ state$: BehaviorSubject<State>
+ private _reducers: Array<Reducer<State, Actions>>
+
+ constructor(private $injector: ng.auto.IInjectorService) {
+ this.$injector = $injector;
+
+ this.actions$ = new Subject();
+ this.state$ = new BehaviorSubject({});
+ this.actions$.pipe(
+ scan((state, action) => this._reducers.reduce((state, reducer) => reducer(state, action), state), void 0),
+ tap((state) => this.state$.next(state))
+ ).subscribe();
+ this._reducers = [(state) => state];
+ }
+
+ dispatch(action: Actions) {
+ this.actions$.next(action);
+ }
+
+ addReducer<T extends keyof State, U = State[T]>(path: T, reducer: Reducer<U, Actions>): void
+ addReducer(reducer: Reducer<State, Actions>): void
+ addReducer(...args) {
+ if (typeof args[0] === 'string') {
+ const [path, reducer] = args;
+ this._reducers = [
+ ...this._reducers,
+ (state = {}, action) => {
+ const pathState = reducer(state[path], action);
+ // Don't update root state if child state changes
+ return state[path] !== pathState ? {...state, [path]: pathState} : state;
+ }
+ ];
+ } else {
+ const [reducer] = args;
+ this._reducers = [...this._reducers, reducer];
+ }
+ }
+
+ addEffects(EffectsClass) {
+ const instance = this.$injector.instantiate(EffectsClass);
+ return merge(
+ ...Object.keys(instance).filter((k) => k.endsWith('Effect$')).map((k) => instance[k]),
+ ).pipe(tap((a) => this.dispatch(a))).subscribe();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/actions/ui.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/actions/ui.ts b/modules/web-console/frontend/app/store/actions/ui.ts
new file mode 100644
index 0000000..25d9ba0
--- /dev/null
+++ b/modules/web-console/frontend/app/store/actions/ui.ts
@@ -0,0 +1,36 @@
+/*
+ * 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 {NavigationMenuItem} from '../../types';
+
+export const TOGGLE_SIDEBAR: 'TOGGLE_SIDEBAR' = 'TOGGLE_SIDEBAR';
+export const toggleSidebar = () => ({type: TOGGLE_SIDEBAR});
+
+export const NAVIGATION_MENU_ITEM: 'NAVIGATION_MENU_ITEM' = 'NAVIGATION_MENU_ITEM';
+export const navigationMenuItem = (menuItem: NavigationMenuItem) => ({type: NAVIGATION_MENU_ITEM, menuItem});
+
+export const HIDE_NAVIGATION_MENU_ITEM: 'HIDE_NAVIGATION_MENU_ITEM' = 'HIDE_NAVIGATION_MENU_ITEM';
+export const hideNavigationMenuItem = (label: NavigationMenuItem['label']) => ({type: HIDE_NAVIGATION_MENU_ITEM, label});
+
+export const SHOW_NAVIGATION_MENU_ITEM: 'SHOW_NAVIGATION_MENU_ITEM' = 'SHOW_NAVIGATION_MENU_ITEM';
+export const showNavigationMenuItem = (label: NavigationMenuItem['label']) => ({type: SHOW_NAVIGATION_MENU_ITEM, label});
+
+export type UIActions =
+ | ReturnType<typeof toggleSidebar>
+ | ReturnType<typeof navigationMenuItem>
+ | ReturnType<typeof hideNavigationMenuItem>
+ | ReturnType<typeof showNavigationMenuItem>;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/actions/user.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/actions/user.ts b/modules/web-console/frontend/app/store/actions/user.ts
new file mode 100644
index 0000000..34c8d20
--- /dev/null
+++ b/modules/web-console/frontend/app/store/actions/user.ts
@@ -0,0 +1,24 @@
+/*
+ * 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 {User} from '../../types';
+
+export const USER: 'USER' = 'USER';
+export const user = (user: User) => ({type: USER, user});
+
+export type UserActions =
+ | ReturnType<typeof user>;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/effects/ui.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/effects/ui.ts b/modules/web-console/frontend/app/store/effects/ui.ts
new file mode 100644
index 0000000..2a635d6
--- /dev/null
+++ b/modules/web-console/frontend/app/store/effects/ui.ts
@@ -0,0 +1,32 @@
+/*
+ * 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 {AppStore, USER, ofType, hideNavigationMenuItem, showNavigationMenuItem} from '..';
+import {map} from 'rxjs/operators';
+
+export class UIEffects {
+ static $inject = ['Store']
+ constructor(private store: AppStore) {}
+
+ toggleQueriesNavItemEffect$ = this.store.actions$.pipe(
+ ofType(USER),
+ map((action) => {
+ const QUERY_LABEL = 'Queries';
+ return action.user.becomeUsed ? hideNavigationMenuItem(QUERY_LABEL) : showNavigationMenuItem(QUERY_LABEL);
+ })
+ )
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/index.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/index.ts b/modules/web-console/frontend/app/store/index.ts
new file mode 100644
index 0000000..fa4a878
--- /dev/null
+++ b/modules/web-console/frontend/app/store/index.ts
@@ -0,0 +1,48 @@
+/*
+ * 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 {Store} from '../services/store';
+
+import {UIState, uiReducer} from './reducers/ui';
+import {UIActions} from './actions/ui';
+import {UIEffects} from './effects/ui';
+
+import {UserActions} from './actions/user';
+
+export * from './actions/ui';
+export * from './reducers/ui';
+export * from './selectors/ui';
+
+export * from './actions/user';
+
+export {ofType} from './ofType';
+
+export type State = {
+ ui: UIState,
+};
+
+export type Actions =
+ | UserActions
+ | UIActions;
+
+export type AppStore = Store<Actions, State>;
+
+register.$inject = ['Store'];
+export function register(store: AppStore) {
+ store.addReducer('ui', uiReducer);
+ store.addEffects(UIEffects);
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/ofType.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/ofType.ts b/modules/web-console/frontend/app/store/ofType.ts
new file mode 100644
index 0000000..3d3bd8e
--- /dev/null
+++ b/modules/web-console/frontend/app/store/ofType.ts
@@ -0,0 +1,26 @@
+/*
+ * 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 {OperatorFunction} from 'rxjs/interfaces';
+import {filter} from 'rxjs/operators';
+
+type Action = {type: string};
+export function ofType<T extends string, U extends Action, V extends Extract<U, {type: T}>>(type: T): OperatorFunction<U, V>
+export function ofType<U extends Action>(type): OperatorFunction<U, U> {
+ return filter((action: U): boolean => type === action.type);
+}
+
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/reducers/ui.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/reducers/ui.ts b/modules/web-console/frontend/app/store/reducers/ui.ts
new file mode 100644
index 0000000..6f2859d
--- /dev/null
+++ b/modules/web-console/frontend/app/store/reducers/ui.ts
@@ -0,0 +1,50 @@
+/*
+ * 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 {NavigationMenu} from '../../types';
+import {UIActions, TOGGLE_SIDEBAR, NAVIGATION_MENU_ITEM, HIDE_NAVIGATION_MENU_ITEM, SHOW_NAVIGATION_MENU_ITEM} from '..';
+
+export type UIState = {
+ sidebarOpened: boolean,
+ navigationMenu: NavigationMenu
+};
+
+const defaults: UIState = {
+ sidebarOpened: false,
+ navigationMenu: []
+};
+
+export function uiReducer(state: UIState = defaults, action: UIActions): UIState {
+ switch (action.type) {
+ case TOGGLE_SIDEBAR:
+ return {...state, sidebarOpened: !state.sidebarOpened};
+ case NAVIGATION_MENU_ITEM:
+ return {...state, navigationMenu: [...state.navigationMenu, action.menuItem]};
+ case HIDE_NAVIGATION_MENU_ITEM:
+ return {
+ ...state,
+ navigationMenu: state.navigationMenu.map((i) => i.label === action.label ? {...i, hidden: true} : i)
+ };
+ case SHOW_NAVIGATION_MENU_ITEM:
+ return {
+ ...state,
+ navigationMenu: state.navigationMenu.map((i) => i.label === action.label ? {...i, hidden: false} : i)
+ };
+ default:
+ return state;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/reduxDebug.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/reduxDebug.ts b/modules/web-console/frontend/app/store/reduxDebug.ts
new file mode 100644
index 0000000..d7b1474
--- /dev/null
+++ b/modules/web-console/frontend/app/store/reduxDebug.ts
@@ -0,0 +1,45 @@
+/*
+ * 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 {reducer, devTools} from '../components/page-configure/reduxDevtoolsIntegration';
+import {AppStore} from '.';
+import {filter, withLatestFrom, tap} from 'rxjs/operators';
+
+run.$inject = ['Store'];
+
+export function run(store: AppStore) {
+ if (devTools) {
+ devTools.subscribe((e) => {
+ if (e.type === 'DISPATCH' && e.state) store.dispatch(e);
+ });
+
+ const ignoredActions = new Set([
+ ]);
+
+ store.actions$.pipe(
+ filter((e) => e.type !== 'DISPATCH'),
+ withLatestFrom(store.state$.skip(1)),
+ tap(([action, state]) => {
+ if (ignoredActions.has(action.type)) return;
+ devTools.send(action, state);
+ console.log(action);
+ })
+ ).subscribe();
+
+ store.addReducer(reducer);
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/store/selectors/ui.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/store/selectors/ui.ts b/modules/web-console/frontend/app/store/selectors/ui.ts
new file mode 100644
index 0000000..0bd2fa9
--- /dev/null
+++ b/modules/web-console/frontend/app/store/selectors/ui.ts
@@ -0,0 +1,29 @@
+/*
+ * 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 {State, AppStore} from '..';
+import {pluck, map} from 'rxjs/operators';
+import {pipe} from 'rxjs';
+import {memoize, orderBy} from 'lodash';
+
+const orderMenu = <T extends {order: number}>(menu: Array<T>) => orderBy(menu, 'order');
+
+export const selectSidebarOpened = () => pluck<State, State['ui']['sidebarOpened']>('ui', 'sidebarOpened');
+export const selectNavigationMenu = () => pipe(
+ pluck<State, State['ui']['navigationMenu']>('ui', 'navigationMenu'),
+ map(orderMenu)
+);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/types/index.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/types/index.ts b/modules/web-console/frontend/app/types/index.ts
index df6a169..ad40c15 100644
--- a/modules/web-console/frontend/app/types/index.ts
+++ b/modules/web-console/frontend/app/types/index.ts
@@ -32,3 +32,33 @@ export interface IIgniteNg1StateDeclaration extends Ng1StateDeclaration {
tfMetaTags: ITfMetatagsConfig,
permission?: string
}
+
+export type User = {
+ _id: string,
+ firstName: string,
+ lastName: string,
+ email: string,
+ phone?: string,
+ company: string,
+ country: string,
+ registered: string,
+ lastLogin: string,
+ lastActivity: string,
+ admin: boolean,
+ token: string,
+ resetPasswordToken: string,
+ // Assigned in UI
+ becomeUsed?: boolean
+};
+
+export type NavigationMenuItem = {
+ label: string,
+ icon: string,
+ order: number,
+ hidden?: boolean
+} & (
+ {sref: string, activeSref: string} |
+ {href: string}
+);
+
+export type NavigationMenu = Array<NavigationMenuItem>;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/public/images/icons/cluster.icon.svg
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/images/icons/cluster.icon.svg b/modules/web-console/frontend/public/images/icons/cluster.icon.svg
new file mode 100644
index 0000000..7576049
--- /dev/null
+++ b/modules/web-console/frontend/public/images/icons/cluster.icon.svg
@@ -0,0 +1,10 @@
+<svg version="1.1" viewBox="0 0 20 17" xmlns="http://www.w3.org/2000/svg">
+ <g fill="none" fill-rule="evenodd" stroke="currentColor" stroke-width="2">
+ <rect x="8.5" y="1" width="3" height="3" rx="1"/>
+ <rect x="8.5" y="12.25" width="3" height="3" rx="1"/>
+ <rect x="16" y="12.25" width="3" height="3" rx="1"/>
+ <rect x="1" y="12.25" width="3" height="3" rx="1"/>
+ <path d="M10 5v2.5l7.656.05v4.206" stroke-linecap="square" stroke-linejoin="round"/>
+ <path d="M10.156 5v6.756V7.5L2.5 7.55v4.206" stroke-linecap="round" stroke-linejoin="round"/>
+ </g>
+</svg>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/public/images/icons/connectedClusters.icon.svg
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/images/icons/connectedClusters.icon.svg b/modules/web-console/frontend/public/images/icons/connectedClusters.icon.svg
deleted file mode 100644
index f405317..0000000
--- a/modules/web-console/frontend/public/images/icons/connectedClusters.icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 13"><g fill="none" fill-rule="evenodd"><path fill="currentColor" d="M6 0h4v4H6zm0 9h4v4H6zm6 0h4v4h-4zM0 9h4v4H0z"/><path stroke="currentColor" stroke-linecap="square" d="M8 4v2l6.125.04v3.365"/><path stroke="currentColor" stroke-linecap="square" d="M8.125 4v5.405V6L2 6.04v3.365"/></g></svg>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/public/images/icons/downloadAgent.icon.svg
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/images/icons/downloadAgent.icon.svg b/modules/web-console/frontend/public/images/icons/downloadAgent.icon.svg
new file mode 100644
index 0000000..afb51ee
--- /dev/null
+++ b/modules/web-console/frontend/public/images/icons/downloadAgent.icon.svg
@@ -0,0 +1,16 @@
+<svg version="1.1" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg">
+ <g fill="none" fill-rule="evenodd">
+ <g transform="translate(-263 -1597)" fill="currentColor">
+ <g transform="translate(235 1485)">
+ <g transform="translate(28 112)">
+ <path d="m-8.7041e-14 9.0435v7.1788c0 0.97787 0.81811 1.7778 1.8182 1.7778h16.364c0.99966 0 1.8178-0.79991 1.8178-1.7778v-7.1788h-20zm1.7103 0h16.472v7.1876h-16.364l-0.10794-7.1876z"/>
+ <g stroke="currentColor" stroke-width=".5">
+ <polygon points="14.7 8.635 14.131 8.0659 10.757 11.44 10.757 5 9.9435 5 9.9435 11.44 6.5692 8.0659 6 8.635 10.35 12.985"/>
+ <polygon points="10.757 3.719 10.757 3 9.9435 3 9.9435 3.719"/>
+ <polygon points="10.757 1.719 10.757 1 9.9435 1 9.9435 1.719"/>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/public/images/icons/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/images/icons/index.js b/modules/web-console/frontend/public/images/icons/index.js
index 0951d32..2e41085 100644
--- a/modules/web-console/frontend/public/images/icons/index.js
+++ b/modules/web-console/frontend/public/images/icons/index.js
@@ -21,7 +21,6 @@ export {default as check} from './check.icon.svg';
export {default as checkmark} from './checkmark.icon.svg';
export {default as clock} from './clock.icon.svg';
export {default as collapse} from './collapse.icon.svg';
-export {default as connectedClusters} from './connectedClusters.icon.svg';
export {default as copy} from './copy.icon.svg';
export {default as cross} from './cross.icon.svg';
export {default as csv} from './csv.icon.svg';
@@ -43,3 +42,7 @@ export {default as refresh} from './refresh.icon.svg';
export {default as search} from './search.icon.svg';
export {default as sort} from './sort.icon.svg';
export {default as structure} from './structure.icon.svg';
+export {default as cluster} from './cluster.icon.svg';
+export {default as sql} from './sql.icon.svg';
+export {default as menu} from './menu.icon.svg';
+export {default as downloadAgent} from './downloadAgent.icon.svg';
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/public/images/icons/menu.icon.svg
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/images/icons/menu.icon.svg b/modules/web-console/frontend/public/images/icons/menu.icon.svg
new file mode 100644
index 0000000..392d42e
--- /dev/null
+++ b/modules/web-console/frontend/public/images/icons/menu.icon.svg
@@ -0,0 +1,7 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 4.2333332 4.2333332" xmlns="http://www.w3.org/2000/svg">
+ <g transform="translate(0 -292.77)" fill="currentColor">
+ <rect y="295.95" width="4.2333" height=".52917" style="paint-order:markers fill stroke"/>
+ <rect x="1.1126e-7" y="294.62" width="4.2333" height=".52917" style="paint-order:markers fill stroke"/>
+ <rect y="293.3" width="4.2333" height=".52917" style="paint-order:markers fill stroke"/>
+ </g>
+</svg>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/public/images/icons/sql.icon.svg
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/images/icons/sql.icon.svg b/modules/web-console/frontend/public/images/icons/sql.icon.svg
new file mode 100644
index 0000000..bd54eee
--- /dev/null
+++ b/modules/web-console/frontend/public/images/icons/sql.icon.svg
@@ -0,0 +1,3 @@
+<svg version="1.1" viewBox="0 0 20 16" xmlns="http://www.w3.org/2000/svg">
+ <path d="M6.454 9.208c0-.2-.07-.353-.211-.46-.141-.107-.395-.22-.762-.338a5.4 5.4 0 0 1-.871-.351c-.583-.315-.875-.74-.875-1.273 0-.278.079-.525.235-.743a1.53 1.53 0 0 1 .673-.51c.293-.121.622-.183.986-.183.367 0 .694.067.98.2.287.133.51.32.669.562.158.242.238.517.238.825H6.458c0-.235-.074-.417-.222-.548-.148-.13-.357-.196-.625-.196-.258 0-.46.055-.603.164a.517.517 0 0 0-.215.432c0 .167.084.307.252.42.169.113.416.219.743.317.602.181 1.04.406 1.315.674.275.268.413.602.413 1.001 0 .445-.168.793-.505 1.046-.336.253-.788.38-1.357.38-.395 0-.755-.073-1.08-.218a1.708 1.708 0 0 1-.742-.594 1.522 1.522 0 0 1-.255-.875h1.061c0 .567.339.85 1.016.85.251 0 .448-.05.589-.153a.5.5 0 0 0 .211-.429zm5.988-1.103c0 .48-.077.896-.233 1.25-.155.354-.37.637-.645.851l.854.67-.674.596-1.093-.878a2.314 2.314 0 0 1-.388.032c-.426 0-.805-.102-1.14-.307a2.038 2.038 0 0 1-.775-.876c-.183-.38-.276-.816-.279-1.31v-.254c0-.506.091-.95.274-1.335.182-.384.44-.68.772-.885a2.124 2.124 0 0 1 1.14-.309c.429 0 .809.103
1.142.309.332.206.59.5.772.885.182.385.273.828.273 1.331v.23zm-1.072-.233c0-.538-.096-.948-.289-1.227-.193-.28-.468-.42-.825-.42-.355 0-.63.138-.822.414-.193.277-.29.682-.293 1.215v.25c0 .525.097.932.29 1.22.192.29.47.435.832.435.355 0 .628-.14.818-.418.19-.279.287-.685.29-1.219v-.25zm2.906 1.834h2.246v.85h-3.304V5.42h1.058v4.285zM18.182 0H1.818C.818 0 0 .8 0 1.778v12.444C0 15.2.818 16 1.818 16h16.364c1 0 1.818-.8 1.818-1.778V1.778C20 .8 19.182 0 18.182 0zM1.818 1.769h16.364V14.23H1.818V1.77z" fill="currentColor" fill-rule="evenodd"/>
+</svg>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/stylesheets/style.scss b/modules/web-console/frontend/public/stylesheets/style.scss
index ce14e45..3f601be 100644
--- a/modules/web-console/frontend/public/stylesheets/style.scss
+++ b/modules/web-console/frontend/public/stylesheets/style.scss
@@ -255,17 +255,70 @@ body {
flex-direction: column;
}
-body > .wrapper,
- // Nested ui-view, like on password reset state
-body > .wrapper > ui-view {
- display: flex;
- flex-direction: column;
+:root {
+ --page-side-padding: 30px;
+}
+
+.wrapper {
+ --header-height: 62px;
+
min-height: 100vh;
+ display: grid;
+ grid-template-columns: auto 1fr;
+ grid-template-rows: auto var(--header-height) 1fr;
+ grid-template-areas: 'notifications notifications' 'header header' 'sidebar content';
+
+ permanent-notifications {
+ grid-area: notifications;
+ }
+
+ web-console-header {
+ grid-area: header;
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ z-index: 10;
+ transform: translateZ(1px);
+ }
+
+ web-console-sidebar {
+ grid-area: sidebar;
+ transform: translateZ(1px);
+ }
+
+ &>.content {
+ grid-area: content;
+ padding-left: var(--page-side-padding);
+ padding-right: var(--page-side-padding);
+ padding-bottom: var(--page-side-padding);
+ display: flex;
+ flex-direction: column;
+
+ &>ui-view {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ }
+ }
+
+ &.wrapper-public {
+ grid-template-columns: 1fr;
+ grid-template-rows: auto var(--header-height) 1fr auto;
+ grid-template-areas: 'notifications' 'header' 'content' 'footer';
+ }
+}
+
+.public-page {
+ margin-left: auto;
+ margin-right: auto;
flex: 1 0 auto;
+ width: 100%;
+ max-width: 530px;
- .body-container {
- flex: 1 0 auto;
- padding-bottom: 30px;
+ .public-page__title {
+ font-size: 38px;
+ font-weight: 300;
+ margin: 30px 0 30px;
}
}
@@ -374,7 +427,6 @@ i.btn {
h1,
h2,
h3 {
- user-select: none;
font-weight: normal;
/* Makes the vertical size of the text the same for all fonts. */
line-height: 1;
@@ -2004,10 +2056,6 @@ html, body {
position: absolute !important;
}
-.demo-mode {
- padding-top: 30px;
-}
-
// Fix for injecting svg icon into BS btn
.btn--with-icon {
display: flex;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/views/base.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/base.pug b/modules/web-console/frontend/views/base.pug
index 967d469..b14cdac 100644
--- a/modules/web-console/frontend/views/base.pug
+++ b/modules/web-console/frontend/views/base.pug
@@ -14,13 +14,10 @@
See the License for the specific language governing permissions and
limitations under the License.
+permanent-notifications
web-console-header
- web-console-header-left
- include ./includes/header-left
- web-console-header-right
- include ./includes/header-right
+ web-console-header-content
-.container--responsive.body-container.flex-full-height
- div(ui-view='').flex-full-height
+web-console-sidebar
-web-console-footer
+ui-view.content
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/views/includes/header-left.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/includes/header-left.pug b/modules/web-console/frontend/views/includes/header-left.pug
deleted file mode 100644
index 03e0616..0000000
--- a/modules/web-console/frontend/views/includes/header-left.pug
+++ /dev/null
@@ -1,42 +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.
-
-a.wch-nav-item(
- ui-sref='base.configuration.overview'
- ui-sref-active='{active: "base.configuration"}'
-)
- | Configure
-
-.wch-nav-item(ng-if='!$root.user.becomeUsed')
- a(ui-sref='base.sql.tabs.notebooks-list' ui-sref-active='active')
- | Queries
-
-.wch-additional-nav-items(ignite-navbar)
- .wch-nav-item(ng-repeat='item in navbar.items')
- div(ng-if='$root.user.becomeUsed ? item.canBecomed : item.children' ng-click='$event.stopPropagation()'
- ng-class='{active: $state.includes(item.sref)}'
- bs-dropdown='item.children'
- data-placement='bottom-left'
- data-trigger='hover focus'
- data-container='self'
- aria-haspopup='true'
- aria-expanded='false'
- )
- span {{::item.text}}
- span.caret
-
- a(ng-if='$root.user.becomeUsed ? item.canBecomed : !item.children' ui-sref='{{item.sref}}' ui-sref-active='active')
- | {{::item.text}}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/views/includes/header-right.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/includes/header-right.pug b/modules/web-console/frontend/views/includes/header-right.pug
deleted file mode 100644
index d2d89aa..0000000
--- a/modules/web-console/frontend/views/includes/header-right.pug
+++ /dev/null
@@ -1,35 +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.
-
-.wch-demo-toggle(ng-if='!$root.user.becomeUsed' ng-controller='demoController')
- button.btn-ignite.btn-ignite--success(
- ng-if='!IgniteDemoMode'
- ng-click='startDemo()'
- ) Start Demo
-
-web-console-header-extension
-
-.wch-nav-item(ignite-userbar)
- .user-name-wrapper(
- ng-class='{active: $state.includes("base.settings")}'
- ng-click='$event.stopPropagation()'
- bs-dropdown='userbar.items'
- data-placement='bottom-right'
- data-trigger='hover focus'
- data-container='self'
- )
- span {{$root.user.firstName}} {{$root.user.lastName}}
- span.caret
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/views/public.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/public.pug b/modules/web-console/frontend/views/public.pug
new file mode 100644
index 0000000..934ac56
--- /dev/null
+++ b/modules/web-console/frontend/views/public.pug
@@ -0,0 +1,20 @@
+//-
+ 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.
+
+web-console-header(hide-menu-button='true')
+ .web-console-header-content__title Management console for Apache Ignite
+.content(ui-view='page')
+web-console-footer.web-console-footer__page-bottom
\ No newline at end of file
[3/3] ignite git commit: IGNITE-10239 Update navigation and top menu.
- Fixes #5630.
Posted by an...@apache.org.
IGNITE-10239 Update navigation and top menu. - Fixes #5630.
Signed-off-by: Andrey Novikov <an...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9dc251cd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9dc251cd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9dc251cd
Branch: refs/heads/master
Commit: 9dc251cd036a840313e3fb34aa9e522620fc2365
Parents: 8ef8466
Author: Ilya Borisov <Kl...@gmail.com>
Authored: Mon Dec 17 16:29:24 2018 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Mon Dec 17 16:29:24 2018 +0700
----------------------------------------------------------------------
.../e2e/testcafe/components/topNavigation.js | 6 +-
.../e2e/testcafe/components/userMenu.js | 2 +-
modules/web-console/frontend/app/app.config.js | 7 +
modules/web-console/frontend/app/app.js | 8 +-
.../connected-clusters-badge/style.scss | 34 ++--
.../connected-clusters-badge/template.pug | 5 +-
.../page-configure/icons/configuration.icon.svg | 13 ++
.../app/components/page-configure/index.js | 193 ------------------
.../app/components/page-configure/index.ts | 194 +++++++++++++++++++
.../page-forgot-password/controller.js | 8 +-
.../app/components/page-forgot-password/run.js | 11 +-
.../components/page-forgot-password/style.scss | 38 ++--
.../page-forgot-password/template.pug | 53 +++--
.../app/components/page-landing/index.js | 11 +-
.../app/components/page-landing/public.pug | 21 ++
.../app/components/page-landing/style.scss | 12 ++
.../app/components/page-landing/template.pug | 8 -
.../page-password-changed/controller.js | 26 ---
.../page-password-changed/controller.ts | 32 +++
.../components/page-password-changed/index.js | 10 +-
.../components/page-password-changed/style.scss | 13 +-
.../page-password-changed/template.pug | 9 +-
.../page-password-reset/controller.js | 11 +-
.../app/components/page-password-reset/index.js | 10 +-
.../components/page-password-reset/style.scss | 15 +-
.../components/page-password-reset/template.pug | 102 ++++------
.../app/components/page-queries/index.js | 100 ----------
.../app/components/page-queries/index.ts | 110 +++++++++++
.../app/components/page-signin/controller.ts | 7 +-
.../frontend/app/components/page-signin/run.ts | 10 +-
.../app/components/page-signin/style.scss | 33 +---
.../app/components/page-signin/template.pug | 73 +++----
.../app/components/page-signup/controller.ts | 11 +-
.../frontend/app/components/page-signup/run.js | 11 +-
.../app/components/page-signup/style.scss | 26 +--
.../app/components/page-signup/template.pug | 36 ++--
.../permanent-notifications/component.ts | 25 +++
.../permanent-notifications/controller.ts | 28 +++
.../components/permanent-notifications/index.ts | 21 ++
.../permanent-notifications/style.scss | 54 ++++++
.../permanent-notifications/template.pug | 23 +++
.../app/components/timed-redirection/style.scss | 1 +
.../components/web-console-footer/component.js | 4 +-
.../web-console-footer-links/component.js | 23 ---
.../web-console-footer-links/style.scss | 31 ---
.../web-console-footer-links/template.pug | 17 --
.../components/web-console-footer/controller.ts | 27 +++
.../app/components/web-console-footer/index.js | 11 +-
.../components/web-console-footer/style.scss | 93 ++++++---
.../components/web-console-footer/template.pug | 20 +-
.../components/web-console-header/component.js | 53 -----
.../components/web-console-header/component.ts | 43 ++++
.../components/demo-mode-button/component.ts | 24 +++
.../components/demo-mode-button/controller.ts | 46 +++++
.../components/demo-mode-button/template.pug | 20 ++
.../components/user-menu/component.ts | 25 +++
.../components/user-menu/controller.ts | 53 +++++
.../components/user-menu/style.scss | 28 +++
.../components/user-menu/template.pug | 26 +++
.../web-console-header-content/component.ts | 25 +++
.../web-console-header-content/controller.ts | 45 +++++
.../web-console-header-content/style.scss | 44 +++++
.../web-console-header-content/template.pug | 24 +++
.../web-console-header-extension/component.js | 22 ---
.../web-console-header-extension/template.pug | 15 --
.../app/components/web-console-header/index.js | 8 +-
.../components/web-console-header/style.scss | 168 +++-------------
.../components/web-console-header/template.pug | 32 ++-
.../components/web-console-sidebar/component.ts | 25 +++
.../web-console-sidebar/controller.ts | 30 +++
.../app/components/web-console-sidebar/index.ts | 25 +++
.../components/web-console-sidebar/style.scss | 44 +++++
.../components/web-console-sidebar/template.pug | 22 +++
.../web-console-sidebar-navigation/component.ts | 28 +++
.../controller.ts | 24 +++
.../web-console-sidebar-navigation/style.scss | 108 +++++++++++
.../web-console-sidebar-navigation/template.pug | 35 ++++
.../web-console-sidebar-overflow/component.ts | 26 +++
.../web-console-sidebar-overflow/controller.ts | 50 +++++
.../web-console-sidebar-overflow/style.scss | 52 +++++
.../web-console-sidebar-overflow/template.pug | 18 ++
.../app/modules/branding/branding.module.js | 10 +-
.../app/modules/branding/branding.service.js | 4 -
.../app/modules/branding/footer.directive.js | 39 ----
.../modules/branding/header-logo.directive.js | 39 ----
.../app/modules/branding/header-logo.pug | 18 --
.../modules/branding/header-title.directive.js | 44 -----
.../branding/powered-by-apache.directive.js | 39 ----
.../app/modules/branding/powered-by-apache.pug | 18 --
.../frontend/app/modules/demo/Demo.module.js | 28 ---
.../app/modules/navbar/Navbar.provider.js | 30 ---
.../app/modules/navbar/navbar.directive.js | 32 ---
.../app/modules/navbar/navbar.module.js | 9 +-
.../app/modules/navbar/userbar.directive.js | 59 ------
.../web-console/frontend/app/services/store.ts | 75 +++++++
.../frontend/app/store/actions/ui.ts | 36 ++++
.../frontend/app/store/actions/user.ts | 24 +++
.../frontend/app/store/effects/ui.ts | 32 +++
modules/web-console/frontend/app/store/index.ts | 48 +++++
.../web-console/frontend/app/store/ofType.ts | 26 +++
.../frontend/app/store/reducers/ui.ts | 50 +++++
.../frontend/app/store/reduxDebug.ts | 45 +++++
.../frontend/app/store/selectors/ui.ts | 29 +++
modules/web-console/frontend/app/types/index.ts | 30 +++
.../public/images/icons/cluster.icon.svg | 10 +
.../images/icons/connectedClusters.icon.svg | 1 -
.../public/images/icons/downloadAgent.icon.svg | 16 ++
.../frontend/public/images/icons/index.js | 5 +-
.../frontend/public/images/icons/menu.icon.svg | 7 +
.../frontend/public/images/icons/sql.icon.svg | 3 +
.../frontend/public/stylesheets/style.scss | 74 +++++--
modules/web-console/frontend/views/base.pug | 11 +-
.../frontend/views/includes/header-left.pug | 42 ----
.../frontend/views/includes/header-right.pug | 35 ----
modules/web-console/frontend/views/public.pug | 20 ++
115 files changed, 2390 insertions(+), 1433 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/e2e/testcafe/components/topNavigation.js
----------------------------------------------------------------------
diff --git a/modules/web-console/e2e/testcafe/components/topNavigation.js b/modules/web-console/e2e/testcafe/components/topNavigation.js
index b4262d0..6db745e 100644
--- a/modules/web-console/e2e/testcafe/components/topNavigation.js
+++ b/modules/web-console/e2e/testcafe/components/topNavigation.js
@@ -17,5 +17,7 @@
import {Selector} from 'testcafe';
-export const configureNavButton = Selector('.wch-nav-item').withText('Configure');
-export const queriesNavButton = Selector('.wch-nav-item').withText('Queries');
+export const toggleMenuButton = Selector('.web-console-header__togle-menu-button');
+
+export const configureNavButton = Selector('.web-console-sidebar-navigation__link[title="Configuration"]');
+export const queriesNavButton = Selector('.web-console-sidebar-navigation__link[title="Queries"]');
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/e2e/testcafe/components/userMenu.js
----------------------------------------------------------------------
diff --git a/modules/web-console/e2e/testcafe/components/userMenu.js b/modules/web-console/e2e/testcafe/components/userMenu.js
index 75246c8..973f21f 100644
--- a/modules/web-console/e2e/testcafe/components/userMenu.js
+++ b/modules/web-console/e2e/testcafe/components/userMenu.js
@@ -17,7 +17,7 @@
import {Selector, t} from 'testcafe';
-const _selector = Selector('[ignite-userbar]');
+const _selector = Selector('user-menu');
export const userMenu = {
_selector,
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/app.config.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/app.config.js b/modules/web-console/frontend/app/app.config.js
index 88bffee..04c02ea 100644
--- a/modules/web-console/frontend/app/app.config.js
+++ b/modules/web-console/frontend/app/app.config.js
@@ -22,6 +22,7 @@ import isNil from 'lodash/isNil';
import isEmpty from 'lodash/isEmpty';
import mixin from 'lodash/mixin';
+import {user as userAction, register as registerStore} from './store';
const nonNil = negate(isNil);
const nonEmpty = negate(isEmpty);
@@ -36,6 +37,8 @@ import validationTemplateUrl from 'views/templates/validation-error.tpl.pug';
const igniteConsoleCfg = angular.module('ignite-console.config', ['ngAnimate', 'mgcrea.ngStrap']);
+igniteConsoleCfg.run(registerStore);
+
// Configure AngularJS animation: do not animate fa-spin.
igniteConsoleCfg.config(['$animateProvider', ($animateProvider) => {
$animateProvider.classNameFilter(/^((?!(fa-spin|ng-animate-disabled)).)*$/);
@@ -133,3 +136,7 @@ igniteConsoleCfg.directive('uiGridSelection', function() {
}
};
});
+
+igniteConsoleCfg.run(['$rootScope', 'Store', ($root, store) => {
+ $root.$on('user', (event, user) => store.dispatch(userAction({...user})));
+}]);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/app.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/app.js b/modules/web-console/frontend/app/app.js
index 2dd2733..e1cbdbb 100644
--- a/modules/web-console/frontend/app/app.js
+++ b/modules/web-console/frontend/app/app.js
@@ -96,6 +96,7 @@ import {CSV} from './services/CSV';
import {$exceptionHandler} from './services/exceptionHandler';
import IGFSs from './services/IGFSs';
import Models from './services/Models';
+import {Store} from './services/store';
import AngularStrapTooltip from './services/AngularStrapTooltip.decorator';
import AngularStrapSelect from './services/AngularStrapSelect.decorator';
@@ -159,6 +160,8 @@ import pageSignup from './components/page-signup';
import pageSignin from './components/page-signin';
import pageForgotPassword from './components/page-forgot-password';
import formSignup from './components/form-signup';
+import sidebar from './components/web-console-sidebar';
+import permanentNotifications from './components/permanent-notifications';
import igniteServices from './services';
@@ -266,7 +269,9 @@ export default angular.module('ignite-console', [
progressLine.name,
formField.name,
formSignup.name,
- timedRedirection.name
+ timedRedirection.name,
+ sidebar.name,
+ permanentNotifications.name
])
.service('$exceptionHandler', $exceptionHandler)
// Directives.
@@ -314,6 +319,7 @@ export default angular.module('ignite-console', [
.service('CSV', CSV)
.service('IGFSs', IGFSs)
.service('Models', Models)
+.service('Store', Store)
// Filters.
.filter('byName', byName)
.filter('bytes', bytes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/connected-clusters-badge/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/connected-clusters-badge/style.scss b/modules/web-console/frontend/app/components/connected-clusters-badge/style.scss
index 3b2d202..e46e382 100644
--- a/modules/web-console/frontend/app/components/connected-clusters-badge/style.scss
+++ b/modules/web-console/frontend/app/components/connected-clusters-badge/style.scss
@@ -18,26 +18,26 @@
connected-clusters {
@import "./../../../public/stylesheets/variables.scss";
- div {
- position: absolute;
- top: 0;
- right: 30px;
+ height: 100%;
+ display: flex;
- display: flex;
- align-items: center;
- padding: 3px 10px;
-
- cursor: pointer;
- color: white;
- font-size: 12px;
- line-height: 12px;
+ .connected-cluster-badge__count {
+ color: $ignite-brand-success;
+ margin-left: 5px;
+ }
- background-color: $text-color;
+ button {
+ height: 100%;
+ width: 100%;
+ background: none !important;
+ border: none !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ outline: none !important;
- border-radius: 0 0 4px 4px;
+ display: flex;
+ align-items: center;
- [ignite-icon] {
- margin-right: 6px;
- }
+ font-size: 14px;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/connected-clusters-badge/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/connected-clusters-badge/template.pug b/modules/web-console/frontend/app/components/connected-clusters-badge/template.pug
index 49224e5..dfb4bd9 100644
--- a/modules/web-console/frontend/app/components/connected-clusters-badge/template.pug
+++ b/modules/web-console/frontend/app/components/connected-clusters-badge/template.pug
@@ -14,6 +14,5 @@
See the License for the specific language governing permissions and
limitations under the License.
-div(ng-click='$ctrl.show()')
- svg(ignite-icon='connectedClusters')
- | Connected clusters: {{ $ctrl.connectedClusters }}
+button(type='button' ng-click='$ctrl.show()')
+ | My Connected Clusters: <span class='connected-cluster-badge__count'>{{ $ctrl.connectedClusters }}</span>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-configure/icons/configuration.icon.svg
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure/icons/configuration.icon.svg b/modules/web-console/frontend/app/components/page-configure/icons/configuration.icon.svg
new file mode 100644
index 0000000..7c0ac7a
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-configure/icons/configuration.icon.svg
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17">
+ <g fill="none" fill-rule="evenodd" transform="translate(0 1)">
+ <rect width="11" height="2" x="9" y="1" fill="currentColor" rx="1"/>
+ <rect width="5" height="2" x="15" y="7" fill="currentColor" rx="1"/>
+ <rect width="8" height="2" x="12" y="13" fill="currentColor" rx="1"/>
+ <rect width="5" height="2" y="1" fill="currentColor" rx="1"/>
+ <rect width="11" height="2" y="7" fill="currentColor" rx="1"/>
+ <rect width="8" height="2" y="13" fill="currentColor" rx="1"/>
+ <circle cx="5" cy="1.776" r="1" stroke="currentColor" stroke-width="2"/>
+ <circle cx="11" cy="7.776" r="1" stroke="currentColor" stroke-width="2"/>
+ <circle cx="8" cy="13.776" r="1" stroke="currentColor" stroke-width="2"/>
+ </g>
+</svg>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-configure/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure/index.js b/modules/web-console/frontend/app/components/page-configure/index.js
deleted file mode 100644
index 531b46c..0000000
--- a/modules/web-console/frontend/app/components/page-configure/index.js
+++ /dev/null
@@ -1,193 +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.
- */
-
-import angular from 'angular';
-
-import 'angular1-async-filter';
-import {UIRouterRx} from '@uirouter/rx';
-import uiValidate from 'angular-ui-validate';
-
-import component from './component';
-import ConfigureState from './services/ConfigureState';
-import PageConfigure from './services/PageConfigure';
-import ConfigurationDownload from './services/ConfigurationDownload';
-import ConfigChangesGuard from './services/ConfigChangesGuard';
-import ConfigSelectionManager from './services/ConfigSelectionManager';
-import SummaryZipper from './services/SummaryZipper';
-import ConfigurationResource from './services/ConfigurationResource';
-import selectors from './store/selectors';
-import effects from './store/effects';
-
-import projectStructurePreview from './components/modal-preview-project';
-import itemsTable from './components/pc-items-table';
-import pcUiGridFilters from './components/pc-ui-grid-filters';
-import isInCollection from './components/pcIsInCollection';
-import pcValidation from './components/pcValidation';
-import fakeUiCanExit from './components/fakeUICanExit';
-import formUICanExitGuard from './components/formUICanExitGuard';
-import modalImportModels from './components/modal-import-models';
-import buttonImportModels from './components/button-import-models';
-import buttonDownloadProject from './components/button-download-project';
-import buttonPreviewProject from './components/button-preview-project';
-import previewPanel from './components/preview-panel';
-import pcSplitButton from './components/pc-split-button';
-
-import {errorState} from './transitionHooks/errorState';
-import {default as ActivitiesData} from 'app/core/activities/Activities.data';
-
-import 'rxjs/add/operator/withLatestFrom';
-import 'rxjs/add/operator/skip';
-
-import {Observable} from 'rxjs/Observable';
-
-Observable.prototype.debug = function(l) {
- return this.do((v) => console.log(l, v), (e) => console.error(l, e), () => console.log(l, 'completed'));
-};
-
-import {
- editReducer2,
- shortObjectsReducer,
- reducer,
- editReducer,
- loadingReducer,
- itemsEditReducerFactory,
- mapStoreReducerFactory,
- mapCacheReducerFactory,
- basicCachesActionTypes,
- clustersActionTypes,
- shortClustersActionTypes,
- cachesActionTypes,
- shortCachesActionTypes,
- modelsActionTypes,
- shortModelsActionTypes,
- igfssActionTypes,
- shortIGFSsActionTypes,
- refsReducer
-} from './reducer';
-
-import {reducer as reduxDevtoolsReducer, devTools} from './reduxDevtoolsIntegration';
-import {registerStates} from './states';
-
-/**
- * @param {uirouter.UIRouter} $uiRouter
- * @param {ActivitiesData} ActivitiesData
- */
-function registerActivitiesHook($uiRouter, ActivitiesData) {
- $uiRouter.transitionService.onSuccess({to: 'base.configuration.**'}, (transition) => {
- ActivitiesData.post({group: 'configuration', action: transition.targetState().name()});
- });
-}
-
-registerActivitiesHook.$inject = ['$uiRouter', 'IgniteActivitiesData'];
-
-export default angular
- .module('ignite-console.page-configure', [
- 'ui.router',
- 'asyncFilter',
- uiValidate,
- pcUiGridFilters.name,
- projectStructurePreview.name,
- itemsTable.name,
- pcValidation.name,
- modalImportModels.name,
- buttonImportModels.name,
- buttonDownloadProject.name,
- buttonPreviewProject.name,
- previewPanel.name,
- pcSplitButton.name
- ])
- .config(registerStates)
- .config(['DefaultStateProvider', (DefaultState) => {
- DefaultState.setRedirectTo(() => 'base.configuration.overview');
- }])
- .run(registerActivitiesHook)
- .run(['ConfigEffects', 'ConfigureState', '$uiRouter', (ConfigEffects, ConfigureState, $uiRouter) => {
- $uiRouter.plugin(UIRouterRx);
-
- if (devTools) {
- devTools.subscribe((e) => {
- if (e.type === 'DISPATCH' && e.state) ConfigureState.actions$.next(e);
- });
-
- ConfigureState.actions$
- .filter((e) => e.type !== 'DISPATCH')
- .withLatestFrom(ConfigureState.state$.skip(1))
- .subscribe(([action, state]) => devTools.send(action, state));
-
- ConfigureState.addReducer(reduxDevtoolsReducer);
- }
-
- ConfigureState.addReducer(refsReducer({
- models: {at: 'domains', store: 'caches'},
- caches: {at: 'caches', store: 'models'}
- }));
-
- ConfigureState.addReducer((state, action) => Object.assign({}, state, {
- clusterConfiguration: editReducer(state.clusterConfiguration, action),
- configurationLoading: loadingReducer(state.configurationLoading, action),
- basicCaches: itemsEditReducerFactory(basicCachesActionTypes)(state.basicCaches, action),
- clusters: mapStoreReducerFactory(clustersActionTypes)(state.clusters, action),
- shortClusters: mapCacheReducerFactory(shortClustersActionTypes)(state.shortClusters, action),
- caches: mapStoreReducerFactory(cachesActionTypes)(state.caches, action),
- shortCaches: mapCacheReducerFactory(shortCachesActionTypes)(state.shortCaches, action),
- models: mapStoreReducerFactory(modelsActionTypes)(state.models, action),
- shortModels: mapCacheReducerFactory(shortModelsActionTypes)(state.shortModels, action),
- igfss: mapStoreReducerFactory(igfssActionTypes)(state.igfss, action),
- shortIgfss: mapCacheReducerFactory(shortIGFSsActionTypes)(state.shortIgfss, action),
- edit: editReducer2(state.edit, action)
- }));
-
- ConfigureState.addReducer(shortObjectsReducer);
-
- ConfigureState.addReducer((state, action) => {
- switch (action.type) {
- case 'APPLY_ACTIONS_UNDO':
- return action.state;
-
- default:
- return state;
- }
- });
-
- const la = ConfigureState.actions$.scan((acc, action) => [...acc, action], []);
-
- ConfigureState.actions$
- .filter((a) => a.type === 'UNDO_ACTIONS')
- .withLatestFrom(la, ({actions}, actionsWindow, initialState) => {
- return {
- type: 'APPLY_ACTIONS_UNDO',
- state: actionsWindow.filter((a) => !actions.includes(a)).reduce(ConfigureState._combinedReducer, {})
- };
- })
- .do((a) => ConfigureState.dispatchAction(a))
- .subscribe();
- ConfigEffects.connect();
- }])
- .component('pageConfigure', component)
- .directive('pcIsInCollection', isInCollection)
- .directive('fakeUiCanExit', fakeUiCanExit)
- .directive('formUiCanExitGuard', formUICanExitGuard)
- .factory('configSelectionManager', ConfigSelectionManager)
- .service('IgniteSummaryZipper', SummaryZipper)
- .service('IgniteConfigurationResource', ConfigurationResource)
- .service('ConfigSelectors', selectors)
- .service('ConfigEffects', effects)
- .service('ConfigChangesGuard', ConfigChangesGuard)
- .service('PageConfigure', PageConfigure)
- .service('ConfigureState', ConfigureState)
- .service('ConfigurationDownload', ConfigurationDownload)
- .run(errorState);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-configure/index.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure/index.ts b/modules/web-console/frontend/app/components/page-configure/index.ts
new file mode 100644
index 0000000..dd2ad20
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-configure/index.ts
@@ -0,0 +1,194 @@
+/*
+ * 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';
+
+import 'angular1-async-filter';
+import {UIRouterRx} from '@uirouter/rx';
+import uiValidate from 'angular-ui-validate';
+
+import component from './component';
+import ConfigureState from './services/ConfigureState';
+import PageConfigure from './services/PageConfigure';
+import ConfigurationDownload from './services/ConfigurationDownload';
+import ConfigChangesGuard from './services/ConfigChangesGuard';
+import ConfigSelectionManager from './services/ConfigSelectionManager';
+import SummaryZipper from './services/SummaryZipper';
+import ConfigurationResource from './services/ConfigurationResource';
+import selectors from './store/selectors';
+import effects from './store/effects';
+
+import projectStructurePreview from './components/modal-preview-project';
+import itemsTable from './components/pc-items-table';
+import pcUiGridFilters from './components/pc-ui-grid-filters';
+import isInCollection from './components/pcIsInCollection';
+import pcValidation from './components/pcValidation';
+import fakeUiCanExit from './components/fakeUICanExit';
+import formUICanExitGuard from './components/formUICanExitGuard';
+import modalImportModels from './components/modal-import-models';
+import buttonImportModels from './components/button-import-models';
+import buttonDownloadProject from './components/button-download-project';
+import buttonPreviewProject from './components/button-preview-project';
+import previewPanel from './components/preview-panel';
+import pcSplitButton from './components/pc-split-button';
+
+import {errorState} from './transitionHooks/errorState';
+import {default as ActivitiesData} from 'app/core/activities/Activities.data';
+
+import 'rxjs/add/operator/withLatestFrom';
+import 'rxjs/add/operator/skip';
+
+import {Observable} from 'rxjs/Observable';
+
+import {navigationMenuItem, AppStore} from '../../store';
+import {default as configurationIcon} from './icons/configuration.icon.svg';
+import {default as IconsService} from '../ignite-icon/service';
+
+Observable.prototype.debug = function(l) {
+ return this.do((v) => console.log(l, v), (e) => console.error(l, e), () => console.log(l, 'completed'));
+};
+
+import {
+ editReducer2,
+ shortObjectsReducer,
+ reducer,
+ editReducer,
+ loadingReducer,
+ itemsEditReducerFactory,
+ mapStoreReducerFactory,
+ mapCacheReducerFactory,
+ basicCachesActionTypes,
+ clustersActionTypes,
+ shortClustersActionTypes,
+ cachesActionTypes,
+ shortCachesActionTypes,
+ modelsActionTypes,
+ shortModelsActionTypes,
+ igfssActionTypes,
+ shortIGFSsActionTypes,
+ refsReducer
+} from './reducer';
+
+import {reducer as reduxDevtoolsReducer, devTools} from './reduxDevtoolsIntegration';
+import {registerStates} from './states';
+
+/**
+ * @param {uirouter.UIRouter} $uiRouter
+ * @param {ActivitiesData} ActivitiesData
+ */
+function registerActivitiesHook($uiRouter, ActivitiesData) {
+ $uiRouter.transitionService.onSuccess({to: 'base.configuration.**'}, (transition) => {
+ ActivitiesData.post({group: 'configuration', action: transition.targetState().name()});
+ });
+}
+
+registerActivitiesHook.$inject = ['$uiRouter', 'IgniteActivitiesData'];
+
+export default angular
+ .module('ignite-console.page-configure', [
+ 'ui.router',
+ 'asyncFilter',
+ uiValidate,
+ pcUiGridFilters.name,
+ projectStructurePreview.name,
+ itemsTable.name,
+ pcValidation.name,
+ modalImportModels.name,
+ buttonImportModels.name,
+ buttonDownloadProject.name,
+ buttonPreviewProject.name,
+ previewPanel.name,
+ pcSplitButton.name
+ ])
+ .config(registerStates)
+ .config(['DefaultStateProvider', (DefaultState) => {
+ DefaultState.setRedirectTo(() => 'base.configuration.overview');
+ }])
+ .run(registerActivitiesHook)
+ .run(['ConfigEffects', 'ConfigureState', '$uiRouter', 'Store', 'IgniteIcon', (ConfigEffects, ConfigureState, $uiRouter, store: AppStore, icons: IconsService) => {
+ icons.registerIcons({configuration: configurationIcon});
+
+ $uiRouter.plugin(UIRouterRx);
+
+ ConfigureState.addReducer(refsReducer({
+ models: {at: 'domains', store: 'caches'},
+ caches: {at: 'caches', store: 'models'}
+ }));
+
+ ConfigureState.addReducer((state, action) => Object.assign({}, state, {
+ clusterConfiguration: editReducer(state.clusterConfiguration, action),
+ configurationLoading: loadingReducer(state.configurationLoading, action),
+ basicCaches: itemsEditReducerFactory(basicCachesActionTypes)(state.basicCaches, action),
+ clusters: mapStoreReducerFactory(clustersActionTypes)(state.clusters, action),
+ shortClusters: mapCacheReducerFactory(shortClustersActionTypes)(state.shortClusters, action),
+ caches: mapStoreReducerFactory(cachesActionTypes)(state.caches, action),
+ shortCaches: mapCacheReducerFactory(shortCachesActionTypes)(state.shortCaches, action),
+ models: mapStoreReducerFactory(modelsActionTypes)(state.models, action),
+ shortModels: mapCacheReducerFactory(shortModelsActionTypes)(state.shortModels, action),
+ igfss: mapStoreReducerFactory(igfssActionTypes)(state.igfss, action),
+ shortIgfss: mapCacheReducerFactory(shortIGFSsActionTypes)(state.shortIgfss, action),
+ edit: editReducer2(state.edit, action)
+ }));
+
+ ConfigureState.addReducer(shortObjectsReducer);
+
+ ConfigureState.addReducer((state, action) => {
+ switch (action.type) {
+ case 'APPLY_ACTIONS_UNDO':
+ return action.state;
+
+ default:
+ return state;
+ }
+ });
+
+ const la = ConfigureState.actions$.scan((acc, action) => [...acc, action], []);
+
+ ConfigureState.actions$
+ .filter((a) => a.type === 'UNDO_ACTIONS')
+ .withLatestFrom(la, ({actions}, actionsWindow, initialState) => {
+ return {
+ type: 'APPLY_ACTIONS_UNDO',
+ state: actionsWindow.filter((a) => !actions.includes(a)).reduce(ConfigureState._combinedReducer, {})
+ };
+ })
+ .do((a) => ConfigureState.dispatchAction(a))
+ .subscribe();
+ ConfigEffects.connect();
+
+ store.dispatch(navigationMenuItem({
+ activeSref: 'base.configuration.**',
+ icon: 'configuration',
+ label: 'Configuration',
+ order: 1,
+ sref: 'base.configuration.overview'
+ }));
+ }])
+ .component('pageConfigure', component)
+ .directive('pcIsInCollection', isInCollection)
+ .directive('fakeUiCanExit', fakeUiCanExit)
+ .directive('formUiCanExitGuard', formUICanExitGuard)
+ .factory('configSelectionManager', ConfigSelectionManager)
+ .service('IgniteSummaryZipper', SummaryZipper)
+ .service('IgniteConfigurationResource', ConfigurationResource)
+ .service('ConfigSelectors', selectors)
+ .service('ConfigEffects', effects)
+ .service('ConfigChangesGuard', ConfigChangesGuard)
+ .service('PageConfigure', PageConfigure)
+ .service('ConfigureState', ConfigureState)
+ .service('ConfigurationDownload', ConfigurationDownload)
+ .run(errorState);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-forgot-password/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-forgot-password/controller.js b/modules/web-console/frontend/app/components/page-forgot-password/controller.js
index 7d06773..86597af 100644
--- a/modules/web-console/frontend/app/components/page-forgot-password/controller.js
+++ b/modules/web-console/frontend/app/components/page-forgot-password/controller.js
@@ -24,22 +24,26 @@ export default class PageForgotPassword {
data = {email: null};
/** @type {string} */
serverError = null;
+ /** @type {JQLite} */
+ el;
- static $inject = ['Auth', 'IgniteMessages', 'IgniteFormUtils'];
+ static $inject = ['Auth', 'IgniteMessages', 'IgniteFormUtils', '$element'];
/**
* @param {import('app/modules/user/Auth.service').default} Auth
*/
- constructor(Auth, IgniteMessages, IgniteFormUtils) {
+ constructor(Auth, IgniteMessages, IgniteFormUtils, el) {
this.Auth = Auth;
this.IgniteMessages = IgniteMessages;
this.IgniteFormUtils = IgniteFormUtils;
+ this.el = el;
}
/** @param {import('./types').IForgotPasswordFormController} form */
canSubmitForm(form) {
return form.$error.server ? true : !form.$invalid;
}
$postLink() {
+ this.el.addClass('public-page');
this.form.email.$validators.server = () => !this.serverError;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-forgot-password/run.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-forgot-password/run.js b/modules/web-console/frontend/app/components/page-forgot-password/run.js
index c7ee6a6..d9259e9 100644
--- a/modules/web-console/frontend/app/components/page-forgot-password/run.js
+++ b/modules/web-console/frontend/app/components/page-forgot-password/run.js
@@ -15,6 +15,8 @@
* limitations under the License.
*/
+import publicTemplate from '../../../views/public.pug';
+
/**
* @param {import("@uirouter/angularjs").UIRouter} $uiRouter
*/
@@ -23,7 +25,14 @@ export function registerState($uiRouter) {
const state = {
name: 'forgotPassword',
url: '/forgot-password',
- component: 'pageForgotPassword',
+ views: {
+ '': {
+ template: publicTemplate
+ },
+ 'page@forgotPassword': {
+ component: 'pageForgotPassword'
+ }
+ },
unsaved: true,
tfMetaTags: {
title: 'Forgot Password'
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-forgot-password/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-forgot-password/style.scss b/modules/web-console/frontend/app/components/page-forgot-password/style.scss
index 86425c1..7893c62 100644
--- a/modules/web-console/frontend/app/components/page-forgot-password/style.scss
+++ b/modules/web-console/frontend/app/components/page-forgot-password/style.scss
@@ -20,34 +20,22 @@ page-forgot-password {
flex-direction: column;
flex: 1 0 auto;
- section {
- margin-left: auto;
- margin-right: auto;
- width: 530px;
-
- h3 {
- font-size: 38px;
- font-weight: 300;
- margin: 30px 0 30px;
- }
-
- p {
- margin-bottom: 20px;
- }
+ p {
+ margin-bottom: 20px;
+ }
- .form-field {
- margin: 10px 0;
- }
+ .form-field {
+ margin: 10px 0;
+ }
- .form-footer {
- padding: 15px 0;
- text-align: right;
- display: flex;
- align-items: center;
+ .form-footer {
+ padding: 15px 0;
+ text-align: right;
+ display: flex;
+ align-items: center;
- .btn-ignite {
- margin-left: auto;
- }
+ .btn-ignite {
+ margin-left: auto;
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-forgot-password/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-forgot-password/template.pug b/modules/web-console/frontend/app/components/page-forgot-password/template.pug
index 82e7898..309e9b9 100644
--- a/modules/web-console/frontend/app/components/page-forgot-password/template.pug
+++ b/modules/web-console/frontend/app/components/page-forgot-password/template.pug
@@ -16,34 +16,25 @@
include /app/helpers/jade/mixins
-web-console-header
- web-console-header-left
- ignite-header-title
-
-.container--responsive.body-container
- section
- - const form = '$ctrl.form'
- h3 Forgot password?
- p Enter the email address for your account & we'll email you a link to reset your password.
- form(name=form novalidate ng-submit='$ctrl.remindPassword()')
- +form-field__email({
- label: 'Email:',
- model: '$ctrl.data.email',
- name: '"email"',
- placeholder: 'Input email',
- required: true
- })(
- ng-model-options='{allowInvalid: true}'
- autocomplete='email'
- ignite-auto-focus
- tabindex='0'
- )
- +form-field__error({error: 'server', message: `{{$ctrl.serverError}}`})
- footer.form-footer
- a(ui-sref='signin') Back to sign in
- button.btn-ignite.btn-ignite--primary(
- tabindex='1'
- type='submit'
- ) Send it to me
-
-web-console-footer
+h3.public-page__title Forgot password?
+p Enter the email address for your account & we'll email you a link to reset your password.
+form(name='$ctrl.form' novalidate ng-submit='$ctrl.remindPassword()')
+ +form-field__email({
+ label: 'Email:',
+ model: '$ctrl.data.email',
+ name: '"email"',
+ placeholder: 'Input email',
+ required: true
+ })(
+ ng-model-options='{allowInvalid: true}'
+ autocomplete='email'
+ ignite-auto-focus
+ tabindex='0'
+ )
+ +form-field__error({error: 'server', message: `{{$ctrl.serverError}}`})
+ footer.form-footer
+ a(ui-sref='signin') Back to sign in
+ button.btn-ignite.btn-ignite--primary(
+ tabindex='1'
+ type='submit'
+ ) Send it to me
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-landing/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-landing/index.js b/modules/web-console/frontend/app/components/page-landing/index.js
index 8f678f3..cabb5bb 100644
--- a/modules/web-console/frontend/app/components/page-landing/index.js
+++ b/modules/web-console/frontend/app/components/page-landing/index.js
@@ -17,6 +17,7 @@
import angular from 'angular';
+import baseTemplate from './public.pug';
import template from './template.pug';
import './style.scss';
@@ -44,7 +45,15 @@ export default angular
$stateProvider
.state('landing', {
url: '/',
- template: '<page-landing></page-landing>',
+ views: {
+ '@': {
+ template: baseTemplate
+ },
+ 'page@landing': {
+ component: 'pageLanding'
+ }
+ },
+ // template: '<page-landing></page-landing>',
redirectTo: (trans) => {
return trans.injector().get('User').read()
.then(() => {
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-landing/public.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-landing/public.pug b/modules/web-console/frontend/app/components/page-landing/public.pug
new file mode 100644
index 0000000..d9153f5
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-landing/public.pug
@@ -0,0 +1,21 @@
+//-
+ 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.
+
+web-console-header(hide-menu-button='true')
+ .web-console-header-content__title Management console for Apache Ignite
+ .page-landing__button-signin.btn-ignite.btn-ignite--primary(ui-sref='signin') Sign In
+.content(ui-view='page')
+web-console-footer.web-console-footer__page-bottom
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-landing/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-landing/style.scss b/modules/web-console/frontend/app/components/page-landing/style.scss
index a92206b..90f3dda 100644
--- a/modules/web-console/frontend/app/components/page-landing/style.scss
+++ b/modules/web-console/frontend/app/components/page-landing/style.scss
@@ -24,8 +24,20 @@
@include custom_btn;
}
+.page-landing__button-signin {
+ align-self: center;
+ margin-left: 30px;
+ margin-right: var(--page-side-padding) !important;
+ min-width: 80px;
+ font-weight: 500;
+ padding: 10px 25px !important;
+ flex: 0 0 auto;
+}
+
page-landing {
font-family: Roboto;
+ display: block;
+ margin: 0 calc(var(--page-side-padding) * -1) calc(var(--page-side-padding) * -1);
.btn-custom {
@include custom_btn;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-landing/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-landing/template.pug b/modules/web-console/frontend/app/components/page-landing/template.pug
index 0fc1f9c..bf926fa 100644
--- a/modules/web-console/frontend/app/components/page-landing/template.pug
+++ b/modules/web-console/frontend/app/components/page-landing/template.pug
@@ -14,12 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-web-console-header
- web-console-header-left
- ignite-header-title
- web-console-header-right
- a#signin_show.btn-ignite.btn-ignite--primary(ui-sref='signin') Sign In
-
section.intro-container-wrapper
.container
.col-lg-6.col-md-6.col-sm-6.col-xs-12.intro-content
@@ -62,5 +56,3 @@ section.features-container-wrapper
p The Web Console allows you to have accounts with different roles.
.align-center.text-center
a.btn.btn-lg.btn-primary.btn-custom(ui-sref='signup') Get Started
-
-web-console-footer
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-changed/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-changed/controller.js b/modules/web-console/frontend/app/components/page-password-changed/controller.js
deleted file mode 100644
index e3b0a03..0000000
--- a/modules/web-console/frontend/app/components/page-password-changed/controller.js
+++ /dev/null
@@ -1,26 +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.
- */
-
-export default class {
- static $inject = ['$state', '$timeout'];
-
- constructor($state, $timeout) {
- $timeout(() => {
- $state.go('signin');
- }, 10000);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-changed/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-changed/controller.ts b/modules/web-console/frontend/app/components/page-password-changed/controller.ts
new file mode 100644
index 0000000..9696a09
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-password-changed/controller.ts
@@ -0,0 +1,32 @@
+/*
+ * 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 {StateService} from '@uirouter/angularjs';
+
+export default class implements ng.IPostLink {
+ static $inject = ['$state', '$timeout', '$element'];
+
+ constructor($state: StateService, $timeout: ng.ITimeoutService, private el: JQLite) {
+ $timeout(() => {
+ $state.go('signin');
+ }, 10000);
+ }
+
+ $postLink() {
+ this.el.addClass('public-page');
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-changed/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-changed/index.js b/modules/web-console/frontend/app/components/page-password-changed/index.js
index 7c244be..903138f 100644
--- a/modules/web-console/frontend/app/components/page-password-changed/index.js
+++ b/modules/web-console/frontend/app/components/page-password-changed/index.js
@@ -19,6 +19,7 @@ import angular from 'angular';
import template from './template.pug';
import controller from './controller';
+import publicTemplate from '../../../views/public.pug';
import './style.scss';
@@ -32,7 +33,14 @@ export default angular
.config(['$stateProvider', ($stateProvider) => {
$stateProvider.state('password.send', {
url: '/changed',
- component: 'pagePasswordChanged',
+ views: {
+ '@': {
+ template: publicTemplate
+ },
+ 'page@password.send': {
+ component: 'pagePasswordChanged'
+ }
+ },
tfMetaTags: {
title: 'Password send'
},
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-changed/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-changed/style.scss b/modules/web-console/frontend/app/components/page-password-changed/style.scss
index eeb44ec..e32e9b2 100644
--- a/modules/web-console/frontend/app/components/page-password-changed/style.scss
+++ b/modules/web-console/frontend/app/components/page-password-changed/style.scss
@@ -19,17 +19,10 @@ page-password-changed {
display: flex;
flex: 1 0 auto;
flex-direction: column;
-
min-height: 100%;
-
- font-family: Roboto;
-
- .body-container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
+ justify-content: center;
+ align-items: center;
+ max-width: initial !important;
h2 {
margin-bottom: 30px;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-changed/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-changed/template.pug b/modules/web-console/frontend/app/components/page-password-changed/template.pug
index 7d2d986..82c2cc1 100644
--- a/modules/web-console/frontend/app/components/page-password-changed/template.pug
+++ b/modules/web-console/frontend/app/components/page-password-changed/template.pug
@@ -14,9 +14,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-.container.body-container
- h2 Ready!
+h2 Ready!
- p
- | Further instructions for password reset have been sent to your e-mail address.#[br]
- | You'll be redirected back automatically in a few seconds. If not, please #[a(ui-sref='signin') click here].
+p
+ | Further instructions for password reset have been sent to your e-mail address.#[br]
+ | You'll be redirected back automatically in a few seconds. If not, please #[a(ui-sref='signin') click here].
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-reset/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-reset/controller.js b/modules/web-console/frontend/app/components/page-password-reset/controller.js
index 53d6c69..b69e566 100644
--- a/modules/web-console/frontend/app/components/page-password-reset/controller.js
+++ b/modules/web-console/frontend/app/components/page-password-reset/controller.js
@@ -16,7 +16,9 @@
*/
export default class {
- static $inject = ['$modal', '$http', '$state', 'IgniteMessages'];
+ static $inject = ['$modal', '$http', '$state', 'IgniteMessages', '$element'];
+ /** @type {JQLite} */
+ el;
/**
* @param {mgcrea.ngStrap.modal.IModalService} $modal
@@ -24,10 +26,15 @@ export default class {
* @param {import('@uirouter/angularjs').StateService} $state
* @param {ReturnType<typeof import('app/services/Messages.service').default>} Messages
*/
- constructor($modal, $http, $state, Messages) {
+ constructor($modal, $http, $state, Messages, el) {
this.$http = $http;
this.$state = $state;
this.Messages = Messages;
+ this.el = el;
+ }
+
+ $postLink() {
+ this.el.addClass('public-page');
}
$onInit() {
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-reset/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-reset/index.js b/modules/web-console/frontend/app/components/page-password-reset/index.js
index e1042a6..c07fa23 100644
--- a/modules/web-console/frontend/app/components/page-password-reset/index.js
+++ b/modules/web-console/frontend/app/components/page-password-reset/index.js
@@ -22,6 +22,7 @@ import _ from 'lodash';
import template from './template.pug';
import controller from './controller';
+import publicTemplate from '../../../views/public.pug';
import './style.scss';
@@ -42,7 +43,14 @@ export default angular
})
.state('password.reset', {
url: '/reset?{token}',
- component: 'pagePasswordReset',
+ views: {
+ '@': {
+ template: publicTemplate
+ },
+ 'page@password.reset': {
+ component: 'pagePasswordReset'
+ }
+ },
redirectTo: (trans) => {
if (_.isEmpty(trans.params('to').token))
return 'signin';
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-reset/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-reset/style.scss b/modules/web-console/frontend/app/components/page-password-reset/style.scss
index 75f758e..05ef953 100644
--- a/modules/web-console/frontend/app/components/page-password-reset/style.scss
+++ b/modules/web-console/frontend/app/components/page-password-reset/style.scss
@@ -20,12 +20,19 @@ page-password-reset {
flex: 1 0 auto;
flex-direction: column;
- footer {
+ .form-footer {
+ padding: 15px 0;
+ text-align: right;
display: flex;
- justify-content: flex-end;
+ align-items: center;
+
+ .btn-ignite {
+ margin-left: auto;
+ }
}
- .btn-ignite + .btn-ignite {
- margin-left: 10px;
+ form {
+ display: grid;
+ grid-gap: 10px;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-password-reset/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-password-reset/template.pug b/modules/web-console/frontend/app/components/page-password-reset/template.pug
index 1acfab8..c0df3c9 100644
--- a/modules/web-console/frontend/app/components/page-password-reset/template.pug
+++ b/modules/web-console/frontend/app/components/page-password-reset/template.pug
@@ -16,65 +16,45 @@
include /app/helpers/jade/mixins
-web-console-header
- web-console-header-left
- ignite-header-title
+//- This doesn't seem to do anything 😵
+.main-content(ng-if='error')
+ .text-center
+ p {{::$ctrl.ui.error}}
+h3.public-page__title(ng-if-start='$ctrl.ui.token && !$ctrl.ui.error') Reset Password
+form.page-password-reset__grid(name='$ctrl.form' ng-init='reset_info.token = token' ng-if-end)
+ +form-field__email({
+ label: 'E-mail:',
+ model: '$ctrl.ui.email',
+ disabled: true
+ })
+
+ +form-field__password({
+ label: 'New password:',
+ model: '$ctrl.ui.password',
+ name: '"password"',
+ required: true,
+ placeholder: 'New password'
+ })(
+ ignite-auto-focus
+ ignite-on-enter-focus-move='passwordConfirmInput'
+ )
+ +form-field__password({
+ label: 'Confirm password:',
+ model: 'confirm',
+ name: '"passwordConfirm"',
+ required: true,
+ placeholder: 'Confirm new password'
+ })(
+ ignite-on-enter-focus-move='resetForm.$valid && resetPassword(user_info)'
+ ignite-match='$ctrl.ui.password'
+ )
+
+ footer.form-footer
+ a(ui-sref='default-state') Cancel
+ button.btn-ignite.btn-ignite--primary(
+ ng-disabled='$ctrl.form.$invalid'
+ ng-click='$ctrl.resetPassword()'
+ )
+ svg.icon-left(ignite-icon='checkmark')
+ | Save Changes
-.container.body-container
- .row
- .main-content(ng-if='error')
- .text-center
- p {{::$ctrl.ui.error}}
- div(ng-if='$ctrl.ui.token && !$ctrl.ui.error')
- header.header-with-selector
- div
- h1 Reset Password
-
- -var form = '$ctrl.form'
- form.theme--ignite(name='$ctrl.form' ng-init='reset_info.token = token')
- .row
- .col-50
- +form-field__email({
- label: 'E-mail:',
- model: '$ctrl.ui.email',
- disabled: true
- })
-
- .row
- .col-50
- +form-field__password({
- label: 'New password:',
- model: '$ctrl.ui.password',
- name: '"password"',
- required: true,
- placeholder: 'New password'
- })(
- ignite-auto-focus
- ignite-on-enter-focus-move='passwordConfirmInput'
- )
-
- .row
- .col-50
- +form-field__password({
- label: 'Confirm password:',
- model: 'confirm',
- name: '"passwordConfirm"',
- required: true,
- placeholder: 'Confirm new password'
- })(
- ignite-on-enter-focus-move='resetForm.$valid && resetPassword(user_info)'
- ignite-match='$ctrl.ui.password'
- )
-
- hr
-
- footer
- a.btn-ignite.btn-ignite--link-success(type='button' ui-sref='default-state') Cancel
- button.btn-ignite.btn-ignite--success(
- ng-disabled='$ctrl.form.$invalid'
- ng-click='$ctrl.resetPassword()'
- )
- svg.icon-left(ignite-icon='checkmark')
- | Save Changes
-
-web-console-footer
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-queries/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/index.js b/modules/web-console/frontend/app/components/page-queries/index.js
deleted file mode 100644
index ba9e511..0000000
--- a/modules/web-console/frontend/app/components/page-queries/index.js
+++ /dev/null
@@ -1,100 +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.
- */
-
-import './style.scss';
-
-import angular from 'angular';
-
-import queriesNotebooksList from './components/queries-notebooks-list';
-import queriesNotebook from './components/queries-notebook';
-import pageQueriesCmp from './component';
-import {default as ActivitiesData} from 'app/core/activities/Activities.data';
-import Notebook from './notebook.service';
-
-/**
- * @param {uirouter.UIRouter} $uiRouter
- * @param {ActivitiesData} ActivitiesData
- */
-function registerActivitiesHook($uiRouter, ActivitiesData) {
- $uiRouter.transitionService.onSuccess({to: 'base.sql.**'}, (transition) => {
- ActivitiesData.post({group: 'sql', action: transition.targetState().name()});
- });
-}
-
-registerActivitiesHook.$inject = ['$uiRouter', 'IgniteActivitiesData'];
-
-export default angular.module('ignite-console.sql', [
- 'ui.router',
- queriesNotebooksList.name,
- queriesNotebook.name
-])
- .component('pageQueries', pageQueriesCmp)
- .component('pageQueriesSlot', {
- require: {
- pageQueries: '^pageQueries'
- },
- bindings: {
- slotName: '<'
- },
- controller: class {
- static $inject = ['$transclude', '$timeout'];
-
- constructor($transclude, $timeout) {
- this.$transclude = $transclude;
- this.$timeout = $timeout;
- }
-
- $postLink() {
- this.$transclude((clone) => {
- this.pageQueries[this.slotName].empty();
- clone.appendTo(this.pageQueries[this.slotName]);
- });
- }
- },
- transclude: true
- })
- .service('IgniteNotebook', Notebook)
- .config(['$stateProvider', ($stateProvider) => {
- // set up the states
- $stateProvider
- .state('base.sql', {
- abstract: true
- })
- .state('base.sql.tabs', {
- url: '/queries',
- component: 'pageQueries',
- redirectTo: 'base.sql.tabs.notebooks-list',
- permission: 'query'
- })
- .state('base.sql.tabs.notebooks-list', {
- url: '/notebooks',
- component: 'queriesNotebooksList',
- permission: 'query',
- tfMetaTags: {
- title: 'Notebooks'
- }
- })
- .state('base.sql.notebook', {
- url: '/notebook/{noteId}',
- component: 'queriesNotebook',
- permission: 'query',
- tfMetaTags: {
- title: 'Query notebook'
- }
- });
- }])
- .run(registerActivitiesHook);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-queries/index.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/index.ts b/modules/web-console/frontend/app/components/page-queries/index.ts
new file mode 100644
index 0000000..2e25cb0
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-queries/index.ts
@@ -0,0 +1,110 @@
+/*
+ * 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 './style.scss';
+
+import angular from 'angular';
+
+import queriesNotebooksList from './components/queries-notebooks-list';
+import queriesNotebook from './components/queries-notebook';
+import pageQueriesCmp from './component';
+import {default as ActivitiesData} from 'app/core/activities/Activities.data';
+import Notebook from './notebook.service';
+import {navigationMenuItem, AppStore} from '../../store';
+
+/**
+ * @param {uirouter.UIRouter} $uiRouter
+ * @param {ActivitiesData} ActivitiesData
+ */
+function registerActivitiesHook($uiRouter, ActivitiesData) {
+ $uiRouter.transitionService.onSuccess({to: 'base.sql.**'}, (transition) => {
+ ActivitiesData.post({group: 'sql', action: transition.targetState().name()});
+ });
+}
+
+registerActivitiesHook.$inject = ['$uiRouter', 'IgniteActivitiesData'];
+
+export default angular.module('ignite-console.sql', [
+ 'ui.router',
+ queriesNotebooksList.name,
+ queriesNotebook.name
+])
+ .run(['Store', (store: AppStore) => {
+ store.dispatch(navigationMenuItem({
+ activeSref: 'base.sql.**',
+ icon: 'sql',
+ label: 'Queries',
+ order: 2,
+ sref: 'base.sql.tabs.notebooks-list'
+ }));
+ }])
+ .component('pageQueries', pageQueriesCmp)
+ .component('pageQueriesSlot', {
+ require: {
+ pageQueries: '^pageQueries'
+ },
+ bindings: {
+ slotName: '<'
+ },
+ controller: class {
+ static $inject = ['$transclude', '$timeout'];
+
+ constructor($transclude, $timeout) {
+ this.$transclude = $transclude;
+ this.$timeout = $timeout;
+ }
+
+ $postLink() {
+ this.$transclude((clone) => {
+ this.pageQueries[this.slotName].empty();
+ clone.appendTo(this.pageQueries[this.slotName]);
+ });
+ }
+ },
+ transclude: true
+ })
+ .service('IgniteNotebook', Notebook)
+ .config(['$stateProvider', ($stateProvider) => {
+ // set up the states
+ $stateProvider
+ .state('base.sql', {
+ abstract: true
+ })
+ .state('base.sql.tabs', {
+ url: '/queries',
+ component: 'pageQueries',
+ redirectTo: 'base.sql.tabs.notebooks-list',
+ permission: 'query'
+ })
+ .state('base.sql.tabs.notebooks-list', {
+ url: '/notebooks',
+ component: 'queriesNotebooksList',
+ permission: 'query',
+ tfMetaTags: {
+ title: 'Notebooks'
+ }
+ })
+ .state('base.sql.notebook', {
+ url: '/notebook/{noteId}',
+ component: 'queriesNotebook',
+ permission: 'query',
+ tfMetaTags: {
+ title: 'Query notebook'
+ }
+ });
+ }])
+ .run(registerActivitiesHook);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signin/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signin/controller.ts b/modules/web-console/frontend/app/components/page-signin/controller.ts
index c461b86..18fee0b 100644
--- a/modules/web-console/frontend/app/components/page-signin/controller.ts
+++ b/modules/web-console/frontend/app/components/page-signin/controller.ts
@@ -27,7 +27,7 @@ interface ISigninFormController extends ng.IFormController {
password: ng.INgModelController
}
-export default class {
+export default class implements ng.IPostLink {
data: ISiginData = {
email: null,
password: null
@@ -37,15 +37,16 @@ export default class {
serverError: string = null;
- static $inject = ['Auth', 'IgniteMessages', 'IgniteFormUtils'];
+ static $inject = ['Auth', 'IgniteMessages', 'IgniteFormUtils', '$element'];
- constructor(private Auth: AuthService, private IgniteMessages, private IgniteFormUtils) {}
+ constructor(private Auth: AuthService, private IgniteMessages, private IgniteFormUtils, private el: JQLite) {}
canSubmitForm(form: ISigninFormController) {
return form.$error.server ? true : !form.$invalid;
}
$postLink() {
+ this.el.addClass('public-page');
this.form.email.$validators.server = () => !this.serverError;
this.form.password.$validators.server = () => !this.serverError;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signin/run.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signin/run.ts b/modules/web-console/frontend/app/components/page-signin/run.ts
index aa5647c..4c0a1e6 100644
--- a/modules/web-console/frontend/app/components/page-signin/run.ts
+++ b/modules/web-console/frontend/app/components/page-signin/run.ts
@@ -15,6 +15,7 @@
* limitations under the License.
*/
+import publicTemplate from '../../../views/public.pug';
import {UIRouter} from '@uirouter/angularjs';
import {IIgniteNg1StateDeclaration} from 'app/types';
@@ -22,7 +23,14 @@ export function registerState($uiRouter: UIRouter) {
const state: IIgniteNg1StateDeclaration = {
url: '/signin',
name: 'signin',
- component: 'pageSignin',
+ views: {
+ '': {
+ template: publicTemplate
+ },
+ 'page@signin': {
+ component: 'pageSignin'
+ }
+ },
unsaved: true,
redirectTo: (trans) => {
const skipStates = new Set(['signup', 'forgotPassword', 'landing']);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signin/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signin/style.scss b/modules/web-console/frontend/app/components/page-signin/style.scss
index 51da101..729d439 100644
--- a/modules/web-console/frontend/app/components/page-signin/style.scss
+++ b/modules/web-console/frontend/app/components/page-signin/style.scss
@@ -18,32 +18,19 @@
page-signin {
display: flex;
flex-direction: column;
- flex: 1 0 auto;
- section {
- margin-left: auto;
- margin-right: auto;
- width: 530px;
-
- h3 {
- font-size: 38px;
- font-weight: 300;
- margin: 30px 0 30px;
- }
-
- .form-field {
- margin: 10px 0;
- }
+ .form-field {
+ margin: 10px 0;
+ }
- .form-footer {
- padding: 15px 0;
- text-align: right;
- display: flex;
- align-items: center;
+ .form-footer {
+ padding: 15px 0;
+ text-align: right;
+ display: flex;
+ align-items: center;
- .btn-ignite {
- margin-left: auto;
- }
+ .btn-ignite {
+ margin-left: auto;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signin/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signin/template.pug b/modules/web-console/frontend/app/components/page-signin/template.pug
index b31a9bd..2a128a0 100644
--- a/modules/web-console/frontend/app/components/page-signin/template.pug
+++ b/modules/web-console/frontend/app/components/page-signin/template.pug
@@ -16,44 +16,35 @@
include /app/helpers/jade/mixins
-web-console-header
- web-console-header-left
- ignite-header-title
-
-.container--responsive.body-container
- section
- -var form = '$ctrl.form'
- h3 Sign In
- form(name=form novalidate ng-submit='$ctrl.signin()')
- +form-field__email({
- label: 'Email:',
- model: '$ctrl.data.email',
- name: '"email"',
- placeholder: 'Input email',
- required: true
- })(
- ng-model-options='{allowInvalid: true}'
- autocomplete='email'
- ignite-auto-focus
- )
- +form-field__error({error: 'server', message: `{{$ctrl.serverError}}`})
- +form-field__password({
- label: 'Password:',
- model: '$ctrl.data.password',
- name: '"password"',
- placeholder: 'Input password',
- required: true
- })(
- ng-model-options='{allowInvalid: true}'
- autocomplete='current-password'
- )
- +form-field__error({error: 'server', message: `{{$ctrl.serverError}}`})
- footer.form-footer
- a(ui-sref='forgotPassword({email: $ctrl.data.email})') Forgot password?
- button.btn-ignite.btn-ignite--primary(
- type='submit'
- ) Sign In
- footer.page-signin__no-account-message
- | Don't have an account? #[a(ui-sref='signup') Get started]
-
-web-console-footer
+h3.public-page__title Sign In
+form(name='$ctrl.form' novalidate ng-submit='$ctrl.signin()')
+ +form-field__email({
+ label: 'Email:',
+ model: '$ctrl.data.email',
+ name: '"email"',
+ placeholder: 'Input email',
+ required: true
+ })(
+ ng-model-options='{allowInvalid: true}'
+ autocomplete='email'
+ ignite-auto-focus
+ )
+ +form-field__error({error: 'server', message: `{{$ctrl.serverError}}`})
+ +form-field__password({
+ label: 'Password:',
+ model: '$ctrl.data.password',
+ name: '"password"',
+ placeholder: 'Input password',
+ required: true
+ })(
+ ng-model-options='{allowInvalid: true}'
+ autocomplete='current-password'
+ )
+ +form-field__error({error: 'server', message: `{{$ctrl.serverError}}`})
+ footer.form-footer
+ a(ui-sref='forgotPassword({email: $ctrl.data.email})') Forgot password?
+ button.btn-ignite.btn-ignite--primary(
+ type='submit'
+ ) Sign In
+footer.page-signin__no-account-message
+ | Don't have an account? #[a(ui-sref='signup') Get started]
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signup/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signup/controller.ts b/modules/web-console/frontend/app/components/page-signup/controller.ts
index ddf77be..93d9987 100644
--- a/modules/web-console/frontend/app/components/page-signup/controller.ts
+++ b/modules/web-console/frontend/app/components/page-signup/controller.ts
@@ -20,7 +20,7 @@ import MessagesFactory from '../../services/Messages.service';
import FormUtilsFactoryFactory from '../../services/FormUtils.service';
import {ISignupData} from '../form-signup';
-export default class PageSignup {
+export default class PageSignup implements ng.IPostLink {
form: ng.IFormController;
data: ISignupData = {
@@ -34,14 +34,19 @@ export default class PageSignup {
serverError: string | null = null;
- static $inject = ['Auth', 'IgniteMessages', 'IgniteFormUtils'];
+ static $inject = ['Auth', 'IgniteMessages', 'IgniteFormUtils', '$element'];
constructor(
private Auth: Auth,
private IgniteMessages: ReturnType<typeof MessagesFactory>,
- private IgniteFormUtils: ReturnType<typeof FormUtilsFactoryFactory>
+ private IgniteFormUtils: ReturnType<typeof FormUtilsFactoryFactory>,
+ private el: JQLite
) {}
+ $postLink() {
+ this.el.addClass('public-page');
+ }
+
canSubmitForm(form: PageSignup['form']) {
return form.$error.server ? true : !form.$invalid;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signup/run.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signup/run.js b/modules/web-console/frontend/app/components/page-signup/run.js
index 1d04fa2..bd27638 100644
--- a/modules/web-console/frontend/app/components/page-signup/run.js
+++ b/modules/web-console/frontend/app/components/page-signup/run.js
@@ -15,6 +15,8 @@
* limitations under the License.
*/
+import publicTemplate from '../../../views/public.pug';
+
/**
* @param {import("@uirouter/angularjs").UIRouter} $uiRouter
*/
@@ -23,7 +25,14 @@ export function registerState($uiRouter) {
const state = {
name: 'signup',
url: '/signup',
- component: 'pageSignup',
+ views: {
+ '': {
+ template: publicTemplate
+ },
+ 'page@signup': {
+ component: 'pageSignup'
+ }
+ },
unsaved: true,
tfMetaTags: {
title: 'Sign Up'
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signup/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signup/style.scss b/modules/web-console/frontend/app/components/page-signup/style.scss
index 98c4729..0930036 100644
--- a/modules/web-console/frontend/app/components/page-signup/style.scss
+++ b/modules/web-console/frontend/app/components/page-signup/style.scss
@@ -20,26 +20,14 @@ page-signup {
flex-direction: column;
flex: 1 0 auto;
- section {
- h3 {
- font-size: 38px;
- font-weight: 300;
- margin: 30px 0 30px;
- }
-
- margin-left: auto;
- margin-right: auto;
- width: 530px;
-
- form footer {
- padding: 15px 0;
- text-align: right;
- display: flex;
- align-items: center;
+ form footer {
+ padding: 15px 0;
+ text-align: right;
+ display: flex;
+ align-items: center;
- .btn-ignite {
- margin-left: auto;
- }
+ .btn-ignite {
+ margin-left: auto;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/page-signup/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-signup/template.pug b/modules/web-console/frontend/app/components/page-signup/template.pug
index 5584dfc..686079a 100644
--- a/modules/web-console/frontend/app/components/page-signup/template.pug
+++ b/modules/web-console/frontend/app/components/page-signup/template.pug
@@ -14,26 +14,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-include /app/helpers/jade/mixins
-
-web-console-header
- web-console-header-left
- ignite-header-title
-
-.container--responsive.body-container
- section
- h3 Don't Have An Account?
- form(name='$ctrl.form' novalidate ng-submit='$ctrl.signup()')
- form-signup(
- outer-form='$ctrl.form'
- ng-model='$ctrl.data'
- server-error='$ctrl.serverError'
- )
- footer.full-width.form-footer
- button.btn-ignite.btn-ignite--primary(
- type='submit'
- ) Sign Up
- footer.page-signup__has-account-message
- | Already have an account? #[a(ui-sref='signin') Sign in here]
-
-web-console-footer
+h3.public-page__title Don't Have An Account?
+form(name='$ctrl.form' novalidate ng-submit='$ctrl.signup()')
+ form-signup(
+ outer-form='$ctrl.form'
+ ng-model='$ctrl.data'
+ server-error='$ctrl.serverError'
+ )
+ footer.full-width.form-footer
+ button.btn-ignite.btn-ignite--primary(
+ type='submit'
+ ) Sign Up
+footer.page-signup__has-account-message
+ | Already have an account? #[a(ui-sref='signin') Sign in here]
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/permanent-notifications/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/permanent-notifications/component.ts b/modules/web-console/frontend/app/components/permanent-notifications/component.ts
new file mode 100644
index 0000000..e86d3e5
--- /dev/null
+++ b/modules/web-console/frontend/app/components/permanent-notifications/component.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 './template.pug';
+import controller from './controller';
+import './style.scss';
+
+export const component: ng.IComponentOptions = {
+ template,
+ controller
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/permanent-notifications/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/permanent-notifications/controller.ts b/modules/web-console/frontend/app/components/permanent-notifications/controller.ts
new file mode 100644
index 0000000..d672304
--- /dev/null
+++ b/modules/web-console/frontend/app/components/permanent-notifications/controller.ts
@@ -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.
+ */
+
+export default class PermanentNotifications {
+ static $inject = ['UserNotifications', '$rootScope', '$window']
+ constructor(
+ private UserNotifications: unknown,
+ private $rootScope: ng.IRootScopeService,
+ private $window: ng.IWindowService
+ ) {}
+ closeDemo() {
+ this.$window.close();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/permanent-notifications/index.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/permanent-notifications/index.ts b/modules/web-console/frontend/app/components/permanent-notifications/index.ts
new file mode 100644
index 0000000..33a9189
--- /dev/null
+++ b/modules/web-console/frontend/app/components/permanent-notifications/index.ts
@@ -0,0 +1,21 @@
+/*
+ * 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 {component} from './component';
+
+export default angular.module('ignite-console.permanent-notifications', [])
+ .component('permanentNotifications', component);
[2/3] ignite git commit: IGNITE-10239 Update navigation and top menu.
- Fixes #5630.
Posted by an...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/permanent-notifications/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/permanent-notifications/style.scss b/modules/web-console/frontend/app/components/permanent-notifications/style.scss
new file mode 100644
index 0000000..e40f21a
--- /dev/null
+++ b/modules/web-console/frontend/app/components/permanent-notifications/style.scss
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+permanent-notifications {
+ display: block;
+
+ @import "./../../../public/stylesheets/variables.scss";
+
+ .wch-notification {
+ line-height: 16px;
+ padding: 7px;
+ background: $brand-warning;
+ font-size: 16px;
+ text-align: center;
+
+ a {
+ color: $brand-info;
+ }
+
+ &+.wch-notification {
+ border-top: 1px solid darken($brand-warning, 15%);
+ }
+ }
+
+ .wch-notification.wch-notification--demo {
+ color: white;
+ background: $ignite-brand-success;
+ border: none;
+
+ a {
+ color: white;
+ text-decoration: underline;
+
+ &:hover {
+ color: #ffab40;
+ text-decoration: none;
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/permanent-notifications/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/permanent-notifications/template.pug b/modules/web-console/frontend/app/components/permanent-notifications/template.pug
new file mode 100644
index 0000000..6abe611
--- /dev/null
+++ b/modules/web-console/frontend/app/components/permanent-notifications/template.pug
@@ -0,0 +1,23 @@
+//-
+ 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.
+
+.wch-notification(ng-show='$ctrl.UserNotifications.isShown && $ctrl.UserNotifications.message' ng-bind-html='$ctrl.UserNotifications.message')
+
+.wch-notification(ng-show='$ctrl.$rootScope.user.becomeUsed')
+ | You are currently viewing user #[strong {{$ctrl.$rootScope.user.firstName}} {{$ctrl.$rootScope.user.lastName}}] as administrator. #[a(ng-click='$ctrl.$rootScope.revertIdentity()') Revert to your identity?]
+
+.wch-notification.wch-notification--demo(ng-if='$ctrl.$rootScope.IgniteDemoMode')
+ | You are now in #[b Demo Mode]. #[a(ng-click='$ctrl.closeDemo()') Close Demo?]
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/timed-redirection/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/timed-redirection/style.scss b/modules/web-console/frontend/app/components/timed-redirection/style.scss
index 5b0ecfd..487fa2d 100644
--- a/modules/web-console/frontend/app/components/timed-redirection/style.scss
+++ b/modules/web-console/frontend/app/components/timed-redirection/style.scss
@@ -23,6 +23,7 @@ timed-redirection {
display: flex;
flex-direction: column;
flex: 1;
+ min-height: 100%;
.timed-redirection--wrapper {
text-align: center;
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/component.js b/modules/web-console/frontend/app/components/web-console-footer/component.js
index 40a1051..bb2f7f7 100644
--- a/modules/web-console/frontend/app/components/web-console-footer/component.js
+++ b/modules/web-console/frontend/app/components/web-console-footer/component.js
@@ -17,7 +17,9 @@
import template from './template.pug';
import './style.scss';
+import controller from './controller';
export default {
- template
+ template,
+ controller
};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/component.js b/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/component.js
deleted file mode 100644
index 40a1051..0000000
--- a/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/component.js
+++ /dev/null
@@ -1,23 +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.
- */
-
-import template from './template.pug';
-import './style.scss';
-
-export default {
- template
-};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/style.scss b/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/style.scss
deleted file mode 100644
index 47b88af..0000000
--- a/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/style.scss
+++ /dev/null
@@ -1,31 +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.
- */
-
-web-console-footer-links {
- margin-left: auto;
-
- a + a {
- margin-left: 5px;
-
- &:before {
- content: '|';
- display: inline-block;
- margin-right: 5px;
- color: #fafafa;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/template.pug b/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/template.pug
deleted file mode 100644
index 5c04467..0000000
--- a/modules/web-console/frontend/app/components/web-console-footer/components/web-console-footer-links/template.pug
+++ /dev/null
@@ -1,17 +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.
-
-a(href="/api/v1/downloads/agent" target="_self") Download Agent
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/controller.ts b/modules/web-console/frontend/app/components/web-console-footer/controller.ts
new file mode 100644
index 0000000..0811748
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-footer/controller.ts
@@ -0,0 +1,27 @@
+/*
+ * 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 {default as Version} from '../../services/Version.service';
+
+export default class WebConsoleFooter {
+ static $inject = ['IgniteVersion', '$rootScope']
+ constructor(private Version: Version, private $root: ng.IRootScopeService) {}
+ year = new Date().getFullYear()
+ get userIsAuthorized() {
+ return !!this.$root.user;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/index.js b/modules/web-console/frontend/app/components/web-console-footer/index.js
index e26b602..4fa4617 100644
--- a/modules/web-console/frontend/app/components/web-console-footer/index.js
+++ b/modules/web-console/frontend/app/components/web-console-footer/index.js
@@ -17,9 +17,16 @@
import angular from 'angular';
import component from './component';
-import componentLinks from './components/web-console-footer-links/component';
export default angular
.module('ignite-console.web-console-footer', [])
.component('webConsoleFooter', component)
- .component('webConsoleFooterLinks', componentLinks);
+ .directive('webConsoleFooterPageBottom', function() {
+ return {
+ restrict: 'C',
+ link(scope, el) {
+ el.parent().addClass('wrapper-public');
+ scope.$on('$destroy', () => el.parent().removeClass('wrapper-public'));
+ }
+ };
+ });
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/style.scss b/modules/web-console/frontend/app/components/web-console-footer/style.scss
index f3de59f..fe5eb64 100644
--- a/modules/web-console/frontend/app/components/web-console-footer/style.scss
+++ b/modules/web-console/frontend/app/components/web-console-footer/style.scss
@@ -16,46 +16,87 @@
*/
web-console-footer {
- display: block;
- color: #fafafa;
- background: linear-gradient(to bottom, #5f5e5e, #393939);
- font-family: Roboto;
font-size: 12px;
- font-weight: 300;
- padding-top: 12px;
- padding-bottom: 12px;
- p {
- margin-bottom: 0;
+ .#{&}__legal {
+ color: rgba(0, 0, 0, 0.54);
+ }
+
+ &.web-console-footer__sidebar-closed {
+ width: var(--width-narrow);
+ border-top: 1px solid #dddddd;
+
+ a {
+ color: var(--inactive-link-color);
+ margin-left: auto;
+ margin-right: auto;
+ width: 40px;
+ height: 40px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
- &:first-of-type {
- margin-bottom: 5px;
+ &:hover, &:focus {
+ color: var(--active-link-color);
+ }
+ [ignite-icon] {
+ transform: scale(1.25);
+ }
+ }
+
+ .web-console-footer__sidebar-stuff {
+ position: sticky;
+ display: grid;
+ grid-row-gap: 15px;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ }
+
+ .web-console-footer__regular-stuff {
+ display: none;
}
}
- .wcf-content {
+ &.web-console-footer__sidebar-opened {
+ width: var(--width-wide);
display: flex;
- flex-direction: row;
- align-items: center;
+ flex-direction: column;
+ padding: 27px 18px 27px 27px;
- & > :nth-child(2) {
- margin-left: auto;
+ .web-console-footer__sidebar-stuff {
+ display: none;
+ }
+
+ .web-console-footer__regular-stuff {
+ display: block;
}
}
+}
+
+.web-console-footer__page-bottom {
+ grid-area: footer;
+ color: #fafafa;
+ background: #393939;
+ font-size: 12px;
+ font-weight: 300;
+ padding: 12px var(--page-side-padding);
+
+ .web-console-footer__sidebar-stuff {
+ display: none;
+ }
- ignite-powered-by-apache {
- & > a {
- margin-left: 40px;
- }
+ p {
+ margin: 0;
}
a {
- color: #ee8e89;
-
- &:hover, &.hover,
- &:focus, &.focus {
- color: #ee2b27;
- text-decoration: none;
+ color: #ee8e89 !important;
+ &:hover, &:focus {
+ color: #ee2b27 !important;
}
}
+
+ .web-console-footer__legal {
+ color: inherit;
+ }
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-footer/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-footer/template.pug b/modules/web-console/frontend/app/components/web-console-footer/template.pug
index aa2812a..2c1495e 100644
--- a/modules/web-console/frontend/app/components/web-console-footer/template.pug
+++ b/modules/web-console/frontend/app/components/web-console-footer/template.pug
@@ -14,7 +14,19 @@
See the License for the specific language governing permissions and
limitations under the License.
-.container--responsive.wcf-content
- ignite-footer
- web-console-footer-links(ng-if='$parent.user')
- ignite-powered-by-apache
\ No newline at end of file
+
+.web-console-footer__sidebar-stuff
+ a(
+ href="/api/v1/downloads/agent"
+ target="_self"
+ ng-if='$ctrl.userIsAuthorized'
+ title='Download Agent'
+ )
+ svg(ignite-icon='downloadAgent')
+
+.web-console-footer__regular-stuff
+ p Apache Ignite Web Console ({{$ctrl.Version.webConsole}})
+ p © {{::$ctrl.year}} The Apache Software Foundation.
+ p.web-console-footer__legal Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are trademarks of The Apache Software Foundation.
+
+ a(href="/api/v1/downloads/agent" target="_self" ng-if='$ctrl.userIsAuthorized') Download Agent
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/component.js b/modules/web-console/frontend/app/components/web-console-header/component.js
deleted file mode 100644
index 02b3080..0000000
--- a/modules/web-console/frontend/app/components/web-console-header/component.js
+++ /dev/null
@@ -1,53 +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.
- */
-
-import template from './template.pug';
-import './style.scss';
-
-export default {
- template,
- controller: class {
- static $inject = ['$rootScope', '$scope', '$state', 'IgniteBranding', 'UserNotifications'];
-
- static connectedClustersUnvisibleStates = [
- '403', '404', 'signin'
- ];
-
- constructor($rootScope, $scope, $state, branding, UserNotifications) {
- Object.assign(this, {$rootScope, $scope, $state, branding, UserNotifications});
- }
-
- setConnectedClustersVisible() {
- this.isConnectedClustersVisible =
- !this.constructor.connectedClustersUnvisibleStates.some((state) => this.$state.includes(state));
- }
-
- isAuthorized() {
- return !!this.$rootScope.user;
- }
-
- $onInit() {
- this.setConnectedClustersVisible();
-
- this.$scope.$on('$stateChangeSuccess', () => this.setConnectedClustersVisible());
- }
- },
- transclude: {
- slotLeft: '?webConsoleHeaderLeft',
- slotRight: '?webConsoleHeaderRight'
- }
-};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/component.ts b/modules/web-console/frontend/app/components/web-console-header/component.ts
new file mode 100644
index 0000000..ad7e8a7
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/component.ts
@@ -0,0 +1,43 @@
+/*
+ * 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 './template.pug';
+import './style.scss';
+import {AppStore, toggleSidebar} from '../../store';
+
+export default {
+ template,
+ controller: class {
+ static $inject = ['$rootScope', '$scope', '$state', 'IgniteBranding', 'UserNotifications', 'Store'];
+
+ constructor($rootScope, $scope, $state, branding, UserNotifications, private store: AppStore) {
+ Object.assign(this, {$rootScope, $scope, $state, branding, UserNotifications});
+ }
+
+ toggleSidebar() {
+ this.store.dispatch(toggleSidebar());
+ }
+
+ isAuthorized() {
+ return !!this.$rootScope.user;
+ }
+ },
+ transclude: true,
+ bindings: {
+ hideMenuButton: '<?'
+ }
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/component.ts b/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/component.ts
new file mode 100644
index 0000000..e24b551
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/component.ts
@@ -0,0 +1,24 @@
+/*
+ * 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 './template.pug';
+import controller from './controller';
+
+export const component: ng.IComponentOptions = {
+ template,
+ controller
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/controller.ts b/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/controller.ts
new file mode 100644
index 0000000..1a1bd1e
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/controller.ts
@@ -0,0 +1,46 @@
+/*
+ * 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 {StateService} from '@uirouter/angularjs';
+import {default as LegacyConfirmFactory} from 'app/services/Confirm.service';
+
+export default class DemoModeButton {
+ static $inject = ['$rootScope', '$state', '$window', 'IgniteConfirm'];
+ constructor(
+ private $root: ng.IRootScopeService,
+ private $state: StateService,
+ private $window: ng.IWindowService,
+ private Confirm: ReturnType<typeof LegacyConfirmFactory>
+ ) {}
+
+ private _openTab(stateName: string) {
+ this.$window.open(this.$state.href(stateName, {}), '_blank');
+ }
+
+ startDemo() {
+ if (!this.$root.user.demoCreated)
+ return this._openTab('demo.reset');
+
+ this.Confirm.confirm('Would you like to continue with previous demo session?', true, false)
+ .then((resume) => {
+ if (resume)
+ return this._openTab('demo.resume');
+
+ this._openTab('demo.reset');
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/template.pug b/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/template.pug
new file mode 100644
index 0000000..f566ac4
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/demo-mode-button/template.pug
@@ -0,0 +1,20 @@
+//-
+ 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.
+
+
+button.btn-ignite.btn-ignite--success(
+ ng-click='$ctrl.startDemo()'
+) Start Demo
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/user-menu/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/user-menu/component.ts b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/component.ts
new file mode 100644
index 0000000..f6141d9
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/component.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 './template.pug';
+import controller from './controller';
+import './style.scss';
+
+export default {
+ template,
+ controller
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/user-menu/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/user-menu/controller.ts b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/controller.ts
new file mode 100644
index 0000000..812d3b5
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/controller.ts
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+export default class UserMenu {
+ static $inject = ['$rootScope', 'IgniteUserbar', 'AclService', '$state', 'gettingStarted']
+ constructor(
+ private $root: ng.IRootScopeService,
+ private IgniteUserbar: any,
+ private AclService: any,
+ private $state: any,
+ private gettingStarted: any
+ ) {}
+ $onInit() {
+ this.items = [
+ {text: 'Profile', sref: 'base.settings.profile'},
+ {text: 'Getting started', click: '$ctrl.gettingStarted.tryShow(true)'}
+ ];
+
+ const _rebuildSettings = () => {
+ this.items.splice(2);
+
+ if (this.AclService.can('admin_page'))
+ this.items.push({text: 'Admin panel', sref: 'base.settings.admin'});
+
+ this.items.push(...this.IgniteUserbar);
+
+ if (this.AclService.can('logout'))
+ this.items.push({text: 'Log out', sref: 'logout'});
+ };
+
+ if (this.$root.user)
+ _rebuildSettings(null, this.$root.user);
+
+ this.$root.$on('user', _rebuildSettings);
+ }
+ get user() {
+ return this.$root.user;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/user-menu/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/user-menu/style.scss b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/style.scss
new file mode 100644
index 0000000..898047b
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/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.
+ */
+
+user-menu {
+ --active-link-color: #ee2b27;
+ font-size: 14px;
+
+ &>.active {
+ color: var(--active-link-color)
+ }
+ .caret {
+ margin-left: 8px;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/user-menu/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/user-menu/template.pug b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/template.pug
new file mode 100644
index 0000000..e946c78
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/user-menu/template.pug
@@ -0,0 +1,26 @@
+//-
+ 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(
+ ng-class='{active: $ctrl.$state.includes("base.settings")}'
+ ng-click='$event.stopPropagation()'
+ bs-dropdown='$ctrl.items'
+ data-placement='bottom-right'
+ data-trigger='hover focus'
+ data-container='self'
+)
+ span {{$ctrl.user.firstName}} {{$ctrl.user.lastName}}
+ span.caret
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/component.ts b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/component.ts
new file mode 100644
index 0000000..e86d3e5
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/component.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 './template.pug';
+import controller from './controller';
+import './style.scss';
+
+export const component: ng.IComponentOptions = {
+ template,
+ controller
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/controller.ts b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/controller.ts
new file mode 100644
index 0000000..4345553
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/controller.ts
@@ -0,0 +1,45 @@
+/*
+ * 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 {StateService} from '@uirouter/angularjs';
+
+export default class WebConsoleHeaderContent {
+ static $inject = ['$rootScope', '$state']
+ constructor(
+ private $rootScope: ng.IRootScopeService,
+ private $state: StateService
+ ) {}
+
+ static connectedClusterInvisibleStates = [
+ '403', '404', 'signin'
+ ];
+
+ get showConnectedClusters(): boolean {
+ return this.$rootScope.user &&
+ !this.$rootScope.IgniteDemoMode &&
+ !this.constructor.connectedClusterInvisibleStates.some((state) => this.$state.includes(state)) &&
+ !this.$rootScope.user.becomeUsed;
+ }
+
+ get showUserMenu(): boolean {
+ return !!this.$rootScope.user;
+ }
+
+ get showDemoModeButton(): boolean {
+ return this.$rootScope.user && !this.$rootScope.user.becomeUsed && !this.$rootScope.IgniteDemoMode;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/style.scss b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/style.scss
new file mode 100644
index 0000000..f483614
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/style.scss
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+web-console-header-content {
+ display: flex;
+ flex: 1;
+
+ .web-console-header-content__right {
+ margin-left: auto;
+ display: flex;
+ }
+
+ .web-console-header-item {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ padding: 0 20px;
+ border-left: 1px solid #dddddd;
+ height: 100%;
+ }
+}
+
+.web-console-header-content__title {
+ display: flex;
+ align-items: center;
+ margin-left: 80px;
+ font-size: 1.4em;
+ margin-right: auto;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/template.pug b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/template.pug
new file mode 100644
index 0000000..8f1d4f8
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-content/template.pug
@@ -0,0 +1,24 @@
+//-
+ 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.
+
+.web-console-header-content__right
+ .web-console-header-item(ng-if='$ctrl.showConnectedClusters')
+ connected-clusters
+ .web-console-header-item(ng-if='$ctrl.showDemoModeButton')
+ demo-mode-button
+
+.web-console-header-item(ng-if='$ctrl.showUserMenu')
+ user-menu
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/component.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/component.js b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/component.js
deleted file mode 100644
index 1621adc..0000000
--- a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/component.js
+++ /dev/null
@@ -1,22 +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.
- */
-
-import template from './template.pug';
-
-export default {
- template
-};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/template.pug b/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/template.pug
deleted file mode 100644
index 0545db1..0000000
--- a/modules/web-console/frontend/app/components/web-console-header/components/web-console-header-extension/template.pug
+++ /dev/null
@@ -1,15 +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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/index.js b/modules/web-console/frontend/app/components/web-console-header/index.js
index 3fc5c66..2a106d4 100644
--- a/modules/web-console/frontend/app/components/web-console-header/index.js
+++ b/modules/web-console/frontend/app/components/web-console-header/index.js
@@ -17,9 +17,13 @@
import angular from 'angular';
import component from './component';
-import componentExtension from './components/web-console-header-extension/component';
+import userMenu from './components/user-menu/component';
+import {component as content} from './components/web-console-header-content/component';
+import {component as demo} from './components/demo-mode-button/component';
export default angular
.module('ignite-console.web-console-header', [])
.component('webConsoleHeader', component)
- .component('webConsoleHeaderExtension', componentExtension);
+ .component('webConsoleHeaderContent', content)
+ .component('userMenu', userMenu)
+ .component('demoModeButton', demo);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/style.scss b/modules/web-console/frontend/app/components/web-console-header/style.scss
index 4edf6fd..e343284 100644
--- a/modules/web-console/frontend/app/components/web-console-header/style.scss
+++ b/modules/web-console/frontend/app/components/web-console-header/style.scss
@@ -21,13 +21,24 @@ web-console-header {
$nav-item-margin: 30px;
$bottom-border-width: 4px;
- display: block;
- min-height: 85px;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ height: 62px;
font-family: Roboto;
font-size: 16px;
border-bottom: $bottom-border-width solid red;
background: white;
position: relative;
+ padding-left: 16px;
+
+ &>ng-transclude {
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ height: 100%;
+ flex: 1;
+ }
&:after {
// Shows header shadow over absolutely positioned child content,
@@ -39,6 +50,7 @@ web-console-header {
position: absolute;
overflow: hidden;
bottom: -4px;
+ pointer-events: none;
}
.wch-slot {
@@ -59,154 +71,26 @@ web-console-header {
}
}
- .wch-content {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items: center;
- padding: 18px 30px;
- position: relative;
- height: 81px;
- }
-
.wch-logo {
height: 40px;
}
- .wch-nav-item,
- .wch-nav-item > a {
- cursor: pointer;
- white-space: nowrap;
-
- &, &.active {
- font-size: 16px;
- font-weight: normal;
- text-decoration: none;
- }
-
- $color-default: $text-color;
- $color-hover: $brand-primary;
- $color-active: $brand-primary;
-
- &, a {
- color: $color-default;
- text-decoration: none;
- }
-
- &, ul {
- margin: 0;
- list-style: none;
- -webkit-padding-start: 0;
- }
-
- &:hover {
- color: $color-hover;
- }
-
- &:focus, :focus,
- &.active, .active {
- color: $color-active;
- text-decoration: none;
- }
-
- &[disabled] {
- opacity: 0.5;
- cursor: default;
- }
-
- .caret {
- margin-left: 4px;
- }
-
- &:not(:last-child) {
- margin-right: $nav-item-margin;
- }
-
- .dropdown-menu {
- a {
- &:hover, &:focus {
- color: inherit;
- }
- }
- li.active a {
- color: inherit;
- }
- }
-
- .user-name-wrapper {
- display: flex;
- align-items: center;
-
- & > span {
- max-width: 180px;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
-
- .wch-demo-toggle {
- margin-right: 10px;
-
- // When in demo mode and clusters are hidden
- &:nth-last-child(2) {
- margin-right: $nav-item-margin;
- }
- }
-
- .wch-notification {
- line-height: 16px;
- padding: 7px;
- background: $brand-warning;
- font-size: 16px;
- text-align: center;
-
- a {
- color: $brand-info;
- }
-
- &+.wch-notification {
- border-top: 1px solid darken($brand-warning, 15%);
- }
- }
-
- .wch-notification.wch-notification--demo {
- z-index: 10000000;
- position: fixed;
- top: 0;
- width: 100%;
-
- color: white;
- background: $ignite-brand-success;
- border: none;
-
- box-shadow: 0 0 15px #008eff;
- animation: pulse 2s infinite;
-
- a {
- color: white;
- text-decoration: underline;
-
- &:hover {
- color: #ffab40;
- text-decoration: none;
- }
- }
- }
-
.wch-additional-nav-items {
display: flex;
}
-}
-@keyframes pulse {
- 0% {
- box-shadow: 0 1px 2px #008eff;
- }
- 50% {
- box-shadow: 0 1px 15px #008eff;
+ .web-console-header__togle-menu-button {
+ width: 40px;
+ height: 40px;
+ background: none !important;
+ border: none !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ outline: none !important;
+ color: rgba(0, 0, 0, 0.54);
+ margin-right: 5px;
}
- 100% {
- box-shadow: 0 1px 2px #008eff;
+ .web-console-header__togle-menu-button-hidden {
+ visibility: hidden;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-header/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-header/template.pug b/modules/web-console/frontend/app/components/web-console-header/template.pug
index 1d25b13..940f3a4 100644
--- a/modules/web-console/frontend/app/components/web-console-header/template.pug
+++ b/modules/web-console/frontend/app/components/web-console-header/template.pug
@@ -14,23 +14,15 @@
See the License for the specific language governing permissions and
limitations under the License.
-.wch-notification(ng-show='$ctrl.UserNotifications.isShown && $ctrl.UserNotifications.message' ng-bind-html='$ctrl.UserNotifications.message')
-
-.wch-notification(ng-show='$root.user.becomeUsed')
- | You are currently viewing user #[strong {{$root.user.firstName}} {{$root.user.lastName}}] as administrator. #[a(ng-click='$root.revertIdentity()') Revert to your identity?]
-
-.wch-notification.wch-notification--demo(ng-if='$root.IgniteDemoMode')
- div(ng-controller='demoController')
- | You are now in #[b Demo Mode]. #[a(ng-click='closeDemo();') Close Demo?]
-
-.wch-content
- connected-clusters(ng-if='$ctrl.$rootScope.user && !$ctrl.$rootScope.IgniteDemoMode && $ctrl.isConnectedClustersVisible && !$root.user.becomeUsed')
-
- a(ui-sref='default-state' ng-if='$ctrl.isAuthorized()').wch-logo-anchor
- img.wch-logo(ng-src='{{::$ctrl.branding.headerLogo}}')
-
- a(ui-sref='landing' ng-if='!$ctrl.isAuthorized()').wch-logo-anchor
- img.wch-logo(ng-src='{{::$ctrl.branding.headerLogo}}')
-
- .wch-slot.wch-slot-left(ng-transclude='slotLeft')
- .wch-slot.wch-slot-right(ng-transclude='slotRight')
+button.web-console-header__togle-menu-button(
+ type='button'
+ title='Toggle menu'
+ ng-click='$ctrl.toggleSidebar()'
+ ng-class='::{"web-console-header__togle-menu-button-hidden": $ctrl.hideMenuButton}'
+)
+ svg(ignite-icon='menu')
+
+a(ui-sref='{{$ctrl.isAuthorized() ? "default-state" : "landing"}}').wch-logo-anchor
+ img.wch-logo(src='/images/ignite-logo.svg')
+
+ng-transclude
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/component.ts b/modules/web-console/frontend/app/components/web-console-sidebar/component.ts
new file mode 100644
index 0000000..e86d3e5
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/component.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 './template.pug';
+import controller from './controller';
+import './style.scss';
+
+export const component: ng.IComponentOptions = {
+ template,
+ controller
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/controller.ts b/modules/web-console/frontend/app/components/web-console-sidebar/controller.ts
new file mode 100644
index 0000000..bdf606b
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/controller.ts
@@ -0,0 +1,30 @@
+/*
+ * 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 {AppStore, selectSidebarOpened} from '../../store';
+
+export default class WebConsoleSidebar {
+ static $inject = ['$rootScope', 'Store']
+ constructor(
+ private $rootScope: ng.IRootScopeService,
+ private store: AppStore
+ ) {}
+ sidebarOpened$ = this.store.state$.pipe(selectSidebarOpened())
+ get showNavigation(): boolean {
+ return !!this.$rootScope.user;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/index.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/index.ts b/modules/web-console/frontend/app/components/web-console-sidebar/index.ts
new file mode 100644
index 0000000..717dca5
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/index.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 {component as overflow} from './web-console-sidebar-overflow/component';
+import {component as nav} from './web-console-sidebar-navigation/component';
+import {component as sidebar} from './component';
+
+export default angular.module('sidebar', [])
+ .component('webConsoleSidebarOverflow', overflow)
+ .component('webConsoleSidebarNavigation', nav)
+ .component('webConsoleSidebar', sidebar);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/style.scss b/modules/web-console/frontend/app/components/web-console-sidebar/style.scss
new file mode 100644
index 0000000..b625333
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/style.scss
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+web-console-sidebar {
+ display: flex;
+ flex-direction: column;
+ background: white;
+ border-right: 1px #dddddd solid;
+ --width-narrow: 75px;
+ --width-wide: 280px;
+ --active-link-color: #ee2b27;
+ --inactive-link-color: #757575;
+ // Does not include notifications height
+ max-height: calc(100vh - var(--header-height));
+ position: -webkit-sticky;
+ position: sticky;
+ top: var(--header-height);
+
+ web-console-sidebar-overflow {
+ flex: 1;
+ }
+
+ web-console-footer {
+ flex: 0 0 auto;
+
+ &:first-child {
+ margin-top: auto;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/template.pug b/modules/web-console/frontend/app/components/web-console-sidebar/template.pug
new file mode 100644
index 0000000..f02f2c4
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/template.pug
@@ -0,0 +1,22 @@
+//-
+ 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.
+
+web-console-sidebar-overflow
+ web-console-sidebar-navigation(opened='$ctrl.sidebarOpened$|async:this' ng-if='$ctrl.showNavigation')
+web-console-footer(ng-class=`{
+ "web-console-footer__sidebar-opened": ($ctrl.sidebarOpened$|async:this),
+ "web-console-footer__sidebar-closed": !($ctrl.sidebarOpened$|async:this)
+}`)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/component.ts b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/component.ts
new file mode 100644
index 0000000..4e4647f
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/component.ts
@@ -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 './style.scss';
+import template from './template.pug';
+import controller from './controller';
+
+export const component = {
+ controller,
+ template,
+ bindings: {
+ opened: '<'
+ }
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/controller.ts b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/controller.ts
new file mode 100644
index 0000000..8b5355a
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/controller.ts
@@ -0,0 +1,24 @@
+/*
+ * 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 {AppStore, selectNavigationMenu} from '../../../store';
+
+export default class WebConsoleSidebarNavigation {
+ static $inject = ['Store']
+ constructor(private store: AppStore) {}
+ menu$ = this.store.state$.pipe(selectNavigationMenu())
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/style.scss b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/style.scss
new file mode 100644
index 0000000..83c21a3
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/style.scss
@@ -0,0 +1,108 @@
+/*
+ * 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.
+ */
+
+web-console-sidebar-navigation {
+ display: flex;
+ flex-direction: column;
+ padding-top: 14px;
+
+ nav {
+ display: flex;
+ flex-direction: column;
+ list-style-type: none;
+
+ &>li {
+ display: flex;
+ }
+ }
+
+ .web-console-sidebar-navigation__link-icon {
+ width: 20px;
+ height: auto;
+ color: var(--inactive-link-color);
+ }
+
+ .web-console-sidebar-navigation__link-narrow {
+ height: var(--width-narrow);
+ width: var(--width-narrow);
+ color: var(--inactive-link-color);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ &:hover, &:focus {
+ color: var(--active-link-color);
+
+ }
+
+ &.web-console-sidebar-navigation__link-active {
+ color: var(--active-link-color);
+ position: relative;
+
+ &:after {
+ content: '';
+ display: block;
+ width: 2px;
+ // Line can't be outside of scrollable container
+ right: 0;
+ top: 0;
+ bottom: 0;
+ position: absolute;
+ background: var(--active-link-color);
+ }
+ .web-console-sidebar-navigation__link-icon {
+ color: inherit;
+ }
+ }
+ .web-console-sidebar-navigation__link-content {
+ display: none;
+ }
+ }
+ .web-console-sidebar-navigation__link-wide {
+ color: #393939;
+ text-decoration: none !important;
+ line-height: 19px;
+ font-size: 16px;
+ padding: 10px 28px 11px;
+ width: var(--width-wide);
+ display: inline-flex;
+ align-items: center;
+
+ &:first-of-type {
+ margin-top: 18px;
+ }
+
+ &:hover, &:focus {
+ color: var(--active-link-color);
+
+ .web-console-sidebar-navigation__link-icon {
+ color: inherit;
+ }
+ }
+ &.web-console-sidebar-navigation__link-active {
+ color: white;
+ background: var(--active-link-color);
+
+ .web-console-sidebar-navigation__link-icon {
+ color: inherit;
+ }
+ }
+ .web-console-sidebar-navigation__link-icon {
+ margin-right: 12px;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/template.pug b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/template.pug
new file mode 100644
index 0000000..c35de9d
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-navigation/template.pug
@@ -0,0 +1,35 @@
+//-
+ 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.
+
+nav
+ li(
+ ng-repeat='item in $ctrl.menu$|async:this track by item.sref'
+ ng-if='!item.hidden'
+ )
+ a.web-console-sidebar-navigation__link(
+ ui-sref='{{item.sref}}'
+ ui-sref-active=`{
+ "web-console-sidebar-navigation__link-active": item.activeSref
+ }`
+ title='{{item.label|translate}}'
+ ng-class=`{
+ 'web-console-sidebar-navigation__link-narrow': !$ctrl.opened,
+ 'web-console-sidebar-navigation__link-wide': $ctrl.opened
+ }`
+ tabindex='0'
+ )
+ svg.web-console-sidebar-navigation__link-icon(ignite-icon='{{item.icon}}')
+ span.web-console-sidebar-navigation__link-content(translate='{{item.label}}')
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/component.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/component.ts b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/component.ts
new file mode 100644
index 0000000..0f69e2d
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/component.ts
@@ -0,0 +1,26 @@
+/*
+ * 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 controller from './controller';
+import template from './template.pug';
+import './style.scss';
+
+export const component: ng.IComponentOptions = {
+ controller,
+ transclude: true,
+ template
+};
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/controller.ts
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/controller.ts b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/controller.ts
new file mode 100644
index 0000000..d5403f4
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/controller.ts
@@ -0,0 +1,50 @@
+/*
+ * 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 ResizeObserver from 'resize-observer-polyfill';
+
+export default class WebCOnsoleSidebarOverflow {
+ static $inject = ['$element', 'gridUtil', '$window']
+ constructor(private el: JQLite, private gridUtil: {getScrollbarWidth(): number}, private $win: ng.IWindowService) {}
+ scrollEl!: JQLite
+ resizeObserver: ResizeObserver
+ $onInit() {
+ this.el.css('--scrollbar-width', this.gridUtil.getScrollbarWidth());
+ }
+ $postLink() {
+ this.scrollEl[0].addEventListener('scroll', this.onScroll, {passive: true});
+ this.resizeObserver = new ResizeObserver(() => this.applyStyles(this.scrollEl[0]));
+ this.resizeObserver.observe(this.el[0]);
+ }
+ $onDestroy() {
+ this.scrollEl[0].removeEventListener('scroll', this.onScroll);
+ this.resizeObserver.disconnect();
+ }
+ applyStyles(target: HTMLElement) {
+ const {offsetHeight, scrollTop, scrollHeight} = target;
+ const top = scrollTop !== 0;
+ const bottom = Math.floor((offsetHeight + scrollTop)) !== Math.floor(scrollHeight);
+
+ target.classList.toggle('top', top);
+ target.classList.toggle('bottom', bottom);
+ }
+ onScroll = (e: UIEvent) => {
+ this.$win.requestAnimationFrame(() => {
+ this.applyStyles(e.target as HTMLElement);
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/style.scss b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/style.scss
new file mode 100644
index 0000000..cbc6adc
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/style.scss
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+web-console-sidebar-overflow {
+ overflow: hidden;
+ position: relative;
+ display: flex;
+
+ &>.web-console-sidebar-overflow__scroll-root {
+ overflow-x: hidden;
+ overflow-y: scroll;
+ margin-right: calc(-1 * var(--scrollbar-width));
+
+ &.top:before {
+ display: block;
+ width: 100%;
+ content: '';
+ height: 1px;
+ position: absolute;
+ top: -1px;
+ box-shadow: 0 0 9px 1px #a0a0a0;
+ transform: translateZ(1px);
+ }
+ &.bottom:after {
+ display: block;
+ width: 100%;
+ content: '';
+ position: absolute;
+ bottom: 0;
+ box-shadow: 0 0 9px 1px #a0a0a0;
+ transform: translateZ(1px);
+ }
+
+ &>ng-transclude {
+ display: block;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/template.pug b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/template.pug
new file mode 100644
index 0000000..5b70da6
--- /dev/null
+++ b/modules/web-console/frontend/app/components/web-console-sidebar/web-console-sidebar-overflow/template.pug
@@ -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.
+
+.web-console-sidebar-overflow__scroll-root(ng-ref='$ctrl.scrollEl' ng-ref-read='$element')
+ ng-transclude(ng-style='::{"--scrollbar-width": $ctrl.SCROLLBAR_WIDTH}')
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/branding.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/branding.module.js b/modules/web-console/frontend/app/modules/branding/branding.module.js
index 20cd93e..8b23d04 100644
--- a/modules/web-console/frontend/app/modules/branding/branding.module.js
+++ b/modules/web-console/frontend/app/modules/branding/branding.module.js
@@ -19,12 +19,8 @@ import angular from 'angular';
import IgniteBranding from './branding.service';
-import igniteHeaderLogo from './header-logo.directive';
-import igniteHeaderTitle from './header-title.directive';
import igniteTerms from './terms.directive';
import igniteFeatures from './features.directive';
-import igniteFooter from './footer.directive';
-import ignitePoweredByApache from './powered-by-apache.directive';
angular
.module('ignite-console.branding', [
@@ -41,9 +37,5 @@ angular
tfMetaTagsProvider.setTitleSuffix(' – Apache Ignite Web Console');
}])
-.directive('ignitePoweredByApache', ignitePoweredByApache)
-.directive('igniteHeaderLogo', igniteHeaderLogo)
-.directive('igniteHeaderTitle', igniteHeaderTitle)
.directive('igniteTerms', igniteTerms)
-.directive('igniteFeatures', igniteFeatures)
-.directive('igniteFooter', igniteFooter);
+.directive('igniteFeatures', igniteFeatures);
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/branding.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/branding.service.js b/modules/web-console/frontend/app/modules/branding/branding.service.js
index 667dbfd..f184a4d 100644
--- a/modules/web-console/frontend/app/modules/branding/branding.service.js
+++ b/modules/web-console/frontend/app/modules/branding/branding.service.js
@@ -24,10 +24,6 @@ export default class {
constructor(Version) {
this.titleSuffix = ' - Apache Ignite Web Console';
- this.headerLogo = '/images/ignite-logo.svg';
-
- this.headerText = 'Management console for Apache Ignite';
-
this.showIgniteLogo = false;
this.footerHtml = [
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/footer.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/footer.directive.js b/modules/web-console/frontend/app/modules/branding/footer.directive.js
deleted file mode 100644
index 3c0bb83..0000000
--- a/modules/web-console/frontend/app/modules/branding/footer.directive.js
+++ /dev/null
@@ -1,39 +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.
- */
-
-const template = '<div class="footer" ng-bind-html="footer.html"></div>';
-
-/**
- * @param {import('./branding.service').default} branding
- */
-export default function factory(branding) {
- function controller() {
- const ctrl = this;
-
- ctrl.html = branding.footerHtml;
- }
-
- return {
- restrict: 'E',
- template,
- controller,
- controllerAs: 'footer',
- replace: true
- };
-}
-
-factory.$inject = ['IgniteBranding'];
http://git-wip-us.apache.org/repos/asf/ignite/blob/9dc251cd/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/branding/header-logo.directive.js b/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
deleted file mode 100644
index 60e5d5d..0000000
--- a/modules/web-console/frontend/app/modules/branding/header-logo.directive.js
+++ /dev/null
@@ -1,39 +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.
- */
-
-import template from './header-logo.pug';
-
-/**
- * @param {import('./branding.service').default} branding
- */
-export default function factory(branding) {
- function controller() {
- const ctrl = this;
-
- ctrl.url = branding.headerLogo;
- }
-
- return {
- restrict: 'E',
- template,
- controller,
- controllerAs: 'logo',
- replace: true
- };
-}
-
-factory.$inject = ['IgniteBranding'];