config.san 3.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
<template>
    <div class="visual-dl-scalar-config-com">
        <san-text-field
            hintText="input a tag group name to search"
            label="Group name RegExp"
            inputValue="{=config.groupNameReg=}"
        />
        <ui-slider
            label="Smoothing"
            value="{=config.smoothing=}"
            min="{{0}}"
            max="{{1}}"
            step="{{0.001}}"
        />
        <ui-radio-group
            label="Horizontal"
            value="{{config.horizontal}}"
            items="{{horizontalItems}}"
        />
        <ui-dropdown-menu
            label="Tooltip sorting method"
            items="{{sortingMethodItems}}"
            value="{=config.sortingMethod=}"
        />
        <ui-checkbox-group
            value="{=config.link=}"
            items="{{lnksItems}}"
        />
        <ui-checkbox-group
            value="{=config.chart=}"
            items="{{chartItems}}"
        />
        <ui-checkbox-group
            label="Runs"
            items="{{runsItems}}"
        />
        <san-button class="visual-dl-scalar-run-toggle" variants="raised secondery">Toggle All Runs</san-button>
    </div>
</template>
<script>
import TextField from 'san-mui/TextField';
import Slider from '../../common/ui/Slider';
import RadioGroup from '../../common/ui/RadioGroup';
import DropDownMenu from '../../common/ui/DropDownMenu';
import CheckBoxGroup from '../../common/ui/CheckBoxGroup';
import Button from 'san-mui/Button';
export default {
    components: {
        'san-text-field': TextField,
        'ui-slider': Slider,
        'ui-radio-group': RadioGroup,
        'ui-dropdown-menu': DropDownMenu,
        'ui-checkbox-group': CheckBoxGroup,
        'san-button': Button
    },
    initData() {
        return {
            config: {
                groupName: 'aa',
                smoothing: '0.5',
                horizontal: '1',
                sortingMethod: '2',
                link: [],
                chart: []
            },
            horizontalItems: [
                {
                    name: 'Step',
                    value: '1'
                },
                {
                    name: 'Relative',
                    value: '2'
                },
                {
                    name: 'Wall',
                    value: '3'
                }
            ],
            sortingMethodItems: [
                {
                    name: 'default',
                    value: '1'
                },
                {
                    name: 'descending',
                    value: '2'
                },
                {
                    name: 'ascending',
                    value: '3'
                },
                {
                    name: 'nearest',
                    value: '4'
                }
            ],
            runsItems: [],
            lnksItems: [
                {
                    value: '1',
                    name: 'Show data download links'
                }
            ],
            chartItems: [
                {
                    value: '1',
                    name: 'Ignore outliers in chart scaling'
                }
            ]
        };
    }
};
</script>
<style lang="stylus">
@import '../../style/variables';
+prefix-classes('visual-dl-scalar-')
    .config-com
        width 90%
        margin 0 auto
        .run-toggle
            width 100%
            margin-top 20px
</style>