This commit is contained in:
@@ -3,83 +3,32 @@
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
|
||||
TODO NEXT DASHBOARD:
|
||||
DASHBOARD / KPI / BIZ METRICS
|
||||
|
||||
todo:
|
||||
Bar chart clickable links?
|
||||
palette colors centralized
|
||||
TODO: Move palette color stuff to it's own file that can be imported in here and in ops-metrics
|
||||
todo: change palette colors to very muted choices as per guide book
|
||||
lt titles of dash items properly
|
||||
List one goes to a list filter and sorted appropriately
|
||||
todo: MORE link button click
|
||||
Should take to a data-list view preselected with the criteria that show the complete list of what is in the dash-item wherever possible
|
||||
if an item doesn't really have anything appropriate to click on then don't bother for now, can flesh out more later
|
||||
movement buttons kind of suck, maybe add text to them or try to fit them all in a row on one line
|
||||
|
||||
|
||||
Before making any routes at server, make static data to display in graphs and day calendar so can then play with sizing and see what's realistic to deal with
|
||||
once sizing is in order then can look at specialty routes for serving dash items, maybe combine all dashitems into same route with it's own queries?
|
||||
it just has to return raw data, nothing fancy, check roles etc and then do some nice summarization queries
|
||||
|
||||
|
||||
DASHBOARD / KPI / BIZ METRICS
|
||||
|
||||
todo: DASHBOARD
|
||||
- Joyce kpi / charts and graphs
|
||||
TODO:
|
||||
Make the framework for them, obvs won't have all the data to do them all so look through, find common reqs and code a flexible component(s) for that
|
||||
Ensure have capability to do all the biz metrics planned for v8.0 release
|
||||
|
||||
Source case: https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/1974
|
||||
See notes there
|
||||
ELEMENTS
|
||||
dash ui items that can self update and display properly in any form factor
|
||||
Xcentral dash registry - collection of dash ui items, the roles they are available for, their unique ID's
|
||||
stored at *client* statically, (server prevents out of role access to data anyway)
|
||||
[{id:(unique id, probably human readable 'tag-dash-format'),roles:[role array available to]}]
|
||||
XUser dash registry - user's selected dash widgets to display and the order to display them in plus any unique settings to each one
|
||||
Index in array is their display order
|
||||
[{id:(unique dashitem id),settings:{refreshfrequencymaybe:22,other:'setting'}},{id:(second item id)}]
|
||||
dashboard host page
|
||||
iterates user registry, instantiates the dash items in order desired if user is in allowed role (user may have changed roles)
|
||||
handles removal, re-ordering events
|
||||
Xdashboard selection UI
|
||||
XUI accessed from dashboard menu allowing user to add widgets
|
||||
|
||||
todo: wireframe / mockup dashboard item objects
|
||||
mockup dash items with all commonality built in, better to start mocking up now than try to design perfectly in advance and then implement
|
||||
COMMON PROPERTIES
|
||||
display with correct size in correct form factor
|
||||
self refresh / fetch data
|
||||
Has default update frequency built in
|
||||
COMMON CONTROLS IN A dashboard instrument display meter guage
|
||||
Remove from the display
|
||||
Reorder in the display
|
||||
Refresh - force the refresh of the display
|
||||
Settings - popup settings menu for that control
|
||||
common settings built in, slot for special ones?
|
||||
Mockup example of more than one kind of widget with roles, doesn't have to do anything in it's UI, just be present for testing
|
||||
|
||||
|
||||
|
||||
todo: MORE link button click
|
||||
Should take to a data-list view preselected with the criteria that show the complete list of what is in the dash-item wherever possible
|
||||
if an item doesn't really have anything appropriate to click on then don't bother for now, can flesh out more later
|
||||
|
||||
todo: if dashboard view is empty should be a string displayed saying nothing selected to show?
|
||||
todo: do we need a PLUS menu item to add one of that type to that widget, i.e. if it's showing workorders then a plus to make a new wokorder would be useful
|
||||
todo: default dashboard views for new users on creation?
|
||||
|
||||
|
||||
|
||||
|
||||
todo: when showing a popup warning box error: Could not find one or more icon(s) iconName: "exclamation" prefix: "fas"
|
||||
I think maybe this is a built in vuetify icon?
|
||||
Need to show a warning box to see it in action, maybe delete something and get the are you sure? or maybe it's only the warning type?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TODO: shorten word "control" in my custom controls to ctl, why waste bytes?
|
||||
TODO: gzErrorBox in widget form will not display if form is not ready and form may not be ready if there is an error? (or is that correct?)
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
gridLines: { display: false }
|
||||
}
|
||||
]
|
||||
},
|
||||
onClick: function(e, items) {
|
||||
clicked(e, items);
|
||||
}
|
||||
}"
|
||||
></gz-chart-bar-horizontal>
|
||||
@@ -37,12 +40,6 @@
|
||||
</gz-dash>
|
||||
</template>
|
||||
<script>
|
||||
/*
|
||||
TODO: Move palette color stuff to it's own file that can be imported in here and in ops-metrics
|
||||
todo: change palette colors to very muted choices as per guide book
|
||||
todo: clickable bars to link to source
|
||||
|
||||
*/
|
||||
import GzDash from "../components/dash-base.vue";
|
||||
export default {
|
||||
components: {
|
||||
@@ -72,8 +69,35 @@ export default {
|
||||
data: [2, 4, 6, 8, 10],
|
||||
backgroundColor: getPalette(5)
|
||||
}
|
||||
],
|
||||
//this is added for my use, not part of chart js, used to get special id value of bar since labels are localized and data is not unique
|
||||
//https://stackoverflow.com/a/42635435/8939
|
||||
datakeys: [
|
||||
{ id: 11, type: 34 },
|
||||
{ id: 11, type: 34 },
|
||||
{ id: 11, type: 34 },
|
||||
{ id: 11, type: 34 },
|
||||
{ id: 11, type: 34 }
|
||||
]
|
||||
};
|
||||
},
|
||||
clicked: function(c, i) {
|
||||
if (i.length == 0) return; //Clicked outside any bar.
|
||||
let e = i[0]; //get index of bar clicked on
|
||||
// console.log(e._index);
|
||||
//this gets the label
|
||||
//let x_value = this.obj.labels[e._index];
|
||||
//this gets the value
|
||||
//let y_value = this.obj.datasets[0].data[e._index];
|
||||
//this gets my custom id stuff
|
||||
//https://stackoverflow.com/a/42635435/8939
|
||||
let dataKeyValue = this.obj.datakeys[e._index];
|
||||
// console.log(x_value);
|
||||
// console.log(y_value);
|
||||
//console.log(dataKeyValue);
|
||||
|
||||
alert(`STUB: OPEN ITEM (data: ${JSON.stringify(dataKeyValue)})`);
|
||||
//clickOnChart(lastHoveredIndex);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,9 +108,8 @@ export default {
|
||||
return event.color;
|
||||
},
|
||||
showEvent({ nativeEvent, event }) {
|
||||
alert(`STUB: OPEN ITEM (data: ${JSON.stringify(event)})`);
|
||||
|
||||
nativeEvent.stopPropagation();
|
||||
alert(`STUB: OPEN ITEM (data: ${JSON.stringify(event)})`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user