cloudstack/ui/src/utils
Abhishek Kumar 92931aeeb8
schema,server,api: events improvement (#127)
Add resource ID and resource type to event.
In UI, adds Events tab in resource view for the supporting resources.

Following SQL changes needed to support events with resource details in DB,
```
 -- Alter event table to add resource_id and resource_type
ALTER TABLE `cloud`.`event`
    ADD COLUMN `resource_id` bigint unsigned COMMENT 'ID of the resource associated with the even' AFTER `domain_id`,
    ADD COLUMN `resource_type` varchar(32) COMMENT 'Account role in the project (Owner or Regular)' AFTER `resource_id`;

DROP VIEW IF EXISTS `cloud`.`event_view`;
CREATE VIEW `cloud`.`event_view` AS
    SELECT
        event.id,
        event.uuid,
        event.type,
        event.state,
        event.description,
        event.resource_id,
        event.resource_type,
        event.created,
        event.level,
        event.parameters,
        event.start_id,
        eve.uuid start_uuid,
        event.user_id,
        event.archived,
        event.display,
        user.username user_name,
        account.id account_id,
        account.uuid account_uuid,
        account.account_name account_name,
        account.type account_type,
        domain.id domain_id,
        domain.uuid domain_uuid,
        domain.name domain_name,
        domain.path domain_path,
        projects.id project_id,
        projects.uuid project_uuid,
        projects.name project_name
    FROM
        `cloud`.`event`
            INNER JOIN
        `cloud`.`account` ON event.account_id = account.id
            INNER JOIN
        `cloud`.`domain` ON event.domain_id = domain.id
            INNER JOIN
        `cloud`.`user` ON event.user_id = user.id
            LEFT JOIN
        `cloud`.`projects` ON projects.project_account_id = event.account_id
            LEFT JOIN
        `cloud`.`event` eve ON event.start_id = eve.id;
```
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-05-05 13:44:33 +05:30
..
helper src: add apache v2.0 license header to files 2021-01-20 07:06:14 +05:30
timezone storage: recurring volume snapshot form (#99) 2021-01-20 07:06:15 +05:30
auth.js src: add apache v2.0 license header to files 2021-01-20 07:06:14 +05:30
axios.js src: add apache v2.0 license header to files 2021-01-20 07:06:14 +05:30
device.js compute: VM deployment wizard (#146) 2021-01-20 07:06:17 +05:30
directives.js UI: Submit the form when press CTRL + ENTER (#4766) 2021-07-26 08:29:19 -03:00
domUtil.js primate: Add support for UI customisation (#372) 2021-01-20 07:06:19 +05:30
filter.js src: add apache v2.0 license header to files 2021-01-20 07:06:14 +05:30
icons.js icons: add support for Debian os icon 2021-01-20 07:06:15 +05:30
mixin.js src: add apache v2.0 license header to files 2021-01-20 07:06:14 +05:30
permissions.js src: add apache v2.0 license header to files 2021-01-20 07:06:14 +05:30
plugins.js schema,server,api: events improvement (#127) 2022-05-05 13:44:33 +05:30
request.js [UI] Cancel all requests api, async jobs in UI when user logs out (#5663) 2022-01-13 17:44:49 +05:30
sort.js ui: Fix comparator for boolean (#5246) 2021-07-27 14:58:18 +05:30
storage.js src: add apache v2.0 license header to files 2021-01-20 07:06:14 +05:30
util.js store: reset internal data on login/logout 2021-01-20 07:06:17 +05:30