Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d8b3fa01
Commit
d8b3fa01
authored
Sep 04, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobx: removed unused SearchStore
parent
68767acb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2 additions
and
77 deletions
+2
-77
public/app/containers/ContainerProps.ts
+0
-2
public/app/core/components/search/SearchResult.tsx
+2
-12
public/app/stores/RootStore/RootStore.ts
+0
-4
public/app/stores/SearchStore/ResultItem.ts
+0
-10
public/app/stores/SearchStore/SearchResultSection.ts
+0
-27
public/app/stores/SearchStore/SearchStore.ts
+0
-22
No files found.
public/app/containers/ContainerProps.ts
View file @
d8b3fa01
import
{
SearchStore
}
from
'./../stores/SearchStore/SearchStore'
;
import
{
NavStore
}
from
'./../stores/NavStore/NavStore'
;
import
{
PermissionsStore
}
from
'./../stores/PermissionsStore/PermissionsStore'
;
import
{
ViewStore
}
from
'./../stores/ViewStore/ViewStore'
;
import
{
FolderStore
}
from
'./../stores/FolderStore/FolderStore'
;
interface
ContainerProps
{
search
:
typeof
SearchStore
.
Type
;
nav
:
typeof
NavStore
.
Type
;
permissions
:
typeof
PermissionsStore
.
Type
;
view
:
typeof
ViewStore
.
Type
;
...
...
public/app/core/components/search/SearchResult.tsx
View file @
d8b3fa01
import
React
from
'react'
;
import
classNames
from
'classnames'
;
import
{
observer
}
from
'mobx-react'
;
import
{
store
}
from
'app/stores/store'
;
export
interface
SearchResultProps
{
search
:
any
;
}
@
observer
export
class
SearchResult
extends
React
.
Component
<
SearchResultProps
,
any
>
{
export
class
SearchResult
extends
React
.
Component
<
any
,
any
>
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
search
:
store
.
search
,
search
:
''
,
};
store
.
search
.
query
();
}
render
()
{
...
...
@@ -30,7 +21,6 @@ export interface SectionProps {
section
:
any
;
}
@
observer
export
class
SearchResultSection
extends
React
.
Component
<
SectionProps
,
any
>
{
constructor
(
props
)
{
super
(
props
);
...
...
public/app/stores/RootStore/RootStore.ts
View file @
d8b3fa01
import
{
types
}
from
'mobx-state-tree'
;
import
{
SearchStore
}
from
'./../SearchStore/SearchStore'
;
import
{
NavStore
}
from
'./../NavStore/NavStore'
;
import
{
ViewStore
}
from
'./../ViewStore/ViewStore'
;
import
{
FolderStore
}
from
'./../FolderStore/FolderStore'
;
...
...
@@ -7,9 +6,6 @@ import { PermissionsStore } from './../PermissionsStore/PermissionsStore';
import
{
TeamsStore
}
from
'./../TeamsStore/TeamsStore'
;
export
const
RootStore
=
types
.
model
({
search
:
types
.
optional
(
SearchStore
,
{
sections
:
[],
}),
nav
:
types
.
optional
(
NavStore
,
{}),
permissions
:
types
.
optional
(
PermissionsStore
,
{
fetching
:
false
,
...
...
public/app/stores/SearchStore/ResultItem.ts
deleted
100644 → 0
View file @
68767acb
import
{
types
}
from
'mobx-state-tree'
;
export
const
ResultItem
=
types
.
model
(
'ResultItem'
,
{
id
:
types
.
identifier
(
types
.
number
),
folderId
:
types
.
optional
(
types
.
number
,
0
),
title
:
types
.
string
,
url
:
types
.
string
,
icon
:
types
.
string
,
folderTitle
:
types
.
optional
(
types
.
string
,
''
),
});
public/app/stores/SearchStore/SearchResultSection.ts
deleted
100644 → 0
View file @
68767acb
import
{
types
}
from
'mobx-state-tree'
;
import
{
ResultItem
}
from
'./ResultItem'
;
export
const
SearchResultSection
=
types
.
model
(
'SearchResultSection'
,
{
id
:
types
.
identifier
(),
title
:
types
.
string
,
icon
:
types
.
string
,
expanded
:
types
.
boolean
,
items
:
types
.
array
(
ResultItem
),
})
.
actions
(
self
=>
({
toggle
()
{
self
.
expanded
=
!
self
.
expanded
;
for
(
let
i
=
0
;
i
<
100
;
i
++
)
{
self
.
items
.
push
(
ResultItem
.
create
({
id
:
i
,
title
:
'Dashboard '
+
self
.
items
.
length
,
icon
:
'gicon gicon-dashboard'
,
url
:
'asd'
,
})
);
}
},
}));
public/app/stores/SearchStore/SearchStore.ts
deleted
100644 → 0
View file @
68767acb
import
{
types
}
from
'mobx-state-tree'
;
import
{
SearchResultSection
}
from
'./SearchResultSection'
;
export
const
SearchStore
=
types
.
model
(
'SearchStore'
,
{
sections
:
types
.
array
(
SearchResultSection
),
})
.
actions
(
self
=>
({
query
()
{
for
(
let
i
=
0
;
i
<
100
;
i
++
)
{
self
.
sections
.
push
(
SearchResultSection
.
create
({
id
:
'starred'
+
i
,
title
:
'starred'
,
icon
:
'fa fa-fw fa-star-o'
,
expanded
:
false
,
items
:
[],
})
);
}
},
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment