Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0257b272
Commit
0257b272
authored
Jan 08, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GeoNodeDetailItem Component
parent
c09e5643
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
0 deletions
+120
-0
ee/app/assets/javascripts/geo_nodes/components/geo_node_detail_item.vue
...javascripts/geo_nodes/components/geo_node_detail_item.vue
+120
-0
No files found.
ee/app/assets/javascripts/geo_nodes/components/geo_node_detail_item.vue
0 → 100644
View file @
0257b272
<
script
>
import
{
s__
}
from
'
~/locale
'
;
import
stackedProgressBar
from
'
~/vue_shared/components/stacked_progress_bar.vue
'
;
import
{
VALUE_TYPE
,
CUSTOM_TYPE
}
from
'
../constants
'
;
import
geoNodeHealthStatus
from
'
./geo_node_health_status.vue
'
;
import
geoNodeSyncSettings
from
'
./geo_node_sync_settings.vue
'
;
import
geoNodeEventStatus
from
'
./geo_node_event_status.vue
'
;
export
default
{
props
:
{
itemTitle
:
{
type
:
String
,
required
:
true
,
},
cssClass
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
itemValue
:
{
type
:
[
Object
,
String
,
Number
],
required
:
true
,
},
successLabel
:
{
type
:
String
,
required
:
false
,
default
:
s__
(
'
GeoNodes|Synced
'
),
},
failureLabel
:
{
type
:
String
,
required
:
false
,
default
:
s__
(
'
GeoNodes|Failed
'
),
},
neutralLabel
:
{
type
:
String
,
required
:
false
,
default
:
s__
(
'
GeoNodes|Out of sync
'
),
},
itemValueType
:
{
type
:
String
,
required
:
true
,
},
customType
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
},
components
:
{
stackedProgressBar
,
geoNodeHealthStatus
,
geoNodeSyncSettings
,
geoNodeEventStatus
,
},
computed
:
{
isValueTypePlain
()
{
return
this
.
itemValueType
===
VALUE_TYPE
.
PLAIN
;
},
isValueTypeGraph
()
{
return
this
.
itemValueType
===
VALUE_TYPE
.
GRAPH
;
},
isValueTypeCustom
()
{
return
this
.
itemValueType
===
VALUE_TYPE
.
CUSTOM
;
},
isCustomTypeStatus
()
{
return
this
.
customType
===
CUSTOM_TYPE
.
STATUS
;
},
isCustomTypeSync
()
{
return
this
.
customType
===
CUSTOM_TYPE
.
SYNC
;
},
},
};
</
script
>
<
template
>
<li
class=
"row node-detail-item"
>
<div
class=
"node-detail-title"
>
{{
itemTitle
}}
</div>
<div
v-if=
"isValueTypePlain"
class=
"node-detail-value"
:class=
"cssClass"
>
{{
itemValue
}}
</div>
<div
v-if=
"isValueTypeGraph"
class=
"node-detail-value"
>
<stacked-progress-bar
:success-label=
"successLabel"
:failure-label=
"failureLabel"
:neutral-label=
"neutralLabel"
:success-count=
"itemValue.successCount"
:failure-count=
"itemValue.failureCount"
:total-count=
"itemValue.totalCount"
/>
</div>
<template
v-if=
"isValueTypeCustom"
>
<geo-node-health-status
v-if=
"isCustomTypeStatus"
:status=
"itemValue"
/>
<geo-node-sync-settings
v-else-if=
"isCustomTypeSync"
:namespaces=
"itemValue.namespaces"
:last-event=
"itemValue.lastEvent"
:cursor-last-event=
"itemValue.cursorLastEvent"
/>
<geo-node-event-status
v-else
:event-id=
"itemValue.eventId"
:event-time-stamp=
"itemValue.eventTimeStamp"
/>
</
template
>
</li>
</template>
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