-
Notifications
You must be signed in to change notification settings - Fork 76
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
Conversation
and move backup_file model under it. prepare for gathering models that concernig about archive
%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' |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
You should remove a related note file on deleting a backup file. |
end | ||
|
||
def file_id | ||
@file_id ||= with_file { name.gsub(/.conf\Z/,'') } | ||
@file_id ||= with_file { name.gsub(/#{self.class::FILE_EXTENSION}\Z/,'') } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overlooked that 😞
Enable to add a note with each configuration histories
This PR enables to add a note with each configuration histories.
See the following screen capture.