Skip to content

Conversation

@TheWitness
Copy link
Member

This commit adds some i18n
More callbacks to make the UI smoother
Quicker adding from the Graphs pages

This commit adds some i18n
More callbacks to make the UI smoother
Quicker adding from the Graphs pages
Copy link
Member

@netniV netniV left a comment

Choose a reason for hiding this comment

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

I am not sure how busy or aware @howardjones is at the moment, but i've reviewed what has been put forward. Idea looks sound, just a few comments on his behalf that he may have comments on.

Comment on lines 55 to 59
${XGETTEXT_BIN} --no-wrap --copyright-holder="The Cacti Group" --package-name="Cacti" --package-version=`cat include/cacti_version` --msgid-bugs-address="developers@cacti.net" -F -k__gettext -k__ -k__n:1,2 -k__x:1c,2 -k__xn:1c,2,3 -k__esc -k__esc_n:1,2 -k__esc_x:1c,2 -k__esc_xn:1c,2,3 -k__date -o locales/po/cacti.pot `find . -maxdepth 2 -name \*.php`

sed -i 's/FULL NAME <EMAIL@ADDRESS\>/Cacti Developers <developers@cacti.net>/g' locales/po/cacti.pot
sed -i 's/LANGUAGE <LL@li.org>/Cacti Developers <developers@cacti.net>/g' locales/po/cacti.pot
sed -i 's/CHARSET/UTF-8/g' locales/po/cacti.pot
Copy link
Member

Choose a reason for hiding this comment

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

Technically, this should be @howardjones contact details rather than Cacti's since this is his plugin. If he was wliling to transfer the ownership over, this could be kept as a Cacti's detalis.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Honestly I thought I already had! :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, I just copied it from another directory.

Copy link
Member

Choose a reason for hiding this comment

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

@howardjones if you wish to do that, you should add a commit that updates the copyright to the Cacti standard one (just as a way of code history of the agreeing to the transfer), then use the Transfer Repository within settings on the Repo. If you send it to me, I can then transfer it into Cacti's org account.

@@ -0,0 +1,218 @@
# SOME DESCRIPTIVE TITLE.
Copy link
Member

Choose a reason for hiding this comment

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

This file should probably be quicktree.pot rather than cacti.pot since it's a different repository.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think that is important really.

Copy link
Member

Choose a reason for hiding this comment

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

It won't be if it gets transferred over. :)

quicktree.php Outdated
$tree_name = get_nfilter_request_var('tree');
}

if ($tree_name == '') {
Copy link
Member

Choose a reason for hiding this comment

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

This should really be if (empty($tree_name)) to avoid any spaces being simply treated as a name.

Comment on lines +3 to 17
function plugin_quicktree_install() {
api_plugin_register_hook('quicktree', 'top_header_tabs', 'quicktree_show_tab', 'setup.php');
api_plugin_register_hook('quicktree', 'top_graph_header_tabs', 'quicktree_show_tab', 'setup.php');
api_plugin_register_hook('quicktree', 'config_arrays', 'quicktree_config_arrays', 'setup.php');
api_plugin_register_hook('quicktree', 'config_settings', 'quicktree_config_settings', 'setup.php');
api_plugin_register_hook('quicktree', 'draw_navigation_text', 'quicktree_draw_navigation_text', 'setup.php');
api_plugin_register_hook('quicktree', 'graph_buttons', 'quicktree_graph_buttons', 'setup.php');
api_plugin_register_hook('quicktree', 'graph_buttons_thumbnails', 'quicktree_graph_buttons', 'setup.php');

api_plugin_register_hook('quicktree', 'page_head', 'quicktree_page_head', 'setup.php');

quicktree_setup_table();

return true;
}
Copy link
Member

Choose a reason for hiding this comment

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

Not sure why this was moved to the start of the file, but it causes some differencing issues and makes it harder to see if any change actually occurred.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just cause that's the way it is on just about every plugin.

Copy link
Member

@netniV netniV left a comment

Choose a reason for hiding this comment

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

This seems to be OK, though hard to check on a good chunk of the changes because of misaligned differences, caused by shifting functions around unnecessarily ;-)

@howardjones
Copy link
Collaborator

Yep, misaligned differences was the final nail for weathermap. Merging this now and assigning copyright.

@howardjones howardjones merged commit d5fe282 into Cacti:master Feb 1, 2022
@howardjones
Copy link
Collaborator

Merged, but I can't transfer to you, @netniV, because you already have a fork from this repo. If you can delete that, I can transfer (renaming it to the cacti-standard plugin_quicktree didn't make any difference - it's the git reference)

@netniV
Copy link
Member

netniV commented Feb 1, 2022

@howardjones sorry, I'd forgotten that was a requirement. I double-checked and it was up to date with your repo so I've removed it now. You should be able to transfer it over and if you've already renamed it, that makes life a little easier :)

@netniV
Copy link
Member

netniV commented Feb 1, 2022

This has now been transferred and I've pushed a commit to add one or two more copyright notices. I did think there was an option via the graphs management page to add graphs for selection into a new quicktree, but my local instance didn't show that option. Not something you've accidentally removed @TheWitness?

@TheWitness
Copy link
Member Author

Intentionally as user will potentially not have access there. Might make that an option if they have permissions. There are a few dark corners around permissions in general BTW.

Say for example, if the users default permission is to deny access to trees, they won't be able to see them once they are created. So, there is more work to do on this permission front.

@netniV
Copy link
Member

netniV commented Feb 1, 2022

Hmm, I would disagree with that. If they are managing graphs, and have access to quicktree, the option should just be there so you can add a lot of graphs easily when filtering that list. Don't forget, adding it to the quicktree list doesn't give them access to trees.

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.

3 participants