Проблем с конфигурацията на Jira Gadget в Confluence

Имам притурка Jira, за която написах, че бих искал да се използва от confluence. Имам Jira и Confluence, работещи локално на моята машина. Моята притурка е инсталирана на моя екземпляр на jira и имам и двата екземпляра, свързани с пълно доверие като връзки към приложения. Инсталирах моята притурка в сливане в раздела Външни приспособления в Админ. След това създадох проста страница и добавих притурката си чрез макрос за избор. Когато щракна върху моята притурка, имам проблеми с показването на моя екран за конфигурация. Изглежда, че липсва моят i18n ресурс, защото виждам това за етикет gadget.common.project.label. Също така iframe не се разширява, за да съдържа всичките ми конфигурации.

Ето как изглежда моята притурка в сливане:

въведете описание на изображението тук

Ето главния раздел на моите приспособления gadget.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="__MSG_gadget.title__" 
             directory_title="__MSG_gadget.title__"
             description="__MSG_gadget.description__"
             author="__MSG_gadget.author__"
             thumbnail='#staticResourceUrl("TechnicalDebtTracker:TechnicalDebtTracker-resources", "thumbnail.png")'>
    <Optional feature="gadget-directory">
        <Param name="categories">
            . JIRA
        </Param>
    </Optional>
    <Optional feature="atlassian.util"/>
    <Optional feature="auth-refresh"/>
    <Require feature="setprefs" />
    <Require feature="dynamic-height"/>
    <Require feature="settitle"/>
    <Require feature="views"/>
    <Require feature="oauthpopup"/>
    #oauth
    #supportedLocales("gadget.common,gadget.user.activity")
    <Locale messages="__ATLASSIAN_BASE_URL__/download/resources/TechnicalDebtTracker/i18n/ALL_ALL.xml"/>
</ModulePrefs>
<UserPref name="isConfigured" datatype="hidden" default_value="false" />
<UserPref name="project" datatype="hidden" required="true" />
<UserPref name="methodology_type" datatype="hidden" required="true" default_value="scrum" />
<UserPref name="warning_threshold" datatype="hidden" required="true" default_value="10" />
<UserPref name="critical_threshold" datatype="hidden" required="true" default_value="20" />
<UserPref name="paid_down_period" datatype="hidden" required="true" default_value="90" />
<UserPref name="normal_color" datatype="hidden" required="true" default_value="#61F553" />
<UserPref name="warning_color" datatype="hidden" required="true" default_value="#FFFA66" />
<UserPref name="critical_color" datatype="hidden" required="true" default_value="#FF7A66" />
<UserPref name="refresh" datatype="hidden" default_value="false" />
<Content type="html">
    <![CDATA[
        #requireResource("com.atlassian.gadgets.publisher:ajs-gadgets")
        #requireResource("com.atlassian.jira.gadgets:g-filter-results")
        #requireResource("TechnicalDebtTracker:TechnicalDebtTracker-resources")
        #includeResources()

(function () 
        {       
        var gadget = AJS.Gadget({
            baseUrl: "__ATLASSIAN_BASE_URL__",
            useOauth: "/rest/gadget/1.0/currentUser",
            config: {
                descriptor: function(args) {
                    var gadget = this;

                    var projectPicker = AJS.gadget.fields.projectPicker(gadget, "project", args.projectOptions);
                    return {
                        fields: [
                            projectPicker,
                            {
                                id: "methodology_type-id",
                                userpref: "methodology_type",
                                label: "__MSG_gadget.config.SetMethodology__",
                                description: "",
                                type: "select",
                                selected: gadget.getPref("methodology_type"),
                                options: [
                                            {
                                                label:"Scrum",
                                                value:"scrum"
                                            },
                                            {
                                                label:"Kanban",
                                                value:"kanban"
                                            }
                                         ]
                            },
                            {
                                id: "warning_threshold-id",
                                userpref: "warning_threshold",
                                label: "__MSG_gadget.config.SetWarning__",
                                description: "__MSG_gadget.config.InStoryPoints__",
                                type: "text",
                                value: gadget.getPref("warning_threshold")
                            },
                            {
                                id: "critical_threshold-id",
                                userpref: "critical_threshold",
                                label: "__MSG_gadget.config.SetCritical__",
                                description: "__MSG_gadget.config.InStoryPoints__",
                                type: "text",
                                value: gadget.getPref("critical_threshold")
                            },
                            {
                                id: "paid_down_period-id",
                                userpref: "paid_down_period",
                                label: "__MSG_gadget.config.SetPaidDownPeriod__",
                                description: "__MSG_gadget.config.InDays__",
                                type: "text",
                                value: gadget.getPref("paid_down_period")
                            },
                            {
                                id: "normal_color-id",
                                userpref: "normal_color",
                                label: "__MSG_gadget.config.SetNormalColor__",
                                description: "__MSG_gadget.config.HexCode__",
                                type: "text",
                                value: gadget.getPref("normal_color")
                            },
                            {
                                id: "warning_color-id",
                                userpref: "warning_color",
                                label: "__MSG_gadget.config.SetWarningColor__",
                                description: "__MSG_gadget.config.HexCode__",
                                type: "text",
                                value: gadget.getPref("warning_color")
                            },
                            {
                                id: "critical_color-id",
                                userpref: "critical_color",
                                label: "__MSG_gadget.config.SetCriticalColor__",
                                description: "__MSG_gadget.config.HexCode__",
                                type: "text",
                                value: gadget.getPref("critical_color")
                            },
                            AJS.gadget.fields.nowConfigured()
                        ]
                    };
                },
                args: function()
                {
                    return [
                        {
                            key: "projectOptions",
                            ajaxOptions:  "/rest/gadget/1.0/filtersAndProjects?showFilters=false"
                        },
                    ];
                }()
            },

person Tyler Wright    schedule 22.04.2013    source източник
comment
Не мога да видя как изглежда притурката в сливане, мисля, че може случайно да сте пропуснали връзка.   -  person MNRSullivan    schedule 24.04.2013
comment
i.stack.imgur.com/pZw8w.png   -  person Tyler Wright    schedule 24.04.2013


Отговори (1)


Вижте моя "projectPicker". Мисля, че може да е полезно:

AJS.$.extend(true, {}, AJS.gadget.fields.projectPicker(gadget, "project", args.projectOptions),
    {description: "select a project", 
     label: "Project"}
)

Там можете да добавите вашите съобщения по следния начин:

AJS.$.extend(true, {}, AJS.gadget.fields.projectPicker(gadget, "project", args.projectOptions),
    {description: "__MSG_gadget.common.project.label__", 
     label: "__MSG_gadget.common.project.description__"}
) 
person Roman Bubyakin    schedule 07.05.2013