Migrating unique DirectedForce controls (#9359)

* migrating controls

* Linting 

* oops... meant to pull this out in a conflict resolution.
This commit is contained in:
Evan Rusackas 2020-03-25 19:20:52 -07:00 committed by GitHub
parent 4fd5ac9be6
commit 0061a3ebaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 23 deletions

View File

@ -1092,7 +1092,6 @@ Note the `y_axis_format` is defined under various section for some charts.
| `autozoom` | _N/A_ | | | `autozoom` | _N/A_ | |
| `bar_stacked` | _N/A_ | | | `bar_stacked` | _N/A_ | |
| `cache_timeout` | _N/A_ | | | `cache_timeout` | _N/A_ | |
| `charge` | _N/A_ | |
| `clustering_radius` | _N/A_ | | | `clustering_radius` | _N/A_ | |
| `code` | _N/A_ | | | `code` | _N/A_ | |
| `collapsed_fieldsets` | _N/A_ | | | `collapsed_fieldsets` | _N/A_ | |

View File

@ -17,6 +17,7 @@
* under the License. * under the License.
*/ */
import { t } from '@superset-ui/translation'; import { t } from '@superset-ui/translation';
import { formatSelectOptions } from '../../modules/utils';
export default { export default {
controlPanelSections: [ controlPanelSections: [
@ -32,7 +33,34 @@ export default {
}, },
{ {
label: t('Options'), label: t('Options'),
controlSetRows: [['link_length'], ['charge']], controlSetRows: [
['link_length'],
[
{
name: 'charge',
config: {
type: 'SelectControl',
renderTrigger: true,
freeForm: true,
label: t('Charge'),
default: '-500',
choices: formatSelectOptions([
'-50',
'-75',
'-100',
'-150',
'-200',
'-250',
'-500',
'-1000',
'-2500',
'-5000',
]),
description: t('Charge in the force layout'),
},
},
],
],
}, },
], ],
controlOverrides: { controlOverrides: {

View File

@ -845,27 +845,6 @@ export const controls = {
description: t('Link length in the force layout'), description: t('Link length in the force layout'),
}, },
charge: {
type: 'SelectControl',
renderTrigger: true,
freeForm: true,
label: t('Charge'),
default: '-500',
choices: formatSelectOptions([
'-50',
'-75',
'-100',
'-150',
'-200',
'-250',
'-500',
'-1000',
'-2500',
'-5000',
]),
description: t('Charge in the force layout'),
},
granularity_sqla: { granularity_sqla: {
type: 'SelectControl', type: 'SelectControl',
label: TIME_FILTER_LABELS.granularity_sqla, label: TIME_FILTER_LABELS.granularity_sqla,