Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to add a note with each configuration histories #124

Merged
merged 22 commits into from
Jan 7, 2015

Conversation

hassaku
Copy link
Contributor

@hassaku hassaku commented Jan 7, 2015

This PR enables to add a note with each configuration histories.
See the following screen capture.

fluentd

%td
= form_for :note, url: daemon_setting_note_path(id: file.note.file_id), method: :patch do |f|
= f.text_field :content, value: file.note.content, class: "note-content", id: nil
= submit_tag t('terms.save'), class: 'btn'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more needed btn-default class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply that class and adjust it with text_field.

@@ -17,7 +17,7 @@
page.should have_css('h1', text: I18n.t('fluentd.settings.show.page_title'))
page.should have_link(I18n.t('terms.edit'))
page.should have_css('pre', text: 'GREAT CONFIG HERE')
expect(all('.row li').count).to eq Settings.histories_count_in_preview #links to hisotries#show
expect(all('.row tr').count).to eq Settings.histories_count_in_preview + 1 # links to hisotries#show + 1 table header
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@yakitorii
Copy link
Contributor

You should remove a related note file on deleting a backup file.

https://github.com/fluent/fluentd-ui/blob/master/app/models/fluentd/agent/local_common.rb#L86

end

def file_id
@file_id ||= with_file { name.gsub(/.conf\Z/,'') }
@file_id ||= with_file { name.gsub(/#{self.class::FILE_EXTENSION}\Z/,'') }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should Regexp.escape(self.class::FILE_EXTENSION) as @kou commented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I overlooked that 😞

uu59 added a commit that referenced this pull request Jan 7, 2015
Enable to add a note with each configuration histories
@uu59 uu59 merged commit c021a77 into master Jan 7, 2015
@uu59 uu59 deleted the add_memo_to_histroy branch January 7, 2015 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants