Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
844dc657
Commit
844dc657
authored
9 years ago
by
Kyle Doherty
Browse files
Options
Downloads
Patches
Plain Diff
clean up saved questions
parent
02fd1bc4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/frontend_client/app/home/components/Cards.react.js
+10
-22
10 additions, 22 deletions
resources/frontend_client/app/home/components/Cards.react.js
with
10 additions
and
22 deletions
resources/frontend_client/app/home/components/Cards.react.js
+
10
−
22
View file @
844dc657
...
...
@@ -3,6 +3,7 @@
import
React
,
{
Component
,
PropTypes
}
from
"
react
"
;
import
Icon
from
"
metabase/components/Icon.react
"
;
import
IconBorder
from
'
../../query_builder/IconBorder.react
'
;
import
LoadingAndErrorWrapper
from
"
metabase/components/LoadingAndErrorWrapper.react
"
;
import
{
fetchCards
}
from
"
../actions
"
;
...
...
@@ -13,21 +14,6 @@ export default class Cards extends Component {
constructor
()
{
super
();
this
.
state
=
{
error
:
null
};
this
.
styles
=
{
main
:
{
marginRight
:
"
346px
"
},
mainWrapper
:
{
width
:
"
100%
"
,
margin
:
"
0 auto
"
,
paddingLeft
:
"
12em
"
,
paddingRight
:
"
3em
"
},
headerGreeting
:
{
fontSize
:
"
x-large
"
}
};
}
async
componentDidMount
()
{
...
...
@@ -43,10 +29,10 @@ export default class Cards extends Component {
let
items
=
cards
.
slice
().
sort
((
a
,
b
)
=>
b
.
created_at
-
a
.
created_at
);
return
(
<
ul
className
=
"
pt2
"
>
<
ul
className
=
"
pt2
ml1
"
>
{
items
.
map
(
item
=>
<
li
key
=
{
item
.
id
}
className
=
"
flex pt2
"
>
<
div
className
=
"
pb2 mr
3
"
>
<
div
className
=
"
pb2 mr
2
"
>
<
img
style
=
{{
height
:
"
36px
"
}}
src
=
{
"
/app/components/icons/assets/
"
+
item
.
icon
+
"
.png
"
}
/
>
<
/div
>
<
div
className
=
"
flex align-center flex-full border-bottom pb2
"
>
...
...
@@ -55,12 +41,14 @@ export default class Cards extends Component {
<
div
className
=
"
text-grey-3
"
>
{
item
.
description
||
"
No description yet
"
}
<
/div
>
<
/div
>
<
div
className
=
"
flex-align-right flex-full text-right text-grey-3
"
>
<
div
className
=
"
mb1
"
>
Saved
by
<
span
className
=
"
text-dark
"
>
{
item
.
creator
.
common_name
}
<
/span></
div
>
<
div
>
Saved
by
<
span
className
=
"
text-dark
"
>
{
item
.
creator
.
common_name
}
<
/span></
div
>
<
div
>
Created
{
item
.
created_at
.
fromNow
()}
<
/div
>
<
/div
>
<
div
className
=
"
flex-align-right text-right text-grey-3 ml2
"
>
<
a
href
=
{
'
/card/
'
+
item
.
id
}
className
=
"
flex-align-right IconCircle flex text-grey-1 text-grey-3-hover transition-color layout-centered
"
>
<
Icon
name
=
{
'
pencil
'
}
width
=
{
18
}
height
=
{
18
}
><
/Icon
>
<
a
href
=
{
'
/card/
'
+
item
.
id
}
className
=
"
flex-align-right flex text-grey-1 text-grey-3-hover
"
>
<
IconBorder
>
<
Icon
name
=
'
pencil
'
width
=
{
16
}
height
=
{
16
}
><
/Icon
>
<
/IconBorder
>
<
/a
>
<
/div
>
<
/div
>
...
...
@@ -79,9 +67,9 @@ export default class Cards extends Component {
{()
=>
<
div
>
{
cards
.
length
===
0
?
<
div
className
=
"
flex flex-column layout-centered pt4
"
>
<
div
className
=
"
flex flex-column layout-centered pt4
"
style
==
{{
fontSize
:
'
1.08rem
'
}}
>
<
span
className
=
"
QuestionCircle
"
>
?
<
/span
>
<
div
className
=
"
text-normal mt3 mb1
"
>
Hmmm
,
looks
like
you
don
'
t have any saved questions yet.</div>
<
div
className
=
"
text-normal mt3 mb1
h2 text-bold
"
>
Hmmm
,
looks
like
you
don
'
t have any saved questions yet.</div>
<div className="text-normal text-grey-2">Save a question and get this baby going!</div>
</div>
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment