Repository: ignite Updated Branches: refs/heads/ignite-843-rc2 38ff57b62 -> 13bc0f5c1
IGNITE-843 Minor fix. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/13bc0f5c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/13bc0f5c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/13bc0f5c Branch: refs/heads/ignite-843-rc2 Commit: 13bc0f5c1e9d6578cd6a73dcb169c9b0176f088e Parents: 38ff57b Author: Andrey <anovi...@gridgain.com> Authored: Thu Mar 3 15:29:02 2016 +0700 Committer: Andrey <anovi...@gridgain.com> Committed: Thu Mar 3 15:29:02 2016 +0700 ---------------------------------------------------------------------- .../src/main/js/app/filters/byName.filter.js | 23 +++++++++++++++++ .../main/js/app/filters/byName/byName.filter.js | 23 ----------------- .../src/main/js/app/filters/hasPojo.filter.js | 26 ++++++++++++++++++++ .../js/app/filters/hasPojo/hasPojo.filter.js | 26 -------------------- .../control-center-web/src/main/js/app/index.js | 4 +-- 5 files changed, 51 insertions(+), 51 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/13bc0f5c/modules/control-center-web/src/main/js/app/filters/byName.filter.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/filters/byName.filter.js b/modules/control-center-web/src/main/js/app/filters/byName.filter.js new file mode 100644 index 0000000..3b0746f --- /dev/null +++ b/modules/control-center-web/src/main/js/app/filters/byName.filter.js @@ -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. + */ + +export default ['byName', [() => (arr, search) => { + if (!(arr && arr.length) || !search) + return arr; + + return _.filter(arr, ({ name }) => name.indexOf(search) >= 0); +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/13bc0f5c/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.js b/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.js deleted file mode 100644 index 3b0746f..0000000 --- a/modules/control-center-web/src/main/js/app/filters/byName/byName.filter.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. - */ - -export default ['byName', [() => (arr, search) => { - if (!(arr && arr.length) || !search) - return arr; - - return _.filter(arr, ({ name }) => name.indexOf(search) >= 0); -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/13bc0f5c/modules/control-center-web/src/main/js/app/filters/hasPojo.filter.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/filters/hasPojo.filter.js b/modules/control-center-web/src/main/js/app/filters/hasPojo.filter.js new file mode 100644 index 0000000..db47585 --- /dev/null +++ b/modules/control-center-web/src/main/js/app/filters/hasPojo.filter.js @@ -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. + */ + +export default ['hasPojo', [() => { + const filter = (cache) => { + return cache.domains && cache.domains.length; + }; + + return ({caches} = {}) => { + return caches && _.chain(caches).filter(filter).first().value(); + }; +}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/13bc0f5c/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js b/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.js deleted file mode 100644 index db47585..0000000 --- a/modules/control-center-web/src/main/js/app/filters/hasPojo/hasPojo.filter.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 ['hasPojo', [() => { - const filter = (cache) => { - return cache.domains && cache.domains.length; - }; - - return ({caches} = {}) => { - return caches && _.chain(caches).filter(filter).first().value(); - }; -}]]; http://git-wip-us.apache.org/repos/asf/ignite/blob/13bc0f5c/modules/control-center-web/src/main/js/app/index.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js index a2473e8..333f0ef 100644 --- a/modules/control-center-web/src/main/js/app/index.js +++ b/modules/control-center-web/src/main/js/app/index.js @@ -101,8 +101,8 @@ import IgniteCountries from './services/Countries/Countries.service'; // Providers // Filters. -import hasPojo from './filters/hasPojo/hasPojo.filter'; -import byName from './filters/byName/byName.filter'; +import hasPojo from './filters/hasPojo.filter'; +import byName from './filters/byName.filter'; angular .module('ignite-console', [