Skip to content

Commit 56d957f

Browse files
committed
[remote-config] Update parameter actions
1 parent d49d5f0 commit 56d957f

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

plugins/remote-config/frontend/public/localization/remote-config.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,15 @@ remote-config.parameter.created = Created
8787
remote-config.expire.date = Expire date
8888
remote-config.start = Start
8989
remote-config.stop = Stop
90+
remote-config.enable = Enable
91+
remote-config.disable = Disable
9092
remote-config.parameter.running = Running
9193
remote-config.percentage = Percentage
9294
remote-config.parameter.stopped = Stopped
9395
remote-config.parameter.expired = Expired
96+
remote-config.parameter.enabled = Enabled
97+
remote-config.parameter.disabled = Disabled
98+
remote-config.parameter.action-tooltip-content = Actions are not allowed when the parameter is in use in an experiment
9499
remote-config.json.editor = JSON Editor
95100
remote-config.json.invalid = Invalid JSON code
96101
remote-config.json.valid = Valid JSON code

plugins/remote-config/frontend/public/templates/parameters.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
<template v-slot:default="rowScope">
3535
<div>
3636
<div class="cly-vue-remote-config-conditions-drawer__margin-bottom">
37-
<cly-status-tag v-if="rowScope.row.status==='Stopped'" :text="i18n('remote-config.parameter.stopped')" color="red"></cly-status-tag>
37+
<cly-status-tag v-if="rowScope.row.status==='Stopped'" :text="i18n('remote-config.parameter.disabled')" color="red"></cly-status-tag>
3838
<cly-status-tag v-else-if="rowScope.row.status==='Expired'" :text="i18n('remote-config.parameter.expired')" color="yellow"></cly-status-tag>
39-
<cly-status-tag v-else :text="i18n('remote-config.parameter.running')" color="blue"></cly-status-tag>
39+
<cly-status-tag v-else :text="i18n('remote-config.parameter.enabled')" color="blue"></cly-status-tag>
4040
</div>
4141
<div class="color-cool-gray-40 text-small" v-if="rowScope.row.expiry_dttm"> {{i18n('remote-config.expire.date')}} {{getDate(rowScope.row.expiry_dttm)}}</div>
4242
</div>
@@ -62,18 +62,22 @@
6262
</el-table-column>
6363
<el-table-column min-width="160" v-if="hasUpdateRight || hasDeleteRight" type="options">
6464
<template v-slot="rowScope">
65-
<cly-more-options v-if="rowScope.row.hover && rowScope.row.editable" size="small" @command="handleCommand($event, scope, rowScope.row)">
66-
<el-dropdown-item v-if="hasUpdateRight" command="edit">{{i18n('common.edit')}}</el-dropdown-item>
67-
<el-dropdown-item v-if="hasDeleteRight" command="remove">{{i18n('common.delete')}}</el-dropdown-item>
65+
<cly-more-options
66+
v-if="rowScope.row.hover"
67+
size="small"
68+
v-tooltip.left="rowScope.row.editable ? '' : i18n('remote-config.parameter.action-tooltip-content')"
69+
@command="handleCommand($event, scope, rowScope.row)">
70+
<el-dropdown-item v-if="hasUpdateRight && rowScope.row.editable" command="edit">{{i18n('common.edit')}}</el-dropdown-item>
71+
<el-dropdown-item v-if="hasDeleteRight && rowScope.row.editable" command="remove">{{i18n('common.delete')}}</el-dropdown-item>
6872
</cly-more-options>
6973
</template>
7074
</el-table-column>
7175
<el-table-column v-if="hasUpdateRight" min-width="110">
7276
<template v-slot="rowScope">
7377
<div v-if="rowScope.row.hover && rowScope.row.editable">
74-
<el-button v-if="rowScope.row.status==='Stopped' || rowScope.row.status==='Expired'" @click="startParameter(rowScope.row)" size="small" icon="el-icon-remove">{{i18n('remote-config.start')}}
78+
<el-button v-if="rowScope.row.status==='Stopped' || rowScope.row.status==='Expired'" @click="startParameter(rowScope.row)" size="small" icon="el-icon-remove">{{i18n('remote-config.enable')}}
7579
</el-button>
76-
<el-button v-else @click="stopParameter(rowScope.row)" size="small" icon="el-icon-remove">{{i18n('remote-config.stop')}}
80+
<el-button v-else @click="stopParameter(rowScope.row)" size="small" icon="el-icon-remove">{{i18n('remote-config.disable')}}
7781
</el-button>
7882
</div>
7983
</template>

0 commit comments

Comments
 (0)