|
| 1 | +<template> |
| 2 | + <div class="visual-dl-page-config-com"> |
| 3 | + <v-text-field |
| 4 | + name="Group name RegExp" |
| 5 | + label="Group name RegExp" |
| 6 | + hint="input a tag group name" |
| 7 | + id="testing" |
| 8 | + v-model="config.groupNameReg" |
| 9 | + dark |
| 10 | + ></v-text-field> |
| 11 | + |
| 12 | + <v-slider label="Smoothing" v-bind:max="100" v-bind:min="0" v-model="config.smoothing" dark></v-slider> |
| 13 | + <v-text-field v-model="config.smoothing" type="number" dark></v-text-field> |
| 14 | + |
| 15 | + <p>{{ config.horizontal || 'null' }}</p> |
| 16 | + <v-radio-group v-model="config.horizontal" dark> |
| 17 | + <v-radio label="Step" value="step"></v-radio> |
| 18 | + <v-radio label="Relative" value="relative"></v-radio> |
| 19 | + <v-radio label="Wall" value="wall"></v-radio> |
| 20 | + </v-radio-group> |
| 21 | + |
| 22 | + <v-select |
| 23 | + v-bind:items="sortingMethodItems" |
| 24 | + v-model="config.sortingMethod" |
| 25 | + label="Tooltip sorting method" |
| 26 | + single-line |
| 27 | + bottom |
| 28 | + dark |
| 29 | + ></v-select> |
| 30 | + |
| 31 | + <v-checkbox label="Show data download links" v-model="config.downloadLink" dark></v-checkbox> |
| 32 | + <v-checkbox label="Ignore outliers in chart scaling" v-model="config.outlier" dark></v-checkbox> |
| 33 | + |
| 34 | + <p> |
| 35 | + RunItems{{ config.runs }} |
| 36 | + </p> |
| 37 | + <v-checkbox v-for="item in runsItems" |
| 38 | + :label="item" |
| 39 | + :value="item" |
| 40 | + v-model="config.runs" |
| 41 | + dark |
| 42 | + ></v-checkbox> |
| 43 | + |
| 44 | + <v-switch class="visual-dl-page-run-toggle" |
| 45 | + v-bind:label="`Running: ${config.running.toString()}`" |
| 46 | + v-model="config.running" |
| 47 | + dark></v-switch> |
| 48 | + </div> |
| 49 | +</template> |
| 50 | +<script> |
| 51 | +import('vuetify/dist/vuetify.min.css') |
| 52 | +
|
| 53 | +//import TextField from 'san-mui/TextField'; |
| 54 | +
|
| 55 | +// TODO: Consider create Vue Components for these |
| 56 | +
|
| 57 | +//import Slider from '../../common/component/Slider'; |
| 58 | +//import RadioGroup from '../../common/component/RadioGroup'; |
| 59 | +//import DropDownMenu from '../../common/component/DropDownMenu'; |
| 60 | +//import CheckBoxGroup from '../../common/component/CheckBoxGroup'; |
| 61 | +//import Button from 'san-mui/Button'; |
| 62 | +
|
| 63 | +export default { |
| 64 | + name: 'config', |
| 65 | + props: ['runsItems', 'config'], |
| 66 | + data() { |
| 67 | + return { |
| 68 | + config: { |
| 69 | + groupNameReg: '.*', |
| 70 | + smoothing: '0.6', |
| 71 | + horizontal: 'step', |
| 72 | + sortingMethod: 'default', |
| 73 | + downloadLink: [], |
| 74 | + outlier: [], |
| 75 | + running: true, |
| 76 | + runs: [] |
| 77 | + }, |
| 78 | + horizontalItems: [ |
| 79 | + { |
| 80 | + name: 'Step', |
| 81 | + value: 'step' |
| 82 | + }, |
| 83 | + { |
| 84 | + name: 'Relative', |
| 85 | + value: 'relative' |
| 86 | + }, |
| 87 | + { |
| 88 | + name: 'Wall', |
| 89 | + value: 'wall' |
| 90 | + } |
| 91 | + ], |
| 92 | + sortingMethodItems: [ |
| 93 | + 'default', 'descending', 'ascending', 'nearest' |
| 94 | + ], |
| 95 | + runsItems: [], |
| 96 | + }; |
| 97 | + }, |
| 98 | + toggleAllRuns() { |
| 99 | + let running = this.data.get('config.running'); |
| 100 | + this.data.set('config.running', !running); |
| 101 | + this.fire('runningChange', running); |
| 102 | + } |
| 103 | +}; |
| 104 | +
|
| 105 | +</script> |
| 106 | +<style lang="stylus"> |
| 107 | +@import '../../style/variables'; |
| 108 | +
|
| 109 | ++prefix-classes('visual-dl-page-') |
| 110 | + .config-com |
| 111 | + width 90% |
| 112 | + margin 20px auto |
| 113 | + .run-toggle |
| 114 | + width 100% |
| 115 | + margin-top 20px |
| 116 | +
|
| 117 | +</style> |
| 118 | + |
| 119 | + |
0 commit comments