Commit Graph

549 Commits

Author SHA1 Message Date
Markus Frosch b051b2da17 ObjectsController: Unify feature detection and setAction
Groups, Assign and Sets will be checked on the base Object for a group.

refs #12891
2016-11-11 10:44:22 +01:00
Thomas Gelf 63bf607a1d IcingaObjectFieldLoader: allow exotic var names
fixes #12094
fixes #12962
2016-11-08 02:00:38 +01:00
Thomas Gelf 588926a9f9 config/activities: allow to filter them
fixes #12239
2016-11-07 22:04:51 +01:00
Thomas Gelf 76ff4ebfd2 Sets: enable them 2016-11-04 09:37:12 +01:00
Thomas Gelf b2c834e7a4 permissions: provide new ones and enforce them
fixes #13039
2016-11-03 16:06:35 +01:00
Thomas Gelf f286b5ad08 Revert "ServiceSet: re-enable them"
This reverts commit c073278ee3.
2016-11-03 15:04:42 +01:00
Markus Frosch e368b32ec6 ActionController: Add load helper for IcingaConfig 2016-11-03 13:41:44 +01:00
Thomas Gelf c073278ee3 ServiceSet: re-enable them 2016-11-03 12:54:15 +01:00
Thomas Gelf ee0def7d2b Lots of files: make IDE users happy 2016-11-01 18:28:36 +01:00
Thomas Gelf f41d453448 DeployConfigForm: provide link-like form for...
...deployments

fixes #11854
2016-10-30 10:52:14 +00:00
Thomas Gelf 78b01091eb DirectorObjectForm: deal with subform values 2016-10-27 19:39:40 +00:00
Thomas Gelf 27634fe722 QuickBaseForm: allow for multiple module-related...
...prefix paths
2016-10-27 18:17:21 +00:00
Thomas Gelf 2b094067a5 QuickBaseForm: add missing use statement 2016-10-27 17:33:35 +00:00
Thomas Gelf c91084f0db ObjectsController: hide sets for now...
...didn't want to push that early :p
2016-10-27 16:33:47 +00:00
Thomas Gelf bab23c8f9b Form: split constructor to make tests easier 2016-10-27 16:31:04 +00:00
Thomas Gelf d59604bd93 ServiceSet: rework sets, allow for vars and...
...all other service properties when adding services to a set
2016-10-25 23:12:23 +00:00
Thomas Gelf 1724a78da5 DirectorObjectForm: do not set null values 2016-10-25 23:12:23 +00:00
Thomas Gelf c41009992e IcingaObjectFieldLoader: allow to combine objects 2016-10-25 23:12:23 +00:00
Thomas Gelf f87e80989d DirectorObjectForm: persist the field loader 2016-10-25 23:12:23 +00:00
Thomas Gelf 0db659cc4e IcingaObjectFieldLoader: check for fields support 2016-10-25 23:12:23 +00:00
Thomas Gelf 00f21f838b DirectorObjectForm: simplify inhertance code 2016-10-25 23:12:23 +00:00
Thomas Gelf 696e63b4ec Servicesset: add controller, form and table 2016-10-25 23:12:23 +00:00
Thomas Gelf 0d86c24cd8 Huge change, getting rid of legacy assignment...
...code. All objects should work with the new code base right now
2016-10-24 03:41:37 +00:00
Thomas Gelf aeafec37d7 FormDataFilter: simplify HTML, Code and style 2016-10-23 04:23:38 +00:00
Thomas Gelf 24478ede12 DataFilter: json_en/decode when passing to form 2016-10-23 03:14:52 +00:00
Thomas Gelf 8f2b9fea07 DataFilter: automagic fix for not(multiple) 2016-10-22 07:02:09 +00:00
Thomas Gelf a819e7c92c DataFilter: attribs are no longer needed 2016-10-22 07:02:09 +00:00
Thomas Gelf 8ade496fdc DataFilter: refactor the whole class(es) 2016-10-22 07:02:09 +00:00
Thomas Gelf 037c588d26 FormDataFilter: change icon for expression 2016-10-22 07:02:09 +00:00
Thomas Gelf 9349ba0f2a FormDataFilter: new implementation for assignments
First prototype
2016-10-22 07:02:09 +00:00
Thomas Gelf 7c31b37f27 IcingaServiceForm: remove duplicate code
Elements in this list are optional and may be used in various forms,
so keeping this in the base class is preferrable here
2016-10-22 06:09:00 +00:00
Thomas Gelf 0791b900f3 QuickBaseForm: allow translation tools find 'None' 2016-10-22 06:08:44 +00:00
Corentin Ardeois e7bd4343b5 Add support for Apply for rules in services
Apply for rules are defined through `apply_for` property
Only Array custom variables will be eligible in apply_for dropdown.

API Example:
```bash
 ./director-curl POST director/service?name=my_service '{"apply_for": "for (checked_tcp_port in host.vars.checked_tcp_ports)" }'
 ```

 Will render as:
 ```
  apply Service "my_service" for (checked_tcp_port in host.vars.checked_tcp_ports) {
      ...
  }
  ```
Feature: https://dev.icinga.org/issues/11976

Depends-On: https://github.com/Icinga/icingaweb2-module-director/pull/20
refs #11976
2016-10-22 06:00:54 +00:00
Thomas Gelf b62b602f7d DirectorObjectForm: move imports below name 2016-10-20 02:22:34 +00:00
Thomas Gelf d5234f723d HostController: no loop check for 'fake' services
Inherited services do not exist in the db. As many services would
carry their template's name, the fallback to a name-based loop check
would trigger an erraneous error. So we trigger no preliminary loop
check for those now.

fixes #12938
2016-10-20 01:09:34 +00:00
Thomas Gelf 8c2d5ec7f9 Data: flip field/list order, as fields are...
...more important
2016-10-17 17:24:27 +00:00
Thomas Gelf edbda2c592 IcingaObjectFieldLoader: silently ignore setValues
...when called for an object without custom var support
2016-10-17 16:57:25 +00:00
Thomas Gelf b40f4a7ab7 QuickTable: fix 'return value in write contex'...
...for older PHP versions
2016-10-14 19:35:52 +00:00
Thomas Gelf 23ef9a707c MultiEdit: make it independent of an object type 2016-10-14 18:32:34 +00:00
Thomas Gelf 6a54e00402 MultiEdit: code cleanup, add custom var support
fixes #12465
fixes #12906
fixes #11614
2016-10-14 17:17:07 +00:00
Thomas Gelf 69237b8ae9 MultiEditForm: first shot, provides imports
refs #12465
2016-10-14 13:46:06 +00:00
Thomas Gelf 732ebae339 ActionController: provide a singleTab helper 2016-10-14 13:46:06 +00:00
Thomas Gelf 41c4448685 QuickTable: provide multiselect feature
refs #11614
2016-10-14 13:46:06 +00:00
Thomas Gelf 6f46e6b496 YesNo: new boolean-like form fields
fixes #12927
2016-10-14 13:39:43 +00:00
Thomas Gelf 98708e6496 Forms: better error handling
fixes #12926
2016-10-14 13:35:30 +00:00
Thomas Gelf 2df7144240 TemplateResolver: no more false alarms...
...when multiple paths lead to the same template

refs #11803
2016-10-14 11:26:41 +00:00
Thomas Gelf 041fd52174 FieldLoader, TemplateResolver: more cleanup
A few fixes related to modified imports for unstored objects

refs #12922
2016-10-14 09:59:08 +00:00
Thomas Gelf e04acbc55f IcingaObjectFieldLoader: do not fail on emtpy...
...parents
2016-10-14 08:33:58 +00:00
Thomas Gelf 913c2687b6 IcingaObjectFieldLoader: first implementation
Should already replace all former functionality

refs #12904
2016-10-13 21:25:03 +00:00
Markus Frosch f527e31b14 Merge branch 'bugfix/endpoint-remove-import-12920'
fixes #12920
2016-10-13 16:54:34 +02:00
Markus Frosch cc61831258 DirectorObjectForm: Allow form to select if imports are required
refs #12920
2016-10-13 16:37:49 +02:00
Thomas Gelf 71b3459540 DirectorDatafieldForm: allow to wipe all related...
...custom variables when removing a field

fixes #12916
2016-10-13 14:02:51 +00:00
Thomas Gelf 0e45429196 ObjectForm: do not allow to choose type...
...when one is already given
2016-10-13 11:55:53 +00:00
Thomas Gelf e99568fffc DirectorObjectForm: add unique error message...
...without adding an error in case we detect a loop. Also improve
resolve cache invalidation and clean up old imports-related code

refs #11803
2016-10-12 15:23:54 +00:00
Thomas Gelf 7993724dcb IcingaTemplateResolver: detect and throw nesting..
...errors

fixes #11803
2016-10-12 14:16:19 +00:00
Thomas Gelf 70b8a9ea02 DirectorObjectForm: improve Exception error message 2016-10-05 18:03:07 +00:00
Thomas Gelf 04cae6f8f8 DirectorObjectForm: fix forgotten variable 2016-09-09 21:38:49 +00:00
Thomas Gelf f52cd5ea77 DirectorDatafield: simplify usage 2016-09-09 21:32:26 +00:00
Thomas Gelf 217fb38517 IcingaObject: implement supportsAssignRules 2016-09-09 09:06:31 +00:00
Thomas Gelf 1144b5d55f DirectorObjectForm: fix legacy range field 2016-09-05 18:52:22 +00:00
Thomas Gelf 336257680c Settings: remove settings logic from DB...
...and keep helper method for easy instantiation
2016-08-27 13:20:03 +00:00
Thomas Gelf 77c915c897 DirectorObjectForm: normalize command field values...
...with special data types even when filled at services level

fixes #12400
fixes #11692
fixes #11477
2016-08-26 13:48:44 +00:00
Thomas Gelf 5355558519 DirectorObjectForm: place failed command fields...
...into the correct display group
2016-08-26 13:34:57 +00:00
Thomas Gelf 84b035ec24 objects/tree: enable autorefresh...
...and some coding style fixes

fixes #12451
2016-08-23 15:11:42 +00:00
Thomas Gelf 89d8536a92 IconHelper: start to separate concerns in forms
One new small helper class for this purpose
2016-08-05 12:49:11 +00:00
Thomas Gelf 14b5e74bb2 DirectorObjectForm: skip timeperiod range params...
...on redirect after removal. TimeperiodRange::getOnDeleteUrl would
be a better place for this, but I do not like that solution either :p

fixes #12316
2016-08-04 18:29:18 +00:00
Thomas Gelf c2f3609cc6 DirectorObjectForm: provide event command for...
...hosts and services

fixes #12117
fixes #12126
2016-07-20 17:53:19 +02:00
Markus Frosch f863a9b223 WIP: Add templates tab for all objects
Exceptions are global types, and those who can't import.
2016-07-07 09:05:33 +02:00
Markus Frosch c73be6b976 QuickTable: Ignore _dev parameter for the filter 2016-07-07 08:57:45 +02:00
Thomas Gelf 5e2de81767 DirectorObjectForm: prefer sent over inherited 2016-06-27 23:04:02 +02:00
Thomas Gelf 4c70a61060 ListController: get rid of global import history 2016-06-26 15:48:39 +02:00
Thomas Gelf 3b4b85374d QuickForm: fully respect false submit label 2016-06-26 14:02:21 +02:00
Thomas Gelf 97e52b231d ImportsourceController: fix redirect after delete 2016-06-25 23:39:28 +02:00
Thomas Gelf 7438b07c91 DirectorObjectForm: remove superfluous outdated...
...imported objects refresh
2016-06-17 20:42:12 +02:00
Thomas Gelf 35d4a08632 DirectorObjectForm: add extra properties
fixes #11579
2016-06-17 09:38:48 +02:00
Thomas Gelf 271dc6add5 DirectorObjectForm: addd brackets to be on the...
...safe side for all PHP versions
2016-06-16 17:00:09 +02:00
Thomas Gelf 144b20afc8 DirectorObjectForm: getSentOrObjectValue should...
...not fail on missing elements
2016-06-16 14:17:40 +02:00
Thomas Gelf 6254a0de3a ActionController: remove render() call 2016-06-16 14:14:38 +02:00
Thomas Gelf 12764c8482 Web/Controller: replace this->render() 2016-06-13 20:06:58 +02:00
Thomas Gelf 04a9a12d84 ExtensibleSet: fix phpcs complaint 2016-06-12 11:14:12 +02:00
Thomas Gelf 78c984068a ObjectController: remove last traces of isDisabled 2016-06-12 11:05:16 +02:00
Thomas Gelf cc9f5037f4 IcingaNotificationForm: enforce & render apply to
fixes #11895
2016-06-09 23:49:02 +02:00
Thomas Gelf baf6d8f62f DirectorObjectForm: hardcode boolean handling 2016-05-25 15:25:21 +02:00
Thomas Gelf d1af897114 ObjectController: allow for graceful tabs 2016-05-25 08:12:42 +02:00
Thomas Gelf d01194a7b4 QuickForm: optimize runtime order 2016-05-24 20:25:16 +02:00
Thomas Gelf 0ce8a29b52 Boolean: form sends '' for null value 2016-05-24 19:59:02 +02:00
Thomas Gelf d435ca37f7 IcingaNotificationForm: fix timeperiod loading
fixes #11576
2016-05-23 13:00:32 +02:00
Thomas Gelf dca6cc8a01 ExtensibleSet: respect strings when filtering 2016-05-20 10:46:01 +02:00
Thomas Gelf eb52918711 ExtensibleSet: do not array-filter when null 2016-05-20 10:40:58 +02:00
Thomas Gelf 5952de5841 DirectorObjectForm: make use of element filters 2016-05-20 08:37:46 +02:00
Thomas Gelf 0a475e3bcb DirectorObjectForm: remove imports exception...
...this is already handled by the object itself
2016-05-20 08:37:02 +02:00
Thomas Gelf df2a5899f6 ExtensibleSet: remove empty strings at filter time 2016-05-20 08:13:13 +02:00
Thomas Gelf 88c28db54f ObjectController: fix typo avoiding rendering...
...of disabled objects
2016-05-19 22:11:09 +02:00
Thomas Gelf 7622200f2e Element/Boolean: ignore PHPCS violation as of ZF1 2016-05-19 20:54:18 +02:00
Thomas Gelf 5f1a21e1f0 ActivityLogTable: override render to get rid of...
...initial tbody. Ugly.
2016-05-19 15:23:49 +02:00
Thomas Gelf 8a6f7c0e38 ExtensibleSet: remove empty components
fixes #11360
2016-05-19 15:02:30 +02:00
Thomas Gelf 41731241c5 DataTypeBoolean: provide a new data type
fixes #11594
2016-05-19 14:59:25 +02:00
Thomas Gelf da5ee55abf ViewHelperRaw: add new form decorator showing...
...raw, unfiltered values
2016-05-19 14:53:41 +02:00
Thomas Gelf 728c0745ae DirectorObjectForm: provide setSentValue helper 2016-05-13 14:13:48 +02:00
Thomas Gelf 576d62da26 IcingaObject: use resolved zone for apply/tpl 2016-05-10 20:23:45 +02:00
Thomas Gelf 24b201db13 Object/CommandController: unify titles 2016-05-03 09:09:01 +02:00
Thomas Gelf 3d03baff38 Object/HostController: delegate preview rendering 2016-05-03 09:07:28 +02:00
Thomas Gelf 32009ce458 DirectorObjectForm: require imports for all...
...non-template objects
2016-04-03 21:32:49 +02:00
Thomas Gelf e4b609c647 DirectorObjectForm: allow missing elements...
...when defining display groups, but only specific ones. I still want
to see exceptions for all the others
2016-03-30 19:51:29 +02:00
Thomas Gelf d6be2e777c DirectorObjectForm: add max_check_attempts 2016-03-30 19:19:00 +02:00
Thomas Gelf 078e46df60 ServiceController: beforeHandlingAddRequest hook 2016-03-29 19:32:50 +02:00
Thomas Gelf c1185106fa ObjectController: failsafe api access 2016-03-29 19:27:54 +02:00
Thomas Gelf f25b47e1bc DirectorObjectForm: fix exception on no data 2016-03-29 18:50:52 +02:00
Thomas Gelf f2dc9c59e5 DirectorObjectForm: provide check_period element 2016-03-27 23:58:44 +02:00
Thomas Gelf fd1bc38609 DirectorObjectForm: blacklist ids not names...
...when fetching allowed templates
2016-03-27 12:55:05 +02:00
Thomas Gelf dc43a40b41 ObjectController: use setViewScript, not render 2016-03-26 16:45:06 +01:00
Thomas Gelf aee65a706a QuickSubForm: one more forgotten file 2016-03-26 16:21:23 +01:00
Thomas Gelf ec97306e66 DirectorObjectForm: handle data from/for assigns 2016-03-24 11:42:58 +01:00
Thomas Gelf e1acf37ac4 QuickTable: more access, give varname more sense 2016-03-24 10:50:06 +01:00
Thomas Gelf d7b765bd04 QuickTable: fix counting bugy 2016-03-24 02:55:23 +01:00
Thomas Gelf b09593ff75 DirectorObjectForm: move valueIsEmpty to QuickBase 2016-03-24 02:27:10 +01:00
Thomas Gelf 5fc16f393d QuickBaseForm: take over parts of QuickForm 2016-03-24 01:59:50 +01:00
Thomas Gelf 324e15e2b5 QuickForm: add helper for shorter display group...
...definitions
2016-03-22 23:43:47 +01:00
Thomas Gelf ca6a9677bc ServiceController: prefix "add service" with host 2016-03-22 19:09:21 +01:00
Thomas Gelf e753a741d9 ObjectContoller: allow to edit external ApiUser...
...and Endpoint objects

fixes #11429
2016-03-22 18:19:13 +01:00
Thomas Gelf 1ca627f66c DirectorObjectForm: use valueIsEmpty 2016-03-22 02:56:10 +01:00
Thomas Gelf a752100da4 ObjectsController: add quicksearch element 2016-03-22 02:13:35 +01:00
Thomas Gelf 16bc8bf6b3 QuickForm: add missing beforeSetup hook 2016-03-22 02:09:37 +01:00
Thomas Gelf 5faf7c8612 IcingaHostForm: just a lame form field 2016-03-22 02:02:25 +01:00
Thomas Gelf 712dc6c9b7 DirectorObjectForm: handle ordering before setup 2016-03-22 01:34:21 +01:00
Thomas Gelf afde1806f7 QuickForm: add beforeSetup hook 2016-03-22 01:26:44 +01:00
Thomas Gelf 747fd966d2 DirectorObjectForm: refactor getSentOrObjectValue 2016-03-22 00:22:54 +01:00
Thomas Gelf 5e540880e5 Revert "DirectorObjectForm: do not set null defaults"
This reverts commit ce7b6031ff.

Broke quite some forms
2016-03-21 22:51:03 +01:00
Thomas Gelf c36093d350 ObjectController: combine preview & external info 2016-03-21 21:24:22 +01:00
Thomas Gelf 75f8872962 QuickForm: allow for named hints
This is necessary as I want to refer to them in display groups
2016-03-21 19:08:21 +01:00
Thomas Gelf ce7b6031ff DirectorObjectForm: do not set null defaults 2016-03-21 13:20:16 +01:00
Thomas Gelf 98b7b7be3f ActionController: commit missing helper method 2016-03-21 12:12:33 +01:00
Thomas Gelf 3fcb0d9849 controllers/filter: shift modifyFilter 2016-03-21 12:11:33 +01:00
Thomas Gelf 33d323286e ObjectsController: introduce quick search 2016-03-20 15:09:58 +01:00
Thomas Gelf 4f219992d8 objects: add compact quicksearch element 2016-03-20 13:18:55 +01:00
Thomas Gelf 7cd77c75ba Controllers: unify titles 2016-03-20 13:14:49 +01:00
Thomas Gelf d2de1f2eab ObjectController: improve clone link, rendering 2016-03-20 12:14:48 +01:00
Thomas Gelf 99302d40f4 IcingaService: fix redirection for host services 2016-03-20 12:04:06 +01:00
Thomas Gelf 547b13d53f ObjectController: show object name, not 'Modify..' 2016-03-20 12:00:49 +01:00
Thomas Gelf 2dd694f3ec ActionController: add viewscript helper 2016-03-20 11:19:16 +01:00
Thomas Gelf 775363e281 Monitoring: add monitoring integration helper 2016-03-20 11:18:44 +01:00
Thomas Gelf 65a881ca80 DirectorObjectForm: fix lost pointer issue
This has been a scary one :p

fixes #11409
fixes #11410
2016-03-18 21:16:25 +01:00
Thomas Gelf 0a022644b4 DirectorObjectForm: require imports for objects 2016-03-18 15:04:23 +01:00
Thomas Gelf 7ca46b1ab5 ObjectController: show info, no form for externals 2016-03-18 14:58:46 +01:00
Thomas Gelf 4417d58349 DirectorObjectForm: do not allow external objects 2016-03-18 14:39:00 +01:00
Thomas Gelf 906644cb18 DirectorObjectForm: no object type change allowed 2016-03-18 14:36:57 +01:00
Thomas Gelf 944701c725 ObjectController: remove superfluous sprintf 2016-03-18 13:37:15 +01:00
Thomas Gelf 574cb91093 DirectorObjectForm: add form field ordering 2016-03-18 13:01:27 +01:00
Thomas Gelf 6bd8a492b6 ObjectController: add beforeTabs hook 2016-03-18 11:44:48 +01:00
Thomas Gelf 85b26822c0 DirectorObjectForm: failsafe check for object_type 2016-03-18 11:38:08 +01:00