Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Migrate Query Workbench to new Platform #812

Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
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
17 changes: 17 additions & 0 deletions workbench/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2020 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file 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 const PLUGIN_ID = 'opendistroQueryWorkbench';
export const PLUGIN_NAME = 'Query Workbench';
60 changes: 0 additions & 60 deletions workbench/index.js

This file was deleted.

8 changes: 8 additions & 0 deletions workbench/kibana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "opendistroQueryWorkbench",
"version": "7.9.1",
"server": true,
"ui": true,
"requiredPlugins": ["navigation"],
"optionalPlugins": []
}
4 changes: 3 additions & 1 deletion workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
},
"dependencies": {
"brace": "0.11.1",
"css-loader": "^5.0.1",
"lodash": "^4.17.19",
"react-dom": "^16.3.0",
"react-double-scrollbar": "^0.0.15"
"react-double-scrollbar": "^0.0.15",
"style-loader": "^2.0.0"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.7.4",
Expand Down
179 changes: 0 additions & 179 deletions workbench/public/ace-themes/sql_console.css

This file was deleted.

2 changes: 1 addition & 1 deletion workbench/public/ace-themes/sql_console.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as ace from 'brace';
ace.define('ace/theme/sql_console', ['require', 'exports', 'module', 'ace/lib/dom'], function (acequire, exports, module) {
exports.isDark = false;
exports.cssClass = 'ace-sql-console';
exports.cssText = require('./sql_console.css');
exports.cssText = require('../index.scss');

const dom = acequire('../lib/dom');
dom.importCssString(exports.cssText, exports.cssClass);
Expand Down
47 changes: 0 additions & 47 deletions workbench/public/app.js

This file was deleted.

38 changes: 38 additions & 0 deletions workbench/public/application.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2020 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file 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 ReactDOM from 'react-dom';
import { AppMountParameters, CoreStart } from '../../../src/core/public';
import { AppPluginStartDependencies } from './types';
import { WorkbenchApp } from './components/app';

export const renderApp = (
{ notifications, http }: CoreStart,
{ navigation }: AppPluginStartDependencies,
{ appBasePath, element }: AppMountParameters
) => {
ReactDOM.render(
<WorkbenchApp
basename={appBasePath}
notifications={notifications}
http={http}
navigation={navigation}
/>,
element
);

return () => ReactDOM.unmountComponentAtNode(element);
};
Loading