Skip to content

Commit

Permalink
incorporate UX recommendations (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
isacikgoz authored Apr 22, 2024
1 parent 069239a commit 3d5856b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 2 additions & 3 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"bundle_path": "webapp/dist/main.js"
},
"settings_schema": {
"header": "This page is designated to configure the plugin and download the metrics dump.",
"footer": "This plugin is a utility to scrape and store various data points from Mattermost application in openmetrics format, similar to what Prometheus does. It operates by collecting metrics at regular intervals, allowing to be used while troubleshooting issues by including these metrics into a dump file.",
"header": "Collect and store Mattermost performance data at regular intervals in a standard OpenMetrics format, without requiring third-party tool deployments. Data snapshots stored in a dump file can be consumed by a wide range of monitoring systems.",
"settings": [
{
"key": "Stats",
Expand All @@ -30,7 +29,7 @@
"key": "DBPath",
"display_name": "TSDB Path:",
"type": "text",
"help_text": "The path of time-series database, the database is stored in plugins local storage. To change this setting, you'll need to restart the plugin for the changes to take effect.",
"help_text": "The local path where the time series database data is stored. Changing this setting requires a plugin restart.",
"default":"mattermost-plugin-metrics/data"
},
{
Expand Down
16 changes: 13 additions & 3 deletions webapp/src/components/admin_settings/job_table/job_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ export default class JobTable extends React.Component<State, Props> {

render() {
const createDump = (range: DateRange) => {
if (range.to) {
// we need to manipulate one more day to the upper limit because the DayPicker
// returns the 12:00 AM timestamp of the selected range.
range.to = new Date(range.to!.getTime() + (1000 * 60 * 60 * 24));
} else {
// here we are setting upper limit if it's undefined, this happens if you
// only select a single day.
range.to = new Date(range.from!.getTime() + (1000 * 60 * 60 * 24));
}

createJob(range).finally(() => {
this.reload();
this.setState({showScheduleModal: false});
Expand Down Expand Up @@ -168,13 +178,13 @@ export default class JobTable extends React.Component<State, Props> {
{'Created At'}
</th>
<th>
{'Min T'}
{'Minimum Time'}
</th>
<th>
{'Max T'}
{'Maximum Time'}
</th>
<th>
{'Action(s)'}
{'Actions'}
</th>
</tr>
</thead>
Expand Down

0 comments on commit 3d5856b

Please sign in to comment.