You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ly...@apache.org on 2022/08/11 13:07:32 UTC
[superset] 03/04: changed folder layout
This is an automated email from the ASF dual-hosted git repository.
lyndsi pushed a commit to branch lyndsi/create-dataset-blank-state
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 1ccdc90adf6ab3c59a70f397d2cdb0e74d80d653
Author: AAfghahi <ar...@gmail.com>
AuthorDate: Thu Jul 28 18:20:50 2022 -0400
changed folder layout
---
.../dataset/DatasetCreator/DatasetPanel/index.tsx | 23 -------------
.../data/dataset/DatasetCreator/Footer/index.tsx | 23 -------------
.../dataset/DatasetCreator/LeftPanel/index.tsx | 23 -------------
.../CRUD/data/dataset/DatasetCreator/index.tsx | 38 ----------------------
.../dataset/DatasetEditor/DatasetPanel/index.tsx | 23 -------------
.../dataset/DatasetEditor/RightPanel/index.tsx | 23 -------------
.../CRUD/data/dataset/DatasetEditor/index.tsx | 34 -------------------
.../views/CRUD/data/dataset/DatasetPage/index.tsx | 1 -
.../src/views/CRUD/data/dataset/Header/index.tsx | 23 -------------
superset/views/datasource/views.py | 5 ++-
10 files changed, 4 insertions(+), 212 deletions(-)
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/DatasetPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/DatasetPanel/index.tsx
deleted file mode 100644
index 9fe93b8fb5..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/DatasetPanel/index.tsx
+++ /dev/null
@@ -1,23 +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.
- */
-import React from 'react';
-
-export default function DatasetPanel() {
- return <div>Dataset Panel</div>;
-}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/Footer/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/Footer/index.tsx
deleted file mode 100644
index 07c35741ee..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/Footer/index.tsx
+++ /dev/null
@@ -1,23 +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.
- */
-import React from 'react';
-
-export default function Footer() {
- return <div>Footer</div>;
-}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/LeftPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/LeftPanel/index.tsx
deleted file mode 100644
index 5ffb6a12c9..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/LeftPanel/index.tsx
+++ /dev/null
@@ -1,23 +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.
- */
-import React from 'react';
-
-export default function LeftPanel() {
- return <div>Left Panel</div>;
-}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/index.tsx
deleted file mode 100644
index 93fc0db408..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetCreator/index.tsx
+++ /dev/null
@@ -1,38 +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.
- */
-import React from 'react';
-import DatasetPanel from './DatasetPanel';
-import Footer from './Footer';
-import LeftPanel from './LeftPanel';
-import Header from '../Header';
-
-export default function DatasetCreator() {
- return (
- <div>
- <Header />
- <div css={{ display: 'flex' }}>
- <LeftPanel />
- <div>
- <DatasetPanel />
- <Footer />
- </div>
- </div>
- </div>
- );
-}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/DatasetPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/DatasetPanel/index.tsx
deleted file mode 100644
index 9fe93b8fb5..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/DatasetPanel/index.tsx
+++ /dev/null
@@ -1,23 +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.
- */
-import React from 'react';
-
-export default function DatasetPanel() {
- return <div>Dataset Panel</div>;
-}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/RightPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/RightPanel/index.tsx
deleted file mode 100644
index b4f7df73a2..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/RightPanel/index.tsx
+++ /dev/null
@@ -1,23 +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.
- */
-import React from 'react';
-
-export default function LeftPanel() {
- return <div>Right Panel</div>;
-}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/index.tsx
deleted file mode 100644
index 8e7ab900ac..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetEditor/index.tsx
+++ /dev/null
@@ -1,34 +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.
- */
-import React from 'react';
-import Header from '../Header';
-import DatasetPanel from './DatasetPanel';
-import RightPanel from './RightPanel';
-
-export default function DatasetCreator() {
- return (
- <div>
- <Header />
- <div css={{ display: 'flex' }}>
- <DatasetPanel />
- <RightPanel />
- </div>
- </div>
- );
-}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/index.tsx
index 42de041fa0..dc08ac34b5 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/index.tsx
@@ -17,7 +17,6 @@
* under the License.
*/
import React from 'react';
-// import React, { useReducer, Reducer } from 'react';
import Header from './Header';
import DatasetPanel from './DatasetPanel';
import LeftPanel from './LeftPanel';
diff --git a/superset-frontend/src/views/CRUD/data/dataset/Header/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/Header/index.tsx
deleted file mode 100644
index 44f0e19f7b..0000000000
--- a/superset-frontend/src/views/CRUD/data/dataset/Header/index.tsx
+++ /dev/null
@@ -1,23 +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.
- */
-import React from 'react';
-
-export default function Header() {
- return <div>Header</div>;
-}
diff --git a/superset/views/datasource/views.py b/superset/views/datasource/views.py
index 2dbe81e289..2c137fab79 100644
--- a/superset/views/datasource/views.py
+++ b/superset/views/datasource/views.py
@@ -19,7 +19,7 @@ from collections import Counter
from typing import Any
from flask import redirect, request
-from flask_appbuilder import expose
+from flask_appbuilder import expose, permission_name
from flask_appbuilder.api import rison
from flask_appbuilder.security.decorators import has_access, has_access_api
from flask_babel import _
@@ -207,9 +207,11 @@ class Datasource(BaseSupersetView):
class DatasetEditor(BaseSupersetView):
route_base = "/dataset"
+ class_permission_name = "Dataset"
@expose("/add/")
@has_access
+ @permission_name("read")
def root(self) -> FlaskResponse:
dev = request.args.get("testing")
if dev is not None:
@@ -218,6 +220,7 @@ class DatasetEditor(BaseSupersetView):
@expose("/<pk>", methods=["GET"])
@has_access
+ @permission_name("read")
# pylint: disable=unused-argument
def show(self, pk: int) -> FlaskResponse:
dev = request.args.get("testing")