|
@@ -2,21 +2,36 @@ import React, { Component } from 'react';
|
|
|
|
|
|
import Service from './Service.jsx';
|
|
|
|
|
|
+
|
|
|
export default class Services extends Component {
|
|
|
+
|
|
|
+ constructor(props) {
|
|
|
+ super(props);
|
|
|
+
|
|
|
+ this.state = {servicesList: [
|
|
|
+ { link_to: 'https://start.mephi.ru/start', name: 'Стартовая страница' },
|
|
|
+ { link_to: 'https://login.mephi.ru/login?service=https://voip.mephi.ru/login', name: 'IP-телефония' },
|
|
|
+ { link_to: 'https://login.mephi.ru/login?service=https://cps.mephi.ru', name: 'Система учёта рабочего времени' },
|
|
|
+ { link_to: 'https://login.mephi.ru/login?service=https://tasks.mephi.ru', name: 'Система «Задачи»' },
|
|
|
+ { link_to: 'https://login.mephi.ru/login?service=https://chat.mephi.ru', name: 'Чат' },
|
|
|
+ { link_to: 'https://login.mephi.ru/login?service=https://dc.mephi.ru', name: 'ЦОД' },
|
|
|
+ { link_to: 'https://login.mephi.ru/login?service=https://cloud.campus.mephi.ru/apps/user_cas/login', name: 'Файловое облако' },
|
|
|
+ ]};
|
|
|
+
|
|
|
+ document.Services = this;
|
|
|
+ }
|
|
|
+
|
|
|
get() {
|
|
|
- return [
|
|
|
- { link_to: 'https://start.mephi.ru/start', name: 'Стартовая страница' },
|
|
|
- { link_to: 'https://login.mephi.ru/login?service=https://voip.mephi.ru/login', name: 'IP-телефония' },
|
|
|
- { link_to: 'https://login.mephi.ru/login?service=https://cps.mephi.ru', name: 'Система учёта рабочего времени' },
|
|
|
- { link_to: 'https://login.mephi.ru/login?service=https://tasks.mephi.ru', name: 'Система «Задачи»' },
|
|
|
- { link_to: 'https://login.mephi.ru/login?service=https://chat.mephi.ru', name: 'Чат' },
|
|
|
- { link_to: 'https://login.mephi.ru/login?service=https://dc.mephi.ru', name: 'ЦОД' },
|
|
|
- { link_to: 'https://login.mephi.ru/login?service=https://cloud.campus.mephi.ru/apps/user_cas/login', name: 'Файловое облако' },
|
|
|
- ];
|
|
|
+ return this.state.servicesList;
|
|
|
+ }
|
|
|
+
|
|
|
+ onChange() {
|
|
|
+ var link_to = $('select#services option:selected')[0].dataset.link;
|
|
|
+ $('iframe').attr('src', link_to);
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
- return <select id='services' onChange={function(ev){var link_to = ev.target.selectedOptions[0].dataset.link;$('iframe').attr('src', link_to)}}>
|
|
|
+ return <select id='services' onChange={this.onChange}>
|
|
|
{this.get().map((service) => (
|
|
|
<Service key={service.link_to} service={service}/>
|
|
|
))}
|