nytai commented on a change in pull request #8845: [dashboard] New, list view 
(react)
URL: 
https://github.com/apache/incubator-superset/pull/8845#discussion_r367031133
 
 

 ##########
 File path: superset/assets/src/views/dashboardList/DashboardList.tsx
 ##########
 @@ -0,0 +1,294 @@
+/**
+ * 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 { SupersetClient } from '@superset-ui/connection';
+import { t } from '@superset-ui/translation';
+import moment from 'moment';
+import PropTypes from 'prop-types';
+import React from 'react';
+// @ts-ignore
+import { Button, Modal, Panel } from 'react-bootstrap';
+import ListView from 'src/components/ListView/ListView';
+import { FilterTypeMap } from 'src/components/ListView/types';
+import { FetchDataConfig } from 'src/components/ListView/types';
+import withToasts from 'src/messageToasts/enhancers/withToasts';
+
+import './DashboardList.less';
+
+const PAGE_SIZE = 25;
+
+interface Props {
+  addDangerToast: (msg: string) => void;
+}
+
+interface State {
+  dashboards: any[];
+  dashboardCount: number;
+  loading: boolean;
+  showDeleteModal: boolean;
+  deleteCandidate: any;
+  filterTypes: FilterTypeMap;
+  permissions: string[];
+  labelColumns: { [key: string]: string };
+}
+class DashboardList extends React.PureComponent<Props, State> {
+
+  get canEdit() {
+    return this.hasPerm('can_edit');
+  }
+
+  get canDelete() {
+    return this.hasPerm('can_delete');
+  }
+
+  public static propTypes = {
 
 Review comment:
   I've added the babel plugin for `transform-class-properties`.  The proposal 
for these is currently in stage 3, I believe, which is the step right before 
formal adoption into the standard. The proposal states that implementation is 
already under way in the latest chrome and in node 12. 
   proposal: 
   
https://github.com/tc39/proposal-class-fields#class-field-declarations-for-javascript
   
   Happy to switch back too. FWIW, every react project I've worked on has had 
this syntax enabled by babel. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to