Skip to content

Commit

Permalink
FIX: Solve/remove buttons on 'share' page (#214)
Browse files Browse the repository at this point in the history
Also updates the contribution docs in the README
  • Loading branch information
davidtaylorhq committed Nov 1, 2023
1 parent a5ccd72 commit 5e8677f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# CHANGELOG

- 2023-11-01: 2.13.1

- FIX: Solve/remove buttons on 'share' page

- 2023-10-03: 2.13.0

- FEATURE: Format messages with Logster::Logger#formatter before storing
Expand Down
13 changes: 7 additions & 6 deletions README.md
Expand Up @@ -140,10 +140,11 @@ Logster UI is built using [Ember.js](http://emberjs.com/)

1. Fork it ( https://github.com/discourse/logster/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Run `cd client-app && npm install`
3. Run `cd client-app && yarn install`
4. Run `cd website && bundle install`
5. Run `bundle exec rake client_dev` to start Sinatra server (port 9292) and Ember server (port 4200). Use Ember server for hot reload for client code.
6. Once you're done making changes, run `./build_client_app.sh` to make and copy a production build to the assets folder.
7. Commit your changes (`git commit -am 'Add some feature'`)
8. Push to the branch (`git push origin my-new-feature`)
9. Create a new Pull Request
5. In the root directory, run `bundle exec rake client_dev` to start Sinatra server (port 9292) and Ember server (port 4200). Use Ember server for hot reload for client code.
6. Visit `http://localhost:4200/logs/` (with trailing slash) to test the application. Reload `http://localhost:4200/report_error` to add sample log data.
7. Once you're done making changes, run `./build_client_app.sh` to make and copy a production build to the assets folder.
8. Commit your changes (`git commit -am 'Add some feature'`)
9. Push to the branch (`git push origin my-new-feature`)
10. Create a new Pull Request
18 changes: 17 additions & 1 deletion client-app/app/controllers/show.js
@@ -1,9 +1,13 @@
import classic from "ember-classic-decorator";
import Controller from "@ember/controller";
import Controller, { inject as controller } from "@ember/controller";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";

@classic
export default class ShowController extends Controller {
@service router;
@controller("index") indexController;

envPosition = 0;

@action
Expand All @@ -16,6 +20,18 @@ export default class ShowController extends Controller {
this.model.unprotect();
}

@action
async solveMessage(msg) {
await msg.solve();
this.router.transitionTo("index");
}

@action
async removeMessage(msg) {
await msg.destroy();
this.router.transitionTo("index");
}

@action
envChanged(newPosition) {
this.set("envPosition", newPosition);
Expand Down
2 changes: 2 additions & 0 deletions client-app/app/templates/show.hbs
Expand Up @@ -4,6 +4,8 @@
<MessageInfo
@currentMessage={{this.model}}
@showTitle="true"
@removeMessage={{this.removeMessage}}
@solveMessage={{this.solveMessage}}
@envChangedAction={{this.envChanged}}
@currentEnvPosition={{this.envPosition}}
@actionsInMenu={{false}}
Expand Down
2 changes: 1 addition & 1 deletion lib/logster/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Logster
VERSION = "2.13.0"
VERSION = "2.13.1"
end
2 changes: 1 addition & 1 deletion website/sample.rb
Expand Up @@ -106,7 +106,7 @@ class Sample < Sinatra::Base
<h3>Welcome to logster:</h3>
<ul>
<li><a href='https://github.com/SamSaffron/logster'>Learn about logster</a></li>
<li><a href='/logs'>View sample dev logs</a></li>
<li><a href='/logs/'>View sample dev logs</a></li>
</ul>
</body>
</html>
Expand Down

0 comments on commit 5e8677f

Please sign in to comment.