Skip to content
Snippets Groups Projects
Commit 329d7a76 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Tell to user if current question is archived

parent 526ad2ae
Branches
Tags
No related merge requests found
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { connect } from "react-redux";
import { Link } from "react-router";
import cx from "classnames";
import _ from "underscore";
......@@ -8,6 +9,8 @@ import _ from "underscore";
import { loadTableAndForeignKeys } from "metabase/lib/table";
import { isPK, isFK } from "metabase/lib/types";
import EmptyState from "metabase/components/EmptyState";
import QueryBuilderTutorial from "metabase/tutorial/QueryBuilderTutorial.jsx";
import QueryHeader from "../components/QueryHeader.jsx";
......@@ -212,6 +215,21 @@ class LegacyQueryBuilder extends Component {
);
}
if (card.archived) {
return (
<div className="flex full layout-centered flex-column">
<EmptyState
message={<div>
<div>This question has been archived</div>
<Link to={"/questions/archive"} className="my2 link" style={{fontSize: "14px"}}>View the
archive</Link>
</div>}
icon="viewArchive"
/>
</div>
);
}
const showDrawer = uiControls.isShowingDataReference || uiControls.isShowingTemplateTagsEditor;
const ModeFooter = mode && mode.ModeFooter;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment