Hmmm, I already sent you all my code, not sure why it didn't show up on
the list.  I'll send it directly to you...


On 11/10/2017 04:22 PM, Peter wrote:
> I can probably send you a sample. Got any code you can share? Using
> any particular JS framework?
>
>
> On 11/10/2017 01:01 PM, Mark Reynolds wrote:
>> Hi Peter,
>>
>> Thanks for responding!  So basically what I'm trying to do is load my
>> own navigation bar (right now its just a row of buttons which is fine),
>> clicking on "Servers" should load the servers.html page into the
>> iframe(mainFrame).  That's what I want to happen at least :-)   I
>> actually copied the current design from cockpit's own systemd Services
>> package.
>>
>> Ultimately I just want a navigation bar, and then when I click on the
>> item it fills in the body with a new html page/content.  I will be
>> heavily using JS to build trees, and other fun stuff for each "area':
>> Servers, Replication, Backends, etc.  So I need to figure out how to
>> correctly use javascript with cockpit regardless of how I do the main
>> page.
>>
>> Thanks again!!
>>
>> Mark
>>
>>
>>
>>
>> On 11/10/2017 03:45 PM, Peter wrote:
>>> Javascript and CSS need to be in a separate files, and your html
>>> shouldn't have javascript functions embeded in it.
>>>
>>> If you show me some code I could probably help better with debugging,
>>> but chances are it is something like needing to setup onclicks in a
>>> onload function rather than adding it right into the html.
>>>
>>> If you want to disable CSP while developing you can add something like
>>> this to your manifest.
>>>
>>> https://github.com/cockpit-project/cockpit/blob/master/examples/pinger/manifest.json#L11
>>>
>>>
>>>
>>> Generally for anything you ship, you'll want to keep to the default
>>> CSP rules.
>>>
>>> On 11/10/2017 11:51 AM, Mark Reynolds wrote:
>>>> Hello,
>>>>
>>>> I'm evaluating cockpit to be a potential UI replacement for our
>>>> database
>>>> server (389 directory server).  I am also not an experienced web
>>>> developer, but regardless I'm going to be writing our new UI.
>>>>
>>>> I've created a sample package(manifest.json file, html files, etc)
>>>> and I
>>>> put it all under ~/.local/share/cockpit/test/
>>>>
>>>> I see my new menu item, and it loads my html page.  But I can not
>>>> get my
>>>> custom javascript working on my project page:
>>>>
>>>> Content Security Policy: The page’s settings blocked the loading of a
>>>> resource at self (“default-src http://localhost:9090
>>>> http://localhost:9090”). Source: onclick attribute on BUTTON element.
>>>>
>>>>
>>>> I tried putting my javascript in a separate file, and embedding it in
>>>> the html page, etc.  None it works and it's the CSP that "appears"
>>>> to be
>>>> blocking me every time.
>>>>
>>>> What is the correct way to get my javascript functions working in my
>>>> package?
>>>>
>>>> Thanks,
>>>>
>>>> Mark
>>>> _______________________________________________
>>>> cockpit-devel mailing list -- [email protected]
>>>> To unsubscribe send an email to
>>>> [email protected]
>>>>
>>> _______________________________________________
>>> cockpit-devel mailing list -- [email protected]
>>> To unsubscribe send an email to
>>> [email protected]
>>
> _______________________________________________
> cockpit-devel mailing list -- [email protected]
> To unsubscribe send an email to
> [email protected]
_______________________________________________
cockpit-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to