Beispiel #1
0
        private void Populate(InstanceRuntimeDetails runtimeDetails)
        {
            Children.Clear();

            RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Auto)
            });

            var header = new Label();

            header.Text     = runtimeDetails.Name;
            header.FontSize = 18;
            header.Margin   = new Thickness(5, 0, 5, 0);
            header.SetValue(Grid.ColumnSpanProperty, 4);
            header.FontAttributes = FontAttributes.Bold;
            Children.Add(header);

            RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Auto)
            });

            var statusLabelSection = new StackLayout();

            statusLabelSection.Orientation = StackOrientation.Horizontal;
            statusLabelSection.SetValue(Grid.ColumnSpanProperty, 4);
            statusLabelSection.SetValue(Grid.RowProperty, RowDefinitions.Count - 1);

            var statusLabel = new Label();

            statusLabel.Text           = "Status:";
            statusLabel.FontSize       = 16;
            statusLabel.Margin         = new Thickness(5, 0, 5, 0);
            statusLabel.FontAttributes = FontAttributes.Bold;
            statusLabelSection.Children.Add(statusLabel);

            var label = new Label();

            label.Text     = runtimeDetails.Status.ToString();
            label.FontSize = 16;
            statusLabelSection.Children.Add(label);

            Children.Add(statusLabelSection);

            AddSectionHeader(5, "fa-headphones", PlatformManagerResources.InstanceDetails_Listeners);
            foreach (var listener in runtimeDetails.Listeners)
            {
                AddItem(30, listener.Name, listener.Status.ToString(), listener.ListenerType, LISTENER_TYPE, listener.Id);
            }

            AddSectionHeader(5, "fa-share-alt", PlatformManagerResources.InstanceDetails_Planner);
            AddItem(30, runtimeDetails.Planner.Name, runtimeDetails.Planner.Status.ToString(), "", PLANNER_TYPE, runtimeDetails.Planner.Id);

            foreach (var deviceConfig in runtimeDetails.DeviceConfigurations)
            {
                AddDeviceConfiguration(deviceConfig);
            }
        }
        private void Populate(InstanceRuntimeDetails runtimeDetails)
        {
            Children.Clear();

            AddItem(0, runtimeDetails.Name, runtimeDetails.Status.ToString(), INSTANCE_TYPE, runtimeDetails.Id);

            AddSectionHeader(0, PlatformManagerResources.InstanceDetails_Listeners);
            foreach (var listener in runtimeDetails.Listeners)
            {
                AddItem(10, listener.Name, listener.Status.ToString(), LISTENER_TYPE, listener.Id);
            }

            AddSectionHeader(0, PlatformManagerResources.InstanceDetails_Planner);
            AddItem(10, runtimeDetails.Planner.Name, runtimeDetails.Planner.Status.ToString(), PLANNER_TYPE, runtimeDetails.Planner.Id);

            AddSectionHeader(0, PlatformManagerResources.InstanceDetails_DeviceConfigurations);
            foreach (var deviceConfig in runtimeDetails.DeviceConfigurations)
            {
                AddItem(10, deviceConfig.Name, "", "", deviceConfig.Id);
                AddSectionHeader(10, PlatformManagerResources.InstanceDetails_Routes);
                foreach (var route in deviceConfig.Routes)
                {
                    AddItem(20, route.Name, "", "", route.Id);
                    AddSectionHeader(20, PlatformManagerResources.InstanceDetails_MessageTypes);
                    foreach (var msgType in route.MessageTypes)
                    {
                        AddItem(30, msgType.Name, "", MESSAGETYPE_TYPE, msgType.Id);
                    }

                    AddSectionHeader(20, PlatformManagerResources.InstanceDetails_PipelineModules);
                    foreach (var pipelienModule in route.PipelineModules)
                    {
                        AddItem(30, pipelienModule.Name, pipelienModule.Status.ToString(), PIPELINEMODULE_TYPE, pipelienModule.Id);
                    }
                }
            }
        }