Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Views Web UI #15385

Merged
merged 127 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
51947bd
React-specific rules.
Jul 29, 2021
4fed1a4
Analyzers view.
Jul 29, 2021
56098ae
Modal component for React.
Aug 3, 2021
ab43a1f
Analyzer delete functional, +notifications.
Aug 3, 2021
25d8214
Stable render of modal children, +AddAnalyzer form stub.
Aug 4, 2021
096edab
Fixed broken modal re-open.
Aug 4, 2021
948c778
Delimiter form ready.
Aug 4, 2021
54f70fd
All forms ready.
Aug 5, 2021
34a0965
Removed 'Tree' mode.
Aug 5, 2021
1c4a1a7
Analyzer create functional.
Aug 5, 2021
ff01ffd
Fixed stopwords/stopwordsPath mixup.
Aug 6, 2021
51f1d9e
'Create Analyzer' form schema validation.
Aug 6, 2021
20fd739
Added missing fields to Text and N-Gram analyzer forms.
Aug 6, 2021
7480efb
Added support for copying existing analyzer to form state.
Aug 6, 2021
12657f5
Implemented view analyzer details.
Aug 6, 2021
1b59221
Merge branch 'devel' into feature/analyzers-web-ui
Aug 6, 2021
579ceb1
UX improvements.
Aug 11, 2021
76a054d
Fixed analyzer selection.
Aug 11, 2021
6f08080
Added UI for AQL and GeoJSON analyzers.
Aug 11, 2021
2522e13
Added UI for GeoPoint analyzer.
Aug 11, 2021
59e9fef
Improved validation, +dispatcher to manage state, +form cache.
Aug 13, 2021
4993c08
Changed button styles to match theme.
Aug 16, 2021
dfb74ef
Removed 'pointer' cursor on text field labels.
Aug 16, 2021
d3b031a
Added help links to locale and delimiter inputs.
Aug 16, 2021
3aef7a6
Added help text to delimiter field.
Aug 16, 2021
4f8e791
Fix bug that caused crash in case of pre-selected analyzer being dele…
Aug 16, 2021
8dfe282
Merge branch 'devel' into feature/analyzers-web-ui
Aug 17, 2021
1eb0122
Fixed parsing and UI for latitude/longitude elements.
Aug 17, 2021
4638c23
Reusable form and grid components based on Pure.css.
Aug 18, 2021
ccb8391
View mode now provides both JSON and (disabled) form views.
Aug 18, 2021
769dd2e
Using relative field paths to support embeddable forms.
Aug 19, 2021
f89e3af
Normalized accent input, +made all inputs location agnostic.
Aug 19, 2021
81f9fab
Pipeline Analyzer form functional.
Aug 20, 2021
31ba630
Switched to simple text display for code view.
Aug 20, 2021
70ec839
Use text cursor for code view mode.
Aug 20, 2021
1226635
Merge branch 'devel' into feature/analyzers-web-ui
Aug 20, 2021
bf701cd
Merge branch 'devel' of https://github.com/arangodb/arangodb into fea…
KVS85 Aug 20, 2021
08e4442
Added UIs for Stopwords, Collation and Segmentation Analyzers.
Aug 21, 2021
aabcff5
Merge remote-tracking branch 'origin/feature/analyzers-web-ui' into f…
Aug 21, 2021
7b50eb0
Fixed DB base URL evaluation.
Aug 21, 2021
e82d84e
Switched to Pure.css-based grid components.
Aug 21, 2021
147020d
Allow rw access when server is running in non-authenticated mode.
Aug 21, 2021
eddc653
Fixed radio button rendering.
Aug 21, 2021
c1d82b2
Minor UI improvements.
Aug 21, 2021
e63f202
Fixed modal height issues, +fixed JSON form double scrollbar.
Aug 22, 2021
66e302b
Maximized modal height for view mode.
Aug 22, 2021
a531327
Minor UI improvements.
Aug 22, 2021
b1454db
Fixed null values for blank numeric inputs.
Aug 24, 2021
d496528
UI improvements.
Aug 24, 2021
5906f75
Slightly improved responsive grid.
Aug 24, 2021
a5eb6b4
Reusing FormState as action button prop.
Aug 25, 2021
ad24a3c
Stricter type restrictions.
Aug 25, 2021
24b23e3
Temp commit before switching to other work (build broken).
Aug 25, 2021
f8e234a
Merge branch 'devel' into feature/views-web-ui
Sep 7, 2021
67497be
Restored changes before merge.
Sep 7, 2021
5d500b6
Added ajv merge patch
Sep 9, 2021
71876fa
Stable ids for elements.
Sep 17, 2021
7f76560
Merge branch 'devel' into feature/views-web-ui
Sep 20, 2021
6f418d5
Temp commit before branch change.
Sep 20, 2021
bc8403b
Temp commit before branch change.
Sep 20, 2021
0c5b31e
Changed filter input id.
Sep 21, 2021
87f9ce6
Fixed build.
Sep 22, 2021
c3ff642
Merge branch 'devel' into feature/views-web-ui
Sep 22, 2021
483dbc2
Temp commit before branch switch.
Sep 22, 2021
046da90
Schema complete.
Sep 28, 2021
48333ec
Merge branch 'bug-fix/analyzers-ui-test-automation' into feature/view…
Sep 28, 2021
8c92a7e
Views UI partially complete.
Sep 28, 2021
1ecd771
ArangoTable component now accepts extra parameters.
Sep 29, 2021
27e1d57
Label now optional for text and dropdown components.
Sep 29, 2021
f63f4cc
Removed Int type.
Sep 29, 2021
a5c86b2
Fixed FormProps.
Sep 29, 2021
fd4dad0
Added LinkPropertiesForm (stub) and ViewPropertiesForm (partial).
Sep 29, 2021
11159b0
Ignored MSVC project files.
Oct 1, 2021
603e0ad
Fixed analyzer compile errors.
Oct 5, 2021
5b5451b
Fixed build (analyzers tested, views untested).
Oct 5, 2021
0c39b0f
Layout improvements.
Oct 5, 2021
5ff73c9
Added ConsolidationPolicyForm.tsx.
Oct 6, 2021
0ce1ef2
Better table formatting.
Oct 6, 2021
cdf40ea
Nested table for stored value fields array.
Oct 11, 2021
2af1c6f
Extracted IconButton component due to frequent use, extracted nested …
Oct 11, 2021
c268616
Used IconButton component, replacing repeated custom markup.
Oct 12, 2021
dcc450f
Redefined IconButton classes for consistency with existing defined st…
Oct 12, 2021
1231ce6
Merge branch 'devel' into feature/views-web-ui
Oct 19, 2021
e2f8e9b
Merge branch 'devel' into feature/views-web-ui
Oct 19, 2021
c254a02
Recursive form render working.
Oct 20, 2021
8ef76a7
View creation successful (w/ recursive link properties).
Oct 20, 2021
ad64e0d
View display in both form/code mode now functional.
Oct 21, 2021
5e7e214
Restricted consolidation policy input to 'tier'.
Oct 21, 2021
780779f
Views edit works (mostly).
Oct 21, 2021
48b670d
Converted all form inputs to controlled components.
Oct 22, 2021
883ec3d
Merge branch 'devel' of https://github.com/arangodb/arangodb into fea…
KVS85 Oct 22, 2021
d565514
Rebuild UI
KVS85 Oct 22, 2021
a49f671
Primary Sort accepts 'asc': boolean as an alternative to direction fi…
Oct 25, 2021
f3935ab
Removed unused form component.
Oct 25, 2021
2a934f5
De-duplicated JSON forms.
Oct 25, 2021
83788cc
Merge remote-tracking branch 'origin/feature/views-web-ui' into featu…
Oct 25, 2021
2a923be
Added post processor to invoke custom logic during action dispatch.
Oct 25, 2021
73250a3
Removed auto-fix during validation.
Oct 25, 2021
e71923f
Correctly differentiate between and 0-valued and empty numeric fields…
Oct 25, 2021
59e400b
Extracted method for boolean field setter.
Oct 25, 2021
2e16aa5
Fixed multiple field validation issues.
Oct 26, 2021
28f50cf
'Store Values' field rendered as checklist.
Oct 26, 2021
5503a33
Merge remote-tracking branch 'origin/devel' into feature/views-web-ui
Nov 2, 2021
d7d1f54
Temp commit before migrating working directory.
Nov 15, 2021
b27dbb5
Merge remote-tracking branch 'origin/devel' into feature/views-web-ui
Nov 15, 2021
8740c89
Optimized filter function.
Nov 16, 2021
c0fcedc
Removed unused export.
Nov 16, 2021
4f114c7
Autocomplete - initial implementation.
Nov 16, 2021
343d57a
Autocomplete multi-select React component partially ready.
Nov 16, 2021
7488deb
Autocomplete - multi-select React component ready.
Nov 17, 2021
88217dc
Switched to 'flex' layout.
Nov 17, 2021
fff4f0e
Show 'In Background' field only at collection level.
Nov 17, 2021
f77c12b
Minor fixes.
Nov 17, 2021
d6a30df
Merge branch 'devel' into feature/views-web-ui
Nov 29, 2021
a233781
Removed link caching from form (was confusing to use).
Nov 29, 2021
8e9d5e1
Non-modal view details - info page ready.
Dec 2, 2021
bf503a7
Settings page partially built.
Dec 3, 2021
ef0570d
Non-modal view details - settings and consolidation pages ready.
Dec 8, 2021
d2eba8a
Non-modal view details - links pages ready.
Dec 9, 2021
fd4b3aa
Non-modal view details - json page ready.
Dec 9, 2021
666b2f7
Removed unused files.
Dec 9, 2021
d65c193
Use current view name during JSON copy.
Dec 9, 2021
aaff04a
Merge branch 'devel' into feature/views-web-ui
Dec 9, 2021
e883b2d
Merge branch 'devel' into feature/views-web-ui
Dec 20, 2021
b34300a
Added `minScore` field to 'Tier' consolidation policy type.
Dec 20, 2021
4a11ca4
Moved `consolidationIntervalMsec` to settings page, renamed consolida…
Dec 20, 2021
5e99e2b
Merge branch 'devel' into feature/views-web-ui
Jan 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Installation/MacOSX/Bundle/Info.plist

nbproject/
.idea
.vs
CMakeSettings.json
.vscode
*.sublime-workspace
*.sublime-project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
// note timestamp of last activity (only seconds part)
sessionStorage.setItem('lastActivity', Date.now() / 1000);
},

renewJwt: function (callback) {
if (!window.atob) {
return;
Expand Down Expand Up @@ -175,7 +175,7 @@
error: function (data) {
// this function is triggered by a non-interactive
// background task. if it fails for whatever reason,
// we don't report this error.
// we don't report this error.
// the worst thing that can happen is that the JWT
// is not renewed and thus the user eventually gets
// logged out
Expand Down Expand Up @@ -771,7 +771,7 @@
contentType: 'application/json',
processData: false,
success: function (data) {
// deleting a job that is not there anymore is intentionally not considered
// deleting a job that is not there anymore is intentionally not considered
// an error here. this is because in some other places we collect job data,
// which automatically leads to server-side deletion of the job. so just
// swallow 404 errors here, silently...
Expand Down Expand Up @@ -1101,16 +1101,16 @@
}

if (dlType) {
var blob = new Blob([obj], {type: dlType});
var blob = new Blob([obj], { type: dlType });
var blobUrl = window.URL.createObjectURL(blob);
var a = document.createElement('a');
document.body.appendChild(a);
a.style = 'display: none';
a.href = blobUrl;

a.download = (filename ? filename : 'results') + '-' +
window.frontendConfig.db.replace(/[^-_a-z0-9]/gi, "_") +
'.' + type;
a.download = (filename ? filename : 'results') + '-' +
window.frontendConfig.db.replace(/[^-_a-z0-9]/gi, "_") +
'.' + type;

a.click();

Expand Down
59 changes: 41 additions & 18 deletions js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
'logs': 'logger',
'helpus': 'helpUs',
'views': 'views',
'view/:name': 'view',
'view/:name': 'viewInfo',
'view/:name/settings': 'viewSettings',
'view/:name/consolidation': 'viewConsolidation',
'view/:name/links': 'viewLinks',
'view/:name/json': 'viewJSON',
'graph/:name': 'graph',
'graph/:name/settings': 'graphSettings',
'support': 'support'
Expand Down Expand Up @@ -111,7 +115,7 @@
this.loggerView.logTopicView.remove();
}
}

if (this.lastRoute === '#shards') {
if (this.shardsView) {
this.shardsView.remove();
Expand Down Expand Up @@ -1260,25 +1264,44 @@
});
},

view: function (name) {
const self = this;
viewInfo: function (name) {
this.checkUser();

this.init.then(() => {
if (this.viewView) {
this.viewView.remove();
}
this.init.then(
() => ReactDOM.render(React.createElement(window.ViewInfoReactView, { name }),
document.getElementById('content')));
},

this.arangoViewsStore.fetch({
success: function () {
self.viewView = new window.ViewView({
model: self.arangoViewsStore.get(name),
name: name
});
self.viewView.render();
}
});
});
viewSettings: function (name) {
this.checkUser();

this.init.then(
() => ReactDOM.render(React.createElement(window.ViewSettingsReactView, { name }),
document.getElementById('content')));
},

viewConsolidation: function (name) {
this.checkUser();

this.init.then(
() => ReactDOM.render(React.createElement(window.ViewConsolidationReactView, { name }),
document.getElementById('content')));
},

viewLinks: function (name) {
this.checkUser();

this.init.then(
() => ReactDOM.render(React.createElement(window.ViewLinksReactView, { name }),
document.getElementById('content')));
},

viewJSON: function (name) {
this.checkUser();

this.init.then(
() => ReactDOM.render(React.createElement(window.ViewJSONReactView, { name }),
document.getElementById('content')));
},

views: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<li id="dbStatus" class="infoEntry subMenuEntry pull-right positive">
<a class="info">DB:</a>
<a class="state"><span><%= _.escape(currentDB.name) %></span></a>
<a class="icon db-icon default-icon">
<i class="fa fa-refresh"></i>
</a>
</li>
<li id="userBar" class="infoEntry subMenuEntry pull-right" style="margin-right: 10px;">
<a class="icon db-icon default-icon">
<i class="fa fa-refresh"></i>
</a>
</li>
<li id="userBar" class="infoEntry subMenuEntry pull-right" style="margin-right: 10px;">
</li>
</ul>

<div id="licenseInfoArea">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@
if (licenseData.status && licenseData.features && licenseData.features.expires) {
self.renderLicenseInfo(licenseData.status, licenseData.features.expires, serverTime);
} else {
self.showLicenseError();
self.showLicenseError();
}
},
error: function () {
self.showLicenseError();
}
});
});
},

fetchServerTime: function () {
Expand All @@ -161,13 +161,13 @@
if (!timeData.error && timeData.code === 200 && timeData.time) {
self.fetchLicenseInfo(timeData.time);
} else {
self.showGetTimeError();
self.showGetTimeError();
}
},
error: function () {
self.showGetTimeError();
}
});
});
},

showLicenseError: function () {
Expand Down Expand Up @@ -366,7 +366,7 @@
});
} else {
$(self.subEl + ' .bottom').append(
'<li class="subMenuEntry</li>'
'<li class="subMenuEntry"></li>'
);
}
},
Expand Down
13 changes: 12 additions & 1 deletion js/apps/system/_admin/aardvark/APP/frontend/scss/_modals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@
}
}

.select2-container-multi {
.select2-choices {
overflow: unset;
}
}

.select2-choices {
background-image: none !important;
border: 2px solid $c-content-border;
Expand All @@ -116,7 +122,7 @@
}

li {
background-color: $c-white !important;
//background-color: $c-white !important;
background-image: none !important;
color: $c-black;

Expand All @@ -135,6 +141,11 @@
outline: transparent !important;
}

.react-autocomplete-input {
left: unset !important;
top: unset !important;
}

.nav-tabs {
margin-top: 15px;

Expand Down
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ declare module 'styled-css-grid';
declare module 'sigma';
declare module 'picomodal';
declare module 'jsoneditor-react';
declare module 'react-autocomplete-input';
1 change: 1 addition & 0 deletions js/apps/system/_admin/aardvark/APP/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"raw-loader": "^4.0.1",
"react": "^17.0.2",
"react-app-polyfill": "^0.1.3",
"react-autocomplete-input": "^1.0.18",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"redux": "^4.1.0",
Expand Down
6 changes: 6 additions & 0 deletions js/apps/system/_admin/aardvark/APP/react/src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'jsoneditor-react/es/editor.min.css';
import React, { Component } from 'react';
import 'react-autocomplete-input/dist/bundle.css';
import ReactDOM from 'react-dom';

const jsoneditor = require('jsoneditor');
Expand All @@ -12,6 +13,11 @@ const parsePrometheusTextFormat = require('parse-prometheus-text-format');
// import new react views
// require('./views/shards/ShardsReactView');
require('./views/analyzers/AnalyzersReactView');
require('./views/views/ViewInfoReactView');
require('./views/views/ViewSettingsReactView');
require('./views/views/ViewConsolidationReactView');
require('./views/views/ViewLinksReactView');
require('./views/views/ViewJSONReactView');

// old libraries
const jQuery = require('jquery');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React, { CSSProperties, ReactNode } from "react";

type IconButtonProps = {
icon: string;
type?: 'neutral' | 'disabled' | 'header' | 'primary' | 'notification' | 'success' | 'info' | 'navbar'
| 'danger' | 'warning' | 'inactive' | 'close' | 'default';
size?: 'xsmall' | 'small' | 'large' | 'xlarge';
children?: ReactNode;
[key: string]: any;
};

const iconButtonSizeMap: { [key: string]: CSSProperties } = {
xsmall: {
fontSize: '70%'
},
small: {
fontSize: '85%'
},
large: {
fontSize: '110%'
},
xlarge: {
fontSize: '125%'
}
};

export const IconButton = ({ type, size, icon, children, ...rest }: IconButtonProps) => {
const style: CSSProperties = rest.style || {};

if (size) {
Object.assign(style, iconButtonSizeMap[size]);
}
delete rest.style;

return <button className={type ? `button-${type}` : 'pure-button'} style={style} {...rest}>
<i className={`fa fa-${icon}`} style={{ marginLeft: 'auto' }}/>
{
children
? <>
&nbsp;
{children}
</>
: null
}
</button>;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from "react";
import { ChildProp } from "../../utils/constants";

type ArangoTableProps = ChildProp & {
[key: string]: any;
};

export const ArangoTable = ({ children, ...rest }: ArangoTableProps) =>
<table className={'arango-table'} {...rest}>{children}</table>;

type ArangoTHProps = ChildProp & {
seq: number;
[key: string]: any;
};

export const ArangoTH = ({ children, seq, ...rest }: ArangoTHProps) =>
<th className={`arango-table-th table-cell${seq}`} {...rest}>{children}</th>;

export const ArangoTD = ({ children, seq, ...rest }: ArangoTHProps) =>
<td className={`arango-table-td table-cell${seq}`} {...rest}>{children}</td>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { Cell, Grid } from "../pure-css/grid";
interface ModalHeaderProps {
title: string;
children?: ReactNode;
minWidth?: string;
}

const ModalHeader = ({ title, children }: ModalHeaderProps) =>
const ModalHeader = ({ title, children, minWidth = '60vw' }: ModalHeaderProps) =>
<>
<div className="modal-header" style={{ minWidth: '60vw' }}>
<div className="modal-header" style={{ minWidth }}>
<Grid>
<Cell size={'1-4'}>
<span className="arangoHeader">{title}</span>
Expand Down
Loading