Skip to content

Commit

Permalink
Merge branch 'next' into fix-remove-console-log-when-selecting-carous…
Browse files Browse the repository at this point in the history
…el-type
  • Loading branch information
kanwarujjaval authored Dec 2, 2024
2 parents 61e8aa6 + 32861df commit f2d09d9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version XX.XX.XX
Fixes:
- [remote-config] Moving the remote config enable/disable functionality to the drop-down

## Version 24.10.x

Dependencies:
Expand Down
17 changes: 10 additions & 7 deletions plugins/remote-config/frontend/public/javascripts/countly.views.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,19 +810,22 @@
refresh();
});
},
startParameter: function(rowObj) {
this.toggleParameterState(rowObj, "Running");
},
stopParameter: function(rowObj) {
this.toggleParameterState(rowObj, "Stopped");
},
handleCommand: function(command, scope, row) {
var self = this;
switch (command) {

case 'disable':
self.toggleParameterState(row, "Stopped");
break;

case "edit":
self.openDrawer("parameters", row);
break;

case 'enable':
this.toggleParameterState(row, "Running");
break;

case "remove":
CountlyHelpers.confirm(this.i18n("remote-config.confirm-parameter-delete", "<b>" + row.parameter_key + "</b>"), "popStyleGreen", function(result) {
if (!result) {
Expand Down Expand Up @@ -1033,4 +1036,4 @@
this.renderWhenReady(mainView);
});
app.addMenu("improve", {code: "remote-config", permission: FEATURE_NAME, pluginName: "remote-config", url: "#/remote-config", text: "sidebar.remote-config", icon: '<div class="logo"><i class="material-icons" style="transform:rotate(90deg)"> call_split </i></div>', priority: 30});
})();
})();
21 changes: 7 additions & 14 deletions plugins/remote-config/frontend/public/templates/parameters.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,28 +87,21 @@
v-tooltip.left="rowScope.row.editable ? '' : i18n('remote-config.parameter.action-tooltip-content')"
:disabledButton="rowScope.row.editable ? false : true"
@command="handleCommand($event, scope, rowScope.row)">
<template v-if="hasUpdateRight && rowScope.row.editable">
<el-dropdown-item v-if="rowScope.row.status==='Stopped' || rowScope.row.status==='Expired'"
command="enable" :data-test-id="'datatable-remote-config-button-enable-' + rowScope.$index">{{i18n('remote-config.enable')}}</el-dropdown-item>
<el-dropdown-item v-else
command="disable" :data-test-id="'datatable-remote-config-button-disable-' + rowScope.$index">{{i18n('remote-config.disable')}}</el-dropdown-item>
</template>
<el-dropdown-item v-if="hasUpdateRight && rowScope.row.editable"
command="edit" :data-test-id="'datatable-remote-config-button-edit-' + rowScope.$index">{{i18n('common.edit')}}</el-dropdown-item>
<el-dropdown-item v-if="hasDeleteRight && rowScope.row.editable"
command="remove" :data-test-id="'datatable-remote-config-button-delete-' + rowScope.$index">{{i18n('common.delete')}}</el-dropdown-item>
</cly-more-options>
</template>
</el-table-column>
<el-table-column v-if="hasUpdateRight" min-width="110">
<template v-slot="rowScope">
<div v-if="rowScope.row.hover && rowScope.row.editable">
<el-button v-if="rowScope.row.status==='Stopped' || rowScope.row.status==='Expired'"
@click.stop="startParameter(rowScope.row)" size="small"
icon="el-icon-remove" :data-test-id="'datatable-remote-config-button-enable-' + rowScope.$index">{{i18n('remote-config.enable')}}
</el-button>
<el-button :data-test-id="'datatable-remote-config-button-disable-' + rowScope.$index" v-else @click.stop="stopParameter(rowScope.row)" size="small"
icon="el-icon-remove">{{i18n('remote-config.disable')}}
</el-button>
</div>
</template>
</el-table-column>
</template>
</cly-datatable-n>
</cly-main>
<drawer :controls="drawers.parameters" @submit="onSubmit"></drawer>
</div>
</div>

0 comments on commit f2d09d9

Please sign in to comment.