Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B073B200D51 for ; Fri, 22 Dec 2017 14:54:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AD627160C2E; Fri, 22 Dec 2017 13:54:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 081A3160BFD for ; Fri, 22 Dec 2017 14:54:49 +0100 (CET) Received: (qmail 60167 invoked by uid 500); 22 Dec 2017 13:54:49 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 60158 invoked by uid 99); 22 Dec 2017 13:54:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Dec 2017 13:54:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 160F9DFC25; Fri, 22 Dec 2017 13:54:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bbende@apache.org To: commits@nifi.apache.org Date: Fri, 22 Dec 2017 13:54:49 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] nifi-registry git commit: NIFIREG-14 - Remove fds demo archived-at: Fri, 22 Dec 2017 13:54:51 -0000 Repository: nifi-registry Updated Branches: refs/heads/master c9c5f6d79 -> 7f0116293 http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/components/fluid-design-system/fds-demo.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/components/fluid-design-system/fds-demo.js b/nifi-registry-web-ui/src/main/webapp/components/fluid-design-system/fds-demo.js deleted file mode 100644 index 1c2161c..0000000 --- a/nifi-registry-web-ui/src/main/webapp/components/fluid-design-system/fds-demo.js +++ /dev/null @@ -1,1058 +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. - */ - -var ngCore = require('@angular/core'); -var NfRegistryExplorer = require('nifi-registry/components/explorer/nf-registry-explorer.js'); -var covalentCore = require('@covalent/core'); -var ngRouter = require('@angular/router'); -var ngMaterial = require('@angular/material'); -var nfRegistryAnimations = require('nifi-registry/nf-registry.animations.js'); -var fdsDialogsModule = require('@fluid-design-system/dialogs'); -var fdsSnackBarsModule = require('@fluid-design-system/snackbars'); - -var NUMBER_FORMAT = function (v) { - return v; -}; -var DECIMAL_FORMAT = function (v) { - return v.toFixed(2); -}; -var date = new Date(); - -/** - * FdsDemo constructor. - * - * @param FdsSnackBarService The FDS snack bar service module. - * @param dialog The angular material dialog module. - * @param TdDialogService The covalent dialog service module. - * @param TdDataTableService The covalent data table service module. - * @constructor - */ -function FdsDemo(FdsSnackBarService, dialog, TdDataTableService, FdsDialogService) { - - // - - this.snackBarService = FdsSnackBarService; - - // - - // - - this.dialog = dialog; - - // - - // - - this.dialogService = FdsDialogService; - - // - - // - - this.expandCollapseExpansion1Msg = 'No expanded/collapsed detected yet'; - this.expansion1 = false; - this.disabled = false; - - // - - // - - this.currentState = ''; - this.reactiveStates = ''; - this.tdStates = []; - this.tdDisabled = false; - this.states = [ - {code: 'AL', name: 'Alabama'}, - {code: 'AK', name: 'Alaska'}, - {code: 'AZ', name: 'Arizona'}, - {code: 'AR', name: 'Arkansas'}, - {code: 'CA', name: 'California'}, - {code: 'CO', name: 'Colorado'}, - {code: 'CT', name: 'Connecticut'}, - {code: 'DE', name: 'Delaware'}, - {code: 'FL', name: 'Florida'}, - {code: 'GA', name: 'Georgia'}, - {code: 'HI', name: 'Hawaii'}, - {code: 'ID', name: 'Idaho'}, - {code: 'IL', name: 'Illinois'}, - {code: 'IN', name: 'Indiana'}, - {code: 'IA', name: 'Iowa'}, - {code: 'KS', name: 'Kansas'}, - {code: 'KY', name: 'Kentucky'}, - {code: 'LA', name: 'Louisiana'}, - {code: 'ME', name: 'Maine'}, - {code: 'MD', name: 'Maryland'}, - {code: 'MA', name: 'Massachusetts'}, - {code: 'MI', name: 'Michigan'}, - {code: 'MN', name: 'Minnesota'}, - {code: 'MS', name: 'Mississippi'}, - {code: 'MO', name: 'Missouri'}, - {code: 'MT', name: 'Montana'}, - {code: 'NE', name: 'Nebraska'}, - {code: 'NV', name: 'Nevada'}, - {code: 'NH', name: 'New Hampshire'}, - {code: 'NJ', name: 'New Jersey'}, - {code: 'NM', name: 'New Mexico'}, - {code: 'NY', name: 'New York'}, - {code: 'NC', name: 'North Carolina'}, - {code: 'ND', name: 'North Dakota'}, - {code: 'OH', name: 'Ohio'}, - {code: 'OK', name: 'Oklahoma'}, - {code: 'OR', name: 'Oregon'}, - {code: 'PA', name: 'Pennsylvania'}, - {code: 'RI', name: 'Rhode Island'}, - {code: 'SC', name: 'South Carolina'}, - {code: 'SD', name: 'South Dakota'}, - {code: 'TN', name: 'Tennessee'}, - {code: 'TX', name: 'Texas'}, - {code: 'UT', name: 'Utah'}, - {code: 'VT', name: 'Vermont'}, - {code: 'VA', name: 'Virginia'}, - {code: 'WA', name: 'Washington'}, - {code: 'WV', name: 'West Virginia'}, - {code: 'WI', name: 'Wisconsin'}, - {code: 'WY', name: 'Wyoming'}, - ]; - - // - - // - - this.dataTableService = TdDataTableService; - - this.droplets = [{ - id: '23f6cc59-0156-1000-09b4-2b0610089090', - name: "Decompression_Circular_Flow", - displayName: 'Decompressed Circular flow', - type: 'flow', - sublabel: 'A sublabel', - compliant: { - id: '25fd6vv87-3549-0001-05g6-4d4567890765', - label: 'Compliant', - type: 'certification' - }, - fleet: { - id: '23f6cc59-3549-0001-05g6-4d4567890765', - label: 'Fleet', - type: 'certification' - }, - prod: { - id: '52fd6vv87-3549-0001-05g6-4d4567890765', - label: 'Production Ready', - type: 'certification' - }, - secure: { - id: '32f6cc59-3549-0001-05g6-4d4567890765', - label: 'Secure', - type: 'certification' - }, - versions: [{ - id: '23f6cc59-0156-1000-06b4-2b0810089090', - revision: '1', - dependentFlows: [{ - id: '25fd6vv87-3549-0001-05g6-4d4567890765' - }], - created: date.setDate(date.getDate() - 1), - updated: new Date() - }, { - id: '25fd6vv87-3549-0001-05g6-4d4567890765', - revision: '2', - dependentFlows: [{ - id: '23f6cc59-0156-1000-06b4-2b0810089090' - }], - created: new Date(), - updated: new Date() - }], - flows: [], - extensions: [], - assets: [], - actions: [{ - 'name': 'Delete', - 'icon': 'fa fa-close', - 'tooltip': 'Delete User' - }, { - 'name': 'Manage', - 'icon': 'fa fa-user', - 'tooltip': 'Manage User' - }, { - 'name': 'Action 3', - 'icon': 'fa fa-question', - 'tooltip': 'Whatever else we want to do...' - }] - }, { - id: '25fd6vv87-3249-0001-05g6-4d4767890765', - name: "DateConversion", - displayName: 'Date conversion', - type: 'asset', - sublabel: 'A sublabel', - compliant: { - id: '25fd6vv34-3549-0001-05g6-4d4567890765', - label: 'Compliant', - type: 'certification' - }, - prod: { - id: '52vn6vv87-3549-0001-05g6-4d4567890765', - label: 'Production Ready', - type: 'certification' - }, - versions: [{ - id: '23f6ic59-0156-1000-06b4-2b0810089090', - revision: '1', - dependentFlows: [{ - id: '23f6cc19-0156-1000-06b4-2b0810089090' - }], - created: new Date(), - updated: new Date() - }], - flows: [], - extensions: [], - assets: [], - actions: [{ - 'name': 'Delete', - 'icon': 'fa fa-close', - 'tooltip': 'Delete User' - }] - }, { - id: '52fd6vv87-3294-0001-05g6-4d4767890765', - name: "nifi-email-bundle", - displayName: 'nifi-email-bundle', - type: 'extension', - sublabel: 'A sublabel', - compliant: { - id: '33fd6vv87-3549-0001-05g6-4d4567890765', - label: 'Compliant', - test: { - label: 'test' - }, - type: 'certification' - }, - versions: [{ - id: '23d3cc59-0156-1000-06b4-2b0810089090', - revision: '1', - dependentFlows: [{ - id: '23f6cc89-0156-1000-06b4-2b0810089090' - }], - created: new Date(), - updated: new Date() - }], - flows: [], - extensions: [], - assets: [], - actions: [{ - 'name': 'Delete', - 'icon': 'fa fa-close', - 'tooltip': 'Delete User' - }, { - 'name': 'Manage', - 'icon': 'fa fa-user', - 'tooltip': 'Manage User' - },] - }]; - - this.filteredDroplets = []; - - this.dropletColumns = [ - {name: 'id', label: 'ID', sortable: true}, - {name: 'name', label: 'Name', sortable: true,}, - {name: 'displayName', label: 'Display Name', sortable: true}, - {name: 'sublabel', label: 'Label', sortable: true}, - {name: 'type', label: 'Type', sortable: true} - ]; - - this.autoCompleteDroplets = []; - this.dropletsSearchTerms = []; - - // - - // - - this.data = [{ - 'id': 1, - 'name': 'Frozen yogurt', - 'type': 'Ice cream', - 'calories': 159.0, - 'fat': 6.0, - 'carbs': 24.0, - 'protein': 4.0, - 'sodium': 87.0, - 'calcium': 14.0, - 'iron': 1.0, - 'comments': 'I love froyo!', - 'actions': [{ - 'name': 'Action 1', - 'icon': 'fa fa-user', - 'tooltip': 'Manage Users' - }, { - 'name': 'Action 2', - 'icon': 'fa fa-key', - 'tooltip': 'Manage Permissions' - }] - }, { - 'id': 2, - 'name': 'Ice cream sandwich', - 'type': 'Ice cream', - 'calories': 237.0, - 'fat': 9.0, - 'carbs': 37.0, - 'protein': 4.3, - 'sodium': 129.0, - 'calcium': 8.0, - 'iron': 1.0, - 'actions': [{ - 'name': 'Action 1', - 'icon': 'fa fa-user', - 'tooltip': 'Manage Users' - }, { - 'name': 'Action 2', - 'icon': 'fa fa-key', - 'tooltip': 'Manage Permissions' - }, { - 'name': 'Action 3', - 'tooltip': 'Action 3' - }, { - 'name': 'Action 4', - 'disabled': true, - 'tooltip': 'Action 4' - }, { - 'name': 'Action 5', - 'tooltip': 'Action 5' - }] - }, { - 'id': 3, - 'name': 'Eclair', - 'type': 'Pastry', - 'calories': 262.0, - 'fat': 16.0, - 'carbs': 24.0, - 'protein': 6.0, - 'sodium': 337.0, - 'calcium': 6.0, - 'iron': 7.0, - 'actions': [{ - 'name': 'Action 1', - 'icon': 'fa fa-user', - 'tooltip': 'Manage Users' - }, { - 'name': 'Action 2', - 'icon': 'fa fa-key', - 'tooltip': 'Manage Permissions' - }, { - 'name': 'Action 3', - 'tooltip': 'Action 3' - }, { - 'name': 'Action 4', - 'disabled': true, - 'tooltip': 'Action 4' - }, { - 'name': 'Action 5', - 'tooltip': 'Action 5' - }], - }, { - 'id': 4, - 'name': 'Cupcake', - 'type': 'Pastry', - 'calories': 305.0, - 'fat': 3.7, - 'carbs': 67.0, - 'protein': 4.3, - 'sodium': 413.0, - 'calcium': 3.0, - 'iron': 8.0, - 'actions': [{ - 'name': 'Action 1', - 'icon': 'fa fa-user', - 'tooltip': 'Manage Users' - }, { - 'name': 'Action 2', - 'icon': 'fa fa-key', - 'tooltip': 'Manage Permissions' - }, { - 'name': 'Action 3', - 'tooltip': 'Action 3' - }, { - 'name': 'Action 4', - 'disabled': true, - 'tooltip': 'Action 4' - }, { - 'name': 'Action 5', - 'tooltip': 'Action 5' - }], - }, { - 'id': 5, - 'name': 'Jelly bean', - 'type': 'Candy', - 'calories': 375.0, - 'fat': 0.0, - 'carbs': 94.0, - 'protein': 0.0, - 'sodium': 50.0, - 'calcium': 0.0, - 'iron': 0.0, - }, { - 'id': 6, - 'name': 'Lollipop', - 'type': 'Candy', - 'calories': 392.0, - 'fat': 0.2, - 'carbs': 98.0, - 'protein': 0.0, - 'sodium': 38.0, - 'calcium': 0.0, - 'iron': 2.0, - }, { - 'id': 7, - 'name': 'Honeycomb', - 'type': 'Other', - 'calories': 408.0, - 'fat': 3.2, - 'carbs': 87.0, - 'protein': 6.5, - 'sodium': 562.0, - 'calcium': 0.0, - 'iron': 45.0, - }, { - 'id': 8, - 'name': 'Donut', - 'type': 'Pastry', - 'calories': 452.0, - 'fat': 25.0, - 'carbs': 51.0, - 'protein': 4.9, - 'sodium': 326.0, - 'calcium': 2.0, - 'iron': 22.0, - }, { - 'id': 9, - 'name': 'KitKat', - 'type': 'Candy', - 'calories': 518.0, - 'fat': 26.0, - 'carbs': 65.0, - 'protein': 7.0, - 'sodium': 54.0, - 'calcium': 12.0, - 'iron': 6.0, - }, { - 'id': 10, - 'name': 'Chocolate', - 'type': 'Candy', - 'calories': 518.0, - 'fat': 26.0, - 'carbs': 65.0, - 'protein': 7.0, - 'sodium': 54.0, - 'calcium': 12.0, - 'iron': 6.0, - }, { - 'id': 11, - 'name': 'Chamoy', - 'type': 'Candy', - 'calories': 518.0, - 'fat': 26.0, - 'carbs': 65.0, - 'protein': 7.0, - 'sodium': 54.0, - 'calcium': 12.0, - 'iron': 6.0, - },]; - - this.filteredData = this.data; - this.filteredTotal = this.data.length; - - this.columns = [ - {name: 'comments', label: 'Comments', width: 10}, - {name: 'name', label: 'Dessert (100g serving)', sortable: true, width: 10}, - {name: 'type', label: 'Type', sortable: true, width: 10}, - {name: 'calories', label: 'Calories', numeric: true, format: NUMBER_FORMAT, sortable: true, width: 10}, - {name: 'fat', label: 'Fat (g)', numeric: true, format: DECIMAL_FORMAT, sortable: true, width: 10}, - {name: 'carbs', label: 'Carbs (g)', numeric: true, format: NUMBER_FORMAT, sortable: true, width: 10}, - {name: 'protein', label: 'Protein (g)', numeric: true, format: DECIMAL_FORMAT, sortable: true, width: 10}, - {name: 'sodium', label: 'Sodium (mg)', numeric: true, format: NUMBER_FORMAT, sortable: true, width: 10}, - {name: 'calcium', label: 'Calcium (%)', numeric: true, format: NUMBER_FORMAT, sortable: true, width: 10}, - {name: 'iron', label: 'Iron (%)', numeric: true, format: NUMBER_FORMAT, width: 10}, - ]; - - this.allRowsSelected = false; - this.autoCompleteData = []; - this.selectedRows = []; - - this.searchTerm = []; - this.fromRow = 1; - this.currentPage = 1; - this.pageSize = 5; - this.pageCount = 0; - - // - - // - - this.readOnly = false; - - this.items = [ - 'stepper', - 'expansion-panel', - 'markdown', - 'highlight', - 'loading', - 'media', - 'chips', - 'http', - 'json-formatter', - 'pipes', - 'need more?', - ]; - - this.itemsRequireMatch = this.items.slice(0, 6); - - // - - // - - this.favoriteSeason = 'Autumn'; - - this.seasonOptions = [ - 'Winter', - 'Spring', - 'Summer', - 'Autumn', - ]; - - // - - // - - this.selectedValue = ''; - - this.foods = [ - {value: 'steak-0', viewValue: 'Steak'}, - {value: 'pizza-1', viewValue: 'Pizza'}, - {value: 'tacos-2', viewValue: 'Tacos'}, - ]; - - // - - // - - this.user = { - agreesToTOS: false - }; - - this.groceries = [{ - bought: true, - name: 'Seitan', - }, { - bought: false, - name: 'Almond Meal Flour', - }, { - bought: false, - name: 'Organic Eggs', - },]; - - // - - // - - this.systems = [{ - name: 'Lights', - on: false, - color: 'primary', - }, { - name: 'Surround Sound', - on: true, - color: 'accent', - }, { - name: 'T.V.', - on: true, - color: 'warn', - },]; - - this.house = { - lockHouse: false, - }; - - // -}; - -FdsDemo.prototype = { - constructor: FdsDemo, - - // - - displayFn: function (value) { - return value && typeof value === 'object' ? value.name : value; - }, - - filterStates: function (val) { - return val ? this.states.filter(function (s) { - return s.name.match(new RegExp(val, 'gi')); - }) : this.states; - }, - - // - - // - - showSuccessSnackBar: function () { - var snackBarRef = this.snackBarService.openCoaster({ - title: 'Success', - message: 'Some help text regarding the successful event.', - verticalPosition: 'top', - horizontalPosition: 'right', - icon: 'fa fa-check-circle-o', - color: '#1EB475', - duration: 3000 - }); - }, - - showWarnSnackBar: function () { - var snackBarRef = this.snackBarService.openCoaster({ - title: 'Warning', - message: 'Some help text regarding the warning.', - verticalPosition: 'top', - horizontalPosition: 'left', - icon: 'fa fa-exclamation-triangle', - color: '#E98A40', - duration: 3000 - }); - }, - - showErrorSnackBar: function () { - var snackBarRef = this.snackBarService.openCoaster({ - title: 'Error', - message: 'Some help text regarding the critical error. This coaster will stay open until closed with the `x` or if another coaster is created.', - verticalPosition: 'bottom', - horizontalPosition: 'right', - icon: 'fa fa-times-circle-o', - color: '#EF6162' - }); - }, - - showRegularSnackBar: function () { - var snackBarRef = this.snackBarService.openCoaster({ - title: 'Regular', - message: 'Something interesting.', - verticalPosition: 'bottom', - horizontalPosition: 'left', - color: '#808793', - duration: 3000 - }); - }, - - // - - // - - openDialog: function () { - this.dialog.open(NfRegistryExplorer, { - height: '50%', // can be px or % - width: '60%', // can be px or % - }); - }, - - // - - // - - toggleExpansion1: function () { - if (!this.disabled) { - this.expansion1 = !this.expansion1; - } - }, - - toggleDisabled: function () { - this.disabled = !this.disabled; - }, - - expandExpansion1Event: function () { - this.expandCollapseExpansion1Msg = 'Expand event emitted.'; - }, - - collapseExpansion1Event: function () { - this.expandCollapseExpansion1Msg = 'Collapse event emitted.'; - }, - - // - - // - - openAlert: function () { - this.dialogService.openAlert({ - title: 'Alert', - disableClose: true, - message: 'This is how simple it is to create an alert with this wrapper service.', - }); - }, - - openConfirm: function () { - this.dialogService.openConfirm({ - title: 'Confirm', - message: 'This is how simple it is to create a confirm with this wrapper service. Do you agree?', - cancelButton: 'Disagree', - acceptButton: 'Agree', - }); - }, - - openPrompt: function () { - this.dialogService.openPrompt({ - title: 'Prompt', - message: 'This is how simple it is to create a prompt with this wrapper service. Prompt something.', - value: 'Populated value', - cancelButton: 'Cancel', - acceptButton: 'Ok', - }); - }, - - // - - // - - isDropletFilterChecked: function (term) { - return (this.dropletsSearchTerms.indexOf(term) > -1); - }, - - getDropletTypeCount: function (type) { - return this.filteredDroplets.filter(function (droplet) { - return droplet.type === type; - }).length; - }, - - getDropletCertificationCount: function (certification) { - return this.filteredDroplets.filter(function (droplet) { - return Object.keys(droplet).find(function (key) { - if (key === certification && droplet[certification].type === 'certification') { - return droplet; - } - }); - }).length; - }, - - getSortBy: function () { - var sortByColumnLabel; - var arrayLength = this.dropletColumns.length; - for (var i = 0; i < arrayLength; i++) { - if (this.dropletColumns[i].active === true) { - sortByColumnLabel = this.dropletColumns[i].label; - break; - } - } - return sortByColumnLabel; - }, - - sortDroplets: function (column) { - if (column.sortable === true) { - // toggle column sort order - var sortOrder = column.sortOrder = (column.sortOrder === 'ASC') ? 'DESC' : 'ASC'; - this.filterDroplets(column.name, sortOrder); - this.activeColumn = column; - //only one column can be actively sorted so we reset all to inactive - this.dropletColumns.forEach(function (c) { - c.active = false; - }); - //and set this column as the actively sorted column - column.active = true; - } - }, - - toggleDropletsFilter: function (searchTerm) { - var applySearchTerm = true; - // check if the search term is already applied and remove it if true - if (this.dropletsSearchTerms.length > 0) { - var arrayLength = this.dropletsSearchTerms.length; - for (var i = 0; i < arrayLength; i++) { - var index = this.dropletsSearchTerms.indexOf(searchTerm); - if (index > -1) { - this.dropletsSearchTerms.splice(index, 1); - applySearchTerm = false; - } - } - } - - // if we just removed the search term do NOT apply it again - if (applySearchTerm) { - this.dropletsSearchTerms.push(searchTerm); - } - - this.filterDroplets(this.activeColumn.name, this.activeColumn.sortOrder); - }, - - filterDroplets: function (sortBy, sortOrder) { - // if `sortOrder` is `undefined` then use 'ASC' - if (sortOrder === undefined) { - sortOrder = 'ASC' - } - // if `sortBy` is `undefined` then find the first sortable column in this.dropletColumns - if (sortBy === undefined) { - var arrayLength = this.dropletColumns.length; - for (var i = 0; i < arrayLength; i++) { - if (this.dropletColumns[i].sortable === true) { - sortBy = this.dropletColumns[i].name; - this.activeColumn = this.dropletColumns[i]; - //only one column can be actively sorted so we reset all to inactive - this.dropletColumns.forEach(function (c) { - c.active = false; - }); - //and set this column as the actively sorted column - this.dropletColumns[i].active = true; - this.dropletColumns[i].sortOrder = sortOrder; - break; - } - } - } - - var newData = this.droplets; - - for (var i = 0; i < this.dropletsSearchTerms.length; i++) { - newData = this.filterData(newData, this.dropletsSearchTerms[i], true, this.activeColumn.name); - } - - newData = this.dataTableService.sortData(newData, sortBy, sortOrder); - this.filteredDroplets = newData; - this.getAutoCompleteDroplets(); - }, - - getAutoCompleteDroplets: function () { - var self = this; - this.autoCompleteDroplets = []; - this.dropletColumns.forEach(function (c) { - self.filteredDroplets.forEach(function (r) { - (r[c.name.toLowerCase()]) ? self.autoCompleteDroplets.push(r[c.name.toLowerCase()].toString()) : ''; - }); - }); - }, - - // - - filterData: function (data, searchTerm, ignoreCase) { - var field = ''; - if (searchTerm.indexOf(":") > -1) { - field = searchTerm.split(':')[0].trim(); - searchTerm = searchTerm.split(':')[1].trim(); - } - var filter = searchTerm ? (ignoreCase ? searchTerm.toLowerCase() : searchTerm) : ''; - - if (filter) { - data = data.filter(function (item) { - var res = Object.keys(item).find(function (key) { - if (field.indexOf(".") > -1) { - var objArray = field.split("."); - var obj = item; - var arrayLength = objArray.length; - for (var i = 0; i < arrayLength; i++) { - try { - obj = obj[objArray[i]]; - } catch (e) { - return false; - } - } - var preItemValue = ('' + obj); - var itemValue = ignoreCase ? preItemValue.toLowerCase() : preItemValue; - return itemValue.indexOf(filter) > -1; - } else { - if (key !== field && field !== '') { - return false; - } - var preItemValue = ('' + item[key]); - var itemValue = ignoreCase ? preItemValue.toLowerCase() : preItemValue; - return itemValue.indexOf(filter) > -1; - } - }); - return !(typeof res === 'undefined'); - }); - } - return data; - }, - - // - - sort: function (sortEvent, column) { - if (column.sortable) { - var sortBy = column.name; - var sortOrder = column.sortOrder = (column.sortOrder === 'ASC') ? 'DESC' : 'ASC'; - this.filter(sortBy, sortOrder); - - //only one column can be actively sorted so we reset all to inactive - this.columns.forEach(function (c) { - c.active = false; - }); - //and set this column as the actively sorted column - column.active = true; - } - }, - - searchRemove: function (searchTerm) { - //only remove the first occurrence of the search term - var index = this.searchTerm.indexOf(searchTerm); - if (index !== -1) { - this.searchTerm.splice(index, 1); - } - this.fromRow = 1; - this.currentPage = 1; - this.pageSize = 1; - this.filter(); - }, - - searchAdd: function (searchTerm) { - this.searchTerm.push(searchTerm); - this.fromRow = 1; - this.currentPage = 1; - this.pageSize = 1; - this.filter(); - }, - - page: function (pagingEvent) { - this.fromRow = pagingEvent.fromRow; - this.currentPage = pagingEvent.page; - this.pageSize = pagingEvent.pageSize; - this.allRowsSelected = false; - this.filter(); - }, - - filter: function (sortBy, sortOrder) { - if (this.allRowsSelected) { - this.toggleSelectAll(); - } - this.deselectAll(); - var newData = this.data; - - for (var i = 0; i < this.searchTerm.length; i++) { - newData = this.filterData(newData, this.searchTerm[i], true); - } - this.filteredTotal = newData.length; - newData = this.dataTableService.sortData(newData, sortBy, sortOrder); - this.pageCount = newData.length; - newData = this.dataTableService.pageData(newData, this.fromRow, this.currentPage * this.pageSize); - this.filteredData = newData; - this.getAutoCompleteData(); - }, - - toggleSelect: function (row) { - if (this.allFilteredRowsSelected()) { - this.allRowsSelected = true; - } else { - this.allRowsSelected = false; - } - }, - - toggleSelectAll: function () { - if (this.allRowsSelected) { - this.selectAll(); - } else { - this.deselectAll(); - } - }, - - selectAll: function () { - this.filteredData.forEach(function (c) { - c.checked = true; - }); - }, - - deselectAll: function () { - this.filteredData.forEach(function (c) { - c.checked = false; - }); - }, - - allFilteredRowsSelected: function () { - var allFilteredRowsSelected = true; - this.filteredData.forEach(function (c) { - if (c.checked === undefined || c.checked === false) { - allFilteredRowsSelected = false; - } - }); - - return allFilteredRowsSelected; - }, - - areTooltipsOn: function () { - return this.columns[0].hasOwnProperty('tooltip'); - }, - - toggleTooltips: function () { - if (this.columns[0].tooltip) { - this.columns.forEach(function (c) { - delete c.tooltip; - }); - } else { - this.columns.forEach(function (c) { - c.tooltip = 'This is ' + c.label + '!'; - }); - } - }, - - openDataTablePrompt: function (row, name) { - this.dialogService.openPrompt({ - message: 'Enter comment?', - value: row[name], - }).afterClosed().subscribe(function (value) { - if (value !== undefined) { - row[name] = value; - } - }) - }, - - getAutoCompleteData: function () { - var self = this; - this.autoCompleteData = []; - this.columns.forEach(function (c) { - self.filteredData.forEach(function (r) { - (r[c.name.toLowerCase()]) ? self.autoCompleteData.push(r[c.name.toLowerCase()].toString()) : ''; - }); - }); - }, - - // - - // - - toggleReadOnly: function () { - this.readOnly = !this.readOnly; - }, - - // - - // - - /** - * Initialize the component - */ - ngOnInit: function () { - this.filter(); - this.filterDroplets(); - } - - // -}; - -FdsDemo.annotations = [ - new ngCore.Component({ - template: require('./fds-demo.html!text'), - animations: [nfRegistryAnimations.slideInLeftAnimation], - host: { - '[@routeAnimation]': 'routeAnimation' - } - }) -]; - -FdsDemo.parameters = [ - fdsSnackBarsModule.FdsSnackBarService, - ngMaterial.MatDialog, - covalentCore.TdDataTableService, - fdsDialogsModule.FdsDialogService -]; - -module.exports = FdsDemo; http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/nf-registry.module.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/nf-registry.module.js b/nifi-registry-web-ui/src/main/webapp/nf-registry.module.js index 41af1a5..a2d9671 100644 --- a/nifi-registry-web-ui/src/main/webapp/nf-registry.module.js +++ b/nifi-registry-web-ui/src/main/webapp/nf-registry.module.js @@ -18,7 +18,6 @@ var ngCore = require('@angular/core'); var ngMoment = require('angular2-moment'); var NfRegistryRoutes = require('nifi-registry/nf-registry.routes.js'); -var FdsDemo = require('nifi-registry/components/fluid-design-system/fds-demo.js'); var NfRegistry = require('nifi-registry/nf-registry.js'); var NfRegistryApi = require('nifi-registry/services/nf-registry.api.js'); var NfRegistryService = require('nifi-registry/services/nf-registry.service.js'); @@ -65,7 +64,6 @@ NfRegistryModule.annotations = [ NfRegistryRoutes ], declarations: [ - FdsDemo, NfRegistry, NfRegistryExplorer, NfRegistryAdministration, http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/nf-registry.routes.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/nf-registry.routes.js b/nifi-registry-web-ui/src/main/webapp/nf-registry.routes.js index 3d724d6..4235b0a 100644 --- a/nifi-registry-web-ui/src/main/webapp/nf-registry.routes.js +++ b/nifi-registry-web-ui/src/main/webapp/nf-registry.routes.js @@ -16,7 +16,6 @@ */ var ngRouter = require('@angular/router'); -var FdsDemo = require('nifi-registry/components/fluid-design-system/fds-demo.js'); var NfPageNotFoundComponent = require('nifi-registry/components/page-not-found/nf-registry-page-not-found.js'); var NfLoginComponent = require('nifi-registry/components/login/nf-registry-login.js'); var NfRegistryExplorer = require('nifi-registry/components/explorer/nf-registry-explorer.js'); @@ -55,9 +54,6 @@ var NfRegistryRoutes = new ngRouter.RouterModule.forRoot([{ component: NfLoginComponent, canActivate: [nfRegistryAuthGuardService.NfRegistryLoginAuthGuard] }, { - path: 'nifi-registry/fluid-design-system', - component: FdsDemo -}, { path: 'nifi-registry/administration', component: NfRegistryAdministration, children: [{ http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/nf-registry.spec.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/nf-registry.spec.js b/nifi-registry-web-ui/src/main/webapp/nf-registry.spec.js index bb0adf1..a5e43c7 100644 --- a/nifi-registry-web-ui/src/main/webapp/nf-registry.spec.js +++ b/nifi-registry-web-ui/src/main/webapp/nf-registry.spec.js @@ -18,7 +18,6 @@ var NfRegistryRoutes = require('nifi-registry/nf-registry.routes.js'); var ngCoreTesting = require('@angular/core/testing'); var ngCommon = require('@angular/common'); -var FdsDemo = require('nifi-registry/components/fluid-design-system/fds-demo.js'); var NfRegistry = require('nifi-registry/nf-registry.js'); var NfRegistryApi = require('nifi-registry/services/nf-registry.api.js'); var NfRegistryService = require('nifi-registry/services/nf-registry.service.js'); @@ -60,7 +59,6 @@ describe('NfRegistry Component', function () { NfRegistryRoutes ], declarations: [ - FdsDemo, NfRegistry, NfRegistryExplorer, NfRegistryAdministration, http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.spec.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.spec.js b/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.spec.js index 76c9820..fcb8181 100644 --- a/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.spec.js +++ b/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.spec.js @@ -19,7 +19,6 @@ var NfRegistryRoutes = require('nifi-registry/nf-registry.routes.js'); var ngCoreTesting = require('@angular/core/testing'); var ngCommonHttpTesting = require('@angular/common/http/testing'); var ngCommon = require('@angular/common'); -var FdsDemo = require('nifi-registry/components/fluid-design-system/fds-demo.js'); var NfRegistry = require('nifi-registry/nf-registry.js'); var NfRegistryApi = require('nifi-registry/services/nf-registry.api.js'); var NfRegistryService = require('nifi-registry/services/nf-registry.service.js'); @@ -59,7 +58,6 @@ xdescribe('NfRegistry API w/ Angular testing utils', function () { NfRegistryRoutes, ], declarations: [ - FdsDemo, NfRegistry, NfRegistryExplorer, NfRegistryAdministration, http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js b/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js index 68b8c27..054bf86 100644 --- a/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js +++ b/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.spec.js @@ -19,7 +19,6 @@ var NfRegistryRoutes = require('nifi-registry/nf-registry.routes.js'); var ngCoreTesting = require('@angular/core/testing'); var ngCommonHttpTesting = require('@angular/common/http/testing'); var ngCommon = require('@angular/common'); -var FdsDemo = require('nifi-registry/components/fluid-design-system/fds-demo.js'); var NfRegistry = require('nifi-registry/nf-registry.js'); var NfRegistryApi = require('nifi-registry/services/nf-registry.api.js'); var NfRegistryService = require('nifi-registry/services/nf-registry.service.js'); @@ -690,7 +689,6 @@ describe('NfRegistry Service w/ Angular testing utils', function () { ngCommonHttpTesting.HttpClientTestingModule ], declarations: [ - FdsDemo, NfRegistry, NfRegistryExplorer, NfRegistryAdministration, http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/systemjs.builder.config.js ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/systemjs.builder.config.js b/nifi-registry-web-ui/src/main/webapp/systemjs.builder.config.js index 77d27f9..e181ec6 100644 --- a/nifi-registry-web-ui/src/main/webapp/systemjs.builder.config.js +++ b/nifi-registry-web-ui/src/main/webapp/systemjs.builder.config.js @@ -94,7 +94,6 @@ 'nifi-registry/nf-registry.module.js': 'nf-registry.module.js', 'nifi-registry/nf-registry.animations.js': 'nf-registry.animations.js', 'nifi-registry/nf-registry.routes.js': 'nf-registry.routes.js', - 'nifi-registry/components/fluid-design-system/fds-demo.js': 'components/fluid-design-system/fds-demo.js', 'nifi-registry/nf-registry.js': 'nf-registry.js', 'nifi-registry/services/nf-registry.api.js': 'services/nf-registry.api.js', 'nifi-registry/services/nf-registry.service.js': 'services/nf-registry.service.js', http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/theming/components/fluid-design-system/_structureElements.scss ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/theming/components/fluid-design-system/_structureElements.scss b/nifi-registry-web-ui/src/main/webapp/theming/components/fluid-design-system/_structureElements.scss deleted file mode 100644 index 75c5ebb..0000000 --- a/nifi-registry-web-ui/src/main/webapp/theming/components/fluid-design-system/_structureElements.scss +++ /dev/null @@ -1,25 +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. - */ - -#fds-demo { - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - right: 0px; - overflow: auto; -} http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/7f011629/nifi-registry-web-ui/src/main/webapp/theming/nf-registry.scss ---------------------------------------------------------------------- diff --git a/nifi-registry-web-ui/src/main/webapp/theming/nf-registry.scss b/nifi-registry-web-ui/src/main/webapp/theming/nf-registry.scss index 5b8db9e..1c0afed 100644 --- a/nifi-registry-web-ui/src/main/webapp/theming/nf-registry.scss +++ b/nifi-registry-web-ui/src/main/webapp/theming/nf-registry.scss @@ -26,4 +26,3 @@ @import 'components/administration/users/structureElements'; @import 'components/administration/workflow/structureElements'; @import 'components/explorer/grid-list/structureElements'; -@import 'components/fluid-design-system/structureElements';