Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #18 from icstechsales/development
Browse files Browse the repository at this point in the history
License updates and date field default date fix
  • Loading branch information
dprosper authored Mar 16, 2019
2 parents 5a268f1 + b9f7a2f commit 1e50984
Show file tree
Hide file tree
Showing 25 changed files with 365 additions and 82 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
src/old
yarn.lock
yarn.lock
package-lock.json
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) IBM Corp.

Licensed 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.
10 changes: 10 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This application includes code originally developed by IBM Corporation and makes use of of a number of open source libraries/frameworks/icons/fonts:

- The MIT licensed Office UI Fabric React components: https://github.com/OfficeDev/office-ui-fabric-react/blob/master/LICENSE.
- The fonts and icons not covered under the MIT license are not used.
- Some components in the application are derived from components usage examples found in the https://github.com/OfficeDev/office-ui-fabric-react repository.

- The free Fontawesome library is used for icons: https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt

- The Google Roboto font is used: https://github.com/google/roboto/blob/master/LICENSE

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "dql-explorer",
"version": "0.2.5",
"version": "0.2.6",
"author": "Dimitri Prosper <[email protected]>",
"contributors": [
{
"name": "Scott Good",
"email": "[email protected]"
}
],
"license": "IBM Internal Use Only until fate determined",
"license": "Apache-2.0",
"description": "DQL Explorer PoC for IBM Think 2019",
"private": true,
"dependencies": {
Expand Down Expand Up @@ -49,6 +49,6 @@
"not ie <= 11",
"not op_mini all"
],
"proxy": "http://domino.yourdomain.com",
"homepage": "http://domino.yourdomain.com/dqlexplorer.nsf"
"proxy": "http://myorg3.ibmcollabcloud.com",
"homepage": "http://myorg3.ibmcollabcloud.com/dqlexplorer.nsf"
}
28 changes: 23 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/**
* @author Dimitri Prosper <[email protected]>, <[email protected]>, https://dprosper.github.io
* @author Scott Good <[email protected]>, https://scott-good.github.io/
* @todo see inline TODO comments
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React, { Component } from 'react';
Expand Down Expand Up @@ -29,7 +39,7 @@ import {
faDownload, faSortAlphaDown, faSortAlphaUp, faSortAmountDown, faUser, faPlusCircle
} from '@fortawesome/free-solid-svg-icons';

import { people } from './components/querybuilder/PeoplePickerData';
import { people } from './components/querybuilder/PeoplePicker';

library.add(faSave, faUser, faPlusCircle, faCalendar, faCheck, faDownload, faSortAlphaDown, faSortAlphaUp, faSortAmountDown, faTimes, faHashtag, faBold, faTrashAlt, faShareSquare, faDatabase, faFolder, faTasks, faGripHorizontal, faGlobe, faUsers, faTable, faFile, faChevronDown, faChevronUp, faChevronRight, faChevronLeft, faArrowDown, faArrowUp, faArrowLeft, faArrowRight, faTag)

Expand Down Expand Up @@ -544,6 +554,7 @@ Scott Good https://scott-good.github.io/

addTerm = index => {
let children = this.state.query.children;

const term = {
id: `term~${uuidv4()}`,
identifier: "",
Expand Down Expand Up @@ -670,12 +681,18 @@ Scott Good https://scott-good.github.io/

onTermChange = (index, attribute, data) => {
const newValue = typeof data === "object" ? data.key : data;

let children = this.state.query.children;
let term = this._getObject(children, `term~${index}`);

term[attribute] = newValue;

if (data.data.type === 'date') {
const date = new Date();
const dateString = date.getFullYear() + "-" + ('0' + (date.getMonth() + 1)).slice(-2) + "-" + ('0' + date.getDate()).slice(-2);
term.dateValue=date;
term.value=dateString;
}

this.setState(
update(this.state, {
query: { children: { $set: children } },
Expand Down Expand Up @@ -714,6 +731,7 @@ Scott Good https://scott-good.github.io/
entryToUpdate[attribute]=newValue;
entryToUpdate.dateValue=data;

console.log(entryToUpdate)
this.setState(
update(this.state, {
query: { children: { $set: children } },
Expand Down
18 changes: 13 additions & 5 deletions src/components/DatabasesList.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
/**
* @file Component to read and display the list of databases on a server
* @author Dimitri Prosper (IBM) <[email protected]>
* @author Dimitri Prosper (Personal) <[email protected]>
* @contributor Scott Good (IBM) <[email protected]>
* @todo see inline TODO comments
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from "react";
Expand Down
16 changes: 16 additions & 0 deletions src/components/Error.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from "react";

const ErrorMessage = ({errorMsg, errorNum}) => {
Expand Down
16 changes: 13 additions & 3 deletions src/components/Main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/**
* @author Dimitri Prosper <[email protected]>, <[email protected]>, https://dprosper.github.io
* @author Scott Good <[email protected]>, https://scott-good.github.io/
* @todo see inline TODO comments
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from 'react';
Expand Down
16 changes: 16 additions & 0 deletions src/components/MainHeader.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from "react";
import { CommandBar } from "office-ui-fabric-react/lib/CommandBar";

Expand Down
18 changes: 13 additions & 5 deletions src/components/Results.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
/**
* @file Component to display the query results
* @author Dimitri Prosper (IBM) <[email protected]>
* @author Dimitri Prosper (Personal) <[email protected]>
* @contributor Scott Good (IBM) <[email protected]>
* @todo see inline TODO comments
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from 'react';
Expand Down
18 changes: 13 additions & 5 deletions src/components/SavedQueries.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
/**
* @file Component to read and display the saved queries on the server
* @author Dimitri Prosper (IBM) <[email protected]>
* @author Dimitri Prosper (Personal) <[email protected]>
* @contributor Scott Good (IBM) <[email protected]>
* @todo see inline TODO comments
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from 'react';
Expand Down
16 changes: 16 additions & 0 deletions src/components/querybuilder/ActivityPanel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 { Panel, PanelType } from "office-ui-fabric-react/lib/Panel";
import * as React from "react";
import withApp from "../../withApp";
Expand Down
16 changes: 16 additions & 0 deletions src/components/querybuilder/AdvancedOptions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from 'react';
import { Dropdown } from 'office-ui-fabric-react/lib/Dropdown';

Expand Down
16 changes: 16 additions & 0 deletions src/components/querybuilder/CodeBlock.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from "react";
import hljs from "highlight.js";
import javascript from "highlight.js/lib/languages/javascript";
Expand Down
16 changes: 16 additions & 0 deletions src/components/querybuilder/DateTextNumber.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from "react";
import { IconButton } from "office-ui-fabric-react/lib/Button";

Expand Down
16 changes: 16 additions & 0 deletions src/components/querybuilder/Group.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from "react";

import withApp from '../../withApp';
Expand Down
16 changes: 16 additions & 0 deletions src/components/querybuilder/NamePicker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright (c) IBM Corp. All Rights Reserved.
*
* Licensed 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
*
* https://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 React from 'react';

import { BaseComponent } from 'office-ui-fabric-react/lib/Utilities';
Expand Down
Loading

0 comments on commit 1e50984

Please sign in to comment.