You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by aa...@apache.org on 2019/01/28 23:40:11 UTC
[incubator-pinot] branch master updated: [TE] frontend -
harleyjj/yaml-editor - accordion for preview in YAML editor (#3756)
This is an automated email from the ASF dual-hosted git repository.
aaronucsd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new c47ef66 [TE] frontend - harleyjj/yaml-editor - accordion for preview in YAML editor (#3756)
c47ef66 is described below
commit c47ef66b2dff54bf0490eee5b12cd0b4488ec3d0
Author: Harley Jackson <ha...@gmail.com>
AuthorDate: Mon Jan 28 15:40:07 2019 -0800
[TE] frontend - harleyjj/yaml-editor - accordion for preview in YAML editor (#3756)
---
.../app/pods/components/yaml-editor/component.js | 25 ++++++++++++++--------
.../app/pods/components/yaml-editor/template.hbs | 15 +++++++++++++
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/component.js b/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/component.js
index ed158ad..a5423db 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/component.js
@@ -41,7 +41,6 @@ export default Component.extend({
/**
* Properties we expect to receive for the yaml-editor
*/
- //isForm: true,
currentMetric: null,
isYamlParseable: true,
alertTitle: 'Define anomaly detection in YAML',
@@ -59,6 +58,7 @@ export default Component.extend({
YAMLField: '',
currentYamlAlertOriginal: '',
currentYamlSettingsOriginal: '',
+ toggleCollapsed: false,
init() {
@@ -142,13 +142,13 @@ export default Component.extend({
* @method _loadAutocompleteById
* @return Promise
*/
- _loadAutocompleteById(metricId) {
+ _loadAutocompleteById(metricId) {
const promiseHash = {
filters: fetch(selfServeApiGraph.metricFilters(metricId)).then(res => checkStatus(res, 'get', true)),
dimensions: fetch(selfServeApiGraph.metricDimensions(metricId)).then(res => checkStatus(res, 'get', true))
};
return RSVP.hash(promiseHash);
- },
+ },
/**
* Get autocomplete suggestions from relevant api
@@ -173,11 +173,11 @@ export default Component.extend({
dataset,
id: metric.id,
completer:{
- insertMatch: (editor, data) => {
- editor.setValue(yamIt(data.metricname, data.dataset));
- editor.metricId = data.id;
- }
- }};
+ insertMatch: (editor, data) => {
+ editor.setValue(yamIt(data.metricname, data.dataset));
+ editor.metricId = data.id;
+ }
+ }};
});
}
return noResultsArray;
@@ -233,6 +233,13 @@ export default Component.extend({
actions: {
/**
+ * triggered by preview dropdown
+ */
+ showPreview() {
+ this.toggleProperty('toggleCollapsed');
+ },
+
+ /**
* resets given yaml field to default value for creation mode and server value for edit mode
*/
resetYAML(field) {
@@ -254,7 +261,7 @@ export default Component.extend({
}
},
- /**
+ /**
* Brings up appropriate modal, based on which yaml field is clicked
*/
triggerDocModal(field) {
diff --git a/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/template.hbs b/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/template.hbs
index dc917c3..10ad9d8 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/template.hbs
+++ b/thirdeye/thirdeye-frontend/app/pods/components/yaml-editor/template.hbs
@@ -39,6 +39,21 @@
</div>
<div class="col-xs-12">
+ {{#bs-accordion onChange=(action "showPreview") as |acc|}}
+ {{#acc.item value=preview as |aitem|}}
+ {{#aitem.title}}
+ <section class="dashboard-container__title">Preview alert
+ <span class="pull-right"><i class="glyphicon glyphicon-menu-{{if toggleCollapsed "down" "up"}}"></i></span>
+ </section>
+ {{/aitem.title}}
+ {{#aitem.body}}
+ <p>Preview Alert Component Goes Here</p>
+ {{/aitem.body}}
+ {{/acc.item}}
+ {{/bs-accordion}}
+ </div>
+
+ <div class="col-xs-12">
<hr/>
</div>
{{#if showSettings}}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org