~ubuntu-branches/ubuntu/trusty/freeipa/trusty

« back to all changes in this revision

Viewing changes to install/ui/src/freeipa/_base/metadata_provider.js

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2013-06-17 22:15:21 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130617221521-z8zya289o8xgrv3u
Tags: 3.2.1-0ubuntu1
* Merge from unreleased debian git
  - rebase to 3.2.1
  - add ipa-client-automount to freeipa-client, and patch it so it
    works on Debian/Ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  Authors:
2
 
 *    Petr Vobornik <pvoborni@redhat.com>
3
 
 *
4
 
 * Copyright (C) 2013 Red Hat
5
 
 * see file 'COPYING' for use and warranty information
6
 
 *
7
 
 * This program is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation, either version 3 of the License, or
10
 
 * (at your option) any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 
*/
20
 
 
21
 
define(['dojo/_base/lang', './Provider', './Search_provider'],
22
 
       function(lang, Provider, Search_provider) {
23
 
 
24
 
    var metadata = new Provider({
25
 
        code: '@m:'
26
 
    });
27
 
    var objects = new Provider({
28
 
        code: '@mo:',
29
 
        source: metadata,
30
 
        path: 'objects'
31
 
    });
32
 
    var commmads = new Provider({
33
 
        code: '@mc:',
34
 
        source: metadata,
35
 
        path: 'commmads'
36
 
    });
37
 
    var object_param = new Search_provider({
38
 
        code: '@mo-param:',
39
 
        source: metadata,
40
 
        path: 'objects',
41
 
        base_query: '%1.takes_params',
42
 
        array_attr: 'name'
43
 
    });
44
 
    var cmd_arg = new Search_provider({
45
 
        code: '@mc-arg:',
46
 
        source: metadata,
47
 
        path: 'commands',
48
 
        base_query: '%1.takes_args',
49
 
        array_attr: 'name'
50
 
    });
51
 
    var cmd_option = new Search_provider({
52
 
        code: '@mc-opt:',
53
 
        source: metadata,
54
 
        path: 'commands',
55
 
        base_query: '%1.takes_options',
56
 
        array_attr: 'name'
57
 
    });
58
 
 
59
 
    metadata.providers.push(objects, commmads, object_param, cmd_arg, cmd_option);
60
 
 
61
 
    return metadata;
62
 
});
 
 
b'\\ No newline at end of file'