Browse Source

do not display anything below the Analytic Status if analytic is not available

pull/91/head
rozetko 2 years ago
parent
commit
4ed8ba1193
  1. 88
      client/src/views/Home.vue

88
client/src/views/Home.vue

@ -2,50 +2,53 @@
<div class="home"> <div class="home">
<img alt="Vue logo" src="../assets/logo.png"> <img alt="Vue logo" src="../assets/logo.png">
<graph ref="graph" /> <graph ref="graph" />
<analytic-status /> <analytic-status />
<div>
Analytic unit type: <template v-if="analyticStatus.available">
<select :value="analyticUnitType" @change="changeAnalyticUnitType"> <div>
<option disabled value="">Please Select</option> Analytic unit type:
<option v-bind:key="option" v-for="option in analyticUnitTypes" :value="option">{{option}}</option> <select :value="analyticUnitType" @change="changeAnalyticUnitType">
</select> <br/><br/> <option disabled value="">Please Select</option>
</div> <option v-bind:key="option" v-for="option in analyticUnitTypes" :value="option">{{option}}</option>
<div id="controls"> </select> <br/><br/>
<div v-if="analyticUnitType == analyticUnitTypes[0]">
Threshold:
<input :value="analyticUnitConfig.threshold" @change="thresholdChange" /> <br/><br/>
</div>
<div v-if="analyticUnitType == analyticUnitTypes[1]">
Hold <pre>S</pre> to label patterns;
Hold <pre>A</pre> to label anti patterns <br/>
Hold <pre>D</pre> to delete patterns
<br/>
<hr/>
Correlation score:
<input :value="analyticUnitConfig.correlation_score" @change="correlationScoreChange" /> <br/>
Anti correlation score:
<input :value="analyticUnitConfig.anti_correlation_score" @change="antiCorrelationScoreChange" /> <br/>
Model score:
<input :value="analyticUnitConfig.model_score" @change="modelScoreChange" /> <br/>
Threshold score:
<input :value="analyticUnitConfig.threshold_score" @change="thresholdScoreChange" /> <br/><br/>
<button @click="clearAllLabeling"> clear all labeling </button>
</div> </div>
<div v-if="analyticUnitType == analyticUnitTypes[2]"> <div id="controls">
Hold <pre>Z</pre> to set seasonality timespan <div v-if="analyticUnitType == analyticUnitTypes[0]">
<hr/> Threshold:
<!-- Alpha: <input :value="analyticUnitConfig.threshold" @change="thresholdChange" /> <br/><br/>
<input :value="analyticUnitConfig.alpha" @change="alphaChange" /> <br/> --> </div>
Confidence: <div v-if="analyticUnitType == analyticUnitTypes[1]">
<input :value="analyticUnitConfig.confidence" @change="confidenceChange" /> <br/> Hold <pre>S</pre> to label patterns;
Seasonality: Hold <pre>A</pre> to label anti patterns <br/>
<input :value="analyticUnitConfig.seasonality" @change="seasonalityChange" /> <br/> Hold <pre>D</pre> to delete patterns
Seasonality iterations: <br/>
<input :value="analyticUnitConfig.seasonality_iterations" @change="seasonalityIterationsChange" /> <br/> <hr/>
<br/> Correlation score:
<input :value="analyticUnitConfig.correlation_score" @change="correlationScoreChange" /> <br/>
Anti correlation score:
<input :value="analyticUnitConfig.anti_correlation_score" @change="antiCorrelationScoreChange" /> <br/>
Model score:
<input :value="analyticUnitConfig.model_score" @change="modelScoreChange" /> <br/>
Threshold score:
<input :value="analyticUnitConfig.threshold_score" @change="thresholdScoreChange" /> <br/><br/>
<button @click="clearAllLabeling"> clear all labeling </button>
</div>
<div v-if="analyticUnitType == analyticUnitTypes[2]">
Hold <pre>Z</pre> to set seasonality timespan
<hr/>
<!-- Alpha:
<input :value="analyticUnitConfig.alpha" @change="alphaChange" /> <br/> -->
Confidence:
<input :value="analyticUnitConfig.confidence" @change="confidenceChange" /> <br/>
Seasonality:
<input :value="analyticUnitConfig.seasonality" @change="seasonalityChange" /> <br/>
Seasonality iterations:
<input :value="analyticUnitConfig.seasonality_iterations" @change="seasonalityIterationsChange" /> <br/>
<br/>
</div>
</div> </div>
</div> </template>
</div> </div>
</template> </template>
@ -140,6 +143,9 @@ export default defineComponent({
}, },
analyticUnitConfig() { analyticUnitConfig() {
return this.$store.state.analyticUnitConfig; return this.$store.state.analyticUnitConfig;
},
analyticStatus() {
return this.$store.state.analyticStatus;
} }
} }
}); });

Loading…
Cancel
Save