You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2022/04/04 14:10:29 UTC

[superset] branch master updated: chore: Remove StyledQueryButton.less (#19441)

This is an automated email from the ASF dual-hosted git repository.

diegopucci pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new b601db7809 chore: Remove StyledQueryButton.less (#19441)
b601db7809 is described below

commit b601db78090ba1823ee63c797491bee75f4ee1af
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Mon Apr 4 17:10:20 2022 +0300

    chore: Remove StyledQueryButton.less (#19441)
    
    * Remove StyledQueryButton less
    
    * Remove unused className
---
 .../ScheduleQueryButton/ScheduleQueryButton.less   | 39 ----------------------
 .../components/ScheduleQueryButton/index.tsx       | 23 +++++++++++--
 2 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/ScheduleQueryButton.less b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/ScheduleQueryButton.less
deleted file mode 100644
index 4ae5847227..0000000000
--- a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/ScheduleQueryButton.less
+++ /dev/null
@@ -1,39 +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.
- */
-// -------------------------------------------------------------
-// Glyphicons are not supported and used by react-json-schema
-// -------------------------------------------------------------
-.json-schema {
-  i.glyphicon {
-    display: none;
-  }
-  .btn-add::after {
-    content: '+';
-  }
-  .array-item-move-up::after {
-    content: '↑';
-  }
-  .array-item-move-down::after {
-    content: '↓';
-  }
-  .array-item-remove::after {
-    content: '-';
-  }
-}
-// -------------------------------------------------------------
diff --git a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx
index 900e34d05a..e1c7b54d02 100644
--- a/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx
+++ b/superset-frontend/src/SqlLab/components/ScheduleQueryButton/index.tsx
@@ -24,7 +24,6 @@ import { t, styled } from '@superset-ui/core';
 import * as chrono from 'chrono-node';
 import ModalTrigger from 'src/components/ModalTrigger';
 import { Form, FormItem } from 'src/components/Form';
-import './ScheduleQueryButton.less';
 import Button from 'src/components/Button';
 
 const appContainer = document.getElementById('app');
@@ -111,6 +110,24 @@ export const StyledButtonComponent = styled(Button)`
   }
 `;
 
+const StyledJsonSchema = styled.div`
+  i.glyphicon {
+    display: none;
+  }
+  .btn-add::after {
+    content: '+';
+  }
+  .array-item-move-up::after {
+    content: '↑';
+  }
+  .array-item-move-down::after {
+    content: '↓';
+  }
+  .array-item-remove::after {
+    content: '-';
+  }
+`;
+
 const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({
   defaultLabel = t('Undefined'),
   sql,
@@ -175,7 +192,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({
       </StyledRow>
       <Row>
         <Col xs={24}>
-          <div className="json-schema">
+          <StyledJsonSchema>
             <SchemaForm
               schema={getJSONSchema()}
               uiSchema={getUISchema}
@@ -190,7 +207,7 @@ const ScheduleQueryButton: FunctionComponent<ScheduleQueryButtonProps> = ({
                 Submit
               </Button>
             </SchemaForm>
-          </div>
+          </StyledJsonSchema>
         </Col>
       </Row>
       {scheduleQueryWarning && (