admin on rest Can't ReferenceArrayInput and SelectArrayInput to work - admin-on-rest

I wish to insert multiple customers to a booking using ReferenceArrayInput but when I use it the Create page won't render at all.
in bookings.js:
export const BookingCreate = (props) => (
<Create {...props}>
<SimpleForm>
<ReferenceInput label="Customer" source="customer_id" reference="customers" allowEmpty>
<SelectInput optionText="customer_name" />
</ReferenceInput>
<ReferenceArrayInput source="customer_ids" reference="customers">
<SelectArrayInput optionText="customer_name" />
</ReferenceArrayInput>
</SimpleForm>
</Create>
);
I am very new to react and javascript and apis. I suspect that I may have written incorrect/missing apis. ReferenceInput works fine so I am quite confused.
If someone could please explain to me what api is being called for ReferenceArrayInput and how I should handle it and provide an example of what should the response contain I would be very thankful. I've already gone through the documentation but I still cannot understand it.
This is the error I got from the web console when trying to access the Create page:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of `BookingCreate`. bundle.js:1090:15
invariant http://localhost:3000/static/js/bundle.js:1090:15
instantiateReactComponent http://localhost:3000/static/js/bundle.js:41629:23
performInitialMount http://localhost:3000/static/js/bundle.js:99988:17
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104483:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101351:27
mountComponent http://localhost:3000/static/js/bundle.js:101170:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104483:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101351:27
mountComponent http://localhost:3000/static/js/bundle.js:101170:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104483:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101351:27
mountComponent http://localhost:3000/static/js/bundle.js:101170:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104483:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101351:27
mountComponent http://localhost:3000/static/js/bundle.js:101170:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104483:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101351:27
mountComponent http://localhost:3000/static/js/bundle.js:101170:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104483:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101351:27
mountComponent http://localhost:3000/static/js/bundle.js:101170:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99992:18
mountComponent http://localhost:3000/static/js/bundle.js:99879:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100386:24
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100375:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100375:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100375:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100375:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100375:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100375:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100375:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100345:5
updateComponent http://localhost:3000/static/js/bundle.js:100266:7
receiveComponent http://localhost:3000/static/js/bundle.js:100168:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99525:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104453:11
_updateChildren http://localhost:3000/static/js/bundle.js:104557:26
updateChildren http://localhost:3000/static/js/bundle.js:104544:7
_updateDOMChildren http://localhost:3000/static/js/bundle.js:101590:7
updateComponent http://localhost:3000/static/js/bundle.js:101408:5
receiveComponent http://localhost:3000/static/js/bundle.js:101370:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99525:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104453:11
_updateChildren http://localhost:3000/static/js/bundle.js:104557:26
updateChildren http://localhost:3000/static/js/bundle.js:104544:7
_updateDOMChildren http://localhost:3000/static/js/bundle.js:101590:7
updateComponent http://localhost:3000/static/js/bundle.js:101408:5
receiveComponent http://localhost:3000/static/js/bundle.js:101370:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99525:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104453:11
_updateChildren http://localhost:3000/static/js/bundle.js:104557:26
updateChildren http://localhost:3000/static/js/bundle.js:104544:7
_updateDOMChildren http://localhost:3000/static/js/bundle.js:101590:7
updateComponent http://localhost:3000/static/js/bundle.js:101408:5
receiveComponent http://localhost:3000/static/js/bundle.js:101370:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99525:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104453:11
Trying to get ReferenceArrayInput to work I then went on to try to get SelectArrayInput to work but when I tried it it gave the same issue of causing the Create page to not render.
From my testing/possibly misguided understanding, I am under the impression that for SelectArrayInput to display on my Create page I would not even have to have any apis or variables written for it yet and that would only become an issue after the api call has been made with input from SelectArrayInput.
using bookings.js as example:
export const BookingCreate = (props) => (
<Create {...props}>
<SimpleForm>
<SelectArrayInput source="categories" choices={[
{ id: 'music', name: 'Music' },
{ id: 'photography', name: 'Photo' },
{ id: 'programming', name: 'Code' },
{ id: 'tech', name: 'Technology' },
{ id: 'sport', name: 'Sport' },
]} />
<SelectInput source="category" choices={[
{ id: 'programming', name: 'Programming' },
{ id: 'lifestyle', name: 'Lifestyle' },
{ id: 'photography', name: 'Photography' },
]} />
</SimpleForm>
</Create>
);
I got the same error for SelectArrayInput in the web console as well:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of `BookingCreate`. bundle.js:1090:15
invariant http://localhost:3000/static/js/bundle.js:1090:15
instantiateReactComponent http://localhost:3000/static/js/bundle.js:41629:23
performInitialMount http://localhost:3000/static/js/bundle.js:99985:17
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104480:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101348:27
mountComponent http://localhost:3000/static/js/bundle.js:101167:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104480:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101348:27
mountComponent http://localhost:3000/static/js/bundle.js:101167:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104480:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101348:27
mountComponent http://localhost:3000/static/js/bundle.js:101167:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104480:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101348:27
mountComponent http://localhost:3000/static/js/bundle.js:101167:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104480:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101348:27
mountComponent http://localhost:3000/static/js/bundle.js:101167:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
mountChildren http://localhost:3000/static/js/bundle.js:104480:28
_createInitialChildren http://localhost:3000/static/js/bundle.js:101348:27
mountComponent http://localhost:3000/static/js/bundle.js:101167:7
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
performInitialMount http://localhost:3000/static/js/bundle.js:99989:18
mountComponent http://localhost:3000/static/js/bundle.js:99876:16
mountComponent http://localhost:3000/static/js/bundle.js:12123:18
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100383:24
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100372:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100372:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100372:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100372:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100372:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100372:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
_updateRenderedComponent http://localhost:3000/static/js/bundle.js:100372:7
_performComponentUpdate http://localhost:3000/static/js/bundle.js:100342:5
updateComponent http://localhost:3000/static/js/bundle.js:100263:7
receiveComponent http://localhost:3000/static/js/bundle.js:100165:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99522:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104450:11
_updateChildren http://localhost:3000/static/js/bundle.js:104554:26
updateChildren http://localhost:3000/static/js/bundle.js:104541:7
_updateDOMChildren http://localhost:3000/static/js/bundle.js:101587:7
updateComponent http://localhost:3000/static/js/bundle.js:101405:5
receiveComponent http://localhost:3000/static/js/bundle.js:101367:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99522:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104450:11
_updateChildren http://localhost:3000/static/js/bundle.js:104554:26
updateChildren http://localhost:3000/static/js/bundle.js:104541:7
_updateDOMChildren http://localhost:3000/static/js/bundle.js:101587:7
updateComponent http://localhost:3000/static/js/bundle.js:101405:5
receiveComponent http://localhost:3000/static/js/bundle.js:101367:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99522:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104450:11
_updateChildren http://localhost:3000/static/js/bundle.js:104554:26
updateChildren http://localhost:3000/static/js/bundle.js:104541:7
_updateDOMChildren http://localhost:3000/static/js/bundle.js:101587:7
updateComponent http://localhost:3000/static/js/bundle.js:101405:5
receiveComponent http://localhost:3000/static/js/bundle.js:101367:5
receiveComponent http://localhost:3000/static/js/bundle.js:12202:5
updateChildren http://localhost:3000/static/js/bundle.js:99522:9
_reconcilerUpdateChildren http://localhost:3000/static/js/bundle.js:104450:11
SelectInput works just fine. Why?
I really appreciate any help. This has been troubling me for days.

customer_name must be in each customer in response
<ReferenceInput label="Customer" source="customer_id" reference="customers" allowEmpty>
<SelectInput optionText="customer_name" />
</ReferenceInput>
i know that it's simple but for me much clearly if i can say how it should works. it's literally mean: "i try write customer_id to my object. for begin go to server to customers and get records. when i choose one of them to SelectInput write customer_name"
<ReferenceArrayInput source="customer_ids" reference="customers">
<SelectArrayInput optionText="customer_name" />
</ReferenceArrayInput>
"i try write customer_ids to my object. for begin go to server to customers and get records. when i choose one of them to SelectInput write customer_name"
once again, sorry for the obvious things.
if your problem is still actual now, please, write one json object customer

Related

Why does outlook cut off some images for the email templates made with mjml?

So I have made the following templates with mjml. And for some strange reason the app links button images are not getting full height.Also, same happening for the social links icon images too. For both set of images I tried wrapping the icon images inside anchor tag, and then giving explicit height to both images and anchor element but still no luck.
<mjml>
<mj-head>
<mj-font name="Questrial" href="https://fonts.googleapis.com/css2?family=Questrial&display=swap" />
<mj-attributes>
<mj-text font-family="Questrial, sans-serif" font-size="16px" color="#353b48" padding="0px" line-height="24px" />
<mj-section padding="0px" />
<mj-image padding="0px" />
<mj-button background-color="#75bac4" font-size="15px" color="#ffffff" font-family="Inter, sans-serif" text-transform="uppercase" border-radius="50px" font-weight="500" />
</mj-attributes>
<mj-style>
#font-face {
font-family: "Malina";
src: local('Malina1'), url("fonts/Malina1.woff2") format("woff2"),
url("fonts/Malina1.woff") format("woff"),
url("fonts/Malina1.ttf") format("truetype"),
url("fonts/Malina1.otf") format("opentype")
}
</mj-style>
</mj-head>
<mj-body width="600px" background-color="#fff">
<!-- 01:logo -->
<mj-section border-top="1px solid #e6e6e6" border-left=" 1px solid #e6e6e6" border-right="1px solid #e6e6e6" padding-top="30px">
<mj-column width="100%">
<mj-image width="540px" src="https://i.imgur.com/y5pjEGu.png" alt="logo" />
</mj-column>
</mj-section>
<!-- middle section 02 -->
<mj-section padding="48px 30px 0px" border-left="1px solid #e6e6e6" border-right="1px solid #e6e6e6">
<mj-column width="100%">
<mj-text align="left" color="#141414">
Hi Jenny,
</mj-text>
<mj-spacer height="8px" />
<mj-text>
Welcome to FreshFeelz
<br><br>
Are you ready to Feel Fresh & start saving $$$ with our Beauty, Health & Wellness Platform?
<br><br>
Our mission is to provide the convenience of being able to search
& shop for all your Health, Beauty & Wellness needs with just a few clicks
at affordable prices.
</mj-text>
<mj-spacer height="60px" />
</mj-column>
</mj-section>
<!-- how it works -->
<mj-section padding="0px 30px 0px 30px" border-left="1px solid #e6e6e6" border-right="1px solid #e6e6e6">
<mj-column width="100%">
<mj-text align="center" font-size="21px" line-height="24px">
FreshFeelz works in 3 simple steps
</mj-text>
<mj-spacer height="30px" />
</mj-column>
</mj-section>
<!-- 3 column features -->
<mj-section border-left="1px solid #e6e6e6" border-right="1px solid #e6e6e6">
<!-- step 1 -->
<mj-column width="160px" vertical-align="top" padding="15px 0">
<mj-image src="https://i.imgur.com/PZYQJcT.png" height="50px" width="50px" />
<mj-spacer height="10px" />
<mj-text font-size='12px' line-height="24px" letter-spacing="2.4px" align="center">
STEP 1
</mj-text>
<mj-spacer height="10px" />
<mj-text align="center">
Find a deal or product
</mj-text>
</mj-column>
<mj-column width="40px" vertical-align="top" padding="15px 0">
<mj-image src="https://i.imgur.com/wnzirMx.png" height="40px" width="40px" />
</mj-column>
<!-- step 2 -->
<mj-column width="160px" vertical-align="top" padding="15px 0">
<mj-image src="https://i.imgur.com/PZYQJcT.png" height="50px" width="50px" />
<mj-spacer height="10px" />
<mj-text font-size='12px' line-height="24px" letter-spacing="2.4px" align="center">
STEP 2
</mj-text>
<mj-spacer height="10px" />
<mj-text align="center">
Select your payment method. We also offer
</mj-text>
<mj-spacer height="10px" />
<mj-image src="https://i.imgur.com/tpQdjo8.png" width="121px" height="25px" />
</mj-column>
<mj-column width="40px" vertical-align="top" padding="15px 0">
<mj-image src="https://i.imgur.com/wnzirMx.png" height="40px" width="40px" />
</mj-column>
<!-- step 3 -->
<mj-column width="160px" vertical-align="top" padding="15px 0">
<mj-image src="https://i.imgur.com/PZYQJcT.png" height="50px" width="50px" />
<mj-spacer height="10px" />
<mj-text font-size='12px' line-height="24px" letter-spacing="2.4px" align="center">
STEP 3
</mj-text>
<mj-spacer height="10px" />
<mj-text align="center">
Get in touch with the business to redeem your deal or enter delivery details.
</mj-text>
<mj-spacer height="60px" />
</mj-column>
</mj-section>
<!-- login details -->
<mj-wrapper padding="0px 30px 60px 30px" border-left="1px solid #e6e6e6" border-right="1px solid #e6e6e6">
<mj-section background-color="#eaeee2" padding="25px 0px">
<mj-column width="38%" vertical-align="middle">
<mj-text align="left" font-size="21px" line-height="30px" letter-spacing="2.1px">
LOGIN DETAILS
</mj-text>
</mj-column>
<mj-column width="50%" vertical-align="middle">
<mj-text>
Email: as13#xenex-media.com.au
<br>
</mj-text>
<mj-text>
Password: #xenex1234
</mj-text>
</mj-column>
</mj-section>
</mj-wrapper>
<!-- Get Rewarded -->
<mj-section padding="0px 0px 0px 30px" border-left="1px solid #e6e6e6" border-right="1px solid #e6e6e6">
<mj-column width="51%" vertical-align="middle">
<mj-text font-family="Malina" font-size="40px" line-height="36px" color="#141414">
Get Rewarded
</mj-text>
<mj-spacer height="20px" />
<mj-text>
When a new user registers using your code they will receive $5 credit to use on their first purchase.
</mj-text>
<mj-spacer height="20px" />
<mj-text font-size="21px" line-height="24px" color="#141414" align="center">
<div style="max-width:255px;background-image:url('https://i.imgur.com/aXq47yg.png');background-size: cover;background-position: center;border-radius: 10px;padding:15px 0px;">
You will earn $1
<p style="font-family='Questrial';font-size:16px;line-height:24px;margin:0;">everytime they purchase.</p>
</div>
</mj-text>
<mj-spacer height="20px" />
<mj-text>
<p style="margin:0px 0px 10px 0px;">The more people you tell the more you earn!</p>
<div class="spacer" style="margin-bottom:16px;border-bottom:1px solid #353b48;line-height:6px;height:6px;mso-line-height-rule:exactly;">
</div>
</mj-text>
<mj-text>
<span style="font-family:Questrial;color:#141414;">Referral Code:</span> FFAJV1
</mj-text>
</mj-column>
<mj-column width="49%" vertical-align="middle" padding-top="30px">
<mj-image src="https://i.imgur.com/zaas7HS.png" width="300px" />
</mj-column>
</mj-section>
<!-- introductory offer -->
<mj-section border-left="1px solid #e6e6e6" border-right="1px solid #e6e6e6" padding="60px 30px">
<mj-column width="100%">
<mj-image src="https://i.imgur.com/aSyFabQ.png" width="60px" height="60px" />
<mj-spacer height="10px" />
<mj-text align="center" font-size="36px" line-height="36px" color="#141414">
Introductory Offer
</mj-text>
<mj-spacer height="20px" />
<mj-text align="center" font-size="18px" line-height="30px">
Reply to this email with “I’m feeling Fresh” to receive
$10 credits towards your first purchase.
</mj-text>
</mj-column>
</mj-section>
<!-- download the app -->
<mj-section padding="0px 0px 60px 0px" border-left="1px solid #e6e6e6" border-right="1px solid #e6e6e6">
<mj-column width="255px" vertical-align="middle" padding="0px 15px 0px 0px ">
<mj-image src="https://i.imgur.com/nvgV3kv.png" width="255px" />
</mj-column>
<mj-column width="263px" vertical-align="middle" padding="15px">
<mj-text font-size="18px" line-height="30px">
Stay up-to-date with your
FreshFeelz bookings
</mj-text>
<mj-spacer height="10px" />
<mj-text>
Our app lets you discover new deals,
make bookings and earn rewards.
</mj-text>
<mj-spacer height="20px" />
<mj-text align="left">
<!-- appstore -->
<img src="https://i.imgur.com/xVnQerH.png" width="115" style="height:35px" height="35" />
<!-- google play -->
<img src="https://i.imgur.com/Zk4J2eA.png" width="105" height="35" style="height:35px;" />
</mj-text>
</mj-column>
</mj-section>
<!-- 03:footer Main -->
<mj-section padding="30px 15px" background-color="#ebe5d6">
<mj-column width="75%" vertical-align="middle">
<mj-text>
<a href="#" style="margin:0 10px;text-decoration: none;display:inline-block;color:#353b48">
Help Center
</a>
<a href="#" style="margin:0 10px;text-decoration: none;display:inline-block;color:#353b48">
Privacy Policy
</a>
<a href="#" style="margin:0 10px;text-decoration: none;display:inline-block;color:#353b48">
Terms & Conditions
</a>
</mj-text>
</mj-column>
<mj-column width="25%" vertical-align="middle">
<mj-text>
<img src="https://i.imgur.com/ssftYug.png" width="32" height="32" style="height:32px;" />
<img src="https://i.imgur.com/vRERJBi.png" width="36" height="36" style="height:36px;" />
<img src="https://i.imgur.com/Eu54USu.png" width="41" height="41" style="vertical-align:text-bottom;height:41px;" />
</mj-text>
</mj-column>
</mj-section>
<!-- footer Secondary -->
<mj-section background-color="#92a294" padding="18px 0">
<mj-column width="100%">
<mj-text align="center" color="#fff">
<a href="#" style="text-decoration: none;display:inline-block;color:#fff;">
hello#freshfeelz.com.au</a> |
<a href="#" style="text-decoration: none;display:inline-block;color:#fff;">
www.freshfeelz.com.au</a> </a>
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
That usually happens when you have a line height set at the parent level. In your case you have a line height (after the code is compiled) at the div level. It seems <mj-text> puts in a line height of 16px by default.
As a walkaround you can add a line-height attribute at mj-text element as below:
<mj-text line-height="32px">
<img src="https://i.imgur.com/ssftYug.png" width="32" height="32" style="height:32px;" />
<img src="https://i.imgur.com/vRERJBi.png" width="36" height="36" style="height:36px;" />
<img src="https://i.imgur.com/Eu54USu.png" width="41" height="41" style="vertical-align:text-bottom;height:41px;" />
</mj-text>
You can also use line-height="auto" but the live code editor throws an error even though the code output works fine.

How to access runtime queueLength parameter from c++ code in omnet++?

I need to assign cost of OSPF according to queueLength of routers. So how to access this statistic form C++ code? This statistic has defined in PacketQueue.ned that is used in ppp in router. According to OMNeT++ manual documentation I should use
cPar& queueLengthPar = par("queueLength");
but I don't know is this true?
The code that OSPF uses for cost calculation in OspfConfigReader.cc in inet framework is :
Ospfv2Interface *intf = new Ospfv2Interface;
Metric cost = getIntAttrOrPar(ifConfig, "interfaceOutputCost");
if(cost == 0)
intf->setOutputCost(round(par("referenceBandwidth").intValue() / ie.getDatarate()));
else
intf->setOutputCost(cost);
I should modify the code according to queueLength statistic like this:
Ospfv2Interface *intf = new Ospfv2Interface;
Metric cost = getIntAttrOrPar(ifConfig, "interfaceOutputCost");
if(cost == 0)
intf->setOutputCost(par("queueLength"));
else
intf->setOutputCost(cost);
but the error is unknown parameter "queueLength". Where should i a should add this statistic correctly?
`myNet.ned file is:
package secondproject.simulations;
import inet.common.misc.ThruputMeteringChannel;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.networklayer.ipv4.Ipv4RoutingTable;
import inet.networklayer.ipv4.RoutingTableRecorder;
import inet.node.inet.StandardHost;
import inet.node.ospfv2.OspfRouter;
import inet.visualizer.integrated.IntegratedVisualizer;
import inet.visualizer.linklayer.InterfaceTableVisualizer;
network myNet
{
parameters:
#display("p=10,10;b=712,152;bgb=1051.64,508.58002");
types:
channel C extends ThruputMeteringChannel
{
datarate = 10Gbps;
delay = 1ns;
thruputDisplayFormat = "#N";
}
channel Channel extends ThruputMeteringChannel
{
datarate = 10Gbps;
delay = 1ns;
thruputDisplayFormat = "#N";
}
submodules:
rtr: RoutingTableRecorder {
parameters:
#display("p=40.945,475.1775;is=s");
}
H1: StandardHost {
parameters:
#display("p=107.75,31.2475");
gates:
ethg[1];
}
R1: OspfRouter {
parameters:
#display("p=248.9025,103.44");
gates:
ethg[3];
}
R2: OspfRouter {
parameters:
#display("p=466.5575,103.44");
gates:
ethg[4];
}
R3: OspfRouter {
parameters:
#display("p=668.05,103.44");
gates:
ethg[4];
}
R4: OspfRouter {
parameters:
#display("p=886.78253,103.44");
gates:
ethg[3];
}
H4: StandardHost {
parameters:
#display("p=1029.0125,22.6275");
gates:
ethg[1];
}
R5 OspfRouter {
parameters:
#display("p=248.9025,187.485");
gates:
ethg[4];
}
R6: OspfRouter {
parameters:
#display("p=466.5575,191.795");
gates:
ethg[4];
}
R7: OspfRouter {
parameters:
#display("p=668.05,187.485");
gates:
ethg[4];
}
R8: OspfRouter {
parameters:
#display("p=886.78253,187.485");
gates:
ethg[4];
}
R9: OspfRouter {
parameters:
#display("p=248.9025,277.995");
gates:
ethg[4];
}
R10: OspfRouter {
parameters:
#display("p=466.5575,277.995");
gates:
ethg[4];
}
R11: OspfRouter {
parameters:
#display("p=668.05,277.995");
gates:
ethg[4];
}
R12: OspfRouter {
parameters:
#display("p=886.78253,277.995");
gates:
ethg[4];
}
R13: OspfRouter {
parameters:
#display("p=248.9025,372.815");
gates:
ethg[3];
}
R14: OspfRouter {
parameters:
#display("p=466.5575,372.815");
gates:
ethg[4];
}
R15: OspfRouter {
parameters:
#display("p=668.05,372.815");
gates:
ethg[4];
}
R16: OspfRouter {
parameters:
#display("p=886.78253,372.815");
gates:
ethg[3];
}
H9: StandardHost {
parameters:
#display("p=82.9675,277.995");
gates:
ethg[1];
}
H13: StandardHost {
parameters:
#display("p=159.47,466.5575");
gates:
ethg[1];
}
H2: StandardHost {
parameters:
#display("p=466.5575,22.6275");
gates:
ethg[1];
}
H12: StandardHost {
parameters:
#display("p=1027.935,277.995");
gates:
ethg[1];
}
H16: StandardHost {
parameters:
#display("p=1027.935,483.79752");
gates:
ethg[1];
}
H15: StandardHost {
parameters:
#display("p=668.05,461.17");
gates:
ethg[1];
}
H14: StandardHost {
parameters:
#display("p=466.5575,461.17");
gates:
ethg[1];
}
H3: StandardHost {
parameters:
#display("p=668.05,22.6275");
gates:
ethg[1];
}
H5: StandardHost {
parameters:
#display("p=82.9675,187.485");
gates:
ethg[1];
}
H8: StandardHost {
parameters:
#display("p=1027.935,187.485");
gates:
ethg[1];
}
configurator: Ipv4NetworkConfigurator {
parameters:
#display("p=40.945,103.44;is=s");
config = xml("<config>"
+ "<interface among='H1 R1' address='192.168.1.x' netmask='255.255.255.x' />"
+ "<interface among='H2 R2' address='192.168.2.x' netmask='255.255.255.x' />"
+ "<interface among='H3 R3' address='192.168.3.x' netmask='255.255.255.x' />"
+ "<interface among='H4 R4' address='192.168.4.x' netmask='255.255.255.x' />"
+ "<interface among='H5 R5' address='192.168.5.x' netmask='255.255.255.x' />"
+ "<interface among='H8 R8' address='192.168.8.x' netmask='255.255.255.x' />"
+ "<interface among='H9 R9' address='192.168.9.x' netmask='255.255.255.x' />"
+ "<interface among='H12 R12' address='192.168.12.x' netmask='255.255.255.x' />"
+ "<interface among='H13 R13' address='192.168.13.x' netmask='255.255.255.x' />"
+ "<interface among='H14 R14' address='192.168.14.x' netmask='255.255.255.x' />"
+ "<interface among='H15 R15' address='192.168.15.x' netmask='255.255.255.x' />"
+ "<interface among='H16 R16' address='192.168.16.x' netmask='255.255.255.x' />"
+ "<interface among='R*' address='10.0.0.x' netmask='255.255.255.x' />"
+ "<multicast-group hosts='R*' address='224.0.0.5 224.0.0.6' />"
+ "<route hosts='H1' destination='*' gateway='R1'/>"
+ "<route hosts='H2' destination='*' gateway='R2'/>"
+ "<route hosts='H3' destination='*' gateway='R3'/>"
+ "<route hosts='H4' destination='*' gateway='R4'/>"
+ "<route hosts='H5' destination='*' gateway='R5'/>"
+ "<route hosts='H8' destination='*' gateway='R8'/>"
+ "<route hosts='H9' destination='*' gateway='R9'/>"
+ "<route hosts='H12' destination='*' gateway='R12'/>"
+ "<route hosts='H13' destination='*' gateway='R13'/>"
+ "<route hosts='H14' destination='*' gateway='R14'/>"
+ "<route hosts='H15' destination='*' gateway='R15'/>"
+ "<route hosts='H16' destination='*' gateway='R16'/>"
+ "<route hosts='R*' destination='224.0.0.0' netmask='240.0.0.0' interface='eth0'/>"
+ "<route hosts='R*' destination='224.0.0.0' netmask='240.0.0.0' interface='eth1'/>"
+ "<route hosts='R*' destination='224.0.0.0' netmask='240.0.0.0' interface='eth2'/>"
+ "<route hosts='R2 R3 R5 R6 R7 R8 R9 R10 R11 R12 R14 R15' destination='224.0.0.0' netmask='240.0.0.0' interface='eth3'/>"
+ "</config>");
}
connections:
R1.ethg[0] <--> C <--> R2.ethg[0];
R1.ethg[1] <--> C <--> R5.ethg[0];
R1.ethg[2] <--> Channel <--> H1.ethg[0];
R2.ethg[1] <--> C <--> R3.ethg[0];
R2.ethg[2] <--> C <--> R6.ethg[0];
R2.ethg[3] <--> Channel <--> H2.ethg[0];
R3.ethg[1] <--> C <--> R4.ethg[0];
R3.ethg[2] <--> C <--> R7.ethg[0];
R3.ethg[3] <--> Channel <--> H3.ethg[0];
R4.ethg[1] <--> C <--> R8.ethg[0];
R4.ethg[2] <--> Channel <--> H4.ethg[0];
R5.ethg[1] <--> C <--> R6.ethg[1];
R5.ethg[2] <--> C <--> R9.ethg[0];
R5.ethg[3] <--> Channel <--> H5.ethg[0];
R6.ethg[2] <--> C <--> R7.ethg[1];
R6.ethg[3] <--> C <--> R10.ethg[0];
R7.ethg[2] <--> C <--> R8.ethg[1];
R7.ethg[3] <--> C <--> R11.ethg[0];
R8.ethg[2] <--> C <--> R12.ethg[0];
R8.ethg[3] <--> Channel <--> H8.ethg[0];
R9.ethg[1] <--> C <--> R10.ethg[1];
R9.ethg[2] <--> C <--> R13.ethg[0];
R9.ethg[3] <--> Channel <--> H9.ethg[0];
R10.ethg[2] <--> C <--> R11.ethg[1];
R10.ethg[3] <--> C <--> R14.ethg[0];
R11.ethg[2] <--> C <--> R12.ethg[1];
R11.ethg[3] <--> C <--> R15.ethg[0];
R12.ethg[2] <--> C <--> R16.ethg[0];
R12.ethg[3] <--> Channel <--> H12.ethg[0];
R13.ethg[1] <--> C <--> R14.ethg[1];
R13.ethg[2] <--> Channel <--> H13.ethg[0];
R14.ethg[2] <--> C <--> R15.ethg[1];
R14.ethg[3] <--> Channel <--> H14.ethg[0];
R15.ethg[2] <--> C <--> R16.ethg[1];
R15.ethg[3] <--> Channel <--> H15.ethg[0];
R16.ethg[2] <--> Channel <--> H16.ethg[0];
}
omnetpp.ini is:
[General]
network = myNet
eventlog-file = ${resultdir}/${configname}-${iterationvarsf}#${repetition}.elog
record-eventlog = true
sim-time-limit = 10s
**.ospf.ospfConfig = xmldoc("ASConfig.xml")
**.ospf.helloInterval = 1s
**.ospf.retransmissionInterval = 1s
**.H*.numApps = 2
**.app[0].typename = "UdpBasicApp"
**.app[0].destPort = 1234
**.app[0].messageLength = 1000 bytes
**.app[0].sendInterval = 1us
**.app[0].startTime = 2s
**.app[0].stopTime = this.startTime + 90s
**.H1.app[0].destAddresses = "H2 H3 H4 H5 H8 H9 H12 H13 H14 H15 H16"
**.H2.app[0].destAddresses = "H1 H3 H4 H5 H8 H9 H12 H13 H14 H15 H16"
**.H3.app[0].destAddresses = "H1 H2 H4 H5 H8 H9 H12 H13 H14 H15 H16"
**.H4.app[0].destAddresses = "H1 H2 H3 H5 H8 H9 H12 H13 H14 H15 H16"
**.H5.app[0].destAddresses = "H1 H2 H3 H4 H8 H9 H12 H13 H14 H15 H16"
**.H8.app[0].destAddresses = "H1 H2 H3 H4 H5 H9 H12 H13 H14 H15 H16"
**.H9.app[0].destAddresses = "H1 H2 H3 H4 H5 H8 H12 H13 H14 H15 H16"
**.H12.app[0].destAddresses = "H1 H2 H3 H4 H5 H8 H9 H13 H14 H15 H16"
**.H13.app[0].destAddresses = "H1 H2 H3 H4 H5 H8 H9 H12 H14 H15 H16"
**.H14.app[0].destAddresses = "H1 H2 H3 H4 H5 H8 H9 H12 H13 H15 H16"
**.H15.app[0].destAddresses = "H1 H2 H3 H4 H5 H8 H9 H12 H13 H14 H16"
**.H16.app[0].destAddresses = "H1 H2 H3 H4 H5 H8 H9 H12 H13 H14 H15"
**.app[1].typename = "UdpSink"
**.app[1].localPort = 1234
**.configurator.addStaticRoutes = false
**.configurator.addSubnetRoutes = false
**.configurator.addDefaultRoutes = false
**.configurator.dumpRoutes = true
my ASConfig.xml is:
<?xml version="1.0"?>
<OSPFASConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="OSPF.xsd">
<!-- Areas -->
<Area id="0.0.0.0">
<AddressRange address="R1>R2" mask="R1>R2" />
<AddressRange address="R1>R5" mask="R1>R5" />
<AddressRange address="R2>R1" mask="R2>R1" />
<AddressRange address="R2>R3" mask="R2>R3" />
<AddressRange address="R2>R6" mask="R2>R6" />
<AddressRange address="R3>R2" mask="R3>R2" />
<AddressRange address="R3>R4" mask="R3>R4" />
<AddressRange address="R3>R7" mask="R3>R7" />
<AddressRange address="R4>R3" mask="R4>R3" />
<AddressRange address="R4>R8" mask="R4>R8" />
<AddressRange address="R5>R1" mask="R5>R1" />
<AddressRange address="R5>R6" mask="R5>R6" />
<AddressRange address="R5>R9" mask="R5>R9" />
<AddressRange address="R6>R2" mask="R6>R2" />
<AddressRange address="R6>R5" mask="R6>R5" />
<AddressRange address="R6>R7" mask="R6>R7" />
<AddressRange address="R6>R10" mask="R6>R10" />
<AddressRange address="R7>R3" mask="R7>R3" />
<AddressRange address="R7>R6" mask="R7>R6" />
<AddressRange address="R7>R8" mask="R7>R8" />
<AddressRange address="R7>R11" mask="R7>R11" />
<AddressRange address="R8>R4" mask="R8>R4" />
<AddressRange address="R8>R7" mask="R8>R7" />
<AddressRange address="R8>R12" mask="R8>R12" />
<AddressRange address="R9>R5" mask="R9>R5" />
<AddressRange address="R9>R10" mask="R9>R10" />
<AddressRange address="R9>R13" mask="R9>R13" />
<AddressRange address="R10>R6" mask="R10>R6" />
<AddressRange address="R10>R9" mask="R10>R9" />
<AddressRange address="R10>R11" mask="R10>R11" />
<AddressRange address="R10>R14" mask="R10>R14" />
<AddressRange address="R11>R7" mask="R11>R7" />
<AddressRange address="R11>R10" mask="R11>R10" />
<AddressRange address="R11>R12" mask="R11>R12" />
<AddressRange address="R11>R15" mask="R11>R15" />
<AddressRange address="R12>R8" mask="R12>R8" />
<AddressRange address="R12>R11" mask="R12>R11" />
<AddressRange address="R12>R16" mask="R12>R16" />
<AddressRange address="R13>R9" mask="R13>R9" />
<AddressRange address="R13>R14" mask="R13>R14" />
<AddressRange address="R14>R10" mask="R14>R10" />
<AddressRange address="R14>R13" mask="R14>R13" />
<AddressRange address="R14>R15" mask="R14>R15" />
<AddressRange address="R15>R11" mask="R15>R11" />
<AddressRange address="R15>R14" mask="R15>R14" />
<AddressRange address="R15>R16" mask="R15>R16" />
<AddressRange address="R16>R12" mask="R16>R12" />
<AddressRange address="R16>R15" mask="R16>R15" />
</Area>
<Area id="0.0.0.1">
<AddressRange address="H1" mask="H1" />
</Area>
<Area id="0.0.0.2">
<AddressRange address="H2" mask="H2" />
</Area>
<Area id="0.0.0.3">
<AddressRange address="H3" mask="H3" />
</Area>
<Area id="0.0.0.4">
<AddressRange address="H4" mask="H4" />
</Area>
<Area id="0.0.0.5">
<AddressRange address="H5" mask="H5" />
</Area>
<Area id="0.0.0.8">
<AddressRange address="H8" mask="H8" />
</Area>
<Area id="0.0.0.9">
<AddressRange address="H9" mask="H9" />
</Area>
<Area id="0.0.0.12">
<AddressRange address="H12" mask="H12" />
</Area>
<Area id="0.0.0.13">
<AddressRange address="H13" mask="H13" />
</Area>
<Area id="0.0.0.14">
<AddressRange address="H14" mask="H14" />
</Area>
<Area id="0.0.0.15">
<AddressRange address="H15" mask="H15" />
</Area>
<Area id="0.0.0.16">
<AddressRange address="H16" mask="H16" />
</Area>
<!-- Routers -->
<Router name="R1" RFC1583Compatible="true">
<BroadcastInterface ifName="eth2" areaID="0.0.0.1" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
</Router>
<Router name="R2" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.2" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R3" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.3" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R4" RFC1583Compatible="true">
<BroadcastInterface ifName="eth2" areaID="0.0.0.4" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
</Router>
<Router name="R5" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.5" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R6" RFC1583Compatible="true">
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth3" areaID="0.0.0.0" />
</Router>
<Router name="R7" RFC1583Compatible="true">
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth3" areaID="0.0.0.0" />
</Router>
<Router name="R8" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.8" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R9" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.9" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R10" RFC1583Compatible="true">
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth3" areaID="0.0.0.0" />
</Router>
<Router name="R11" RFC1583Compatible="true">
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth3" areaID="0.0.0.0" />
</Router>
<Router name="R12" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.12" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R13" RFC1583Compatible="true">
<BroadcastInterface ifName="eth2" areaID="0.0.0.13" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
</Router>
<Router name="R14" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.14" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R15" RFC1583Compatible="true">
<BroadcastInterface ifName="eth3" areaID="0.0.0.15" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth2" areaID="0.0.0.0" />
</Router>
<Router name="R16" RFC1583Compatible="true">
<BroadcastInterface ifName="eth2" areaID="0.0.0.16" />
<PointToPointInterface ifName="eth0" areaID="0.0.0.0" />
<PointToPointInterface ifName="eth1" areaID="0.0.0.0" />
</Router>
</OSPFASConfig>
To read the value of a parameter write:
int len = par("queueLength");

Can't find any node using Nokogiri

I have [Content_Types].xml file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
<Default Extension="xml" ContentType="application/xml"/>
<Default Extension="jpeg" ContentType="image/jpeg"/>
<Default Extension="png" ContentType="image/png"/>
<Default Extension="jpg" ContentType="image/jpeg"/>
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
<Override PartName="/customXml/itemProps1.xml" ContentType="application/vnd.openxmlformats-officedocument.customXmlProperties+xml"/>
<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>
<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>
<Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/>
<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>
<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>
<Override PartName="/word/header1.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"/>
<Override PartName="/word/footer1.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"/>
<Override PartName="/word/header2.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"/>
<Override PartName="/word/footer2.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"/>
<Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>
<Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>
<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
<Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
</Types>
I've loaded it using Nokogiri:
doc = File.open("[Content_Types].xml") { |f| Nokogiri::XML(f) }
I want to find the <Default Extension="png" ContentType="image/png"/> node but I can't find anything:
irb(main):048:0> doc.xpath('//Default')
=> []
irb(main):049:0> doc.xpath('//Override')
=> []
irb(main):050:0> doc.xpath('//Types')
=> []
irb(main):051:0> doc.xpath('Types')
=> []
Why?
The xml is loaded correctly:
irb(main):003:0> doc
=>
#<Nokogiri::XML::Document:0x3fcddd413ad0 name="document" children=[#<Nokogiri::XML::Element:0x3fcddd41347c name="Types" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> children=[#<Nokogiri::XML::Text:0x3fcddd412f18 "\n\n ">, #<Nokogiri::XML::Element:0x3fcddd412e14 name="Default" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd412d9c name="Extension" value="xml">, #<Nokogiri::XML::Attr:0x3fcddd412d88 name="ContentType" value="application/xml">]>, #<Nokogiri::XML::Text:0x3fcddd4126bc "\n ">, #<Nokogiri::XML::Element:0x3fcddd413558 name="Default" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd40ffac name="Extension" value="rels">, #<Nokogiri::XML::Attr:0x3fcddd40ff84 name="ContentType" value="application/vnd.openxmlformats-package.relationships+xml">]>, #<Nokogiri::XML::Text:0x3fcddd40ef08 "\n ">, #<Nokogiri::XML::Element:0x3fcddd40eddc name="Default" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd40ecec name="Extension" value="jpeg">, #<Nokogiri::XML::Attr:0x3fcddd40ecc4 name="ContentType" value="image/jpeg">]>, #<Nokogiri::XML::Text:0x3fcddd40bca4 "\n ">, #<Nokogiri::XML::Element:0x3fcddd40bb78 name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd40bac4 name="PartName" value="/word/document.xml">, #<Nokogiri::XML::Attr:0x3fcddd40ba88 name="ContentType" value="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">]>, #<Nokogiri::XML::Text:0x3fcddd40a8cc "\n ">, #<Nokogiri::XML::Element:0x3fcddd40a7f0 name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd40a778 name="PartName" value="/word/styles.xml">, #<Nokogiri::XML::Attr:0x3fcddd40a764 name="ContentType" value="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml">]>, #<Nokogiri::XML::Text:0x3fcddd099d00 "\n ">, #<Nokogiri::XML::Element:0x3fcddd099bc0 name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd099b34 name="PartName" value="/word/settings.xml">, #<Nokogiri::XML::Attr:0x3fcddd099b20 name="ContentType" value="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml">]>, #<Nokogiri::XML::Text:0x3fcddd098e8c "\n ">, #<Nokogiri::XML::Element:0x3fcddd098d60 name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd098cc0 name="PartName" value="/word/webSettings.xml">, #<Nokogiri::XML::Attr:0x3fcddd098cac name="ContentType" value="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml">]>, #<Nokogiri::XML::Text:0x3fcddd08ded8 "\n ">, #<Nokogiri::XML::Element:0x3fcddd08dd98 name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd08dce4 name="PartName" value="/word/fontTable.xml">, #<Nokogiri::XML::Attr:0x3fcddd08dca8 name="ContentType" value="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml">]>, #<Nokogiri::XML::Text:0x3fcddd08cdf8 "\n ">, #<Nokogiri::XML::Element:0x3fcddd08cd1c name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd08cc54 name="PartName" value="/word/theme/theme1.xml">, #<Nokogiri::XML::Attr:0x3fcddd08cc40 name="ContentType" value="application/vnd.openxmlformats-officedocument.theme+xml">]>, #<Nokogiri::XML::Text:0x3fcddd08c0d8 "\n ">, #<Nokogiri::XML::Element:0x3fcddd08c010 name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd089fa4 name="PartName" value="/docProps/core.xml">, #<Nokogiri::XML::Attr:0x3fcddd089f90 name="ContentType" value="application/vnd.openxmlformats-package.core-properties+xml">]>, #<Nokogiri::XML::Text:0x3fcddd089388 "\n ">, #<Nokogiri::XML::Element:0x3fcddd089248 name="Override" namespace=#<Nokogiri::XML::Namespace:0x3fcddd4133b4 href="http://schemas.openxmlformats.org/package/2006/content-types"> attributes=[#<Nokogiri::XML::Attr:0x3fcddd089144 name="PartName" value="/docProps/app.xml">, #<Nokogiri::XML::Attr:0x3fcddd089130 name="ContentType" value="application/vnd.openxmlformats-officedocument.extended-properties+xml">]>]>]>
On the "Searching a XML/HTML document" page on the Nokogiri site, there's an ATOM example
Let’s take this atom feed for example:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>
If we stick to the convention, we can grab all title tags like this
#doc.xpath('//xmlns:title') # => ["<title>Example Feed</title>", "<title>Atom-Powered Robots Run Amok</title>"]
Since your example input has
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
It should work to do
puts doc.xpath("//xmlns:Default[#Extension='png']")
# <Default Extension="png" ContentType="image/png"/>
Alternatively, you can use css instead
puts doc.css("Types Default[Extension='png']")
# <Default Extension="png" ContentType="image/png"/>
There's also a section on the page about not dealing with namespaces if you're interested

Anychart datetime on the y_axis

I am trying to show a trend of processes that run every day over time. Therefore I have a date which I call processing date, which I want to be shown on the X-Axis, and an end_time (date timestamp) since the end time can finish before or after midnight. Therefore I would like to be able to plot the data on the Y axis. I am using Oracle APEX v5, not sure which version of Anychart is running behind, maybe this is version related?
So far, I have not figured out a way for the values returned by my query to be plotted correctly when the values are dates. Is this possible? These are the settings of the y_axis, which when used do not show any data on the graph.
<y_axis >
<scale type="DateTime" mode="Normal" />
<title enabled="false" />
<labels enabled="true" position="Outside">
<font family="Tahoma" size="10" color="0x000000" />
<format>
<![CDATA[{%Value}]]>
</format>
</labels>
<major_grid enabled="False"/>
<minor_grid enabled="False"/>
</y_axis>
When I convert the dates to a number, they are plotted correctly, but so far I had no luck with trying to convert them back to a date using the settings/locale:
<settings>
<locale>
<date_time_format>
<format>%yyyy%MM%dd%HH%mm%ss</format>
</date_time_format>
</locale>
<animation enabled="false"/>
<no_data show_waiting_animation="False">
<label>
<text>#NO_DATA_MESSAGE#</text>
<font family="Verdana" bold="yes" size="10"/>
</label>
</no_data>
</settings>
I am using this to generate the test points with values:
select null as link, trunc (sysdate) as label, to_char((sysdate),'YYYYMMDDHH24MISS') as end_time from dual
union
select null as link, trunc (sysdate)-1 as label, to_char((sysdate)-1,'YYYYMMDDHH24MISS') as end_time from dual
order by label;
The Value of the point ends up being "2016%MM20%HH00%ss", I tried changing the upper/lower case of the formatting to no avail. From the output it looks like the %vars cannot be used concatenated, but if that is the case, then I cannot use values to convert the dates...
Maybe this is conceptually wrong, but so far I have not found a way to plot these correctly. I hope someone can shed some light on this.
Thank you in advance.
Edit:
I managed to do it ignoring the XML from Apex and creating my own datapoints (I will post the complete answer later), this is a sample of the XML:
<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
<anychart>
<settings>
<animation enabled="false" />
<no_data show_waiting_animation="False">
<label>
<text>No data found</text>
<font family="Verdana" bold="yes" size="10" />
</label>
</no_data>
<locale>
<date_time_format>
<format>
<![CDATA[%dd-%MM-%yyyy %HH:%mm]]>
</format>
</date_time_format>
</locale>
</settings>
<margin left="0" top="0" right="0" bottom="0" />
<charts>
<chart plot_type="CategorizedVertical" name="chart_52322125829114359521">
<chart_settings>
<title enabled="False" />
<chart_background>
<fill type="Solid" color="0xffffff" opacity="0" />
<border enabled="false" />
<corners type="Square" />
</chart_background>
<data_plot_background></data_plot_background>
<axes>
<y_axis>
<scale type="DateTime" mode="Normal" />
<title enabled="false" />
<labels enabled="true" position="Outside">
<font family="Tahoma" size="10" color="0x000000" />
<format>
<![CDATA[{%Value}{dateTimeFormat:%HH:%mm}]]>
</format>
</labels>
<major_grid enabled="True" interlaced="false">
<line color="Black" />
</major_grid>
<minor_grid enabled="True"></minor_grid>
</y_axis>
<x_axis>
<scale type="DateTime" mode="Normal" />
<title enabled="false" />
<labels enabled="true" position="Outside">
<font family="Tahoma" size="10" color="0x000000" />
<format>
<![CDATA[{%Value}{dateTimeFormat:%ddd %dd-%MM-%yyyy}]]>
</format>
</labels>
<major_grid enabled="True" interlaced="false">
<line color="Black" />
</major_grid>
<minor_grid enabled="True"></minor_grid>
</x_axis>
</axes>
<legend enabled="true" position="Right" align="Near" elements_layout="Vertical">
<title enabled="False"/>
<icon>
<marker enabled="true" />
</icon>
<font family="Tahoma" size="10" color="0x000000" />
</legend>
</chart_settings>
<data_plot_settings enable_3d_mode="false" default_series_type="Line">
<line_series>
<tooltip_settings enabled="true">
<format>
<![CDATA[{%SeriesName} {%Name} {%Value}{dateTimeFormat:%HH:%mm}]]>
</format>
<font family="Tahoma" size="10" color="0x000000" />
<position anchor="Center" valign="Top" halign="Center" padding="10" />
</tooltip_settings>
<label_settings enabled='&LABEL.' mode="Outside" multi_line_align="Center">
<format>
<![CDATA[{%Value}{dateTimeFormat:%HH:%mm}]]>
</format>
<background enabled="false" />
<font family="Tahoma" size="10" color="0x000000" />
</label_settings>
<line_style>
<line enabled="true" thickness="2" opacity="1" />
</line_style>
<marker_settings enabled="True" >
<marker type="HLine" />
</marker_settings>
</line_series>
</data_plot_settings>
<data>
<series name="AEG" type="Line">
<point name="01-03-2016 00:00" y="01-01-2001 23:35"></point>
<point name="02-03-2016 00:00" y="01-01-2001 23:16"></point>
<point name="03-03-2016 00:00" y="01-01-2001 23:20"></point>
<point name="04-03-2016 00:00" y="01-01-2001 23:32"></point>
<point name="07-03-2016 00:00" y="01-01-2001 23:28"></point>
<point name="08-03-2016 00:00" y="01-01-2001 23:24"></point>
<point name="09-03-2016 00:00" y="01-01-2001 23:14"></point>
<point name="10-03-2016 00:00" y="01-01-2001 23:30"></point>
<point name="11-03-2016 00:00" y="01-01-2001 23:54"></point>
<point name="14-03-2016 00:00" y="01-01-2001 23:52"></point>
<point name="15-03-2016 00:00" y="01-01-2001 23:27"></point>
<point name="16-03-2016 00:00" y="01-01-2001 23:51"></point>
<point name="17-03-2016 00:00" y="01-01-2001 23:34"></point>
<point name="18-03-2016 00:00" y="01-01-2001 23:32"></point>
<point name="21-03-2016 00:00" y="02-01-2001 00:02"></point>
</series>
</data>
</chart>
</charts>
</anychart>
A new question is, can you help me understand why the tooltip does not get the correct value on the %Name?
<![CDATA[{%SeriesName} {%Name} {%Value}{dateTimeFormat:%HH:%mm}]]>
In the tooltip I am getting the following text on the first point is AEG 01-01-1970 00:00 23:35 and I was expecting, based on the name 01-03-2016 00:00 23:35
Thanks!

Requesting guidance on slickgrid implementation for ASP.Net 3.5 web forms app

I'm looking for some guidance on how to implement the slickgrid in an ASP.net web application. The application queries a sql server 2005 database and currently uses gridviews to display the data. My goal is to eliminate the use of gridviews and replace them with the slickgrid. My code is below and I'm not sure how or where to start.
In my Dashboard.aspx.cs file (below) you will see that I bind my data to gridviews. How do I replace the databinding to utilize the slickgrid?
Thanks in advance for any help.
Dashboard.aspx page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 100%; table-layout: auto; border-top-style: none; border-right-style: none; border-left-style: none; border-collapse: collapse; border-bottom-style: none;">
<tr>
<td rowspan="8" align="center" valign="top">
<asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" Text="Refresh"
Width="100px" />
<br />
<asp:Button ID="Button2" runat="server" PostBackUrl="~/InterfaceListing.aspx" Text="Interface List"
Width="100px" />
</td>
<td style="color: #990000; font-family: Tahoma; height: 1px; text-align: left; width: 124px;">
</td>
<td style="width: 19px; height: 1px">
</td>
<td style="height: 1px; width: 216px;">
</td>
<td style="width: 20%; height: 19px">
</td>
</tr>
<tr>
<td style="color: #990000; font-family: Tahoma; height: 1px; text-align: left; width: 124px;">
<span style="font-size: 11pt; vertical-align: top;">
<asp:Label ID="Label2" runat="server" Text="Last 10 Jobs Executed" Width="307px"></asp:Label></span></td>
<td style="width: 19px; height: 1px">
</td>
<td style="height: 1px; width: 216px;">
<span style="font-size: 11pt; color: #990000; font-family: Tahoma">
<asp:Label ID="Label3" runat="server" Text="Interface Summary" Width="185px"></asp:Label></span></td>
<td style="width: 20%; height: 19px">
</td>
</tr>
<tr>
<td style="width: 124px; text-align: left; vertical-align: top;">
<asp:GridView ID="gvLast10" runat="server" AutoGenerateColumns="False" CellPadding="4"
Font-Names="Tahoma" Font-Size="8pt" ForeColor="#333333"
GridLines="None" Width="800px" >
<RowStyle BackColor="#FFFBD6" BorderStyle="Solid" BorderWidth="1px" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="InterfaceName" HeaderText="Name" SortExpression="InterfaceName">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="TotalTransactionCount" HeaderText="Transaction Count" SortExpression="TotalTransactionCount">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="ErrorsOccured" HeaderText="Status" SortExpression="ErrorsOccured">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="RunTime" HeaderText="Duration" ReadOnly="True" SortExpression="RunTime">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="Started" HeaderText="Started" SortExpression="DateBegan">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" BorderColor="#990000" BorderStyle="Solid" BorderWidth="1px"
Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td style="vertical-align: top; width: 19px; text-align: left">
</td>
<td style="width: 216px; vertical-align: top; text-align: left;">
<asp:GridView ID="gvPackageCount" runat="server" AutoGenerateColumns="False" CellPadding="4"
ForeColor="#333333" GridLines="None" Width="195px" Font-Names="Tahoma" Font-Size="8pt">
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
<Columns>
<asp:BoundField DataField="Status" HeaderText="Status" ReadOnly="True" SortExpression="Status"
Visible="False" />
<asp:BoundField DataField="Description" HeaderText="Description" ReadOnly="True"
SortExpression="Description">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Count" HeaderText="Count" ReadOnly="True"
SortExpression="Count">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" BorderColor="#990000" BorderStyle="Solid" BorderWidth="1px" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td style="width: 20%; height: 19px">
</td>
</tr>
<tr>
<td style="width: 124px; color: #990000; background-color: white; height: 19px;">
<span style="font-size: 11pt; font-family: Tahoma">
<br />
<asp:Label ID="Label1" runat="server" Text="Next 10 Jobs Scheduled" Width="236px"></asp:Label></span></td>
<td style="width: 19px; height: 19px">
</td>
<td style="width: 216px; height: 19px;">
<span style="font-size: 11pt; font-family: Tahoma"></span>
</td>
<td style="width: 20%; height: 19px">
</td>
</tr>
<tr>
<td style="width: 124px; vertical-align: top; height: 147px;">
<asp:GridView ID="gvNext10" runat="server" AutoGenerateColumns="False" CellPadding="4"
Font-Names="Tahoma" Font-Size="8pt" ForeColor="#333333"
GridLines="None" Width="800px">
<RowStyle BackColor="#FFFBD6" BorderStyle="Solid" BorderWidth="1px" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="Interfacename" HeaderText="Name" SortExpression="Interfacename">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Next Run" HeaderText="Next Run" ReadOnly="True" SortExpression="Next Run">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" BorderColor="#990000" BorderWidth="1px" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td style="width: 19px; height: 147px">
</td>
<td style="width: 216px; height: 147px; vertical-align: bottom; text-align: center;">
</td>
<td style="width: 20%; height: 19px">
</td>
</tr>
<tr>
<td style="vertical-align: top; width: 124px">
</td>
<td style="width: 19px">
</td>
<td style="width: 216px">
</td>
<td style="width: 20%; height: 19px">
</td>
</tr>
<tr>
<td style="color: #990000; font-family: Tahoma; height: 1px; text-align: left; width: 124px;">
<span style="font-size: 11pt; vertical-align: top;">
<asp:Label ID="Label4" runat="server" Text="Jobs In Process"
Width="307px"></asp:Label></span></td>
<td style="width: 19px; height: 1px">
</td>
<td style="height: 1px; width: 216px;">
</td>
<td style="width: 20%; height: 19px">
</td>
</tr>
<tr>
<td style="color: #990000; font-family: Tahoma; height: 1px; text-align: left; width: 124px;">
<asp:GridView ID="gvInProcess" runat="server" AutoGenerateColumns="False" CellPadding="4"
Font-Names="Tahoma" Font-Size="8pt" ForeColor="#333333"
GridLines="None" Width="800px" >
<RowStyle BackColor="#FFFBD6" BorderStyle="Solid" BorderWidth="1px" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="InterfaceName" HeaderText="Name" SortExpression="InterfaceName">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Started" HeaderText="Started" SortExpression="DateBegan">
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="RunTime" HeaderText="Duration"
SortExpression="RunTime" ReadOnly="True">
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" BorderColor="#990000" BorderStyle="Solid" BorderWidth="1px"
Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</td>
<td style="width: 19px; height: 1px">
</td>
<td style="height: 1px; width: 216px;">
</td>
<td style="width: 20%; height: 19px">
</td>
</tr>
</table>
<br />
<br />
</div>
</form>
</body>
</html>
Dashboard.aspx.cs
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace IntegrationSupport
{
public partial class Dashboard : System.Web.UI.Page
{
ClassData cd = new ClassData();
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt1 = cd.Dashboard("Summary");
gvPackageCount.DataSource = dt1;
gvPackageCount.DataBind();
DataTable dt2 = cd.Dashboard("Last10");
gvLast10.DataSource = dt2;
gvLast10.DataBind();
DataTable dt3 = cd.Dashboard("Next10");
gvNext10.DataSource = dt3;
gvNext10.DataBind();
DataTable dt4 = cd.Dashboard("InProcess");
gvInProcess.DataSource = dt4;
gvInProcess.DataBind();
}
protected void btnRefresh_Click(object sender, EventArgs e)
{
Response.Redirect("~/Dashboard.aspx");
}
}
}
ClassData.cs:
public DataTable Dashboard(string Section)
{
//Get Dashboard Sections...
string sStoredProc = string.Empty;
switch (Section)
{
case "Summary":
sStoredProc = "InterfaceListing_DashboardDataset";
break;
case "Last10":
sStoredProc = "InterfaceListing_Dashboard_6Last10Jobs";
break;
case "Next10":
sStoredProc = "InterfaceListing_Dashboard_7Next10Jobs";
break;
case "InProcess":
sStoredProc = "InterfaceListing_Dashboard_JobsInProcess";
break;
default:
sStoredProc = "";
break;
}
SqlCommand cmd = new SqlCommand();
Open();
cmd.Connection = con;
cmd.CommandText = sStoredProc;
cmd.CommandType = CommandType.StoredProcedure;
Ada = new SqlDataAdapter(cmd);
DataTable dtInterface = new DataTable();
Ada.Fill(dtInterface);
return dtInterface;
}
I'm looking for some guidance on how to implement the slickgrid in an ASP.net web >application. The application queries a sql server 2005 database and currently uses gridviews >to display the data. My goal is to eliminate the use of gridviews and replace them with the >slickgrid. My code is below and I'm not sure how or where to start.
this will help u:
http://www.codeproject.com/Articles/183301/Real-Time-Stock-Quotes-Stock-Alerts-Indicators-Usi

Resources