From a979efa6ef711c509564f704f889c26dba2b25d3 Mon Sep 17 00:00:00 2001 From: Praveen Durairaj Date: Fri, 29 Jun 2018 17:21:00 +0530 Subject: [PATCH] console: disable change schema dropdown (#24) * console: disable change schema dropdown * console: fix graphiql scroll for document title --- console/Makefile | 25 +++++++++++++++++++ .../src/components/ApiExplorer/GraphiQL.css | 2 +- .../components/Services/Data/DataHeader.js | 10 ++++++-- 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 console/Makefile diff --git a/console/Makefile b/console/Makefile new file mode 100644 index 00000000..ea7ebebc --- /dev/null +++ b/console/Makefile @@ -0,0 +1,25 @@ +export PATH := node_modules/.bin:$(PATH) +DIST_PATH = /console/static/dist +CONSOLE_PATH = /console +BUCKET_NAME = hasura-graphql-engine + +all: deps build gcloud-cp-stable gcloud-set-metadata + +deps: + npm install + +build: + npm run build + +test: + npm run test + +gcloud-cp-stable: + gsutil cp -r $(DIST_PATH)/main.css/* gs://$BUCKET_NAME/console/${VERSION}/main.css + gsutil cp -r $(DIST_PATH)/main.js/* gs://$BUCKET_NAME/console/${VERSION}/main.js + gsutil cp -r $(DIST_PATH)/vendor.js/* gs://$BUCKET_NAME/console/${VERSION}/vendor.js + +gcloud-set-metadata: + gsutil setmeta -h "Content-Type: application/javascript" gs:// + $(BUCKET_NAME) + '/console/' + ${VERSION} + '/*.js' + gsutil setmeta -h "Content-Type: text/css" gs:// + $(BUCKET_NAME) + '/console/' + $(VERSION) + '/*.css' + gsutil setmeta -h "Content-Encoding: gzip" gs:// + $(BUCKET_NAME) + '/console/' + $(VERSION) + '/*' diff --git a/console/src/components/ApiExplorer/GraphiQL.css b/console/src/components/ApiExplorer/GraphiQL.css index a100aaea..cf83d55e 100644 --- a/console/src/components/ApiExplorer/GraphiQL.css +++ b/console/src/components/ApiExplorer/GraphiQL.css @@ -1256,7 +1256,7 @@ span.CodeMirror-selectedtext { -ms-flex: 1; flex: 1; font-weight: bold; - overflow-x: hidden; + overflow-x: initial; padding: 10px 0 10px 10px; text-align: center; text-overflow: ellipsis; diff --git a/console/src/components/Services/Data/DataHeader.js b/console/src/components/Services/Data/DataHeader.js index 8097fcc9..ef3d3cc9 100644 --- a/console/src/components/Services/Data/DataHeader.js +++ b/console/src/components/Services/Data/DataHeader.js @@ -1,21 +1,23 @@ import React from 'react'; import { Link } from 'react-router'; import Helmet from 'react-helmet'; -import { push } from 'react-router-redux'; +// import { push } from 'react-router-redux'; import PageContainer from './PageContainer/PageContainer'; import { appPrefix } from './push'; +/* import { UPDATE_CURRENT_SCHEMA, loadSchema, loadUntrackedSchema, } from './DataActions'; +*/ import globals from '../../../Globals'; const DataHeader = ({ schema, - schemaList, + // schemaList, currentSchema, children, location, @@ -23,6 +25,7 @@ const DataHeader = ({ }) => { const styles = require('./TableCommon/Table.scss'); const currentLocation = location.pathname; + /* const handleSchemaChange = e => { const updatedSchema = e.target.value; dispatch(push(globals.urlPrefix + '/data/schema/' + updatedSchema)); @@ -32,6 +35,7 @@ const DataHeader = ({ dispatch(loadUntrackedSchema()), ]); }; + */ let migrationSection = null; if (globals.consoleMode === 'cli') { migrationSection = ( @@ -70,6 +74,7 @@ const DataHeader = ({
+ {/* disable dropdown selection for now